/* Fontes locais (latin + latin-ext) */
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(fonts/space-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(fonts/space-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

        /* ============================================================
           CSS VARIABLES
        ============================================================ */
        :root {
            --bg:           #040913;
            --bg-alt:       #07111f;
            --bg-card:      rgba(82, 129, 212, 0.04);
            --accent:       #5281d4;
            --accent-blue:  #5281d4;   /* preenchimento dos botões (sólido) */
            --accent-blue-hover: #4070c2;
            --accent-dim:   rgba(82, 129, 212, 0.14);
            --text:         #eef4ff;
            --text-muted:   rgba(238, 244, 255, 0.72);
            --text-faint:   rgba(238, 244, 255, 0.64);
            --line-faint:   rgba(238, 244, 255, 0.22);
            --border:       rgba(82, 129, 212, 0.11);
            --border-hover: rgba(82, 129, 212, 0.36);
            --glow:         0 0 48px rgba(82, 129, 212, 0.13);
            --nav-h:        70px;
            --r:            12px;
            --r-sm:         6px;
            --ease:         0.28s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* ============================================================
           RESET & BASE
        ============================================================ */
        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

        html {
            scroll-behavior: smooth;
            scroll-padding-top: var(--nav-h);
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg);
            color: var(--text);
            overflow-x: hidden;
            line-height: 1.65;
        }

        h1, h2, h3, h4 {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            line-height: 1.1;
            letter-spacing: -0.02em;
        }

        .container {
            max-width: 1180px;
            margin: 0 auto;
            padding: 0 2rem;
        }

        ::-webkit-scrollbar { width: 4px; }
        ::-webkit-scrollbar-track { background: var(--bg); }
        ::-webkit-scrollbar-thumb { background: rgba(82, 129, 212,0.25); border-radius: 4px; }

        /* ============================================================
           BACKGROUND LAYERS
        ============================================================ */
        #matrixCanvas {
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            opacity: 0.07;
            pointer-events: none;
        }

        #particlesLayer {
            position: fixed;
            inset: 0;
            z-index: 1;
            pointer-events: none;
            overflow: hidden;
        }

        .scan-line {
            position: fixed;
            top: 0; left: 0; right: 0;
            height: 2px;
            background: linear-gradient(90deg, transparent 0%, rgba(82, 129, 212,0.45) 50%, transparent 100%);
            z-index: 2;
            pointer-events: none;
            animation: scanDown 10s linear infinite;
        }

        @keyframes scanDown {
            from { top: -2px; }
            to   { top: 100vh; }
        }

        /* ============================================================
           NAVBAR
        ============================================================ */
        #navbar {
            position: fixed;
            top: 0; left: 0; right: 0;
            z-index: 100;
            height: var(--nav-h);
            border-bottom: 1px solid transparent;
            transition: background var(--ease), border-color var(--ease);
        }

        #navbar.scrolled {
            background: rgba(4, 9, 19, 0.93);
            backdrop-filter: blur(22px);
            -webkit-backdrop-filter: blur(22px);
            border-bottom-color: var(--border);
        }

        .nav-inner {
            max-width: 1180px;
            margin: 0 auto;
            padding: 0 2rem;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 2rem;
        }

        .nav-brand {
            display: flex;
            align-items: center;
            gap: 0.7rem;
            text-decoration: none;
            flex-shrink: 0;
        }
        .nav-brand img {
            height: 36px;
            width: auto;
        }

        .nav-brand-text {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 1.15rem;
            color: var(--accent);
            letter-spacing: -0.01em;
        }

        .nav-brand-text .a { color: var(--text); }

        .nav-right {
            display: flex;
            align-items: center;
            gap: 2rem;
        }

        .nav-link {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.855rem;
            font-weight: 500;
            letter-spacing: 0.02em;
            transition: color var(--ease);
        }

        .nav-link:hover { color: var(--accent); }

        .lang-wrap {
            display: flex;
            align-items: center;
            gap: 2px;
            border: 1px solid var(--border);
            border-radius: 5px;
            padding: 3px;
            background: rgba(0,0,0,0.35);
        }

        .lang-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            font-weight: 500;
            letter-spacing: 0.08em;
            cursor: pointer;
            padding: 0.22rem 0.55rem;
            border-radius: 3px;
            transition: all var(--ease);
        }

        .lang-btn.active      { background: var(--accent-blue); color: #fff; }
        .lang-btn:not(.active):hover { color: var(--accent); }

        .btn-cta {
            background: transparent;
            border: 1px solid var(--accent);
            color: var(--accent);
            padding: 0.48rem 1.1rem;
            border-radius: var(--r-sm);
            font-size: 0.77rem;
            font-weight: 600;
            letter-spacing: 0.07em;
            text-transform: uppercase;
            cursor: pointer;
            font-family: 'JetBrains Mono', monospace;
            transition: all var(--ease);
            white-space: nowrap;
        }

        .btn-cta:hover {
            background: var(--accent-blue);
            color: #fff;
            box-shadow: 0 0 22px rgba(82, 129, 212,0.35);
        }

        .hamburger {
            display: none;
            flex-direction: column;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px;
        }

        .hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
        .hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
        .hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

        .hamburger span {
            display: block;
            width: 22px;
            height: 2px;
            background: var(--text);
            border-radius: 2px;
            transition: all var(--ease);
        }

        .mobile-menu {
            display: none;
            position: fixed;
            top: var(--nav-h);
            left: 0; right: 0;
            background: rgba(4, 9, 19, 0.97);
            backdrop-filter: blur(22px);
            border-bottom: 1px solid var(--border);
            padding: 1.5rem 2rem;
            flex-direction: column;
            gap: 1rem;
            z-index: 99;
        }

        .mobile-menu.open { display: flex; }

        .mobile-menu .nav-link {
            font-size: 1rem;
            padding: 0.5rem 0;
            border-bottom: 1px solid var(--border);
        }

        /* ============================================================
           HERO
        ============================================================ */
        #hero {
            position: relative;
            min-height: 100vh;
            min-height: 100svh;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            overflow: hidden;
        }

        .hero-grid {
            position: absolute;
            inset: 0;
            background-image:
                linear-gradient(to right,  rgba(82, 129, 212,0.04) 1px, transparent 1px),
                linear-gradient(to bottom, rgba(82, 129, 212,0.04) 1px, transparent 1px);
            background-size: 80px 80px;
            mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(0,0,0,0.55) 20%, transparent 70%);
            -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(0,0,0,0.55) 20%, transparent 70%);
            pointer-events: none;
        }

        .hero-radial {
            position: absolute;
            width: 900px;
            height: 900px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(82, 129, 212,0.055) 0%, transparent 68%);
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
        }

        .hero-content {
            position: relative;
            z-index: 20;
            text-align: center;
            padding: calc(var(--nav-h) + 3rem) 2rem 5rem;
            max-width: 820px;
        }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.6rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.74rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--accent);
            background: rgba(82, 129, 212,0.07);
            border: 1px solid rgba(82, 129, 212,0.2);
            padding: 0.38rem 1rem;
            border-radius: 2rem;
            margin-bottom: 2.5rem;
        }

        .hero-badge::before {
            content: '';
            width: 6px; height: 6px;
            border-radius: 50%;
            background: var(--accent);
            box-shadow: 0 0 9px var(--accent);
            animation: blink 2s ease-in-out infinite;
        }

        @keyframes blink {
            0%,100% { opacity: 1; }
            50%      { opacity: 0.2; }
        }
        .topicon {
            height: 36px;
            width: auto;
        }
        .hero-logo {
            display: block;
            width: clamp(110px, 10vw, 150px);
            height: auto;
            margin: 0 auto 1.75rem;
            filter: drop-shadow(0 0 24px rgba(82,129,212,0.45));
            animation: logoPulse 5s ease-in-out infinite;
        }

        .hero-logo-fallback {
            width: clamp(80px, 14vw, 130px);
            height: clamp(80px, 14vw, 130px);
            border: 2px solid var(--border-hover);
            border-radius: 18px;
            display: none;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.75rem;
            font-family: 'JetBrains Mono', monospace;
            font-weight: 700;
            font-size: 2rem;
            color: var(--accent);
        }

        @keyframes logoPulse {
            0%,100% { filter: drop-shadow(0 0 20px rgba(82, 129, 212,0.3)); }
            50%      { filter: drop-shadow(0 0 38px rgba(82, 129, 212,0.65)); }
        }

        .hero-title {
            font-size: clamp(3.2rem, 9vw, 6.5rem);
            font-weight: 700;
            color: var(--accent);
            margin-bottom: 1rem;
            letter-spacing: -0.04em;
        }

        .hero-title .a { color: var(--text); }

        .hero-tagline {
            font-size: clamp(1rem, 2.4vw, 1.3rem);
            color: var(--text-muted);
            margin-bottom: 1.25rem;
            line-height: 1.7;
            max-width: 620px;
            margin-left: auto;
            margin-right: auto;
            text-wrap: balance;
        }

        .hero-tagline strong { color: var(--text); font-weight: 600; }

        .hero-intro {
            font-size: clamp(0.85rem, 1.8vw, 0.98rem);
            color: rgba(238, 244, 255, 0.62);
            max-width: 560px;
            margin: 0 auto 2.75rem;
            line-height: 1.7;
        }

        .hero-actions {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn-primary {
            background: var(--accent-blue);
            color: #fff;
            border: none;
            padding: 0.875rem 2rem;
            border-radius: var(--r-sm);
            font-size: 0.875rem;
            font-weight: 600;
            letter-spacing: 0.04em;
            cursor: pointer;
            font-family: inherit;
            transition: all var(--ease);
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            text-decoration: none;
            box-shadow: 0 4px 22px rgba(82, 129, 212,0.22);
        }

        .btn-primary:hover {
            background: var(--accent-blue-hover);
            transform: translateY(-2px);
            box-shadow: 0 8px 32px rgba(82, 129, 212,0.38);
        }

        .btn-secondary {
            background: transparent;
            color: var(--text-muted);
            border: 1px solid var(--border);
            padding: 0.875rem 2rem;
            border-radius: var(--r-sm);
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            font-family: inherit;
            transition: all var(--ease);
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            text-decoration: none;
        }

        .btn-secondary:hover {
            border-color: var(--accent);
            color: var(--accent);
            background: rgba(82, 129, 212,0.05);
        }

        .hero-scroll {
            position: absolute;
            bottom: 2.5rem; left: 50%;
            transform: translateX(-50%);
            z-index: 20;
        }

        .scroll-chevron {
            width: 18px; height: 18px;
            border-right: 1.5px solid var(--line-faint);
            border-bottom: 1.5px solid var(--line-faint);
            transform: rotate(45deg);
            animation: chevronBounce 2.2s ease-in-out infinite;
        }

        @keyframes chevronBounce {
            0%,100% { transform: rotate(45deg) translateY(0); opacity: 0.3; }
            50%      { transform: rotate(45deg) translateY(6px); opacity: 1; }
        }

        /* ============================================================
           SECTION SHARED
        ============================================================ */
        section { position: relative; z-index: 10; }

        .section-tag {
            display: inline-block;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.76rem;
            letter-spacing: 0.16em;
            color: var(--accent);
            text-transform: uppercase;
            margin-bottom: 1rem;
        }

        .section-header {
            text-align: center;
            margin-bottom: 4rem;
        }

        .section-header h2 {
            font-size: clamp(2rem, 5vw, 3.4rem);
            color: var(--text);
            margin-bottom: 1rem;
        }

        .section-header p {
            color: var(--text-muted);
            max-width: 560px;
            margin: 0 auto;
            font-size: 0.95rem;
            line-height: 1.75;
        }

        /* ============================================================
           CAPABILITIES / PILLARS
        ============================================================ */
        #capabilities {
            padding: 8rem 0;
            background: var(--bg);
        }

        .cap-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.4rem;
        }

        .cap-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--r);
            padding: 2rem 1.75rem;
            position: relative;
            overflow: hidden;
            transition: all var(--ease);
            cursor: default;
        }

        .cap-card::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--accent), transparent);
            opacity: 0;
            transition: opacity var(--ease);
        }

        .cap-card:hover {
            border-color: var(--border-hover);
            background: rgba(82, 129, 212,0.065);
            transform: none;
            box-shadow: var(--glow);
        }

        .cap-card:hover::after { opacity: 1; }

        .cap-num {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.72rem;
            color: var(--text-faint);
            letter-spacing: 0.1em;
            margin-bottom: 1.4rem;
        }

        .cap-icon {
            width: 50px; height: 50px;
            background: rgba(82, 129, 212,0.09);
            border: 1px solid rgba(82, 129, 212,0.18);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1.4rem;
        }

        .cap-icon svg {
            width: 22px; height: 22px;
            stroke: var(--accent);
            fill: none;
            stroke-width: 1.6;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .cap-card h3 {
            font-size: 1.05rem;
            color: var(--text);
            margin-bottom: 0.7rem;
            font-weight: 600;
        }

        .cap-card p {
            color: var(--text-muted);
            font-size: 0.86rem;
            line-height: 1.75;
        }

        /* ============================================================
           TECHNOLOGY
        ============================================================ */
        #technology {
            padding: 8rem 0;
            background: var(--bg-alt);
            border-top: 1px solid var(--border);
            border-bottom: 1px solid var(--border);
        }

        .tech-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1.4rem;
        }

        /* ============================================================
           RESEARCH / METRICS
        ============================================================ */
        #research {
            padding: 8rem 0;
            background: var(--bg);
        }

        .steps-grid {
            list-style: none;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 1.4rem;
            margin-top: 1rem;
        }

        .step {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: var(--r);
            padding: 2rem 1.75rem;
            transition: border-color var(--ease), box-shadow var(--ease);
        }

        .step:hover {
            border-color: var(--border-hover);
            box-shadow: var(--glow);
        }

        .step-num {
            display: block;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            letter-spacing: 0.1em;
            color: var(--accent);
            margin-bottom: 1.1rem;
        }

        .step h3 {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 0.7rem;
        }

        .step p {
            color: var(--text-muted);
            font-size: 0.88rem;
            line-height: 1.75;
        }

        .research-note {
            text-align: center;
            margin-top: 2.75rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            color: var(--text-faint);
            letter-spacing: 0.05em;
            line-height: 1.8;
        }

        /* ============================================================
           ABOUT
        ============================================================ */
        #about {
            padding: 8rem 0;
            background: var(--bg-alt);
            border-top: 1px solid var(--border);
            border-bottom: 1px solid var(--border);
        }

        .about-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6rem;
            align-items: start;
        }

        .about-left h2 {
            font-size: clamp(2rem, 4vw, 3rem);
            color: var(--text);
            line-height: 1.18;
        }

        .about-left h2 em {
            font-style: normal;
            color: var(--accent);
        }

        .about-divider {
            width: 38px;
            height: 2px;
            background: var(--accent);
            margin: 2rem 0;
        }

        .about-right p {
            color: var(--text-muted);
            font-size: 0.93rem;
            line-height: 1.85;
            margin-bottom: 1.2rem;
        }

        .mono-line {
            display: inline-flex;
            align-items: center;
            gap: 0.6rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.74rem;
            color: var(--accent);
            letter-spacing: 0.12em;
            margin: 0.5rem 0 0;
            padding: 0.45rem 0.7rem;
            border-left: 2px solid rgba(82, 129, 212,0.35);
        }

        /* ============================================================
           EDGE / ADVANTAGE
        ============================================================ */
        #edge {
            padding: 8rem 0;
            background: var(--bg);
        }

        .edge-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 5rem;
            align-items: start;
        }

        .edge-left h2 {
            font-size: clamp(2rem, 4vw, 3rem);
            color: var(--text);
            line-height: 1.18;
        }

        .edge-left h2 em { font-style: normal; color: var(--accent); }

        .edge-lead {
            color: var(--text-muted);
            font-size: 0.95rem;
            line-height: 1.85;
            margin-top: 1.5rem;
        }

        .edge-list {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .edge-item {
            display: flex;
            gap: 1.1rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--border);
        }

        .edge-item:last-child { border-bottom: none; padding-bottom: 0; }

        .edge-k {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.76rem;
            color: var(--accent);
            letter-spacing: 0.1em;
            padding-top: 0.2rem;
            flex-shrink: 0;
        }

        .edge-item h3 {
            font-size: 1rem;
            color: var(--text);
            margin-bottom: 0.4rem;
            font-weight: 600;
        }

        .edge-item p {
            color: var(--text-muted);
            font-size: 0.86rem;
            line-height: 1.7;
        }

        /* ============================================================
           MODAL
        ============================================================ */
        .modal-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.72);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 200;
            opacity: 0;
            visibility: hidden;
            transition: all var(--ease);
        }

        .modal-backdrop.open {
            opacity: 1;
            visibility: visible;
        }

        .modal-box {
            position: fixed;
            top: 50%; left: 50%;
            transform: translate(-50%, -46%);
            z-index: 201;
            width: min(520px, calc(100vw - 2rem));
            background: #060d1e;
            border: 1px solid var(--border-hover);
            border-radius: var(--r);
            padding: 2.5rem;
            opacity: 0;
            visibility: hidden;
            transition: all var(--ease);
            max-height: 90vh;
            overflow-y: auto;
        }

        .modal-box.open {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, -50%);
        }

        .modal-close {
            position: absolute;
            top: 1rem; right: 1rem;
            background: none;
            border: 1px solid var(--border);
            border-radius: var(--r-sm);
            width: 32px; height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-muted);
            font-size: 0.9rem;
            transition: all var(--ease);
        }

        .modal-close:hover { border-color: var(--accent); color: var(--accent); }

        .modal-box h3 {
            font-size: 1.5rem;
            color: var(--text);
            margin: 0.4rem 0 0.5rem;
        }

        .modal-sub {
            color: var(--text-muted);
            font-size: 0.855rem;
            line-height: 1.65;
            margin-bottom: 2rem;
        }

        .form-group { margin-bottom: 1.2rem; }

        .form-group label {
            display: block;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.74rem;
            font-weight: 600;
            letter-spacing: 0.09em;
            text-transform: uppercase;
            color: var(--text-muted);
            margin-bottom: 0.45rem;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            background: rgba(82, 129, 212,0.04);
            border: 1px solid var(--border);
            border-radius: var(--r-sm);
            padding: 0.72rem 1rem;
            color: var(--text);
            font-size: 0.875rem;
            font-family: inherit;
            outline: none;
            transition: border-color var(--ease), background var(--ease);
            resize: vertical;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            border-color: var(--accent);
            background: rgba(82, 129, 212,0.065);
        }

        .form-group input::placeholder,
        .form-group textarea::placeholder { color: var(--text-faint); }

        .form-group textarea { min-height: 96px; }

        .form-submit { width: 100%; margin-top: 0.4rem; justify-content: center; }

        .form-success {
            display: none;
            text-align: center;
            padding: 2rem 1rem;
        }

        .success-icon {
            width: 56px; height: 56px;
            background: rgba(82, 129, 212,0.09);
            border: 1px solid rgba(82, 129, 212,0.28);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.5rem;
        }

        .success-icon svg {
            width: 24px; height: 24px;
            stroke: var(--accent);
            stroke-width: 2;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .form-success h4 { font-size: 1.2rem; color: var(--text); margin-bottom: 0.5rem; }
        .form-success p  { color: var(--text-muted); font-size: 0.875rem; }

        /* ============================================================
           FOOTER
        ============================================================ */
        footer {
            position: relative;
            z-index: 10;
            background: var(--bg);
            border-top: 1px solid var(--border);
            padding: 2.25rem 0;
        }

        .footer-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .footer-brand {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            text-decoration: none;
        }

        .footer-brand img { height: 30px; width: auto; opacity: 0.9; }

        .footer-brand-text {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .footer-copy {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.78rem;
            color: var(--text-faint);
        }

        .footer-url {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.78rem;
            color: var(--accent);
            text-decoration: none;
            opacity: 0.85;
            transition: opacity var(--ease);
        }

        .footer-url:hover { opacity: 1; }

        /* ============================================================
           PARTICLES
        ============================================================ */
        .pt {
            position: absolute;
            background: var(--accent);
            border-radius: 50%;
            pointer-events: none;
            animation: floatUp linear infinite;
            opacity: 0;
        }

        @keyframes floatUp {
            0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
            10%  { opacity: 0.55; }
            90%  { opacity: 0.35; }
            100% { transform: translateY(-30px) translateX(var(--dx)); opacity: 0; }
        }

        /* ============================================================
           SCROLL REVEAL
        ============================================================ */
        .js-ok .reveal {
            opacity: 0;
            transform: translateY(28px);
            transition: opacity 0.65s ease, transform 0.65s ease;
        }

        .js-ok .reveal.visible { opacity: 1; transform: translateY(0); }

        .js-ok .cap-card.reveal:nth-child(1) { transition-delay: 0s; }
        .js-ok .cap-card.reveal:nth-child(2) { transition-delay: 0.08s; }
        .js-ok .cap-card.reveal:nth-child(3) { transition-delay: 0.16s; }
        .js-ok .cap-card.reveal:nth-child(4) { transition-delay: 0.24s; }

        /* ============================================================
           RESPONSIVE
        ============================================================ */
        @media (max-width: 1000px) {
            .nav-right  { display: none; }
            .hamburger  { display: flex; }
        }

        @media (max-width: 768px) {

            .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
            .edge-grid  { grid-template-columns: 1fr; gap: 2.5rem; }
            .hero-actions { flex-direction: column; align-items: center; }
            .footer-inner { justify-content: center; text-align: center; }
            #edge, #capabilities, #technology, #research, #about { padding: 5.5rem 0; }
        }

        @media (max-width: 480px) {
            .container { padding: 0 1.25rem; }
        }
    
        /* ============================================================
           v1.5 · ACESSIBILIDADE, FORMULÁRIO, CTA FINAL, FOOTER, LEGAL
        ============================================================ */
        .sr-only {
            position: absolute;
            width: 1px; height: 1px;
            padding: 0; margin: -1px;
            overflow: hidden;
            clip: rect(0,0,0,0);
            white-space: nowrap;
            border: 0;
        }

        .skip-link {
            position: fixed;
            top: 0.75rem; left: 0.75rem;
            z-index: 300;
            background: var(--accent-blue);
            color: #fff;
            padding: 0.6rem 1rem;
            border-radius: var(--r-sm);
            font-weight: 600;
            font-size: 0.85rem;
            text-decoration: none;
            transform: translateY(-200%);
        }

        .skip-link:focus { transform: translateY(0); }

        :focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 3px;
        }

        .form-group input:focus-visible,
        .form-group textarea:focus-visible { outline-offset: 0; }

        .nav-link.active { color: var(--accent); }

        .nav-link[aria-current="true"] { color: var(--accent); }

        /* Fluxo da tecnologia */
        .tech-flow {
            display: flex;
            align-items: stretch;
            justify-content: center;
            flex-wrap: wrap;
            gap: 0.6rem;
            margin-top: 2.5rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.78rem;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .tech-flow-step {
            display: flex;
            align-items: center;
            padding: 0.7rem 1.1rem;
            border: 1px solid var(--border);
            border-radius: var(--r-sm);
            background: var(--bg-card);
            color: var(--text);
        }

        .tech-flow-step.is-end {
            border-color: var(--border-hover);
            color: var(--accent);
        }

        .tech-flow-arrow {
            display: flex;
            align-items: center;
            color: var(--accent);
            opacity: 0.7;
        }

        /* Formulário */
        .form-group .field-error {
            display: none;
            margin-top: 0.4rem;
            font-size: 0.78rem;
            color: #ff8a8a;
        }

        .form-group.invalid .field-error,
        .form-consent.invalid .field-error { display: block; }
        .form-group.invalid input,
        .form-group.invalid textarea { border-color: #ff6b6b; }

        .form-hp {
            position: absolute;
            left: -9999px;
            width: 1px; height: 1px;
            overflow: hidden;
        }

        .form-consent {
            display: flex;
            gap: 0.7rem;
            align-items: flex-start;
            margin-bottom: 1.2rem;
            font-size: 0.8rem;
            line-height: 1.55;
            color: var(--text-muted);
        }

        .form-consent input {
            flex-shrink: 0;
            width: 18px; height: 18px;
            margin-top: 0.15rem;
            accent-color: var(--accent);
        }

        .form-consent a { color: var(--accent); }

        .form-consent.invalid { color: #ff8a8a; }

        .form-status {
            margin-top: 0.9rem;
            font-size: 0.85rem;
            color: #ff8a8a;
            min-height: 1.2em;
            text-align: center;
        }

        .btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }

        /* CTA final */
        #contact-cta {
            padding: 7rem 0;
            background: var(--bg);
            text-align: center;
        }

        #contact-cta h2 {
            font-size: clamp(2rem, 5vw, 3.2rem);
            margin-bottom: 1rem;
        }

        #contact-cta h2 em { font-style: normal; color: var(--accent); }

        #contact-cta p {
            color: var(--text-muted);
            max-width: 520px;
            margin: 0 auto 2.25rem;
            font-size: 0.98rem;
        }

        .cta-mail {
            display: block;
            margin-top: 1.25rem;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.85rem;
            color: var(--text-muted);
            text-decoration: none;
        }

        .cta-mail:hover { color: var(--accent); }

        /* Footer */
        .footer-links {
            display: flex;
            align-items: center;
            gap: 1.4rem;
            flex-wrap: wrap;
        }

        .footer-links a {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.78rem;
            color: var(--text-muted);
            text-decoration: none;
            transition: color var(--ease);
        }

        .footer-links a:hover { color: var(--accent); }

        /* Página legal */
        .legal-page { padding: calc(var(--nav-h) + 4rem) 0 6rem; position: relative; z-index: 10; }

        .legal-page .container { max-width: 760px; }

        .legal-page h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.75rem; }

        .legal-page h2 {
            font-size: 1.25rem;
            margin: 2.5rem 0 0.75rem;
            color: var(--accent);
        }

        .legal-page p,
        .legal-page li {
            color: var(--text-muted);
            font-size: 0.95rem;
            line-height: 1.8;
        }

        .legal-page ul { padding-left: 1.2rem; margin: 0.5rem 0; }
        .legal-page a { color: var(--accent); }
        .legal-meta { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--text-faint); }

        /* Ecrãs pequenos */
        @media (max-width: 768px) {
            #contact-cta { padding: 5rem 0; }
            .tech-flow-arrow { transform: rotate(90deg); }
            .tech-flow { flex-direction: column; align-items: center; }
        }

        /* Movimento reduzido: desliga todas as animações decorativas */
        @media (prefers-reduced-motion: reduce) {
            html { scroll-behavior: auto; }
            .scan-line, #particlesLayer, #matrixCanvas { display: none; }
            .hero-logo, .hero-badge::before, .scroll-chevron { animation: none; }
            .js-ok .reveal { opacity: 1; transform: none; transition: none; }
            *, *::before, *::after { transition-duration: 0.01ms !important; }
        }

        main:focus { outline: none; }

        html[lang="pt"] .l-en,
        html[lang="en"] .l-pt { display: none; }

        .mobile-menu .lang-wrap { margin-top: 0.25rem; align-self: flex-start; }
        .mobile-menu .btn-cta   { align-self: flex-start; margin-top: 0.25rem; }
        .nav-right.is-always    { display: flex; }
