/*
  EvoCortexAI shared website styles.
  Static, dependency-free design system for the public site.
*/

@layer reset, base, components, utilities, overrides;

/* Reset / Base */
@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  :root {
    --font-system: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
    --bg: #020711;
    --bg-alt: #061020;
    --card: rgba(8, 18, 34, 0.78);
    --card-strong: rgba(9, 22, 41, 0.92);
    --text: #f4f8ff;
    --text-muted: #b8c5d8;
    --accent: #5bd6ff;
    --accent-strong: #9be9ff;
    --accent-warm: #d7b66f;
    --success: #4ade80;
    --warning: #f5c76b;
    --border: rgba(79, 201, 255, 0.2);
    --border-strong: rgba(99, 216, 255, 0.46);
    --nav-bg: rgba(2, 7, 17, 0.96);
    --nav-height: 72px;
    --nav-z: 100;
    --menu-z: 90;
    --surface-muted: rgba(255, 255, 255, 0.045);
    --surface-quiet: rgba(255, 255, 255, 0.03);
    color-scheme: dark;
  }

  html {
    color-scheme: dark;
  }

  body {
    font-family: var(--font-system);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 18rem),
      linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 52%, var(--bg) 100%);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
  }
}

/* Base layout */
@layer base {
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.18);
    white-space: nowrap;

    &:hover {
      transform: translateY(-2px);
    }
  }

  .btn-primary {
    background: linear-gradient(135deg, #dff8ff, #61d7ff 55%, #268ee7);
    color: #03101f;
    border-color: transparent;
    box-shadow: 0 18px 44px rgba(38, 142, 231, 0.25);

    &:hover {
      box-shadow: 0 22px 52px rgba(38, 142, 231, 0.3);
    }
  }

  .btn-secondary {
    background: rgba(4, 14, 29, 0.52);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);

    &:hover {
      border-color: var(--border-strong);
      background: rgba(6, 20, 40, 0.72);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    }
  }

  .section {
    padding: 96px 0;
  }

  .section-header {
    font-size: 42px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
  }

  .section-sub {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 560px;
  }

  .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
  }

  .badge-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  .grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 48px;
  }

  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;

    &:hover {
      transform: translateY(-4px);
      border-color: var(--border-strong);
      box-shadow: 0 22px 72px rgba(0, 0, 0, 0.26);
    }
  }

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
  }

  .card-number {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--accent-strong);
    background: rgba(255,255,255,0.04);
    padding: 4px 10px;
    border-radius: 9999px;
  }

  .card-title {
    font-size: 22px;
    font-weight: 600;
    margin: 16px 0 12px;
    line-height: 1.2;
  }

  .card-desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
  }

  .tech-stack {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: rgba(184, 197, 216, 0.72);
  }

  .systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 48px;
    container-type: inline-size; /* Modern container query support */
  }

  .system-card {
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .system-label {
    font-size: 10px;
    letter-spacing: 1px;
    color: rgba(184, 197, 216, 0.7);
    margin-bottom: 16px;
  }

  .system-name {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 12px;
  }

  .system-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
  }

  footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    color: rgba(184, 197, 216, 0.68);
    font-size: 12px;
    background: #020711;
  }

  .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;

    a {
      color: rgba(184, 197, 216, 0.72);
      text-decoration: none;

      &:hover {
        color: white;
      }
    }
  }

  /* Modern: container query example for grids */
  @container (max-width: 640px) {
    .grid-3,
    .systems-grid {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 768px) {
    .section-header {
      font-size: 32px;
    }
  }
}

