/* ═══════════════════════════════════
   MindWeb - Main Stylesheet
   Dark theme matching mindweb.pt
═══════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --blue: #4A7FA5;
    --blue-hover: #5a92b8;
    --blue-dark: #3a6a8e;
    --blue-glow: rgba(74, 127, 165, 0.12);
    --dark-bg: #0c0c0c;
    --dark-section: #111111;
    --dark-card: #181818;
    --dark-border: #222222;
    --dark-input: #1a1a1a;
    --white: #ffffff;
    --text: #e0e0e0;
    --text-muted: #999999;
    --text-dim: #666666;
    --font: 'Poppins', sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--dark-bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ═══════════ HEADER ═══════════ */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between; height: 72px;
}

.header-logo img { height: 38px; }

.header-nav {
    display: flex; align-items: center; gap: 4px; list-style: none;
}

.header-nav a {
    font-size: 0.88rem; font-weight: 500; color: var(--text-muted);
    padding: 8px 16px; border-radius: 6px; transition: all 0.25s var(--ease);
}

.header-nav a:hover,
.header-nav a.active { color: var(--white); }

.header-right { display: flex; align-items: center; gap: 16px; }

.header-social { display: flex; gap: 8px; }
.header-social a {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--text-muted); transition: all 0.25s; font-size: 0.85rem;
}
.header-social a:hover { color: var(--blue); background: var(--blue-glow); }

.lang-switch {
    display: flex; gap: 1px; background: var(--dark-border); border-radius: 6px; overflow: hidden;
}
.lang-switch a {
    background: var(--dark-card); color: var(--text-dim);
    font-size: 0.72rem; font-weight: 600; padding: 6px 10px;
    transition: all 0.2s; letter-spacing: 0.06em;
    display: inline-block; text-align: center;
}
.lang-switch a.active { background: var(--blue); color: var(--white); }
.lang-switch a:hover:not(.active) { color: var(--text); }

.btn-header {
    background: var(--blue); color: var(--white);
    font-size: 0.82rem; font-weight: 600; padding: 9px 22px;
    border-radius: 6px; transition: all 0.25s; display: inline-block;
}
.btn-header:hover { background: var(--blue-hover); }

/* Mobile */
.menu-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px; z-index: 1002;
}
.menu-toggle span {
    display: block; width: 22px; height: 2px; background: var(--white);
    border-radius: 1px; transition: all 0.3s var(--ease);
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 999;
}
.mobile-overlay.open { display: block; }

/* ═══════════ HERO ═══════════ */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(74, 127, 165, 0.08) 0%, transparent 70%);
    border-radius: 50%; pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-logo { width: 180px; margin: 0 auto 40px; animation: heroIn 1s var(--ease) both; }
.hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem); font-weight: 300;
    color: var(--white); margin-bottom: 12px;
    animation: heroIn 1s var(--ease) 0.15s both;
}
.hero h1 strong { font-weight: 600; color: var(--blue); }
.hero .tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 300;
    color: var(--text-muted); margin-bottom: 48px;
    animation: heroIn 1s var(--ease) 0.3s both;
}
.hero-btns {
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
    animation: heroIn 1s var(--ease) 0.45s both;
}
@keyframes heroIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════ BUTTONS ═══════════ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; border-radius: 8px; font-size: 0.9rem;
    font-weight: 600; cursor: pointer; transition: all 0.3s var(--ease);
    font-family: var(--font); border: none;
}
.btn-primary {
    background: var(--blue); color: var(--white);
    box-shadow: 0 4px 20px rgba(74, 127, 165, 0.2);
}
.btn-primary:hover {
    background: var(--blue-hover); transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(74, 127, 165, 0.3);
}
.btn-outline {
    background: transparent; color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

/* ═══════════ SECTIONS ═══════════ */
.section { padding: 100px 0; }
.section-alt { background: var(--dark-section); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-label {
    font-size: 0.78rem; font-weight: 600; color: var(--blue);
    text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 12px;
}
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600;
    color: var(--white); margin-bottom: 16px;
}
.section-desc { font-size: 0.95rem; color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.section-link {
    display: inline-block; color: var(--blue); font-size: 0.88rem;
    font-weight: 600; margin-top: 8px; transition: color 0.2s;
}
.section-link:hover { color: var(--blue-hover); }

/* ═══════════ SOLUTION CARDS ═══════════ */
.solutions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sol-card {
    background: var(--dark-card); border: 1px solid var(--dark-border);
    border-radius: 12px; padding: 32px 24px; text-align: center;
    transition: all 0.35s var(--ease); position: relative; overflow: hidden;
}
.sol-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--blue);
    transform: scaleX(0); transition: transform 0.35s var(--ease);
}
.sol-card:hover {
    transform: translateY(-6px); border-color: rgba(74, 127, 165, 0.3);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.sol-card:hover::after { transform: scaleX(1); }
.sol-card-img { width: 72px; height: 72px; margin: 0 auto 20px; display: block; }
.sol-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--white); margin-bottom: 12px; }
.sol-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }

