/* Kernia Theme · platform-v2 paper design system
 * Auto-generated from Website-Mockups/platform-mockup-v2-paper.html.
 * Edit the source mockup and re-run build-paper-theme.py.
 */

/* =========================================================
     PLATFORM PAGE · V2 PAPER — neutral-grey canvas (#ECECEC)
     Uses Kernia's brand-native --paper tone instead of v2's ink
     or v2-light's warm sand. Cool, quiet, document-like. White
     cards on grey canvas, cool hairline borders, orange accents
     unchanged. Product-UI elements (Aion dashboard mock, deploy
     action screen, footer) stay DARK as intentional "product-
     island" accents. Signal constellation and engine flow carry
     over with contrast tuned for legibility on grey.
     ========================================================= */
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  :root {
    /* Paper / neutral-grey tokens. --sand tokens are kept as aliases
       so the rest of the stylesheet (inherited from v2-light) resolves
       without needing every rule rewritten. */
    --paper:         #ECECEC;
    --paper-soft:    #E3E3E3;
    --sand:          #ECECEC;  /* alias — maps to --paper */
    --sand-soft:     #E3E3E3;  /* alias — maps to --paper-soft */
    --surface:       #FFFFFF;
    --surface-hi:    #F7F7F7;
    --hairline:      #D4D4D4;
    --hairline-hi:   #BEBEBE;
    --ink:           #17181A;
    --ink-heading:   #0E0E10;
    --ink-muted:     #55575C;
    --ink-faint:     #8A8B8F;
    /* Dark product-island tokens */
    --dark-bg:       #0A0A0C;
    --dark-surface:  #12131A;
    --dark-border:   #1F2027;
    --dark-border-hi:#2B2D36;
    --dark-text:     rgba(255,255,255,0.88);
    --dark-soft:     rgba(255,255,255,0.62);
    --dark-mute:     rgba(255,255,255,0.42);
  }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  ::selection { background: var(--orange-500); color: #fff; }
  a { color: inherit; text-decoration: none; border-bottom: none; }

  body h1, body h2, body h3 { color: var(--ink-heading); }
  body p, body .p { color: var(--ink); }
  .eyebrow { color: var(--orange-500); }

  /* ---------- Scroll progress sliver ---------- */
  .scroll-progress {
    position: fixed; top: 0; left: 0;
    height: 2px; width: 0%;
    background: var(--orange-500);
    z-index: 100;
    box-shadow: 0 0 10px rgba(232,93,4,0.35);
    pointer-events: none;
  }

  /* ---------- Primary nav (sand, sticky) ---------- */
  .topnav {
    position: sticky; top: 0; z-index: 60;
    background: var(--sand);
    border-bottom: 1px solid var(--hairline);
  }
  .topnav .inner {
    max-width: 1280px; margin: 0 auto;
    padding: 18px 32px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 32px;
  }
  .brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 20px; letter-spacing: -0.02em;
    color: var(--ink-heading);
  }
  .brand-mark { width: 22px; height: 22px; flex: 0 0 22px; }
  .primary-links { display: flex; align-items: center; gap: 28px; }
  .primary-links a {
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 500;
    color: var(--ink-muted);
    transition: color var(--dur-fast) var(--ease-out);
  }
  .primary-links a:hover,
  .primary-links a[aria-current="page"] { color: var(--orange-500); }

  /* Dropdown parent (.has-sub) + submenu (.subnav) — desktop hover/focus,
     mobile inline (no collapse). Parent anchor still navigates on click;
     submenu opens on hover/focus-within or on Enter/Space/arrow keys. */
  .has-sub { position: relative; display: inline-flex; align-items: center; }
  .has-sub__anchor {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 500;
    color: var(--ink-muted);
    transition: color var(--dur-fast) var(--ease-out);
  }
  .has-sub__anchor:hover,
  .has-sub.is-current-parent > .has-sub__anchor,
  .has-sub__anchor[aria-current="page"] { color: var(--orange-500); }
  .has-sub__chev {
    width: 10px; height: 6px;
    transition: transform var(--dur-fast) var(--ease-out);
  }
  .has-sub[data-open="true"] > .has-sub__anchor .has-sub__chev,
  .has-sub:hover > .has-sub__anchor .has-sub__chev,
  .has-sub:focus-within > .has-sub__anchor .has-sub__chev {
    transform: rotate(180deg);
  }
  .subnav {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 220px;
    margin-top: 10px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-3);
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
    z-index: 70;
  }
  .has-sub:hover > .subnav,
  .has-sub:focus-within > .subnav,
  .has-sub[data-open="true"] > .subnav {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }
  .subnav::before {
    content: "";
    position: absolute;
    top: -14px; left: 0; right: 0; height: 14px;
  }
  .subnav__link {
    display: block;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 500;
    color: var(--ink-heading);
    transition: background var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
  }
  .subnav__link:hover,
  .subnav__link[aria-current="page"] { background: var(--paper-soft); color: var(--orange-500); }

  @media (max-width: 960px) {
    .site-menu .has-sub { display: block; width: 100%; }
    .site-menu .has-sub__anchor {
      display: flex; justify-content: space-between; align-items: center;
      padding: 18px 4px;
      font-size: 18px;
      color: var(--ink-heading);
      border-bottom: 1px solid var(--hairline);
    }
    .site-menu .has-sub__chev { width: 12px; height: 8px; transform: rotate(180deg); opacity: 0.6; }
    .site-menu .subnav {
      position: static;
      transform: none;
      box-shadow: none;
      border: 0;
      background: transparent;
      min-width: 0;
      padding: 0 0 0 14px;
      opacity: 1;
      margin: 0;
    }
    .site-menu .subnav__link {
      padding: 14px 4px;
      font-size: 16px;
      border-bottom: 1px solid var(--hairline);
      border-radius: 0;
    }
    .site-menu .subnav__link:last-child { border-bottom: 0; }
    .site-menu .subnav::before { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .subnav { transition: opacity var(--dur-fast) linear; }
    .has-sub__chev { transition: none; }
  }
  .nav-actions { display: flex; align-items: center; gap: 12px; }
  .aion-portal {
    font-family: var(--font-sans);
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; font-weight: 600;
    color: var(--ink-heading);
    padding: 10px 14px;
    border-radius: var(--r-sm);
    border: 1px solid var(--ink-heading);
    transition: background var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
  }
  .aion-portal::after { content: "→"; color: var(--orange-500); font-weight: 400; transition: transform var(--dur-fast) var(--ease-out); }
  .aion-portal:hover { background: var(--ink-heading); color: #fff; }
  .aion-portal:hover::after { transform: translateX(2px); color: var(--orange-500); }
  .demo-cta {
    font-family: var(--font-sans);
    font-size: 13.5px; font-weight: 600;
    background: var(--orange-500); color: #fff;
    padding: 11px 18px; border-radius: var(--r-sm);
    transition: background var(--dur-fast) var(--ease-out);
  }
  .demo-cta:hover { background: var(--orange-600); }

  /* ---------- Responsive nav (hamburger + drawer, <= 960px) ---------- */
  .nav-toggle { display: none; }

  @media (max-width: 960px) {
    .topnav .inner { padding: 14px 20px; }
    .primary-links,
    .nav-actions { /* hidden until the drawer opens */ }

    .nav-toggle {
      display: inline-flex; align-items: center; justify-content: center;
      width: 44px; height: 44px; padding: 0;
      background: transparent; color: var(--ink-heading);
      border: 1px solid var(--ink-heading); border-radius: var(--r-sm);
      cursor: pointer;
      transition: background var(--dur-fast) var(--ease-out),
                  color var(--dur-fast) var(--ease-out);
    }
    .nav-toggle:hover { background: var(--ink-heading); color: #fff; }
    .nav-toggle-icon { width: 22px; height: 22px; display: block; fill: currentColor; }
    .nav-toggle-icon .b1,
    .nav-toggle-icon .b2,
    .nav-toggle-icon .b3 {
      transform-origin: 50% 50%;
      transition: transform var(--dur-med) var(--ease-out),
                  opacity   var(--dur-fast) var(--ease-out);
    }
    .nav-toggle[aria-expanded="true"] .b1 { transform: translateY(5px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .b2 { opacity: 0; }
    .nav-toggle[aria-expanded="true"] .b3 { transform: translateY(-5px) rotate(-45deg); }

    .site-menu {
      position: fixed;
      top: var(--topnav-h, 60px); left: 0; right: 0;
      max-height: calc(100vh - var(--topnav-h, 60px));
      overflow-y: auto;
      padding: 8px 20px 24px;
      background: var(--sand);
      border-top: 1px solid var(--hairline);
      box-shadow: var(--shadow-3);
      opacity: 0; transform: translateY(-8px); pointer-events: none;
      transition: opacity var(--dur-med) var(--ease-out),
                  transform var(--dur-med) var(--ease-out);
    }
    .site-menu[data-open="true"] {
      opacity: 1; transform: translateY(0); pointer-events: auto;
    }

    .site-menu .primary-links {
      display: flex; flex-direction: column; gap: 0;
    }
    .site-menu .primary-links a {
      display: block; padding: 18px 4px;
      font-size: 18px; line-height: 1.3;
      border-bottom: 1px solid var(--hairline);
    }
    .site-menu .primary-links a:last-child { border-bottom: 0; }

    .site-menu .nav-actions {
      display: flex;
      flex-direction: column; align-items: stretch;
      gap: 10px; margin-top: 20px;
    }
    .site-menu .aion-portal,
    .site-menu .demo-cta {
      justify-content: center; padding: 14px 16px; font-size: 15px;
    }

    body.body--menu-open { overflow: hidden; }
  }

  /* Desktop: drawer-state markup collapses back to the original flex row. */
  @media (min-width: 961px) {
    .site-menu {
      display: contents; /* children (primary-links + nav-actions) flow into .topnav .inner */
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .site-menu {
      transition: opacity var(--dur-fast) linear;
      transform: none;
    }
    .site-menu[data-open="true"] { transform: none; }
    .nav-toggle-icon .b1,
    .nav-toggle-icon .b2,
    .nav-toggle-icon .b3 { transition: none; }
  }

  /* ---------- Section scaffolding ---------- */
  .wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
  section { position: relative; padding: 128px 0; overflow: hidden; }
  .section-head { max-width: 760px; margin: 0 0 80px; }
  .section-head .eyebrow { margin-bottom: 20px; display: inline-block; }
  .section-head p.lede {
    margin-top: 20px;
    font-size: var(--fs-body-lg); line-height: 1.6;
    color: var(--ink-muted); max-width: 640px;
  }

  /* Section dividers — hairline flanks + three orange nodes centred.
     Echoes the hero signal-constellation animation: same orange dots,
     same subtle pulse, same visual vocabulary. Replaces the single-dot
     divider so the page has one coherent "nodes on a line" rhythm
     between sections. */
  .divider {
    max-width: 1080px;
    margin: 0 auto;
    padding: 80px 32px;
    display: flex;
    align-items: center;
    gap: 28px;
    position: relative;
  }
  .divider::before,
  .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--hairline);
  }
  .divider-nodes {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 6px;
  }
  .divider-nodes .node {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--orange-500);
    box-shadow: 0 0 6px rgba(232,93,4,0.4);
    opacity: 0.55;
    animation: divNodePulse 5.5s ease-in-out infinite;
    will-change: opacity, transform;
  }
  .divider-nodes .node:nth-child(2) { animation-delay: 1s; }
  .divider-nodes .node:nth-child(3) { animation-delay: 2s; }
  @keyframes divNodePulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); box-shadow: 0 0 4px rgba(232,93,4,0.3); }
    40%      { opacity: 1;   transform: scale(1.15); box-shadow: 0 0 10px rgba(232,93,4,0.55); }
    70%      { opacity: 0.6; transform: scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .divider-nodes .node { animation: none; opacity: 0.6; }
  }

  /* ---------- Buttons ---------- */
  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-sans);
    font-size: 15px; font-weight: 600;
    padding: 14px 22px; border-radius: var(--r-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out);
  }
  .btn--primary {
    background: var(--orange-500); color: #fff;
  }
  .btn--primary:hover { background: var(--orange-600); }
  .btn--primary:active { background: var(--orange-700); }
  .btn--ink-outline {
    border-color: var(--ink-heading); color: var(--ink-heading); background: transparent;
  }
  .btn--ink-outline:hover { background: var(--ink-heading); color: #fff; }
  .btn::after { content: "→"; }
  .btn--no-arrow::after { content: none; }
  .btn--play .btn-play-icon {
    width: 0; height: 0;
    border-left: 9px solid currentColor;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    margin-right: 2px;
  }

  .quiet-link {
    font-family: var(--font-sans);
    font-size: 14.5px; font-weight: 500;
    color: var(--ink-heading);
    display: inline-flex; align-items: center; gap: 10px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--hairline-hi);
    transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  }
  .quiet-link::after { content: "→"; color: var(--orange-500); }
  .quiet-link:hover { color: var(--orange-500); border-bottom-color: var(--orange-500); }

  /* =========================================================
     01 · HERO — sand, with signal constellation behind
     ========================================================= */
  .hero { padding: 120px 0 140px; }

  /* Signal constellation — same pattern as v2, colours inverted
     for legibility on sand. Orange lines/nodes still sing. */
  .hero-signals {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(ellipse 95% 90% at 50% 50%, black 35%, transparent 100%);
            mask-image: radial-gradient(ellipse 95% 90% at 50% 50%, black 35%, transparent 100%);
  }
  .signals-net {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
  }
  .net-line {
    stroke: var(--orange-500);
    stroke-width: 1;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    opacity: 0;
    animation: netDraw 14s ease-in-out infinite;
  }
  @keyframes netDraw {
    0%, 4%   { stroke-dashoffset: 1200; opacity: 0; }
    12%      { stroke-dashoffset: 0;    opacity: 0.32; }
    45%      { stroke-dashoffset: 0;    opacity: 0.3;  }
    60%      { stroke-dashoffset: -1200; opacity: 0.3; }
    64%, 100%{ stroke-dashoffset: -1200; opacity: 0;   }
  }
  .net-node {
    fill: var(--orange-500);
    opacity: 0.2;
    animation: netNode 14s ease-in-out infinite;
  }
  @keyframes netNode {
    0%, 4%, 64%, 100% { opacity: 0.18; transform: scale(1); }
    12%               { opacity: 0.65; transform: scale(1.2); }
    45%               { opacity: 0.4;  transform: scale(1); }
    60%               { opacity: 0.18; }
  }
  .net-node, .net-line { transform-box: fill-box; transform-origin: center; }
  .hero-signals::after {
    content: "";
    position: absolute;
    width: 70%; height: 80%;
    left: -10%; top: -15%;
    background: radial-gradient(circle, rgba(232,93,4,0.06) 0%, transparent 65%);
    filter: blur(60px);
    animation: sigDrift 36s ease-in-out infinite;
    pointer-events: none;
  }
  @keyframes sigDrift {
    0%   { transform: translate(0,   0);    }
    50%  { transform: translate(60%, 30%);  }
    100% { transform: translate(0,   0);    }
  }
  @media (prefers-reduced-motion: reduce) {
    .net-line, .net-node, .hero-signals::after { animation: none; opacity: 0.25; }
    .net-line { stroke-dashoffset: 0; opacity: 0.25; }
  }

  .hero-grid {
    display: grid; grid-template-columns: 1.05fr 1fr;
    gap: 72px; align-items: center;
  }
  .hero .eyebrow { margin-bottom: 24px; display: inline-block; }
  .hero h1 {
    font-size: clamp(44px, 6vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.02em;
    margin: 0 0 28px;
    max-width: 680px;
    color: var(--ink-heading);
  }
  .hero h1 .break { color: var(--orange-500); }
  .hero .sub {
    font-size: 18px; line-height: 1.6;
    color: var(--ink-muted);
    max-width: 540px;
    margin: 0 0 40px;
  }
  .hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
  @media (max-width: 560px) {
    .hero-ctas { flex-wrap: nowrap; gap: 10px; }
    .hero-ctas .btn { flex: 1 1 0; justify-content: center; padding: 14px 12px; min-width: 0; }
  }

  /* Aion dashboard mock — kept DARK on sand: a product-UI island */
  .aion-mock {
    position: relative;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: 0 40px 80px -30px rgba(10,10,11,0.35),
                0 20px 40px -20px rgba(232,93,4,0.14);
    justify-self: end;
    width: 100%; max-width: 560px;
    color: var(--dark-text);
  }
  .aion-mock-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--dark-border);
    margin-bottom: 20px;
  }
  .aion-mock-title {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 14px; letter-spacing: 0.08em;
    color: #fff;
    text-transform: uppercase;
    display: flex; align-items: center; gap: 10px;
  }
  .aion-mock-title::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--orange-500);
    box-shadow: 0 0 0 4px rgba(232,93,4,0.2);
    animation: pulseDot 2.4s ease-in-out infinite;
  }
  @keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(232,93,4,0.2); }
    50%      { box-shadow: 0 0 0 8px rgba(232,93,4,0.0); }
  }
  .aion-mock-tag {
    font-family: var(--font-mono);
    font-size: 11px; color: rgba(255,255,255,0.5);
    letter-spacing: 0.08em;
  }

  /* Engine flow inside the Aion mock */
  .engine-flow { display: flex; flex-direction: column; gap: 18px; }
  .ef-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 64px 108px 64px 1fr;
    grid-template-rows: repeat(3, 40px);
    row-gap: 10px;
    align-items: center;
  }
  .ef-stream, .ef-action {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-sm);
    font-family: var(--font-sans);
    font-size: 12.5px;
    color: rgba(255,255,255,0.85);
    height: 40px; min-width: 0;
  }
  .ef-stream .ef-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ef-stream .ef-val,
  .ef-action .ef-val {
    font-family: var(--font-mono); font-size: 11px;
    color: var(--orange-500); font-weight: 500;
  }
  .ef-action .ef-body { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ef-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(232,93,4,0.3); flex-shrink: 0;
    transition: background 280ms var(--ease-out), box-shadow 280ms var(--ease-out);
  }
  .ef-dot.is-active {
    background: var(--orange-500);
    box-shadow: 0 0 10px rgba(232,93,4,0.7);
  }
  .ef-stream-1 { grid-column: 1; grid-row: 1; }
  .ef-stream-2 { grid-column: 1; grid-row: 2; }
  .ef-stream-3 { grid-column: 1; grid-row: 3; }
  .ef-action-1 { grid-column: 5; grid-row: 1; }
  .ef-action-2 { grid-column: 5; grid-row: 2; }
  .ef-action-3 { grid-column: 5; grid-row: 3; }
  .ef-svg { pointer-events: none; width: 100%; height: 100%; display: block; }
  .ef-svg--left  { grid-column: 2; grid-row: 1 / 4; }
  .ef-svg--right { grid-column: 4; grid-row: 1 / 4; }
  .ef-track {
    fill: none; stroke: rgba(255,255,255,0.09); stroke-width: 1;
  }
  .ef-flow {
    fill: none; stroke: var(--orange-500);
    stroke-width: 1.5;
    stroke-dasharray: 3 72;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(232,93,4,0.8));
    animation: efDash 2.4s linear infinite;
  }
  .ef-svg--right .ef-flow { animation-delay: -1.2s; }
  @keyframes efDash {
    from { stroke-dashoffset: 75; }
    to   { stroke-dashoffset: 0; }
  }
  .ef-core {
    grid-column: 3; grid-row: 1 / 4;
    align-self: center; justify-self: center;
    width: 108px; height: 108px;
    position: relative;
  }
  .ef-core-ring { position: absolute; inset: 0; animation: efSpin 6s linear infinite; }
  @keyframes efSpin { to { transform: rotate(360deg); } }
  .ef-core-ring .track { stroke: rgba(255,255,255,0.08); stroke-width: 1; fill: none; }
  .ef-core-ring .arc {
    stroke: var(--orange-500); stroke-width: 1.5;
    fill: none; stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(232,93,4,0.6));
  }
  .ef-core-inner {
    position: absolute; inset: 14px;
    border: 1px solid var(--dark-border);
    border-radius: 50%;
    background: var(--dark-surface);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px;
  }
  .ef-core-title {
    font-family: var(--font-display); font-weight: var(--fw-bold);
    font-size: 14px; letter-spacing: 0.12em;
    color: #fff; text-transform: uppercase;
  }
  .ef-core-sub {
    font-family: var(--font-mono); font-size: 9.5px;
    letter-spacing: 0.08em; color: var(--orange-500);
  }
  .ef-core-pulse {
    position: absolute; inset: 14px;
    border-radius: 50%;
    border: 1px solid var(--orange-500);
    opacity: 0;
    animation: efCorePulse 3.2s ease-out infinite;
  }
  @keyframes efCorePulse {
    0%   { transform: scale(0.96); opacity: 0.55; }
    100% { transform: scale(1.35); opacity: 0; }
  }
  .ef-footer {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    padding-top: 14px; border-top: 1px solid var(--dark-border);
  }
  .ef-stat {
    padding: 10px 12px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-sm);
  }
  .ef-stat-lbl {
    font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    display: block; margin-bottom: 4px;
  }
  .ef-stat-val {
    font-family: var(--font-display); font-weight: var(--fw-bold);
    font-size: 16px; color: #fff; letter-spacing: -0.02em;
  }
  .ef-stat-val .brand { color: var(--orange-500); }
  @media (prefers-reduced-motion: reduce) {
    .ef-flow, .ef-core-ring, .ef-core-pulse { animation: none; }
    .ef-core-ring { transform: none; }
  }

  @media (max-width: 920px) {
    .hero-grid { grid-template-columns: 1fr; gap: 56px; }
    .aion-mock { justify-self: stretch; max-width: 100%; }
  }

  /* =========================================================
     01b · WATCH VIDEO — centered header + inline player
     ========================================================= */
  .watch { padding: 48px 0 120px; text-align: center; }
  .watch-head { max-width: 640px; margin: 0 auto 48px; }
  .watch-head .eyebrow { margin-bottom: 16px; display: inline-block; }
  .watch-head h2 {
    font-size: clamp(28px, 3.4vw, 42px);
    margin: 0;
    color: var(--ink-heading);
  }
  .watch-head p {
    margin-top: 16px;
    color: var(--ink-muted);
    font-size: 16px; line-height: 1.6;
  }
  /* Video player frame — keeps dark because it's a product screenshot */
  .player {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-lg);
    overflow: hidden;
    cursor: pointer;
    background: #0F1012;
    border: 1px solid var(--hairline);
    transform: scale(0.92);
    opacity: 0;
    filter: saturate(0.7) brightness(0.85);
    transition:
      transform 900ms var(--ease-out),
      opacity 700ms var(--ease-out),
      filter 900ms var(--ease-out),
      box-shadow 900ms var(--ease-out);
    box-shadow: 0 0 0 0 rgba(232,93,4,0);
  }
  .player.is-in {
    transform: scale(1); opacity: 1;
    filter: saturate(1) brightness(1);
    box-shadow:
      0 40px 100px -30px rgba(0,0,0,0.3),
      0 20px 60px -20px rgba(232,93,4,0.25),
      0 0 0 1px rgba(0,0,0,0.06);
  }
  .player-poster {
    position: absolute; inset: 0;
    background:
      radial-gradient(circle at 30% 40%, rgba(232,93,4,0.25), transparent 55%),
      radial-gradient(circle at 75% 65%, rgba(255,143,61,0.14), transparent 60%),
      linear-gradient(135deg, #0F1012 0%, #1A1B1E 100%);
  }
  .player-poster::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 25%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 25%, transparent 70%);
  }
  .player-tag {
    position: absolute; top: 24px; left: 24px;
    font-family: var(--font-sans);
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--orange-500);
    display: inline-flex; align-items: center; gap: 10px;
  }
  .player-tag::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--orange-500);
    box-shadow: 0 0 0 4px rgba(232,93,4,0.24);
    animation: pulseDot 2.4s ease-in-out infinite;
  }
  .player-meta {
    position: absolute; bottom: 22px; left: 22px; right: 22px;
    display: flex; align-items: center;
    gap: 20px; z-index: 2;
  }
  .player-title {
    flex: 1;
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: clamp(18px, 2vw, 24px);
    color: #fff; letter-spacing: -0.01em; line-height: 1.2;
    text-align: left;
    max-width: 520px;
  }
  .player-duration {
    font-family: var(--font-mono);
    font-size: 12px; color: rgba(255,255,255,0.7);
    padding: 6px 12px;
    border-radius: var(--r-pill);
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.14);
    white-space: nowrap;
  }
  .player-play {
    position: relative;
    width: 64px; height: 64px; flex: 0 0 64px;
    border-radius: 50%;
    background: var(--orange-500);
    display: flex; align-items: center; justify-content: center;
    transition: transform var(--dur-med) var(--ease-out), background var(--dur-fast) var(--ease-out);
  }
  .player-play::before {
    content: ""; position: absolute; inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(232,93,4,0.55);
    animation: playRing 2.4s ease-out infinite;
  }
  @keyframes playRing {
    0%   { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0; }
  }
  .player-play svg { width: 22px; height: 22px; margin-left: 3px; }
  .player:hover .player-play { transform: scale(1.06); background: var(--orange-600); }
  @media (prefers-reduced-motion: reduce) {
    .player { transition: none; transform: none; opacity: 1; filter: none; }
    .player-play::before { animation: none; }
  }
  @media (max-width: 720px) {
    .player-meta { bottom: 16px; left: 16px; right: 16px; gap: 14px; }
    .player-duration { display: none; }
  }

  /* =========================================================
     02 · CAPABILITIES — white cards on sand
     ========================================================= */
  .capabilities { padding-bottom: 96px; }
  .cap-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  }
  .cap-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    padding: 36px 32px 38px;
    display: flex; flex-direction: column; gap: 14px;
    transition: border-color var(--dur-med) var(--ease-out),
                background var(--dur-med) var(--ease-out);
    min-height: 280px;
    overflow: hidden;
  }
  .cap-card:hover {
    border-color: var(--hairline-hi);
    background: var(--surface-hi);
  }
  .cap-num {
    font-family: var(--font-mono);
    font-size: 12px; font-weight: 600;
    color: var(--orange-500);
    letter-spacing: 0.1em;
  }
  .cap-icon-wrap {
    width: 56px; height: 56px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(232,93,4,0.12) 0%, rgba(232,93,4,0.03) 100%);
    border: 1px solid rgba(232,93,4,0.2);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 4px;
  }
  .cap-icon { width: 24px; height: 24px; color: var(--orange-500); }
  .cap-title {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 22px; letter-spacing: -0.01em; line-height: 1.2;
    color: var(--ink-heading); margin: 0;
  }
  .cap-body {
    font-size: 15px; line-height: 1.6;
    color: var(--ink-muted); margin: 0;
  }
  @media (max-width: 920px) { .cap-grid { grid-template-columns: 1fr 1fr !important; } }
  @media (max-width: 640px) {
    .cap-grid { grid-template-columns: 1fr !important; }
    .cap-grid:has(> :nth-child(4)) { grid-template-columns: 1fr 1fr !important; gap: 14px !important; }
  }

  /* Solutions constellation — replaces the old 8-card grid */
  .solutions-viz { margin: 64px auto 0; max-width: 720px; }
  .solutions-viz svg { width: 100%; height: auto; display: block; }
  @media (max-width: 560px) {
    .solutions-viz { margin-top: 40px; }
  }

  /* Platform atlas — wider than constellation to keep dense label text readable */
  .platform-atlas { margin: 64px auto 0; max-width: 1200px; }
  .platform-atlas svg { width: 100%; height: auto; display: block; }
  @media (max-width: 560px) { .platform-atlas { margin-top: 40px; } }

  /* Solutions atlas — same treatment as platform atlas */
  .solutions-atlas { margin: 64px auto 0; max-width: 1200px; }
  .solutions-atlas svg { width: 100%; height: auto; display: block; }
  @media (max-width: 560px) { .solutions-atlas { margin-top: 40px; } }

  /* =========================================================
     03 · 3-STAGE ENGINE — white cards, ink numbers, orange arc
     ========================================================= */
  .engine { padding: 128px 0; }
  .engine-grid {
    display: grid; grid-template-columns: 1fr 36px 1fr 36px 1fr;
    gap: 0; align-items: stretch;
    margin-bottom: 48px;
    position: relative; z-index: 2;
  }
  .stage {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: 40px 32px;
    display: flex; flex-direction: column; gap: 14px;
    transition: border-color var(--dur-med) var(--ease-out);
  }
  .stage .stage-fill {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 0% 0%, rgba(232,93,4,0.06), transparent 60%);
    opacity: 0;
    transition: opacity 600ms var(--ease-out);
    pointer-events: none;
  }
  .stage > *:not(.stage-fill) { position: relative; z-index: 1; }
  .stage.is-active .stage-fill { opacity: 1; }
  .stage.is-active { border-color: var(--orange-500); }
  .stage.is-active .stage-num {
    background: var(--orange-500);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(232,93,4,0.12);
  }
  .stage-num {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--ink-heading);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: 15px; font-weight: 600;
    margin-bottom: 6px;
    transition: background var(--dur-med) var(--ease-out),
                box-shadow var(--dur-med) var(--ease-out);
  }
  .stage-title {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 22px; line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink-heading); margin: 0;
  }
  .stage-caps {
    font-family: var(--font-sans);
    font-size: 13px; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--orange-500);
  }
  .stage-body {
    font-size: 15px; line-height: 1.6;
    color: var(--ink-muted);
  }
  .stage-meta { margin-top: auto; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
  .chip {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-muted);
    padding: 5px 10px;
    background: var(--sand);
    border: 1px solid var(--hairline);
    border-radius: var(--r-pill);
  }
  .stage-sep {
    align-self: center;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-faint);
    font-size: 22px;
    height: 100%;
  }
  .stage-sep .sep-track {
    position: absolute; left: 12%; right: 12%;
    top: calc(50% - 1px);
    height: 2px; background: var(--hairline);
  }
  .stage-sep .sep-fill {
    position: absolute; left: 12%; right: 12%;
    top: calc(50% - 1px);
    height: 2px;
    background: linear-gradient(90deg, var(--orange-500), rgba(255,143,61,1));
    box-shadow: 0 0 10px rgba(232,93,4,0.4);
    transform-origin: 0 50%;
    transform: scaleX(0);
  }
  .stage-sep .sep-arrow {
    position: relative; z-index: 1;
    background: var(--sand-soft);
    padding: 0 8px;
    color: var(--ink-faint);
  }
  .engine-link { display: flex; justify-content: flex-end; position: relative; z-index: 2; }
  @media (max-width: 920px) {
    .engine-grid { grid-template-columns: 1fr; gap: 16px; }
    .stage-sep { display: none; }
  }

  /* =========================================================
     04 · THE SCIENCE — 2×2 proof tiles on sand
     ========================================================= */
  .science { padding: 128px 0; }
  .proof-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  }
  .proof {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    padding: 44px 40px;
    transition: border-color var(--dur-med) var(--ease-out);
    display: flex; flex-direction: column; gap: 14px;
  }
  .proof:hover { border-color: var(--hairline-hi); }
  .proof-no {
    font-family: var(--font-sans);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--orange-500);
  }
  .proof-head {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 24px; line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink-heading); margin: 0;
  }
  .proof-plain {
    font-family: var(--font-sans);
    font-size: 15.5px; font-weight: 500;
    color: var(--orange-500);
    margin: 0;
  }
  .proof-body {
    font-size: 15px; line-height: 1.6; color: var(--ink-muted);
    margin: 0;
  }
  @media (max-width: 820px) {
    .proof-grid { grid-template-columns: 1fr; }
    .proof { padding: 36px 32px; }
  }

  /* ---------- Why Kernia · 3-up proof ----------
     Desktop: 3-column grid. Mobile: 1-column stack. */
  .why-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  @media (max-width: 820px) {
    .why-slider { grid-template-columns: 1fr; gap: 16px; }
    .why-slider > .proof { padding: 36px 32px; }
  }

  /* =========================================================
     05 · DEPLOY SPEED — white metrics + dark product screen
     ========================================================= */
  .deploy { padding: 128px 0; }
  .deploy-grid {
    display: grid; grid-template-columns: 0.9fr 1.1fr;
    gap: 64px; align-items: center;
  }
  .metric-pair {
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    overflow: hidden;
  }
  .metric-cell {
    padding: 44px 36px;
    border-right: 1px solid var(--hairline);
  }
  .metric-cell:last-child { border-right: none; }
  .metric-val {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: clamp(44px, 5.5vw, 72px);
    line-height: 1;
    color: var(--ink-heading);
    letter-spacing: -0.02em;
    display: block;
    margin-bottom: 16px;
  }
  .metric-cap {
    font-family: var(--font-sans);
    font-size: 11.5px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--orange-500);
    display: block; margin-bottom: 12px;
  }
  .metric-sub {
    font-size: 13.5px; line-height: 1.55;
    color: var(--ink-muted);
    margin: 0;
  }
  /* Deploy action screen — stays DARK as a product-island */
  .deploy-screen {
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-lg);
    padding: 22px;
    box-shadow: 0 30px 80px -30px rgba(0,0,0,0.2);
    color: var(--dark-text);
  }
  .ds-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 14px; margin-bottom: 18px;
    border-bottom: 1px solid var(--dark-border);
  }
  .ds-tag {
    font-family: var(--font-sans); font-size: 11px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--orange-500);
  }
  .ds-pill {
    font-family: var(--font-mono); font-size: 11px;
    color: rgba(255,255,255,0.6);
    padding: 4px 10px; border-radius: var(--r-pill);
    border: 1px solid var(--dark-border);
  }
  .ds-title {
    font-family: var(--font-display); font-weight: var(--fw-bold);
    font-size: 16px; color: #fff;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
  }
  .action-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--dark-border);
    border-radius: var(--r-md);
    padding: 14px 16px; margin-bottom: 10px;
    display: grid; grid-template-columns: 1fr auto; gap: 12px;
    align-items: center;
  }
  .action-card:hover { border-color: rgba(232,93,4,0.4); }
  .ac-title {
    font-family: var(--font-sans); font-size: 13.5px; font-weight: 500;
    color: #fff; margin-bottom: 4px;
  }
  .ac-meta { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.5); }
  .ac-roi {
    font-family: var(--font-display); font-weight: var(--fw-bold);
    font-size: 16px; color: var(--orange-500);
    letter-spacing: -0.02em;
  }
  .deploy-roi {
    margin-top: 40px;
    display: flex; justify-content: flex-end;
  }
  @media (max-width: 920px) {
    .deploy-grid { grid-template-columns: 1fr; gap: 40px; }
    .metric-pair { grid-template-columns: 1fr; }
    .metric-cell { border-right: none; border-bottom: 1px solid var(--hairline); }
    .metric-cell:last-child { border-bottom: none; }
  }

  /* =========================================================
     06 · DEMO CLOSER — orange band (the one chromatic moment)
     ========================================================= */
  .closer { padding: 96px 0 128px; }
  .closer-card {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    border-radius: var(--r-2xl);
    padding: 96px 64px;
    text-align: center;
    background: var(--orange-500);
    color: #fff;
    overflow: hidden;
  }
  .closer-card .pre {
    font-family: var(--font-sans);
    font-size: 12.5px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    margin-bottom: 24px;
    display: inline-flex; align-items: center; gap: 16px;
  }
  .closer-card .pre .dot {
    width: 3px; height: 3px; background: currentColor; border-radius: 50%;
    display: inline-block;
  }
  .closer-card h2 {
    color: #fff;
    max-width: 880px; margin: 0 auto 24px;
    font-size: clamp(36px, 5vw, 60px);
    letter-spacing: -0.02em;
  }
  .closer-card p.sub {
    font-size: 17px; line-height: 1.6;
    color: rgba(255,255,255,0.9);
    max-width: 640px; margin: 0 auto 40px;
  }
  .closer-card .ctas {
    display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 40px;
  }
  .closer-card .btn--primary {
    background: #fff; color: var(--orange-500);
  }
  .closer-card .btn--primary:hover { background: var(--ink-heading); color: #fff; }
  .closer-card .btn--ink-outline {
    color: #fff; border-color: rgba(255,255,255,0.55);
  }
  .closer-card .btn--ink-outline:hover { background: #fff; color: var(--orange-500); border-color: #fff; }
  .trust-strip {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 28px;
    font-family: var(--font-sans);
    font-size: 13px; font-weight: 500;
    color: rgba(255,255,255,0.9);
  }
  .trust-strip span { display: inline-flex; align-items: center; gap: 10px; }
  .trust-strip span + span::before {
    content: ""; width: 3px; height: 3px; border-radius: 50%;
    background: rgba(255,255,255,0.55);
    margin-right: 18px;
  }
  @media (max-width: 720px) { .closer-card { padding: 64px 28px; } }

  /* =========================================================
     FOOTER — dark ink (anchors the bottom of the sand page)
     ========================================================= */
  footer {
    background: var(--dark-bg);
    color: #fff;
    padding: 96px 0 40px;
    position: relative;
  }
  .sign-off {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    text-align: center;
    font-size: clamp(36px, 5vw, 64px);
    color: #fff;
    letter-spacing: -0.02em;
    padding-bottom: 64px;
    margin-bottom: 64px;
    border-bottom: 1px solid var(--dark-border);
  }
  .sign-off .orange { color: var(--orange-500); }
  .foot-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  }
  .foot-grid h4 {
    font-family: var(--font-sans);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin: 0 0 20px;
  }
  .foot-grid ul { list-style: none; padding: 0; margin: 0; }
  .foot-grid li { margin-bottom: 12px; }
  .foot-grid a {
    color: var(--dark-soft);
    font-size: 14.5px;
    transition: color var(--dur-fast) var(--ease-out);
  }
  .foot-grid a:hover { color: #fff; }
  .foot-brand .brand { margin-bottom: 16px; color: #fff; }
  .foot-brand .line { color: var(--dark-mute); font-size: 14px; max-width: 300px; line-height: 1.6; }
  .foot-bottom {
    margin-top: 64px; padding-top: 28px;
    border-top: 1px solid var(--dark-border);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    font-size: 12.5px; color: var(--dark-mute);
  }
  @media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

  /* =========================================================
     VIDEO MODAL (dark, same as v2)
     ========================================================= */
  body.modal-open { position: fixed; width: 100%; overflow: hidden; }
  .player-modal {
    position: fixed; inset: 0; z-index: 200;
    display: none; align-items: center; justify-content: center;
    padding: 48px 48px 80px;
  }
  .player-modal.is-open { display: flex; }
  .player-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(5, 5, 7, 0.82);
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
    cursor: zoom-out;
  }
  .player-modal.is-open .player-modal-backdrop { opacity: 1; }
  .player-modal-frame {
    position: relative; z-index: 1;
    width: 100%; max-width: 1200px;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: #0F1012;
    box-shadow: 0 40px 120px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 450ms var(--ease-out), transform 550ms var(--ease-out);
  }
  .player-modal.is-open .player-modal-frame { opacity: 1; transform: scale(1); }
  .player-modal-frame .player-poster {
    position: absolute; inset: 0;
    background:
      radial-gradient(circle at 30% 40%, rgba(232,93,4,0.28), transparent 55%),
      radial-gradient(circle at 75% 65%, rgba(255,143,61,0.14), transparent 60%),
      linear-gradient(135deg, #0F1012 0%, #1A1B1E 100%);
  }
  .player-modal-frame .player-poster::after {
    content: ""; position: absolute; inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 25%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 25%, transparent 70%);
  }
  .player-modal-frame .player-tag {
    position: absolute; top: 28px; left: 28px;
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--orange-500);
    display: inline-flex; align-items: center; gap: 10px;
  }
  .player-modal-frame .player-tag::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--orange-500);
    box-shadow: 0 0 0 4px rgba(232,93,4,0.24);
    animation: pulseDot 2.4s ease-in-out infinite;
  }
  .player-modal-frame .player-play {
    position: relative;
    width: 84px; height: 84px; flex: 0 0 84px;
    border-radius: 50%;
    background: var(--orange-500);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform var(--dur-med) var(--ease-out), background var(--dur-fast) var(--ease-out), opacity 300ms var(--ease-out);
    border: none; padding: 0;
  }
  .player-modal-frame .player-play::before {
    content: ""; position: absolute; inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(232,93,4,0.55);
    animation: playRing 2.4s ease-out infinite;
  }
  .player-modal-frame .player-play svg { width: 28px; height: 28px; margin-left: 4px; }
  .player-modal-frame .player-play:hover { background: var(--orange-600); transform: scale(1.06); }
  .player-modal-frame.is-playing .player-play { opacity: 0; pointer-events: none; }
  .player-modal-frame.is-playing .player-poster::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
  }
  .player-modal-frame .player-meta {
    position: absolute; bottom: 28px; left: 28px; right: 28px;
    display: flex; align-items: center;
    gap: 24px; z-index: 2;
  }
  .player-modal-frame .player-title {
    flex: 1;
    font-family: var(--font-display); font-weight: var(--fw-bold);
    font-size: clamp(22px, 2.4vw, 30px);
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.2;
    max-width: 620px;
  }
  .player-modal-frame .player-duration {
    font-family: var(--font-mono);
    font-size: 12px; color: rgba(255,255,255,0.75);
    padding: 6px 12px;
    border-radius: var(--r-pill);
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.14);
    white-space: nowrap;
  }
  .player-modal-progress {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 3px; background: rgba(255,255,255,0.12);
    z-index: 4; opacity: 0;
    transition: opacity 300ms var(--ease-out);
  }
  .player-modal-progress::after {
    content: ""; display: block;
    height: 100%; width: 0%; background: var(--orange-500);
  }
  .player-modal-frame.is-playing .player-modal-progress { opacity: 1; }
  .player-modal-frame.is-playing .player-modal-progress::after { animation: fauxProgress 134s linear forwards; }
  @keyframes fauxProgress { 0% { width: 0%; } 100% { width: 100%; } }
  .player-modal-close {
    position: fixed;
    top: 24px; right: 24px;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
    z-index: 2; padding: 0;
  }
  .player-modal-close svg { width: 18px; height: 18px; }
  .player-modal-close:hover { background: var(--orange-500); border-color: var(--orange-500); transform: scale(1.05); }
  .player-modal-hint {
    position: fixed;
    left: 50%; bottom: 28px;
    transform: translateX(-50%);
    font-family: var(--font-sans);
    font-size: 11.5px; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
  }
  .player-modal-hint kbd {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 6px;
    margin: 0 2px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.75);
  }
  @media (max-width: 720px) {
    .player-modal { padding: 24px 16px 72px; }
    .player-modal-close { top: 16px; right: 16px; }
    .player-modal-frame .player-play { width: 60px; height: 60px; flex-basis: 60px; }
    .player-modal-frame .player-play svg { width: 20px; height: 20px; }
    .player-modal-frame .player-tag { top: 16px; left: 16px; }
    .player-modal-frame .player-meta { bottom: 16px; left: 16px; right: 16px; gap: 14px; }
    .player-modal-frame .player-title { font-size: 16px; }
    .player-modal-frame .player-duration { display: none; }
    .player-modal-hint { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .player-modal-backdrop, .player-modal-frame { transition: none; }
    .player-modal-frame .player-play::before { animation: none; }
    .player-modal-frame.is-playing .player-modal-progress::after { animation: none; width: 30%; }
  }

  /* ---------- Variant badge ---------- */
  .variant-badge {
    position: fixed; top: 14px; left: 14px;
    z-index: 90;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-muted);
    padding: 5px 10px;
    border-radius: var(--r-pill);
    background: var(--surface);
    border: 1px solid var(--hairline);
    pointer-events: none;
  }
  .variant-badge .dot {
    display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: var(--orange-500); margin-right: 6px; vertical-align: middle;
  }

  /* ---------- Blog index · 3-column card grid ----------
     /blog/, category, tag, date archives, and search all render through
     this layout. Eyebrow + h1 + lede on top, grid of .post-card under.
     Cards are flat (no shadow, hairline border, subtle hover state). */
  .blog-index { padding: 96px 0 128px; }
  .blog-index__head { max-width: 720px; margin: 0 0 64px; }
  .blog-index__head h1 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink-heading);
    margin: 16px 0 20px;
  }
  .blog-index__head .lede {
    font-size: 18px; line-height: 1.55; color: var(--ink-muted); margin: 0;
  }
  .post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .post-card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: border-color var(--dur-med) var(--ease-out),
                transform     var(--dur-med) var(--ease-out);
  }
  .post-card:hover { border-color: var(--ink-heading); transform: translateY(-2px); }
  .post-card__image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--paper-soft);
    border-bottom: 1px solid var(--hairline);
    overflow: hidden;
  }
  .post-card__image img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--dur-slow) var(--ease-out);
  }
  .post-card:hover .post-card__image img { transform: scale(1.03); }
  .post-card__placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--orange-500);
  }
  .post-card__placeholder svg { width: 48px; height: 48px; opacity: 0.55; }
  .post-card__content {
    display: flex; flex-direction: column; gap: 12px;
    padding: 28px 28px 28px;
    flex: 1;
  }
  .post-card__eyebrow { margin: 0; }
  .post-card__title {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink-heading);
    margin: 4px 0 0;
  }
  .post-card__title a { color: inherit; text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
  .post-card__title a:hover { color: var(--orange-500); }
  .post-card__excerpt {
    font-size: 15px; line-height: 1.55; color: var(--ink-muted); margin: 0;
  }
  .post-card__meta {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-sans);
    font-size: 13px; color: var(--ink-muted);
  }
  .post-card__dot { color: var(--ink-faint); }

  .pagination {
    margin-top: 64px;
    display: flex; justify-content: center; gap: 8px;
    flex-wrap: wrap;
  }
  .pagination a.page-numbers,
  .pagination span.page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px;
    padding: 0 14px;
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 500;
    color: var(--ink-heading);
    background: transparent;
    border: 0;
    border-radius: var(--r-sm);
    text-decoration: none;
    line-height: 1;
    transition: background var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
  }
  .pagination a.page-numbers:hover {
    background: var(--paper-soft);
    color: var(--orange-500);
  }
  .pagination span.page-numbers.current {
    background: var(--orange-500);
    color: #fff;
    font-weight: 600;
  }
  .pagination .page-numbers.dots {
    background: transparent;
    color: var(--ink-muted);
  }
  .pagination .page-numbers.prev,
  .pagination .page-numbers.next {
    min-width: auto;
    padding: 0 16px;
  }

  .post-empty { padding: 64px 0; text-align: center; color: var(--ink-muted); }

  @media (max-width: 960px) {
    .post-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  }
  @media (max-width: 640px) {
    .blog-index { padding: 64px 0 96px; }
    .blog-index__head { margin-bottom: 48px; }
    .post-grid { grid-template-columns: 1fr; gap: 20px; }
    .post-card__content { padding: 24px 22px; }
  }

  /* ---------- Single post article ----------
     Centered header + measure-constrained body. Typography mirrors the
     brand — Renogare headlines, Aeonik body at 17/1.7, generous vertical
     rhythm, orange accent for links and eyebrow. */
  .post-article { padding: 96px 0 128px; }
  .post-article__header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 48px;
  }
  .post-article__title {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--ink-heading);
    margin: 16px 0 20px;
    text-wrap: balance;
  }
  .post-article__lede {
    font-size: 20px; line-height: 1.5; color: var(--ink-muted);
    margin: 0 0 28px;
    text-wrap: pretty;
  }
  .post-article__meta {
    display: inline-flex; align-items: center; gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 13.5px; color: var(--ink-muted);
  }
  .post-article__author {
    display: inline-flex; align-items: center; gap: 10px;
  }
  .post-article__avatar-wrap {
    width: 36px; height: 36px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--paper-soft);
    border: 1px solid var(--hairline);
    flex: 0 0 36px;
  }
  .post-article__avatar {
    width: 100%; height: 100%;
    display: block;
    object-fit: cover;
  }
  .post-article__author-name {
    font-weight: 600;
    color: var(--ink-heading);
  }
  .post-article__dot { color: var(--ink-faint); }
  .post-article__hero { max-width: 1120px; margin: 0 auto 64px; padding: 0 32px; }
  .post-article__hero img {
    width: 100%; height: auto; display: block;
    border-radius: var(--r-lg);
    border: 1px solid var(--hairline);
  }
  .post-article__body {
    max-width: 720px;
    font-family: var(--font-sans);
    font-size: 17px; line-height: 1.7; color: var(--ink);
  }
  .post-article__body > * + * { margin-top: 1.4em; }
  .post-article__body h2 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--ink-heading);
    margin-top: 2.2em;
  }
  .post-article__body h3 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 22px;
    color: var(--ink-heading);
    margin-top: 2em;
  }
  .post-article__body p.p-lg { font-size: 19px; line-height: 1.55; color: var(--ink-heading); }
  .post-article__body a { color: var(--orange-500); text-decoration: underline; text-underline-offset: 2px; }
  .post-article__body a:hover { color: var(--orange-600); }
  .post-article__body blockquote {
    margin: 2em 0;
    padding: 4px 0 4px 24px;
    border-left: 2px solid var(--orange-500);
    font-family: var(--font-display);
    font-size: 22px; line-height: 1.4;
    color: var(--ink-heading);
  }
  .post-article__body ul, .post-article__body ol { padding-left: 24px; }
  .post-article__body li + li { margin-top: 8px; }
  .post-article__body img { max-width: 100%; height: auto; border-radius: var(--r-md); }
  .post-article__body code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    padding: 2px 6px;
    background: var(--paper-soft);
    border-radius: 4px;
  }
  .post-article__footer {
    max-width: 720px;
    margin: 64px auto 0;
    padding-top: 40px;
    border-top: 1px solid var(--hairline);
    text-align: center;
  }
  .post-article__back {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 600;
    color: var(--ink-heading);
    background: transparent;
    border: 1px solid var(--ink-heading);
    border-radius: var(--r-sm);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
  }
  .post-article__back::before {
    content: "\2190";
    color: var(--orange-500);
    font-weight: 400;
    transition: transform var(--dur-fast) var(--ease-out);
  }
  .post-article__back:hover {
    background: var(--ink-heading);
    color: #fff;
  }
  .post-article__back:hover::before { transform: translateX(-3px); color: var(--orange-500); }

  /* ---------- Share button (inline with article meta row) ---------- */
  .post-share {
    position: relative;
    display: inline-flex;
  }
  .post-share__toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out);
  }
  .post-share__toggle:hover { color: var(--orange-500); }
  .post-share__icon { width: 14px; height: 14px; display: block; }
  .post-share__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    min-width: 200px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-3);
    display: flex; flex-direction: column; gap: 2px;
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
    z-index: 60;
  }
  .post-share[data-open="true"] .post-share__menu {
    opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
  }
  .post-share__menu[hidden] { display: none; }
  .post-share[data-open="true"] .post-share__menu[hidden] { display: flex; }
  .post-share__item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 500;
    color: var(--ink-heading);
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: var(--r-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out);
  }
  .post-share__item:hover { background: var(--paper-soft); color: var(--orange-500); }
  .post-share__item svg { width: 16px; height: 16px; flex: 0 0 16px; }

  @media print {
    .topnav, footer, .post-share, .post-article__footer,
    .scroll-progress, .trusted-ribbon, .hero-video { display: none !important; }
    body, .post-article, .post-article__body, .post-article__header {
      background: #fff !important; color: #000 !important;
    }
    .post-article { padding: 0 !important; }
    .post-article__hero { page-break-inside: avoid; }
    .post-article__body { max-width: 100%; font-size: 12pt; }
    a { color: #000 !important; text-decoration: underline; }
    .post-article__body a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #555; }
  }

  @media (max-width: 640px) {
    .post-article { padding: 64px 0 96px; }
    .post-article__header { margin-bottom: 32px; }
    .post-article__hero { margin-bottom: 40px; padding: 0 20px; }
    .post-article__body h2 { font-size: 24px; }
    .post-article__body h3 { font-size: 20px; }
    .post-article__body blockquote { font-size: 19px; }
  }

  /* ---------- Contact page (CF7-driven) ---------- */
  .contact-page { padding: 96px 0 128px; }
  .contact-page__head { max-width: 720px; margin: 0 0 64px; }
  .contact-page__head h1 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: clamp(40px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink-heading);
    margin: 16px 0 18px;
    text-wrap: balance;
  }
  .contact-page__head .lede {
    font-size: 18px; line-height: 1.55; color: var(--ink-muted); margin: 0;
  }
  .contact-page__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 64px;
    align-items: start;
  }
  .contact-page__info { display: flex; flex-direction: column; gap: 32px; }
  .contact-info__block {
    padding: 24px 24px 8px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
  }
  .contact-info__block h3 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 18px;
    margin: 0 0 12px;
    color: var(--ink-heading);
  }
  .contact-info__block p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-heading);
  }
  .contact-info__block .caption { color: var(--ink-muted); font-size: 13px; }
  .contact-info__block a {
    color: var(--orange-500);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
  }
  .contact-info__block a:hover { color: var(--orange-600); }

  .contact-page .wpcf7-form { display: flex; flex-direction: column; gap: 18px; }
  .contact-page .k-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0; }
  .contact-page .k-field { margin: 0; }
  .contact-page .k-field label {
    display: block;
    font-family: var(--font-sans);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 8px;
  }
  .contact-page .k-required { color: var(--orange-500); margin-left: 2px; }
  .contact-page input[type="text"],
  .contact-page input[type="email"],
  .contact-page textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-heading);
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-sm);
    transition: border-color var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
  }
  .contact-page textarea { resize: vertical; min-height: 160px; }
  .contact-page input:focus, .contact-page textarea:focus {
    outline: none;
    border-color: var(--ink-heading);
    box-shadow: 0 0 0 3px rgba(232,93,4,.15);
  }
  .contact-page .wpcf7-not-valid { border-color: #C8321F; background: #FFF8F6; }
  .contact-page .wpcf7-not-valid-tip {
    display: block;
    font-size: 12px;
    color: #C8321F;
    margin-top: 6px;
  }
  .contact-page .cf-turnstile { margin-top: 4px; }
  .contact-page .k-field--submit { display: flex; }
  .contact-page input[type="submit"],
  .contact-page .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--orange-500);
    border: 0;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
  }
  .contact-page input[type="submit"]:hover,
  .contact-page .wpcf7-submit:hover { background: var(--orange-600); transform: translateY(-1px); }
  .contact-page input[type="submit"]:disabled,
  .contact-page .wpcf7-submit:disabled { opacity: 0.6; cursor: progress; transform: none; }
  .contact-page .wpcf7-spinner {
    display: inline-block; width: 16px; height: 16px;
    margin-left: 12px;
    border: 2px solid var(--hairline);
    border-top-color: var(--orange-500);
    border-radius: 50%;
    animation: kernia-spin 600ms linear infinite;
    vertical-align: middle;
    visibility: hidden;
  }
  .contact-page .wpcf7-form.submitting .wpcf7-spinner { visibility: visible; }
  @keyframes kernia-spin { to { transform: rotate(360deg); } }
  .contact-page .wpcf7-response-output {
    margin: 16px 0 0 !important;
    padding: 16px 18px !important;
    border-radius: var(--r-sm);
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid !important;
  }
  .contact-page .wpcf7-form.sent .wpcf7-response-output {
    color: #1E8E3E;
    background: #F0FAF1;
    border-color: #1E8E3E !important;
  }
  .contact-page .wpcf7-form.invalid .wpcf7-response-output,
  .contact-page .wpcf7-form.failed .wpcf7-response-output,
  .contact-page .wpcf7-form.unaccepted .wpcf7-response-output,
  .contact-page .wpcf7-form.spam .wpcf7-response-output {
    color: #C8321F;
    background: #FFF1ED;
    border-color: #C8321F !important;
  }

  @media (max-width: 920px) {
    .contact-page__grid { grid-template-columns: 1fr; gap: 40px; }
  }
  @media (max-width: 640px) {
    .contact-page { padding: 64px 0 96px; }
    .contact-page__head { margin-bottom: 40px; }
    .contact-page .k-form-row { grid-template-columns: 1fr; gap: 18px; }
  }

  /* ---------- Legal / policy page (Privacy, Terms, Cookie, DPA, …) ----------
     Assign the 'Legal / policy page' template from Page Attributes on any
     WP page to render it with this long-form layout: centered title,
     effective-date eyebrow, measure-constrained body, typography-forward. */
  .legal-page { padding: 96px 0 128px; }
  .legal-page__header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 56px;
  }
  .legal-page__header .eyebrow { margin-bottom: 14px; display: inline-block; }
  .legal-page__header h1 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--ink-heading);
    margin: 0 0 14px;
    text-wrap: balance;
  }
  .legal-page__effective {
    font-family: var(--font-sans);
    font-size: 13px; color: var(--ink-muted);
    letter-spacing: 0.08em; text-transform: uppercase;
  }
  .legal-page__body {
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--font-sans);
    font-size: 16.5px; line-height: 1.7;
    color: var(--ink);
  }
  .legal-page__body > * + * { margin-top: 1.3em; }
  .legal-page__body h2 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 26px;
    line-height: 1.2;
    color: var(--ink-heading);
    margin-top: 2.4em;
  }
  .legal-page__body h3 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 20px;
    color: var(--ink-heading);
    margin-top: 2em;
  }
  .legal-page__body a { color: var(--orange-500); text-decoration: underline; text-underline-offset: 2px; }
  .legal-page__body ul, .legal-page__body ol { padding-left: 24px; }
  .legal-page__body li + li { margin-top: 6px; }
  .legal-page__body table {
    width: 100%; border-collapse: collapse; margin: 1.6em 0;
    font-size: 15px;
  }
  .legal-page__body th, .legal-page__body td {
    text-align: left; padding: 10px 12px;
    border-bottom: 1px solid var(--hairline);
    vertical-align: top;
  }
  .legal-page__body th {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--ink-heading);
  }
  @media (max-width: 640px) {
    .legal-page { padding: 64px 0 96px; }
    .legal-page__header { margin-bottom: 40px; }
    .legal-page__body { font-size: 16px; }
    .legal-page__body h2 { font-size: 22px; }
  }

  /* ---------- Hero insight · signal → pattern → persona → insight ----------
     Five-stage animation in the hero's right column:
       1. Dots (signals) fade in, grouped into three spatial clusters
       2. Lines connect dots within and across clusters (patterns emerge)
       3. Dashed rings draw around each cluster (group recognised)
       4. Persona labels fade in beside each ring
          (CHANGE AMBASSADOR · TRANSFORMATION DRIVER · CULTURE ANCHOR)
       5. Three insight cards slide up — each with a count-up metric
          and a one-line recommendation tied to the corresponding persona
     Final frame is visible if JS never runs; motion is respected. */
  .hero-insight {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    aspect-ratio: 1 / 1;
  }
  .hi-net { width: 100%; height: 100%; display: block; overflow: visible; }
  .hi-nodes circle {
    fill: var(--ink-heading);
    opacity: 0;
    animation: hi-node-in 600ms var(--ease-out) forwards;
  }
  .hi-lines line {
    stroke: var(--orange-500);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    animation: hi-line-draw 900ms var(--ease-out) forwards;
    opacity: 0.75;
  }
  /* Dashed persona ring around each cluster */
  .hi-rings circle {
    fill: none;
    stroke: var(--orange-500);
    stroke-width: 1.2;
    stroke-dasharray: 3 5;
    opacity: 0;
    animation: hi-ring-in 700ms var(--ease-out) forwards;
  }
  /* Persona labels sit in the SVG using the brand eyebrow style */
  .hi-personas text {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    fill: var(--orange-500);
    opacity: 0;
    transform: translateY(4px);
    transform-origin: center;
    transform-box: fill-box;
    animation: hi-persona-in 600ms var(--ease-out) forwards;
  }
  /* Three insight cards — metric + persona-driven recommendation */
  .hi-card {
    position: absolute;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-2);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 172px;
    max-width: 62%;
    opacity: 0;
    transform: translateY(12px);
    animation: hi-card-in 720ms var(--ease-out) forwards;
    z-index: 2;
  }
  .hi-card-label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }
  .hi-card-val {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 30px;
    line-height: 1;
    color: var(--ink-heading);
    letter-spacing: -0.02em;
  }
  .hi-card-rec {
    margin-top: 2px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.35;
  }
  .hi-card-rec::before {
    content: "\2192";
    color: var(--orange-500);
    margin-right: 6px;
    font-weight: 700;
  }
  .hi-card--1 { top: 0;     right: -2%;  animation-delay: 2500ms; }
  .hi-card--2 { top: 42%;   left: -2%;   animation-delay: 2700ms; }
  .hi-card--3 { bottom: 0;  right: 8%;   animation-delay: 2900ms; }
  .hi-card--1 .hi-card-val { color: var(--orange-500); }

  @keyframes hi-node-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  @keyframes hi-line-draw {
    from { stroke-dashoffset: 420; }
    to   { stroke-dashoffset: 0; opacity: 0.75; }
  }
  @keyframes hi-ring-in {
    from { opacity: 0; }
    to   { opacity: 0.45; }
  }
  @keyframes hi-persona-in {
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes hi-card-in {
    to { opacity: 1; transform: translateY(0); }
  }

  @media (max-width: 920px) {
    .hero-insight { margin-left: 0; margin-right: auto; max-width: 460px; }
    .hi-card { min-width: 156px; }
    .hi-card-val { font-size: 26px; }
    .hi-card-rec { font-size: 11.5px; }
  }
  @media (max-width: 560px) {
    .hi-card { padding: 10px 14px; min-width: 140px; max-width: 64%; }
    .hi-card-label { font-size: 10px; }
    .hi-card-val { font-size: 22px; }
    .hi-card-rec { font-size: 11px; }
    .hi-personas text { font-size: 10px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .hi-nodes circle { opacity: 1; animation: none; }
    .hi-lines line { stroke-dashoffset: 0; animation: none; }
    .hi-rings circle { opacity: 0.45; animation: none; }
    .hi-personas text { opacity: 1; transform: none; animation: none; }
    .hi-card { opacity: 1; transform: none; animation: none; }
  }

  /* ---------- Homepage video · scale-on-reveal ----------
     Rendered by the [kernia_homepage_video] shortcode above the Hidden
     Gap section. The frame starts at 0.88 scale and ramps to 1.0 when
     it enters the viewport (~25% visible), so the block feels like it
     presents itself as the reader arrives. Start state is visible
     (opacity 0.92) so if JS never runs the frame is still watchable. */
  .hero-video { padding: 72px 0 24px; scroll-margin-top: calc(var(--topnav-h, 72px) + 16px); }
  .hero-video__frame {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: #0F1012;
    border: 1px solid var(--hairline);
    transform: scale(0.88);
    opacity: 0.92;
    transition: transform 720ms var(--ease-out),
                opacity 720ms var(--ease-out);
    will-change: transform;
  }
  .hero-video__frame.is-in {
    transform: scale(1);
    opacity: 1;
  }
  .hero-video__frame .hv-video,
  .hero-video__frame .hv-embed,
  .hero-video__frame .hv-embed iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
  }

  /* Overlay play button — bottom-left CTA that kicks off playback. JS
     toggles .is-playing on the frame once playback starts, which hides
     this button and reveals the native <video> toolbar. */
  .hero-video__play {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 2;
    width: 72px; height: 72px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--orange-500);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0,0,0,.35);
    transition: background var(--dur-fast) var(--ease-out),
                transform  var(--dur-med)  var(--ease-out),
                opacity    var(--dur-med)  var(--ease-out);
  }
  .hero-video__play:hover { background: var(--orange-600); transform: translateY(-2px); }
  .hero-video__play:focus-visible {
    outline: none;
    box-shadow: 0 10px 28px rgba(0,0,0,.35), 0 0 0 3px rgba(255,255,255,.85);
  }
  .hero-video__play-icon {
    width: 28px; height: 28px;
    margin-left: 3px; /* optical centering for the right-pointing triangle */
    display: block;
  }
  .hero-video__frame.is-playing .hero-video__play {
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px) scale(.92);
  }
  @media (max-width: 560px) {
    .hero-video__play { width: 56px; height: 56px; left: 16px; bottom: 16px; }
    .hero-video__play-icon { width: 22px; height: 22px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero-video__play { transition: opacity var(--dur-fast) linear; }
    .hero-video__play:hover { transform: none; }
  }
  .hero-video--empty .hv-empty {
    text-align: center;
    font-size: 14px;
    color: var(--ink-muted);
    padding: 24px 0;
    background: var(--surface-hi);
    border: 1px dashed var(--hairline);
    border-radius: var(--r-sm);
  }
  @media (max-width: 720px) {
    .hero-video { padding: 48px 0 16px; }
    .hero-video__frame {
      border-radius: var(--r-sm);
      transform: scale(0.92); /* less dramatic on phones */
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .hero-video__frame {
      transform: none;
      opacity: 1;
      transition: none;
    }
  }

  /* ---------- Trusted-by ribbon · full-bleed ticker ----------
     Rendered by the [kernia_trusted_ribbon] shortcode. The label stays
     pinned on the left; the ticker track on the right is duplicated in
     the markup and translated -50% so the keyframe loops seamlessly.
     Edge mask fades the first and last few logos so entries slide on
     and off gently rather than popping. Paused on hover and under
     prefers-reduced-motion. */
  .trusted-ribbon {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 32px 28px;
    background: var(--sand);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .trusted-ribbon__label {
    align-self: center;
    font-family: var(--font-sans);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-muted);
    white-space: nowrap;
  }
  .logo-ticker {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right,
      transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
            mask-image: linear-gradient(to right,
      transparent 0, #000 64px, #000 calc(100% - 64px), transparent 100%);
  }
  .logo-ticker__track {
    display: flex;
    width: max-content;
    align-items: center;
    gap: 40px;
    animation: kernia-ticker 60s linear infinite;
    will-change: transform;
  }
  .trusted-ribbon:hover .logo-ticker__track,
  .trusted-ribbon:focus-within .logo-ticker__track {
    animation-play-state: paused;
  }
  /* Fixed-slot treatment so horizontal and vertical logos get equal visual
     presence. Each slot is a 180x56 box; image is contained inside with
     aspect preserved, text fallback is centered in the same footprint. */
  .logo-ticker__item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 64px;
    padding: 12px 20px;
    box-sizing: border-box;
    white-space: nowrap;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
  }
  .logo-ticker__item--text {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    font-size: 17px;
    letter-spacing: 0.02em;
    color: var(--ink-heading);
    text-transform: uppercase;
    text-align: center;
  }
  .logo-ticker__img {
    display: block;
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
  }
  /* When a ribbon item is an <a> tag, strip global link chrome */
  a.logo-ticker__item {
    border-bottom: none;
    text-decoration: none;
    transition: opacity var(--dur-fast) var(--ease-out);
  }
  a.logo-ticker__item:hover { opacity: 0.7; }
  a.logo-ticker__item--text,
  a.logo-ticker__item--text:hover { color: var(--ink-heading); }
  @keyframes kernia-ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }
  @media (max-width: 560px) {
    .trusted-ribbon { padding: 20px 0; gap: 12px; }
    .logo-ticker {
      -webkit-mask-image: none;
      mask-image: none;
    }
    .logo-ticker__track { gap: 28px; animation-duration: 50s; }
    .logo-ticker__item { width: 140px; height: 52px; padding: 10px 14px; }
    .logo-ticker__item--text { font-size: 15px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .logo-ticker__track { animation: none; transform: none; }
  }
  /* Screen-reader-only list of clients for accessible announcement. */
  .trusted-ribbon .screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
  }

  /* ---------- Responsive refinements (cross-cutting) ----------
     Section vertical rhythm was tuned for desktop (128px bands). On
     narrow viewports these bands become dead-space tunnels — collapse
     to ~72px below 720px. Also collapse the footer to a single column
     below 560px and tighten container padding on small phones. */
  @media (max-width: 720px) {
    section { padding: 72px 0; }
    .hero { padding: 72px 0 88px; }
    .watch { padding: 24px 0 72px; }
    .engine { padding: 72px 0; }
    .science { padding: 72px 0; }
    .deploy { padding: 72px 0; }
    .closer { padding: 64px 0 88px; }
    .section-head { margin-bottom: 48px; }
    .watch-head { margin-bottom: 32px; }
  }
  @media (max-width: 560px) {
    .wrap { padding: 0 20px; }
    .foot-brand .line { max-width: none; }
  }


/* === Video player play-icon — fluid responsive sizing (added 13 May 2026) === */
/* Smooth scaling between 44px touch-target min and the original desktop size,
   so the play icon never overlaps the .player-tag / .player-title meta on
   smaller viewports. Replaces the prior 560px-only step-down for the hero. */

/* Homepage hero video */
.hero-video__play       { width: clamp(48px, 8vw, 72px); height: clamp(48px, 8vw, 72px); }
.hero-video__play-icon  { width: clamp(18px, 3vw, 28px); height: clamp(18px, 3vw, 28px); }

/* Platform page product video */
.player-play           { width: clamp(44px, 7vw, 64px); height: clamp(44px, 7vw, 64px); flex-basis: clamp(44px, 7vw, 64px); }
.player-play svg       { width: clamp(16px, 2.5vw, 22px); height: clamp(16px, 2.5vw, 22px); }