/* Components */
@layer components {
  .badge-dot { /* ... existing ... */ }

  .card { /* ... */ }

  .prop-row {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);

    &:last-child {
      border-bottom: none;
    }
  }

  .prop-icon {
    width: 28px;
    flex-shrink: 0;
    color: var(--accent);
    font-size: 16px;
    padding-top: 2px;
  }

  .prop-body {
    font-size: 14px;
    line-height: 1.7;
  }

  .prop-title {
    font-weight: 600;
    margin-bottom: 4px;
  }

  .prop-desc {
    color: var(--text-muted);
  }

  .no-claim {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;

    &:last-child {
      border-bottom: none;
    }
  }

  .law-box {
    background: var(--card-strong);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 28px 32px;
    margin-top: 8px;
  }

  .platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 24px;
  }

  .platform-card {
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px;
  }

  .platform-label {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 6px;
  }

  .platform-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
  }

  .platform-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
  }

  .two-col,
  .three-col {
    display: grid;
    gap: 20px;
  }

  .two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .three-col {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 40px;
  }

  .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;

    &:last-child {
      border-bottom: none;
    }
  }

  .status-label {
    color: var(--text-muted);
  }

  .status-value {
    font-weight: 500;
    text-align: right;
  }

  .dot-live,
  .dot-dev {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
  }

  .dot-live {
    background: var(--success);
  }

  .dot-dev {
    background: rgba(91, 214, 255, 0.5);
  }

  .cta-box {
    background: var(--card-strong);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-top: 40px;
  }

  .credibility {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 32px;
    color: rgba(184, 197, 216, 0.72);
    font-size: 14px;
  }

  .cred-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
  }

  .plane-diagram {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 620px;
    margin: 48px auto;
  }

  .plane-box {
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 28px;
    position: relative;
  }

  .plane-arrow {
    text-align: center;
    color: var(--accent);
    font-size: 20px;
    line-height: 1;
    padding: 4px 0;
    opacity: 0.68;
  }

  .plane-label {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 6px;
  }

  .plane-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
  }

  .plane-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
  }

  .plane-tech {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: rgba(184, 197, 216, 0.6);
  }

  .method-row {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;

    &:last-child {
      border-bottom: none;
    }
  }

  .method-icon {
    width: 32px;
    height: 32px;
    background: rgba(91, 214, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
    font-size: 16px;
    margin-top: 2px;
  }

  .evidence-banner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px 20px;
    margin-bottom: 28px;
    background: rgba(215, 182, 111, 0.08);
    border: 1px solid rgba(215, 182, 111, 0.28);
    border-radius: 16px;
    color: rgba(244, 248, 255, 0.92);
  }

  .evidence-mark {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--accent-warm);
    box-shadow: 0 0 22px rgba(215, 182, 111, 0.32);
  }

  .benchmark-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-top: 20px;
  }

  .benchmark-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 20px;
    align-items: start;
  }

  .bar-chart {
    display: grid;
    gap: 14px;
  }

  .bar-row {
    display: grid;
    grid-template-columns: minmax(9rem, 14rem) 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: 34px;
    font-size: 13px;
  }

  .bar-label {
    color: rgba(226, 236, 250, 0.88);
    overflow-wrap: anywhere;
  }

  .bar-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
  }

  .bar-fill {
    height: 100%;
    width: 0;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(91, 214, 255, 0.55), rgba(155, 233, 255, 0.95));
  }

  .bar-fill.is-warm {
    background: linear-gradient(90deg, rgba(215, 182, 111, 0.42), rgba(245, 199, 107, 0.9));
  }

  .bar-value {
    color: var(--accent-strong);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .metric-list {
    display: grid;
    gap: 12px;
  }

  .metric-card {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
  }

  .metric-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
  }

  .metric-card span {
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }

  .data-table-wrap {
    overflow-x: auto;
    padding: 0;
  }

  .data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 13px;
  }

  .data-table th,
  .data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
  }

  .data-table th {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(226, 236, 250, 0.86);
    font-weight: 600;
  }

  .data-table .numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .tier-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(226, 236, 250, 0.9);
    font-size: 11px;
    line-height: 1.2;
  }

  /* Hero specific (kept for main landing; can be overridden) */
  .hero {
    position: relative;
    z-index: 0;
    overflow: hidden;
    background-image:
      linear-gradient(90deg, rgba(2, 7, 17, 0.94) 0%, rgba(2, 7, 17, 0.72) 48%, rgba(2, 7, 17, 0.62) 100%),
      linear-gradient(180deg, rgba(2, 7, 17, 0.32) 0%, rgba(2, 7, 17, 0.86) 100%),
      url("/background.jpeg");
    background-position: center;
    background-size: cover;
  }

  .hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 28%;
    z-index: 0;
    background: linear-gradient(180deg, transparent, var(--bg));
    pointer-events: none;
  }

  .hero-copy {
    position: relative;
    z-index: 1;
    max-width: 760px;
  }

  .hero-headline {
    font-size: clamp(2.95rem, 7vw, 5.4rem) !important;
    line-height: 0.98 !important;
    font-weight: 650 !important;
    letter-spacing: -0.05em !important;
    max-width: 15ch !important;
  }

  .hero-subhead {
    margin-top: 24px !important;
    max-width: 720px !important;
    font-size: clamp(1.08rem, 2vw, 1.35rem) !important;
    color: rgba(226, 236, 250, 0.92) !important;
    line-height: 1.5 !important;
  }

  .hero-actions {
    margin-top: 40px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }

  .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
  }

  /* Modal — modernized to use <dialog> */
  dialog {
    border: none;
    border-radius: 24px;
    padding: 0;
    background: var(--card-strong);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
    max-width: 420px;
    width: 100%;
    margin: auto;
  }

  dialog::backdrop {
    background: rgba(1, 5, 12, 0.82);
    backdrop-filter: blur(10px);
  }

  .modal-content {
    padding: 32px;
  }

  /* Other components from subpages */
  .page-header {
    padding: 140px 0 64px;
  }

  .label {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 12px;
  }

  h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.05;
    font-weight: 650;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
  }

  .lead {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(226, 236, 250, 0.88);
    max-width: 600px;
    line-height: 1.6;
  }

  h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
  }

  h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
}