.btn-quote {
    display: inline-block; background: transparent;
    border: 1px solid var(--blue); color: var(--blue);
    font-size: 0.8rem; font-weight: 600; padding: 8px 20px;
    border-radius: 6px; cursor: pointer; transition: all 0.25s var(--ease);
    font-family: var(--font);
}
.btn-quote:hover { background: var(--blue); color: var(--white); }

.btn-more {
    display: inline-block; color: var(--blue); font-size: 0.82rem;
    font-weight: 500; margin-top: 8px; cursor: pointer; transition: color 0.2s;
}
.btn-more:hover { color: var(--blue-hover); text-decoration: underline; }

/* ═══════════ BRAND STRIP ═══════════ */
.brand-strip { padding: 80px 0; text-align: center; }
.brand-strip h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 300;
    color: var(--white); margin-bottom: 8px;
}
.brand-strip h2 strong { font-weight: 600; color: var(--blue); }
.brand-strip p { color: var(--text-muted); font-size: 0.92rem; }

/* ═══════════ CTA BANNER ═══════════ */
.cta-banner {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    padding: 64px 0; text-align: center;
}
.cta-banner h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 600;
    color: var(--white); margin-bottom: 12px;
}
.cta-banner p { color: rgba(255, 255, 255, 0.8); margin-bottom: 28px; font-size: 0.95rem; }
.btn-white {
    background: var(--white); color: var(--blue-dark);
    font-size: 0.88rem; font-weight: 600; padding: 13px 32px;
    border-radius: 8px; border: none; cursor: pointer;
    transition: all 0.3s var(--ease); font-family: var(--font);
    display: inline-block;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }

/* ═══════════ PAGE HEADER ═══════════ */
.page-header {
    padding: 120px 0 60px; text-align: center; position: relative;
}
.page-header::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%); width: 60px; height: 3px;
    background: var(--blue); border-radius: 2px;
}
.page-header h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 600; color: var(--white);
}

/* ═══════════ SOLUTION DETAIL ═══════════ */
.sol-detail-intro { text-align: center; padding: 60px 0 40px; }
.sol-detail-intro p { font-size: 1.05rem; color: var(--text-muted); max-width: 650px; margin: 0 auto; }

.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding-bottom: 80px; }
.feat-card {
    background: var(--dark-card); border: 1px solid var(--dark-border);
    border-radius: 10px; padding: 28px; transition: all 0.3s var(--ease);
}
.feat-card:hover { border-color: rgba(74, 127, 165, 0.25); }
.feat-card h4 { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 8px; }
.feat-card p { font-size: 0.88rem; color: var(--text-muted); }

.sol-back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--blue); font-size: 0.85rem; font-weight: 500;
    margin-bottom: 16px; transition: gap 0.2s;
}
.sol-back:hover { gap: 10px; }

/* ═══════════ CONTACT ═══════════ */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-left h2 { font-size: 1.8rem; font-weight: 600; color: var(--white); margin-bottom: 16px; }
.contact-left > p { color: var(--text-muted); margin-bottom: 36px; }

