/**
 * NADIR homepage — layout & components (index.html)
 * Requires: nadir-tokens.css, nadir-design-system.css
 */

/* ─── Homepage + design system bridge ─── */
body.nadir-home {
  background:
    radial-gradient(circle at 14% 12%, var(--nadir-magma-glow-soft), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(255, 154, 82, 0.06), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(255, 43, 43, 0.04), transparent 28%),
    var(--bg);
}

body.nadir-home .bg-grid {
  z-index: 0;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

  /* ─── NOISE OVERLAY ─── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
  }

  body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background:
      radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.025), transparent 62%),
      repeating-linear-gradient(
        110deg,
        rgba(255, 255, 255, 0.014) 0px,
        rgba(255, 255, 255, 0.014) 1px,
        transparent 1px,
        transparent 6px
      );
    opacity: 0.34;
  }

  /* ─── NAV ─── */
  nav.home-nav,
  body.nadir-home header.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 0 48px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 11, 13, 0.78);
    backdrop-filter: blur(18px) saturate(1.2);
    border-bottom: 1px solid var(--border-subtle);
    transition:
      background var(--dur-med) ease,
      border-color var(--dur-med) ease,
      box-shadow var(--dur-med) ease;
  }

  nav.home-nav.is-scrolled,
  body.nadir-home header.site-header.is-scrolled {
    background: rgba(15, 17, 21, 0.92);
    border-bottom-color: var(--border-magma);
    box-shadow: var(--shadow-layer-1);
  }

  .nav-logo {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .nav-logo-img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--nadir-logo-border, rgba(255, 179, 128, 0.42));
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.35) inset,
      0 6px 18px rgba(230, 0, 92, 0.18);
    background: #060708;
    transition: transform var(--dur-fast) var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .nav-logo:hover .nav-logo-img {
    transform: scale(1.05);
    border-color: rgba(255, 215, 0, 0.55);
  }

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

  .nav-links a {
    font-family: var(--display);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--text2);
    text-decoration: none;
    transition: color 0.2s;
  }

  .nav-links a:hover { color: var(--text); }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .btn-ghost {
    font-family: var(--display);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text2);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    text-decoration: none;
    transition: color 0.2s;
  }

  .btn-ghost:hover { color: var(--text); }

  .btn-primary {
    font-family: var(--display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #17191d;
    background: linear-gradient(135deg, #cf3e1f 0%, #da5528 55%, #c96d36 100%);
    border: 1px solid rgba(216, 137, 73, 0.6);
    cursor: pointer;
    padding: 9px 20px;
    text-decoration: none;
    border-radius: 999px;
    transition: background 0.2s, transform 0.12s ease, box-shadow 0.2s;
    display: inline-block;
    box-shadow: 0 10px 24px rgba(207, 62, 31, 0.22);
  }

  .btn-primary:hover {
    background: linear-gradient(135deg, #dd4b26 0%, #e1662f 55%, #d98041 100%);
    color: #111216;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(207, 62, 31, 0.28);
  }

  /* ─── HERO ─── */
  #hero.home-hero {
    min-height: 100vh;
    padding: 120px 48px 80px;
    position: relative;
    overflow: hidden;
    z-index: 1;
  }

  .home-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    max-width: 1280px;
    position: relative;
    z-index: 2;
  }

  .home-hero__copy {
    max-width: 720px;
  }

  .home-hero__visual {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    min-height: 320px;
    pointer-events: auto;
  }

  .home-hero__visual .nadir-product-3d {
    width: min(340px, 100%);
  }

  .hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255,90,42,0.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,90,42,0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  }

  .hero-glow {
    position: absolute;
    top: 10%; left: 50%;
    transform: translateX(-50%);
    width: 600px; height: 400px;
    background: radial-gradient(ellipse at center, rgba(255,90,42,0.22) 0%, rgba(255,154,82,0.1) 45%, transparent 74%);
    pointer-events: none;
    filter: blur(18px);
    animation: glowFloat 9s ease-in-out infinite;
  }

  .hero-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--accent-bright);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .hero-eyebrow::before {
    content: '';
    width: 24px; height: 1px;
    background: var(--accent-bright);
  }

  .hero-eyebrow,
  h1,
  .hero-sub,
  .hero-actions,
  .telemetry-strip,
  .hero-terminal {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(18px);
    animation: fadeInSoft 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  .hero-eyebrow { animation-delay: 0.1s; }
  h1 { animation-delay: 0.18s; }
  .hero-sub { animation-delay: 0.3s; }
  .hero-actions { animation-delay: 0.44s; }
  .telemetry-strip { animation-delay: 0.56s; }
  .hero-terminal { animation-delay: 0.68s; }

  h1 {
    font-family: var(--display);
    font-size: clamp(56px, 8vw, 112px);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.03em;
    color: var(--text);
    max-width: 900px;
    margin-bottom: 28px;
  }

  h1 .accent {
    /* gradient from .nadir-gradient-text when both classes present */
  }

  .hero-sub {
    font-size: 18px;
    font-weight: 400;
    color: var(--text2);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 48px;
  }

  .hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 80px;
  }

  .btn-large {
    font-family: var(--display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.14em;
    padding: 14px 32px;
    border-radius: 999px;
  }

  .btn-outline {
    font-family: var(--display);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text2);
    background: transparent;
    border: 1px solid var(--border2);
    cursor: pointer;
    padding: 13px 28px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
  }

  .btn-outline:hover {
    color: var(--text);
    border-color: var(--text3);
    background: var(--soft-glass);
  }

  /* ─── LIVE TELEMETRY STRIP ─── */
  .telemetry-strip {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-subtle);
    max-width: 780px;
    margin-top: 48px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    background-color: var(--bg-elev-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-layer-2);
    position: relative;
    z-index: 2;
    transition: transform var(--dur-med) var(--ease-out-expo), box-shadow var(--dur-med) ease;
  }

  .telemetry-strip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-layer-3);
  }

  .tel-item {
    flex: 1;
    padding: 16px 24px;
    border-right: 1px solid var(--border);
  }

  .tel-item:last-child { border-right: none; }

  .tel-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--text3);
    margin-bottom: 6px;
    text-transform: uppercase;
  }

  .tel-value {
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 4px;
  }

  .tel-unit {
    font-size: 12px;
    color: var(--text2);
  }

  .tel-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
  }

  .dot-live {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
  }

  .tel-status {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--accent-bright);
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(255, 154, 82, 0.16);
  }

  /* ─── SECTION COMMONS ─── */
  section {
    padding: 100px 48px;
    max-width: 1240px;
    margin: 0 auto;
  }

  .section-eyebrow {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.25em;
    color: var(--accent-bright);
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .section-eyebrow::after {
    content: '';
    flex: 1;
    max-width: 48px;
    height: 1px;
    background: var(--border2);
  }

  h2 {
    font-family: var(--display);
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 16px;
  }

  .section-desc {
    font-size: 16px;
    font-weight: 400;
    color: var(--text2);
    max-width: 540px;
    line-height: 1.7;
    margin-bottom: 64px;
  }

  hr.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
  }

  /* ─── LOGOS STRIP ─── */
  .logos-section {
    padding: 40px 48px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
  }

  .logos-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .logos-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: color-mix(in srgb, var(--accent-bright) 56%, var(--text3) 44%);
    white-space: nowrap;
    margin-right: 8px;
  }

  .logos-list {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
  }

  .logo-pill {
    font-family: var(--display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--text3);
    padding: 6px 14px;
    border: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
  }

  .logo-pill:hover {
    color: var(--text2);
    border-color: var(--border2);
  }

  /* ─── PROBLEM ─── */
  .problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
  }

  .problem-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    background-color: var(--bg-elev-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-layer-1);
    transition:
      transform var(--dur-med) var(--ease-out-expo),
      box-shadow var(--dur-med) ease,
      border-color var(--dur-med) ease;
  }

  .problem-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.3s;
  }

  .problem-card:hover::before {
    background: var(--accent);
  }

  .problem-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-layer-3), 0 0 0 1px rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.25);
  }

  .problem-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text3);
    letter-spacing: 0.2em;
    margin-bottom: 20px;
  }

  .problem-card h3 {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 16px;
  }

  .problem-card p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
    margin-bottom: 20px;
  }

  .problem-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .problem-bullets li {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text3);
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
  }

  .problem-bullets li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text3);
  }

  /* ─── ARCHITECTURE ─── */
  #architecture {
    background: var(--bg2);
    max-width: 100%;
    padding: 100px 0;
  }

  .arch-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 48px;
  }

  .arch-stack {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-top: 48px;
    border-radius: 18px;
    overflow: hidden;
  }

  .arch-row {
    display: grid;
    grid-template-columns: 140px 1fr 280px;
    background: var(--bg2);
    min-height: 72px;
    align-items: stretch;
    transition: background 0.2s;
  }

  .arch-row:hover { background: var(--bg3); }

  .arch-layer {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--text3);
    text-transform: uppercase;
    padding: 0 24px;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
  }

  .arch-content {
    padding: 20px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border);
  }

  .arch-title {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 4px;
  }

  .arch-desc {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text2);
    line-height: 1.6;
  }

  .arch-tags {
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .arch-tag {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text3);
    border: 1px solid var(--border);
    padding: 3px 8px;
    letter-spacing: 0.08em;
  }

  .arch-tag.accent {
    color: var(--accent);
    border-color: rgba(255,90,42,0.46);
  }

  /* ─── WORKFLOWS ─── */
  .workflow-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
  }

  .workflow-item {
    background: var(--bg2);
    display: grid;
    grid-template-columns: 80px 1fr;
  }

  .workflow-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text3);
    letter-spacing: 0.15em;
    padding: 32px 24px;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  .workflow-body {
    padding: 32px 40px;
  }

  .workflow-body h3 {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 20px;
  }

  .workflow-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
  }

  .workflow-step {
    background: var(--bg3);
    padding: 20px;
    position: relative;
  }

  .step-num {
    font-family: var(--mono);
    font-size: 9px;
    color: color-mix(in srgb, var(--accent-bright) 52%, var(--text3) 48%);
    letter-spacing: 0.15em;
    margin-bottom: 8px;
  }

  .step-text {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
  }

  /* ─── PRODUCT PREVIEW ─── */
  .preview-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
    background: color-mix(in srgb, var(--bg2) 92%, white 8%);
    border: 1px solid var(--border);
    border-radius: 14px 14px 0 0;
    overflow: hidden;
  }

  .preview-tab {
    font-family: var(--display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text2);
    padding: 14px 24px;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, background 0.2s;
  }

  .preview-tab.active {
    color: var(--accent);
    background: rgba(255, 90, 42, 0.12);
    border-bottom-color: var(--accent);
  }

  .preview-tab:hover:not(.active) {
    color: var(--text);
    background: var(--soft-glass);
  }

  .preview-panel {
    display: none;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-top: none;
    padding: 40px;
    border-radius: 0 0 14px 14px;
  }

  .preview-panel.active { display: block; }

  /* Console table */
  .console-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--mono);
    font-size: 12px;
  }

  .console-table th {
    text-align: left;
    color: var(--text3);
    font-weight: 400;
    letter-spacing: 0.15em;
    font-size: 10px;
    border-bottom: 1px solid var(--border);
    padding: 0 0 12px;
  }

  .console-table td {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
    vertical-align: middle;
  }

  .console-table tr:last-child td { border-bottom: none; }

  .sev-critical {
    color: var(--red);
    font-size: 10px;
    letter-spacing: 0.1em;
    background: rgba(255,61,42,0.1);
    padding: 3px 8px;
  }

  .sev-high {
    color: var(--amber);
    font-size: 10px;
    letter-spacing: 0.1em;
    background: rgba(245,166,35,0.1);
    padding: 3px 8px;
  }

  .action-btn {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--accent);
    border: 1px solid rgba(255,90,42,0.45);
    padding: 4px 10px;
    cursor: pointer;
    background: none;
    letter-spacing: 0.08em;
    transition: background 0.2s;
  }

  .action-btn:hover { background: rgba(255,90,42,0.12); }

  /* Timeline */
  .timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .timeline-item {
    display: grid;
    grid-template-columns: 80px 24px 1fr;
    gap: 0 20px;
    align-items: flex-start;
  }

  .t-time {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text3);
    letter-spacing: 0.1em;
    text-align: right;
    padding-top: 2px;
  }

  .t-line {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .t-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
  }

  .t-connector {
    width: 1px;
    flex: 1;
    background: var(--border2);
    min-height: 32px;
  }

  .t-content {
    padding-bottom: 28px;
  }

  .t-content strong {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
  }

  .t-content p {
    font-size: 13px;
    color: var(--text2);
    margin-top: 2px;
  }

  /* KPI grid */
  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
  }

  .kpi-cell {
    background: var(--bg2);
    padding: 32px 28px;
  }

  .kpi-label {
    font-family: var(--mono);
    font-size: 10px;
    color: color-mix(in srgb, var(--accent-bright) 56%, var(--text3) 44%);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
  }

  .kpi-val {
    font-family: var(--display);
    font-size: 42px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
  }

  .kpi-sub {
    font-size: 13px;
    color: var(--text2);
  }

  /* ─── PITCH DECK ─── */
  #pitchdeck {
    background: var(--bg);
    max-width: 100%;
    padding: 100px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .pitch-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 48px;
  }

  .slides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-top: 48px;
    border-radius: 20px;
    overflow: hidden;
  }

  .slide-card {
    background: var(--bg2);
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
    transition: background 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
  }

  .slide-card:hover {
    background: color-mix(in srgb, var(--bg3) 82%, var(--accent) 18%);
    transform: translateY(-3px);
    box-shadow: var(--elev-shadow);
  }

  .slide-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border2), transparent);
  }

  .slide-index {
    font-family: var(--mono);
    font-size: 10px;
    color: color-mix(in srgb, var(--accent-bright) 58%, var(--text3) 42%);
    letter-spacing: 0.2em;
    margin-bottom: 16px;
  }

  .slide-card h3 {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.2;
  }

  .slide-card p {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.7;
  }

  .slide-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }

  .slide-stat-val {
    font-family: var(--display);
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
  }

  .slide-stat-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text3);
    letter-spacing: 0.1em;
  }

  /* ─── SECURITY ─── */
  .sec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
  }

  .sec-card {
    background: var(--bg2);
    padding: 40px 32px;
  }

  .sec-icon {
    width: 40px; height: 40px;
    background: rgba(255,90,42,0.12);
    border: 1px solid rgba(255,154,82,0.34);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 18px;
  }

  .sec-card h3 {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 16px;
  }

  .sec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .sec-list li {
    font-size: 13px;
    color: var(--text2);
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
  }

  .sec-list li::before {
    content: '◆';
    position: absolute;
    left: 0;
    font-size: 6px;
    color: var(--accent);
    top: 5px;
  }

  /* ─── PRICING ─── */
  .pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
  }

  .pricing-card {
    background: var(--bg2);
    padding: 40px 32px;
    position: relative;
  }

  .pricing-card.featured {
    background: var(--bg3);
    border-top: 2px solid var(--accent);
  }

  .pricing-badge {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--bg);
    background: var(--accent);
    padding: 3px 10px;
    display: inline-block;
    margin-bottom: 20px;
  }

  .pricing-tier {
    font-family: var(--display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: color-mix(in srgb, var(--accent-bright) 62%, var(--text2) 38%);
    margin-bottom: 12px;
  }

  .pricing-price {
    font-family: var(--display);
    font-size: 48px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
  }

  .pricing-period {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text3);
    margin-bottom: 32px;
  }

  .pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
  }

  .pricing-features li {
    font-size: 14px;
    color: var(--text2);
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }

  .pricing-features li::before {
    content: '→';
    font-family: var(--mono);
    color: var(--accent);
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
  }

  /* ─── CTA ─── */
  #cta {
    text-align: center;
    padding: 120px 48px;
    position: relative;
    overflow: hidden;
    max-width: 100%;
  }

  .cta-inner { max-width: 1240px; margin: 0 auto; position: relative; z-index: 1; }

  #cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(255,90,42,0.18) 0%, transparent 70%);
    pointer-events: none;
  }

  #cta h2 {
    font-size: clamp(44px, 6vw, 80px);
    max-width: 800px;
    margin: 0 auto 24px;
  }

  #cta p {
    font-size: 18px;
    color: var(--text2);
    margin-bottom: 48px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }

  /* ─── FOOTER ─── */
  footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 60px 48px 40px;
  }

  .footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 80px;
  }

  .footer-brand p {
    font-size: 13px;
    color: var(--text3);
    line-height: 1.7;
    margin-top: 16px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }

  .footer-col h4 {
    font-family: var(--display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: color-mix(in srgb, var(--accent-bright) 54%, var(--text3) 46%);
    margin-bottom: 16px;
  }

  .footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .footer-col a {
    font-size: 13px;
    color: var(--text2);
    text-decoration: none;
    transition: color 0.2s;
    font-family: var(--body);
  }

  .footer-col a:hover { color: var(--text); }

  .footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .footer-bottom p {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text3);
    letter-spacing: 0.1em;
  }

  .lead-modal {
    position: fixed;
    inset: 0;
    background: rgba(7, 8, 10, 0.72);
    backdrop-filter: blur(8px);
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .lead-modal.open { display: flex; }

  .lead-card {
    width: min(560px, 100%);
    background: color-mix(in srgb, var(--bg2) 94%, black 6%);
    border: 1px solid var(--border2);
    box-shadow: var(--elev-shadow);
    border-radius: 18px;
    overflow: hidden;
  }

  .lead-head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .lead-head h3 {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: 0.02em;
    color: var(--text);
  }

  .lead-close {
    border: 1px solid var(--border2);
    background: transparent;
    color: var(--text2);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
  }

  .lead-close:hover {
    color: var(--text);
    border-color: var(--accent);
  }

  .lead-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .lead-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .lead-field.full { grid-column: 1 / -1; }

  .lead-field label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--accent-bright);
    text-transform: uppercase;
  }

  .lead-field input,
  .lead-field textarea {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border2);
    color: var(--text);
    font-family: var(--body);
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    outline: none;
  }

  .lead-field input:focus,
  .lead-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 109, 54, 0.15);
  }

  .lead-field textarea {
    min-height: 88px;
    resize: vertical;
  }

  .lead-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
  }

  .lead-status {
    font-size: 12px;
    color: var(--text2);
  }

  @media (max-width: 640px) {
    .lead-body { grid-template-columns: 1fr; }
  }

  /* Scroll fade-in */
  .reveal {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(24px) scale(0.99);
    transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
  }

  .reveal.visible,
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }

  @keyframes fadeInSoft {
    from {
      opacity: 0;
      filter: blur(10px);
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      filter: blur(0);
      transform: translateY(0);
    }
  }

  @keyframes glowFloat {
    0%, 100% { transform: translateX(-50%) translateY(0px) scale(1); }
    50% { transform: translateX(-50%) translateY(12px) scale(1.03); }
  }

  /* ─── COUNTER ANIMATION ─── */
  @keyframes countUp {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* ─── HERO TERMINAL ─── */
  .hero-terminal {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: min(440px, 100%);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    background-color: var(--bg-elev-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    font-family: var(--mono);
    font-size: 11px;
    overflow: hidden;
    box-shadow: var(--shadow-layer-3);
  }

  .terminal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
  }

  .terminal-dots {
    display: flex;
    gap: 6px;
  }

  .terminal-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--border2);
  }

  .terminal-title {
    font-size: 10px;
    color: var(--text3);
    letter-spacing: 0.12em;
  }

  .terminal-body {
    padding: 20px 20px;
    line-height: 2;
    max-height: 340px;
    overflow: hidden;
    position: relative;
  }

  .terminal-body::after {
    content: '';
    position: absolute;
    inset: -40% 0;
    background: linear-gradient(180deg, transparent 38%, rgba(190,179,207,0.08) 50%, transparent 62%);
    animation: terminalSweep 7s linear infinite;
    pointer-events: none;
  }

  .t-line-item {
    display: flex;
    gap: 10px;
    opacity: 0;
    transform: translateY(4px);
    animation: terminalLineIn 0.45s ease forwards;
  }

  .terminal-body .t-line-item:nth-child(1) { animation-delay: 0.1s; }
  .terminal-body .t-line-item:nth-child(2) { animation-delay: 0.2s; }
  .terminal-body .t-line-item:nth-child(3) { animation-delay: 0.3s; }
  .terminal-body .t-line-item:nth-child(4) { animation-delay: 0.4s; }
  .terminal-body .t-line-item:nth-child(5) { animation-delay: 0.5s; }
  .terminal-body .t-line-item:nth-child(6) { animation-delay: 0.6s; }
  .terminal-body .t-line-item:nth-child(7) { animation-delay: 0.7s; }
  .terminal-body .t-line-item:nth-child(8) { animation-delay: 0.8s; }
  .terminal-body .t-line-item:nth-child(9) { animation-delay: 0.9s; }
  .terminal-body .t-line-item:nth-child(10) { animation-delay: 1s; }
  .terminal-body .t-line-item:nth-child(11) { animation-delay: 1.1s; }
  .t-prefix { color: var(--text3); flex-shrink: 0; }
  .t-green { color: var(--accent); }
  .t-red { color: var(--red); }
  .t-amber { color: var(--amber); }
  .t-dim { color: var(--text3); }
  .t-text { color: var(--text2); }

  @keyframes terminalLineIn {
    from {
      opacity: 0;
      transform: translateY(4px);
      filter: blur(2px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
      filter: blur(0);
    }
  }

  @keyframes terminalSweep {
    0% { transform: translateY(-35%); }
    100% { transform: translateY(35%); }
  }

  /* ─── RESPONSIVE ─── */
  @media (max-width: 1024px) {
    .home-hero__layout {
      grid-template-columns: 1fr;
    }
    .home-hero__visual {
      order: -1;
      min-height: 240px;
    }
    .hero-terminal { display: none; }
    .slides-grid, .problem-grid, .pricing-grid, .sec-grid { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .workflow-steps { grid-template-columns: repeat(2, 1fr); }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr; gap: 40px; }
    nav.home-nav { padding: 0 24px; }
    .nav-links { display: none; }
    h1 { font-size: 52px; }
    section { padding: 60px 24px; }
    #hero.home-hero { padding: 100px 24px 60px; }
  }

  @media (max-width: 640px) {
    .arch-row { grid-template-columns: 1fr; }
    .arch-layer { border-right: none; border-bottom: 1px solid var(--border); padding: 12px 20px; }
    .arch-tags { padding: 12px 20px; }
    .telemetry-strip { flex-direction: column; }
    .tel-item { border-right: none; border-bottom: 1px solid var(--border); }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
  }

  /* ─── Perception demo (homepage) ─── */
  #perception-demo .perception-demo-frame {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-magma);
    box-shadow: var(--shadow-layer-3), 0 0 48px var(--nadir-magma-glow-soft);
    background: var(--bg-elev-2);
    max-width: 1120px;
    margin-inline: auto;
  }

  #perception-demo .perception-demo-video {
    display: block;
    width: 100%;
    height: auto;
  }

  #perception-demo .perception-demo-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-bright);
    background: rgba(10, 11, 13, 0.72);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #perception-demo .pd-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nadir-magma-500);
    box-shadow: 0 0 10px var(--nadir-magma-glow);
    animation: pd-pulse 1.4s ease-in-out infinite;
  }

  @keyframes pd-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
  }