/* Utilities & overrides */
@layer utilities {
  @media (max-width: 768px) {
    .section-header { font-size: 32px; }
    .grid-3, .systems-grid { grid-template-columns: 1fr; }
  }
}

/* =====================================================
   RESPONSIVE PREMIUM SYSTEM
   - Shared spacing, materials, and responsive behavior.
   - Apple-native feel: restrained surfaces, precise radii, system fonts.
   - Strong mobile / iPad / orientation support.
   ===================================================== */

/* Better base spacing & safe areas for modern iOS/iPad (notched, Dynamic Island, orientation changes) */
@layer utilities {
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .section {
    padding: 80px 0;
  }

  /* Mobile-first reductions */
  @media (max-width: 640px) {
    :root { --nav-height: 64px; }
    .section { padding: 56px 0; }
    .container { padding-left: 16px; padding-right: 16px; }
    .card, .system-card { padding: 20px; border-radius: 18px; }
    .two-col, .benchmark-grid { grid-template-columns: 1fr; }
    .status-row { align-items: flex-start; flex-direction: column; gap: 6px; }
    .status-value { text-align: left; }
    .bar-row { grid-template-columns: 1fr; gap: 6px; }
    .plane-diagram { margin: 32px 0; }
  }

  /* iPad portrait & small tablets */
  @media (min-width: 768px) and (max-width: 1024px) {
    .section { padding: 72px 0; }
    .systems-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
  }

  /* iPad landscape + medium tablets get more horizontal breathing room. */
  @media (orientation: landscape) and (min-width: 768px) and (max-width: 1024px) {
    .hero { padding-top: 72px; padding-bottom: 64px; }
    .systems-grid { grid-template-columns: repeat(3, 1fr); }
    .conviction-grid { grid-template-columns: 1fr 1.05fr; gap: 48px; } /* restore side-by-side on landscape iPad */
    .section-header { font-size: 38px; }
  }

  /* Desktop refinements */
  @media (min-width: 1025px) {
    .section { padding: 104px 0; }
  }
}

/* ===== ENHANCED GRAPHICAL & MODERN TECH AESTHETIC ===== */
@layer utilities {
  /* Premium glass / material upgrades */
  .card, .system-card {
    position: relative;
    overflow: hidden;
  }

  .card::before,
  .system-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
    opacity: 0.35;
    pointer-events: none;
  }

  /* Subtle technical grid for infrastructure diagrams. */
  .tech-fabric {
    position: relative;
    background-image: 
      linear-gradient(rgba(91,214,255,0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(91,214,255,0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    border-radius: inherit;
  }

  /* Graphical icon wrapper – clean Apple-style, works with inline SVG */
  .icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
  }

  .icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }


  /* Subtle animated connection lines for diagrams. */
  .connection {
    position: relative;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
    opacity: 0.25;
    margin: 8px 0;
  }

  .connection::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    width: 8px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.6;
    animation: node-pulse 3.5s ease-in-out infinite;
  }

  @keyframes node-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.6); opacity: 0.2; }
  }

  /* Refined hero / page-header for mobile + iPad */
  .hero {
    padding-top: 110px;
    padding-bottom: 72px;
  }

  @media (max-width: 640px) {
    .hero { padding-top: 88px; padding-bottom: 48px; }
    .hero-headline { font-size: clamp(2.1rem, 9vw, 3.1rem) !important; line-height: 1.05 !important; }
    .hero-subhead { font-size: 15px !important; max-width: 32ch !important; }
  }

  @media (min-width: 768px) and (max-width: 1024px) {
    .hero { padding-top: 96px; }
  }

  /* Better lead text on small screens */
  .lead {
    font-size: clamp(0.98rem, 2.1vw, 1.15rem);
  }

  /* Graphical accent for labels / system names (new-gen tech) */
  .system-label, .label {
    position: relative;
    display: inline-block;
  }

  .system-label::after,
  .label::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, var(--accent), transparent);
    opacity: 0.4;
  }
}