.contact-detail { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.cd-icon {
    width: 44px; height: 44px; background: var(--blue-glow);
    border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cd-label {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-dim); margin-bottom: 2px;
}
.cd-value { color: var(--white); font-weight: 500; }
.cd-value a { color: var(--white); }
.cd-value a:hover { color: var(--blue); }

.contact-social { display: flex; gap: 10px; margin-top: 24px; }
.contact-social a {
    width: 42px; height: 42px; background: var(--dark-card);
    border: 1px solid var(--dark-border); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1rem; transition: all 0.25s;
}
.contact-social a:hover { color: var(--blue); border-color: var(--blue); background: var(--blue-glow); }

.contact-form-box {
    background: var(--dark-card); border: 1px solid var(--dark-border);
    border-radius: 12px; padding: 40px;
}
.contact-form-box h3 { font-size: 1.15rem; font-weight: 600; color: var(--white); margin-bottom: 24px; }

/* Forms */
.fg { margin-bottom: 18px; }
.fg label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.fg input, .fg textarea, .fg select {
    width: 100%; background: var(--dark-input); border: 1px solid var(--dark-border);
    border-radius: 8px; padding: 12px 14px; color: var(--text);
    font-family: var(--font); font-size: 0.88rem;
    transition: border-color 0.25s; outline: none;
}
.fg input:focus, .fg textarea:focus, .fg select:focus { border-color: var(--blue); }
.fg textarea { min-height: 110px; resize: vertical; }
.fg select option { background: var(--dark-card); }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn-submit {
    width: 100%; background: var(--blue); color: var(--white);
    font-size: 0.9rem; font-weight: 600; padding: 14px;
    border-radius: 8px; border: none; cursor: pointer;
    font-family: var(--font); transition: all 0.25s; margin-top: 6px;
}
.btn-submit:hover { background: var(--blue-hover); }

/* Alerts */
.alert, .form-msg {
    padding: 14px 20px; border-radius: 10px; margin-bottom: 20px;
    font-size: 0.88rem; font-weight: 500; text-align: center;
    display: none;
}
.alert { display: block; }
.alert-success, .form-msg-success {
    background: rgba(46, 160, 67, 0.15); color: #4ade80;
    border: 1px solid rgba(46, 160, 67, 0.3);
}
.alert-error, .form-msg-error {
    background: rgba(220, 53, 69, 0.15); color: #f87171;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* ═══════════ MODAL ═══════════ */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.75); z-index: 2000;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--dark-card); border: 1px solid var(--dark-border);
    border-radius: 14px; padding: 40px; width: 100%; max-width: 460px;
    position: relative; animation: modalIn 0.3s var(--ease) both;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
    position: absolute; top: 14px; right: 14px;
    background: none; border: none; color: var(--text-dim);
    font-size: 1.4rem; cursor: pointer; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; transition: all 0.2s;
}
.modal-close:hover { color: var(--white); background: rgba(255, 255, 255, 0.05); }
.modal h3 { font-size: 1.2rem; font-weight: 600; color: var(--white); margin-bottom: 24px; }
.modal h3 span { color: var(--blue); }

/* ═══════════ FOOTER ═══════════ */
.footer {
    background: var(--dark-section); border-top: 1px solid var(--dark-border);
    padding: 60px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand img { height: 36px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.85rem; color: var(--text-dim); line-height: 1.7; }
.footer h4 { font-size: 0.9rem; font-weight: 600; color: var(--white); margin-bottom: 18px; }
.footer-menu { list-style: none; }
.footer-menu li { margin-bottom: 10px; }
.footer-menu a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.2s; }
.footer-menu a:hover { color: var(--blue); }
.footer-contact-item { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.footer-contact-item a { color: var(--text-muted); }
.footer-contact-item a:hover { color: var(--blue); }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a {
    width: 36px; height: 36px; border: 1px solid var(--dark-border);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: var(--text-dim); font-size: 0.9rem; transition: all 0.2s;
}
.footer-social a:hover { color: var(--blue); border-color: var(--blue); }
.footer-bottom {
    border-top: 1px solid var(--dark-border); padding-top: 24px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 0.8rem; color: var(--text-dim); }
.footer-copy a { color: var(--blue); }
.footer-privacy-link { font-size: 0.8rem; color: var(--text-dim); transition: color 0.2s; }
.footer-privacy-link:hover { color: var(--blue); }

/* ═══════════ SCROLL ANIM ═══════════ */
/* Cards visible by default. JS adds .js-ready to body, then hides them for animation */
.anim { opacity: 1; transform: translateY(0); transition: all 0.6s var(--ease); }
.js-ready .anim { opacity: 0; transform: translateY(24px); }
.js-ready .anim.visible { opacity: 1; transform: translateY(0); }

/* SVG Icons */
.icon-svg { width: 18px; height: 18px; fill: currentColor; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1024px) {
    .solutions-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-nav {
        position: fixed; top: 0; right: -300px; width: 280px; height: 100vh;
        background: var(--dark-card); border-left: 1px solid var(--dark-border);
        flex-direction: column; align-items: flex-start;
        padding: 80px 24px 40px; gap: 4px;
        transition: right 0.35s var(--ease); z-index: 1001;
    }
    .header-nav.open { right: 0; }
    .header-nav a { width: 100%; padding: 12px 14px; font-size: 0.95rem; }
    .header-right .header-social,
    .header-right .btn-header { display: none; }
    .menu-toggle { display: flex; }

    .solutions-grid { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .fg-row { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .section { padding: 70px 0; }
    .contact-form-box { padding: 28px; }
}