/* Final polish for touch targets (Apple HIG) and orientation stability */
@layer overrides {
  .btn, button:not(.site-menu-toggle), .mobile-contact {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .card.data-table-wrap {
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .card.data-table-wrap:focus-within,
  .card.data-table-wrap:hover {
    border-color: var(--border-strong);
  }

  /* Landscape phones & small tablets get slightly roomier cards */
  @media (orientation: landscape) and (max-width: 767px) {
    .card, .system-card { padding: 22px; }
  }
}

/* =========================================================
   EvoCortexAI Canonical Header
   Single source of truth: nav.js renders .site-header
   ========================================================= */
:root {
  --font-system: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  --header-height: 72px;
  --header-x: clamp(20px, 5vw, 72px);
  --header-bg: rgba(3, 10, 24, 0.82);
  --header-border: rgba(120, 220, 255, 0.16);
  --header-text: rgba(244, 250, 255, 0.9);
  --header-muted: rgba(244, 250, 255, 0.58);
  --header-accent: #55e6f4;
}
html,
body,
button,
input,
textarea,
select {
  font-family: var(--font-system);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 5000;
  width: 100%;
  min-height: var(--header-height);
  background:
    linear-gradient(180deg, rgba(4, 12, 28, 0.94), rgba(4, 12, 28, 0.74));
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.site-header__inner {
  width: min(1220px, calc(100vw - var(--header-x)));
  min-height: var(--header-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(210px, auto) 1fr auto;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
}
.site-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #f4faff;
  text-decoration: none;
  opacity: 1;
}
.site-brand__mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: block;
}
.site-brand__name {
  color: #f4faff;
  font-size: 20px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 28px);
  min-width: 0;
}
.site-nav a {
  color: var(--header-text);
  font-size: 14px;
  font-weight: 540;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.86;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #ffffff;
  opacity: 1;
}
.site-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: max-content;
}
.locale-switcher {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid rgba(120, 220, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 21, 44, 0.56);
  color: var(--header-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.locale-switcher a {
  color: var(--header-muted);
  text-decoration: none;
}
.locale-switcher a:hover,
.locale-switcher a[aria-current="page"] {
  color: var(--header-accent);
}
.locale-switcher__separator {
  color: rgba(244, 250, 255, 0.34);
}
.site-contact {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(120, 220, 255, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(217, 252, 255, 0.96), rgba(43, 158, 245, 0.96));
  color: #03101f;
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 16px 48px rgba(67, 168, 231, 0.28);
}
.site-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  position: relative;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(120, 220, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 21, 44, 0.62);
  color: #f4faff;
  cursor: pointer;
}
.site-menu-toggle span,
.site-menu-toggle span::before,
.site-menu-toggle span::after {
  width: 16px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  content: "";
}
.site-menu-toggle span::before {
  transform: translateY(-6px);
}
.site-menu-toggle span::after {
  transform: translateY(4px);
}
.mobile-menu {
  display: none;
}
@media (max-width: 1023px) {
  :root {
    --header-height: 66px;
    --header-x: 28px;
  }
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }
  .site-brand__mark {
    width: 28px;
    height: 28px;
  }
  .site-brand__name {
    font-size: 19px;
  }
  .site-nav {
    display: none;
  }
  .site-contact {
    display: none;
  }
  .site-menu-toggle {
    display: inline-flex;
  }
  .mobile-menu {
    position: absolute;
    top: calc(var(--header-height) + 8px);
    left: 16px;
    right: 16px;
    z-index: 4999;
    padding: 12px;
    border: 1px solid rgba(120, 220, 255, 0.16);
    border-radius: 22px;
    background: rgba(4, 12, 28, 0.98);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
  }
  .mobile-menu.is-open {
    display: grid;
    gap: 4px;
  }
  .mobile-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 14px;
    border-radius: 14px;
    color: rgba(244, 250, 255, 0.9);
    font-size: 15px;
    font-weight: 560;
    text-decoration: none;
  }
  .mobile-menu a:hover,
  .mobile-menu a[aria-current="page"] {
    background: rgba(120, 220, 255, 0.08);
    color: #ffffff;
  }
  .mobile-menu__contact {
    margin-top: 8px;
    justify-content: center !important;
    background:
      linear-gradient(135deg, rgba(217, 252, 255, 0.96), rgba(43, 158, 245, 0.96));
    color: #03101f !important;
    font-weight: 720 !important;
  }
}
@media (max-width: 560px) {
  :root {
    --header-height: 64px;
    --header-x: 20px;
  }
  .site-brand__name {
    font-size: 18px;
  }
  .locale-switcher {
    height: 31px;
    padding: 0 9px;
    font-size: 11px;
  }
  .site-actions {
    gap: 8px;
  }
  .site-menu-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
}
.hero__inner {
  width: min(1280px, calc(100vw - 48px));
  margin: 0 auto;
}
.hero__content {
  position: relative;
  z-index: 1;
  isolation: isolate;
  max-width: 680px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}
.eyebrow::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
  content: "";
}
.hero__content h1 {
  max-width: 13.5ch;
  font-size: clamp(2.95rem, 7vw, 5.4rem);
  line-height: 0.98;
  font-weight: 650;
  letter-spacing: -0.05em;
}
.hero__lede {
  margin-top: 24px;
  max-width: 620px;
  color: rgba(242, 248, 255, 0.94);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.5;
}
.hero__sublede {
  margin-top: 16px;
  max-width: 590px;
  color: rgba(226, 236, 250, 0.82);
  font-size: 16px;
  line-height: 1.7;
}
.hero__actions {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-video {
  z-index: -2;
  opacity: 0.46;
  filter: saturate(0.76) brightness(0.56) contrast(1.04);
}
@media (max-width: 640px) {
  .hero__inner {
    width: min(100% - 32px, 1280px);
  }
  .hero__content h1 {
    font-size: clamp(2.1rem, 9vw, 3.1rem);
    line-height: 1.05;
  }
  .hero__lede {
    max-width: 32ch;
    font-size: 15px;
  }
}
/* Hero readability overlay */
.hero,
.hero-section,
main > section:first-of-type {
  position: relative;
  isolation: isolate;
}
.hero::before,
.hero-section::before,
main > section:first-of-type::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 24% 42%, rgba(2, 8, 20, 0.96) 0%, rgba(2, 8, 20, 0.82) 34%, rgba(2, 8, 20, 0.24) 68%, transparent 100%),
    linear-gradient(90deg, rgba(1, 5, 14, 0.94) 0%, rgba(1, 5, 14, 0.86) 36%, rgba(1, 5, 14, 0.58) 62%, rgba(1, 5, 14, 0.74) 100%);
}
.hero::after,
.hero-section::after,
main > section:first-of-type::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 7, 17, 0.2), rgba(2, 7, 17, 0.82)),
    radial-gradient(circle at 42% 38%, rgba(85, 230, 244, 0.06), transparent 38%);
}
.hero__content::before {
  content: "";
  position: absolute;
  inset: -26px -34px -30px -34px;
  z-index: -1;
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(1, 6, 16, 0.86), rgba(1, 6, 16, 0.64) 62%, rgba(1, 6, 16, 0.12)),
    radial-gradient(ellipse at 20% 42%, rgba(2, 10, 24, 0.94), rgba(2, 10, 24, 0.18) 72%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}
@media (max-width: 640px) {
  .hero__content {
    max-width: 100%;
  }
  .hero__content::before {
    inset: -18px -16px -22px -16px;
    border-radius: 22px;
    background:
      linear-gradient(180deg, rgba(1, 6, 16, 0.88), rgba(1, 6, 16, 0.68)),
      radial-gradient(ellipse at 28% 34%, rgba(2, 10, 24, 0.94), rgba(2, 10, 24, 0.22) 76%);
  }
}

/* =========================================================
   EvoCortexAI Stable Button System
   ========================================================= */
.btn,
.site-contact,
.mobile-menu__contact {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(120, 220, 255, 0.22);
  font-family: var(--font-system);
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}
.btn:hover,
.site-contact:hover,
.mobile-menu__contact:hover {
  transform: translateY(-1px);
}
.btn-primary,
.site-contact {
  background:
    linear-gradient(135deg, rgba(217, 252, 255, 0.98), rgba(43, 158, 245, 0.98));
  color: #03101f;
  box-shadow: 0 16px 42px rgba(67, 168, 231, 0.24);
}
.btn-secondary {
  background: rgba(5, 14, 31, 0.58);
  color: rgba(244, 250, 255, 0.94);
  border-color: rgba(244, 250, 255, 0.22);
  box-shadow: none;
}
.btn-secondary:hover {
  border-color: rgba(120, 220, 255, 0.34);
  background: rgba(12, 28, 56, 0.72);
}
.mobile-menu__contact {
  width: auto;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 18px;
  background:
    linear-gradient(135deg, rgba(217, 252, 255, 0.98), rgba(43, 158, 245, 0.98));
  color: #03101f !important;
  border-color: rgba(120, 220, 255, 0.22);
  box-shadow: 0 12px 36px rgba(67, 168, 231, 0.22);
}

/* =========================================================
   Stable Mobile Header / Drawer
   ========================================================= */
@media (max-width: 1023px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 5000;
  }
  .site-header__inner {
    min-height: var(--header-height);
  }
  .site-nav,
  .site-contact {
    display: none;
  }
  .site-menu-toggle {
    display: inline-flex;
  }
  .mobile-menu {
    position: absolute;
    top: calc(var(--header-height) + 10px);
    left: 16px;
    right: 16px;
    z-index: 4999;
    display: none;
    max-height: calc(100vh - var(--header-height) - 32px);
    overflow-y: auto;
    padding: 14px;
    border: 1px solid rgba(120, 220, 255, 0.16);
    border-radius: 24px;
    background:
      linear-gradient(180deg, rgba(5, 14, 31, 0.98), rgba(3, 9, 22, 0.98));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
  }
  .mobile-menu.is-open {
    display: grid;
    gap: 6px;
  }
  .mobile-menu a {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 16px;
    border-radius: 16px;
    color: rgba(244, 250, 255, 0.9);
    font-family: var(--font-system);
    font-size: 16px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
  }
  .mobile-menu a:hover,
  .mobile-menu a[aria-current="page"] {
    background: rgba(120, 220, 255, 0.08);
    color: #ffffff;
  }
  .mobile-menu .mobile-menu__contact {
    justify-content: center;
    justify-self: start;
    margin-top: 8px;
    color: #03101f !important;
  }
  body.nav-open {
    overflow: hidden;
  }
  body.nav-open main {
    filter: brightness(0.55);
    pointer-events: none;
  }
}

/* =========================================================
   EvoCortexAI Stability Patch
   Contact/buttons/mobile drawer/Inter typography
   ========================================================= */

:root {
  --font-system: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
}

html,
body,
button,
input,
textarea,
select {
  font-family: var(--font-system);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.hero h1,
.hero-title,
main h1 {
  font-weight: 740;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.hero__lede,
.hero .lead,
.lead {
  font-weight: 450;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

body,
p {
  font-weight: 430;
}

.site-nav a {
  font-weight: 560;
  letter-spacing: -0.01em;
}

.btn,
.site-contact,
.mobile-menu__contact {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(120, 220, 255, 0.22);
  font-family: var(--font-system);
  font-size: 14px;
  font-weight: 690;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.btn:hover,
.site-contact:hover,
.mobile-menu__contact:hover {
  transform: translateY(-1px);
}

.btn-primary,
.site-contact {
  background:
    linear-gradient(135deg, rgba(217, 252, 255, 0.98), rgba(43, 158, 245, 0.98));
  color: #03101f;
  box-shadow: 0 16px 42px rgba(67, 168, 231, 0.24);
}

.btn-secondary {
  background: rgba(5, 14, 31, 0.58);
  color: rgba(244, 250, 255, 0.94);
  border-color: rgba(244, 250, 255, 0.22);
  box-shadow: none;
}

.btn-secondary:hover {
  border-color: rgba(120, 220, 255, 0.34);
  background: rgba(12, 28, 56, 0.72);
}

.mobile-menu__contact {
  width: auto !important;
  max-width: max-content !important;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 18px;
  justify-self: start;
  background:
    linear-gradient(135deg, rgba(217, 252, 255, 0.98), rgba(43, 158, 245, 0.98));
  color: #03101f !important;
  border-color: rgba(120, 220, 255, 0.22);
  box-shadow: 0 12px 36px rgba(67, 168, 231, 0.22);
}

@media (max-width: 1023px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 5000;
  }

  .site-header__inner {
    min-height: var(--header-height);
  }

  .site-nav,
  .site-contact {
    display: none;
  }

  .site-menu-toggle {
    display: inline-flex;
  }

  .mobile-menu {
    position: absolute;
    top: calc(var(--header-height) + 10px);
    left: 16px;
    right: 16px;
    z-index: 4999;

    display: none;
    max-height: calc(100vh - var(--header-height) - 32px);
    overflow-y: auto;

    padding: 14px;
    border: 1px solid rgba(120, 220, 255, 0.16);
    border-radius: 24px;
    background:
      linear-gradient(180deg, rgba(5, 14, 31, 0.98), rgba(3, 9, 22, 0.98));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
  }

  .mobile-menu.is-open {
    display: grid;
    gap: 6px;
  }

  .mobile-menu a {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 16px;
    border-radius: 16px;
    color: rgba(244, 250, 255, 0.9);
    font-family: var(--font-system);
    font-size: 16px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
  }

  .mobile-menu a:hover,
  .mobile-menu a[aria-current="page"] {
    background: rgba(120, 220, 255, 0.08);
    color: #ffffff;
  }

  .mobile-menu .mobile-menu__contact {
    justify-content: center;
    justify-self: start;
    margin-top: 8px;
    color: #03101f !important;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open main {
    filter: brightness(0.55);
    pointer-events: none;
  }
}

/* =========================================================
   EvoCortexAI Logo + Hero Typography Correction
   Goal: less heavy logo, cleaner Inter hero headline
   ========================================================= */

:root {
  --font-system: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
}

/* Global Inter refinement */
html,
body,
button,
input,
textarea,
select {
  font-family: var(--font-system);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Header logo: currently too visually heavy */
.site-brand {
  gap: 10px;
}

.site-brand__mark {
  width: 25px !important;
  height: 25px !important;
  opacity: 0.92;
}

.site-brand__name {
  font-size: 18px !important;
  font-weight: 650 !important;
  letter-spacing: -0.035em !important;
  line-height: 1 !important;
  color: rgba(244, 250, 255, 0.94) !important;
}

/* Desktop hero headline: premium, strong, not black-heavy */
.hero h1,
.hero-title,
.hero-headline,
main h1 {
  font-family: var(--font-system);
  font-weight: 690 !important;
  letter-spacing: -0.06em !important;
  line-height: 0.965 !important;
  color: rgba(247, 251, 255, 0.97);
  text-wrap: balance;
}

/* Hero body should stay readable but not heavy */
.hero__lede,
.hero__sublede,
.hero-subhead,
.hero-support,
.hero .lead {
  font-family: var(--font-system);
  font-weight: 430 !important;
  letter-spacing: -0.012em;
  line-height: 1.55;
  color: rgba(244, 250, 255, 0.82);
}

/* Nav text: medium, not bold */
.site-nav a {
  font-weight: 520 !important;
  letter-spacing: -0.012em !important;
}

/* Buttons: confident but not overly bold */
.btn,
.site-contact,
.mobile-menu__contact {
  font-weight: 660 !important;
}

/* Mobile: keep logo compact and hero readable */
@media (max-width: 1023px) {
  .site-brand__mark {
    width: 24px !important;
    height: 24px !important;
  }

  .site-brand__name {
    font-size: 18px !important;
    font-weight: 650 !important;
  }

  .hero h1,
  .hero-title,
  .hero-headline,
  main h1 {
    font-weight: 690 !important;
    letter-spacing: -0.055em !important;
    line-height: 0.97 !important;
  }
}

@media (max-width: 560px) {
  .site-brand__mark {
    width: 23px !important;
    height: 23px !important;
  }

  .site-brand__name {
    font-size: 17px !important;
    font-weight: 640 !important;
  }

  .hero h1,
  .hero-title,
  .hero-headline,
  main h1 {
    font-size: clamp(46px, 12vw, 64px);
    font-weight: 680 !important;
    letter-spacing: -0.052em !important;
  }
}

/* End Logo + Hero Typography Correction */
