/* Amberflake — site styles. Tokens mirror DESIGN.md. Palette: metal (gold, white) + water (blue, navy). */
:root {
  --ink: #0B1B2B;
  --ink-2: #3A4A5C;
  --ink-3: #6B7A8C;
  --line: #E4E8EE;
  --paper: #FFFFFF;
  --mist: #F5F7FA;
  --blue-50: #EEF4FB;   /* water tint */
  --blue-500: #2768B5;  /* water */
  --blue-700: #164C8E;  /* water, text on white */
  --gold-300: #F2D27A;  /* metal, highlight on dark */
  --gold-500: #D6A93A;  /* metal, accent fill */
  --navy-900: #06111C;
  --on-dark: #C9D3DE;
  --radius: 20px;
  --max: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 700; }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.container { width: 100%; max-width: calc(var(--max) + 48px); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; height: 64px; gap: 40px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; font-size: 19px; letter-spacing: -.02em; }
.brand svg { width: 28px; height: 28px; }
.nav-panel { display: flex; align-items: center; flex: 1; gap: 40px; }
.nav-links { display: flex; gap: 32px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.nav-links a { color: var(--ink-2); transition: color .15s; padding: 8px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { font-weight: 600; }
.nav-cta { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; color: var(--ink); }
.menu-btn span { display: block; height: 2px; background: currentColor; border-radius: 2px; margin: 5px 0; transition: transform .25s var(--ease), opacity .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 24px; border-radius: 999px;
  font: 600 15px/1 var(--font); letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1A2E44; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: #C5CDD8; }
.btn-sm { min-height: 36px; padding: 9px 16px; font-size: 14px; }
.dark .btn-primary { background: var(--gold-500); color: var(--ink); }
.dark .btn-primary:hover { background: var(--gold-300); }
.dark .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, .24); }
.dark .btn-secondary:hover { border-color: rgba(255, 255, 255, .5); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

.link-arrow { color: var(--blue-700); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }
.dark .link-arrow { color: var(--gold-300); }

/* ---------- Type ---------- */
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-700); margin-bottom: 20px; }
.dark .eyebrow { color: var(--gold-300); }
.display { font-size: clamp(44px, 7vw, 80px); line-height: 1.02; letter-spacing: -.035em; }
.h1 { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.06; letter-spacing: -.03em; }
.h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.025em; }
.h3 { font-size: clamp(20px, 2vw, 22px); line-height: 1.3; letter-spacing: -.01em; font-weight: 600; }
.lead { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.dark { background: var(--ink); color: var(--on-dark); }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.dark .lead { color: var(--on-dark); }

/* ---------- Sections ---------- */
.section { padding: 128px 0; }
.section-sm { padding: 96px 0; }
.mist { background: var(--mist); }
.section-head { max-width: 760px; margin-bottom: 64px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-top: 20px; margin-bottom: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 120px 0 128px; text-align: center; }
.hero .mark-wrap { position: relative; width: 112px; height: 112px; margin: 0 auto 44px; }
.hero .mark-wrap::before {
  content: ""; position: absolute; inset: -120px; z-index: -1;
  background: radial-gradient(closest-side, rgba(61, 130, 204, .22), rgba(242, 210, 122, .12) 55%, rgba(242, 210, 122, 0));
}
.hero h1 { max-width: 920px; margin: 0 auto; }
.hero .lead { max-width: 720px; margin: 28px auto 0; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }

.page-hero { padding: 112px 0 80px; }
.page-hero .lead { max-width: 720px; margin-top: 24px; }

/* facet animation on the hero mark */
.facet { opacity: 0; transform-origin: 50px 50px; animation: facet-in .8s var(--ease) forwards; }
.facet:nth-child(2) { animation-delay: .06s; } .facet:nth-child(3) { animation-delay: .12s; }
.facet:nth-child(4) { animation-delay: .18s; } .facet:nth-child(5) { animation-delay: .24s; }
.facet:nth-child(6) { animation-delay: .30s; }
@keyframes facet-in { from { opacity: 0; transform: scale(.86) rotate(-8deg); } to { opacity: 1; transform: none; } }

/* ---------- Grid & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
a.card:hover, .card.hover:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(11, 27, 43, .08); }
.card h3 { margin: 24px 0 12px; }
.card p:last-child { margin-bottom: 0; }
.icon {
  width: 48px; height: 48px; border-radius: 14px; background: var(--blue-50); color: var(--blue-700);
  display: grid; place-items: center;
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.dark .card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); }
.dark .icon { background: rgba(242, 210, 122, .12); color: var(--gold-300); }

.about-mark { width: 100%; height: auto; }

/* principles list */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 64px; }
.principle { padding: 32px 0; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; grid-template-columns: 56px 1fr; }
.principle .num { font-size: 15px; font-weight: 600; color: var(--gold-300); font-variant-numeric: tabular-nums; padding-top: 3px; }
.principle h3 { margin-bottom: 10px; }
.principle p { margin: 0; }

/* product cards */
.product { display: flex; flex-direction: column; padding: 40px; min-height: 340px; }
.product .top { display: flex; justify-content: space-between; align-items: flex-start; }
.product-logo { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-weight: 700; font-size: 26px; color: #fff; letter-spacing: -.03em; }
.product h3 { font-size: 28px; letter-spacing: -.02em; margin: 28px 0 8px; font-weight: 700; }
.product .kind { font-size: 14px; color: var(--ink-3); margin-bottom: 16px; }
.product .foot { margin-top: auto; padding-top: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--blue-50); color: var(--blue-700); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.live { background: #E8F6EE; color: #11713F; }

/* split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

/* stat / fact row */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.fact { padding: 28px 24px 0 0; }
.fact .k { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.fact .v { font-size: 17px; color: var(--ink); font-weight: 600; }

/* steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 28px; border-top: 2px solid var(--ink); }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-size: 14px; font-weight: 600; color: var(--blue-700); margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.step h3 { margin-bottom: 10px; }

/* portal preview mock */
.portal {
  border-radius: 24px; background: var(--navy-900); border: 1px solid rgba(255, 255, 255, .08);
  padding: 20px; box-shadow: 0 40px 80px rgba(6, 17, 28, .35); color: var(--on-dark); font-size: 14px;
}
.portal-bar { display: flex; gap: 6px; margin-bottom: 18px; }
.portal-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.portal-tile { background: rgba(255, 255, 255, .05); border-radius: 14px; padding: 16px; }
.portal-tile .k { font-size: 12px; color: #8A9AAD; }
.portal-tile .v { font-size: 22px; color: #fff; font-weight: 650; margin-top: 4px; letter-spacing: -.02em; }
.portal-chart { background: rgba(255, 255, 255, .05); border-radius: 14px; padding: 16px; height: 168px; display: flex; align-items: flex-end; gap: 8px; }
.portal-chart span { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(var(--gold-300), var(--gold-500)); opacity: .9; }
.portal-note { text-align: center; font-size: 12px; color: #8A9AAD; margin-top: 14px; }

/* CTA band */
.cta { text-align: center; }
.cta .lead { max-width: 620px; margin: 20px auto 0; }
.cta .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }

/* contact */
.contact-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.contact-row .k { color: var(--ink); font-weight: 600; }
.contact-row a { color: var(--blue-700); font-weight: 600; }

/* prose (legal pages) */
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; letter-spacing: -.015em; margin: 48px 0 12px; }
.prose ul { padding-left: 20px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #8A9AAD; padding: 80px 0 40px; font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 2fr repeat(2, 1fr); gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand p { max-width: 320px; margin: 0; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-legal { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 32px; font-size: 13px; }
.footer-legal p { margin: 0; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section { padding: 96px 0; }
  .nav-panel { display: none; }
  .menu-btn { display: block; }
  .menu-open .nav-panel {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0; background: #fff;
    padding: 8px 24px 24px; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(11, 27, 43, .08);
  }
  .menu-open .nav-links { flex-direction: column; gap: 0; }
  .menu-open .nav-links a { display: block; padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .menu-open .nav-cta { margin: 20px 0 0; }
  .menu-open .nav-cta .btn { flex: 1; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 56px; }
  .principles { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }
  .hero { padding: 80px 0 96px; }
  .hero .mark-wrap { width: 88px; height: 88px; margin-bottom: 36px; }
  .page-hero { padding: 80px 0 56px; }
  .section-head { margin-bottom: 44px; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .card, .product { padding: 28px; }
  .contact-row { grid-template-columns: 1fr; gap: 6px; }
  .portal-grid { grid-template-columns: 1fr 1fr; }
  .portal-grid .portal-tile:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .facet, .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   v2 — "Crystal" layer (2026-11-30). Product-first, hexagonal
   lattice from the Gem mark, one orchestrated hero sequence.
   ========================================================= */
:root { --blue-300: #7AB2EC; --glass: rgba(255,255,255,.06); --glass-line: rgba(255,255,255,.12); --mono: ui-monospace, "SF Mono", Menlo, monospace; }

/* Lattice: the Gem's hexagon repeated as a faint crystal grid */
.lattice { position: relative; isolation: isolate; }
.lattice::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 L55 16.5 L55 47.5 L28 63 L1 47.5 L1 16.5 Z M28 63 L28 97 M1 16.5 L-26 1 M55 16.5 L82 1' fill='none' stroke='%237AB2EC' stroke-opacity='.09' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 30%, transparent 75%);
}
.lattice::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 900px; height: 900px; right: -200px; top: -260px;
  background: radial-gradient(closest-side, rgba(61,130,204,.32), rgba(214,169,58,.10) 55%, transparent 72%);
}

/* Dark header variant for the home hero */
.site-header.on-dark { background: rgba(6,17,28,.72); }
.site-header.on-dark.scrolled { border-bottom-color: rgba(255,255,255,.08); }
.site-header.on-dark .brand { color: #fff; }
.site-header.on-dark .nav-links a { color: var(--on-dark); }
.site-header.on-dark .nav-links a:hover { color: #fff; }
.site-header.on-dark .btn-primary { background: var(--gold-500); color: var(--ink); }
.site-header.on-dark .btn-primary:hover { background: var(--gold-300); }
.site-header.on-dark .menu-btn { color: #fff; }
@media (max-width: 959px) { .site-header.on-dark .nav-panel { background: var(--navy-900); } }

/* Hero */
.x-hero { background: var(--navy-900); color: var(--on-dark); padding: 96px 0 120px; overflow: hidden; }
.x-hero .grid-hero { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.x-hero h1 { color: #fff; font-size: clamp(46px, 6.4vw, 84px); line-height: .98; letter-spacing: -.045em; font-weight: 750; }
.x-hero .lead { color: var(--on-dark); margin-top: 28px; max-width: 30em; }
.x-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
.x-hero .btn-primary { background: var(--gold-500); color: var(--ink); }
.x-hero .btn-primary:hover { background: var(--gold-300); }
.x-hero .btn-secondary { color: #fff; border-color: rgba(255,255,255,.24); }
.x-hero .note { margin-top: 28px; font-size: 14px; color: #8FA0B3; }

/* Stage: floating product windows */
.stage { position: relative; height: 520px; }
.win { position: absolute; background: #0E2236; border: 1px solid var(--glass-line); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06); overflow: hidden; color: #C9D3DE; }
.win .bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.06); font-size: 12px; color: #8FA0B3; }
.win .bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.win .bar span { margin-left: 10px; }
.stage .w-notes { left: 0; top: 10px; width: 78%; height: 330px; }
.stage .w-diagram { left: 6%; bottom: 0; width: 48%; height: 200px; }
.stage .w-latency { right: 0; bottom: 36px; width: 50%; height: 210px; }

/* Notes UI */
.ui-notes { display: grid; grid-template-columns: 1fr 1fr; height: calc(100% - 32px); }
.ui-notes .src { padding: 18px; font: 13px/1.75 var(--mono); color: #8FA0B3; border-right: 1px solid rgba(255,255,255,.06); }
.ui-notes .src b { color: var(--blue-300); font-weight: 500; }
.ui-notes .pre { padding: 18px 20px; position: relative; }
.ui-notes .pre h4 { color: #fff; font-size: 20px; letter-spacing: -.02em; margin: 2px 0 12px; }
.ui-notes .pre p { font-size: 13px; line-height: 1.6; margin: 0 0 10px; color: #C9D3DE; }
.ui-notes .pre li { font-size: 13px; line-height: 1.8; list-style: none; position: relative; padding-left: 22px; }
.ui-notes .pre ul { margin: 0; padding: 0; }
.ui-notes .pre li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--blue-300); }
.ui-notes .pre li.done::before { background: var(--blue-300); }
.ink { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.ink path { fill: none; stroke: var(--gold-500); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Diagram UI */
.ui-diagram { position: relative; height: calc(100% - 32px); }
.ui-diagram svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ui-diagram .node { fill: #13304C; stroke: var(--blue-300); stroke-width: 1.5; }
.ui-diagram .core { fill: rgba(214,169,58,.16); stroke: var(--gold-500); }
.ui-diagram .edge { fill: none; stroke: #5C7C9E; stroke-width: 1.5; }
.ui-diagram text { fill: #DCE5EE; font: 600 11px var(--font); }

/* Latency UI */
.ui-latency { padding: 16px 18px; }
.ui-latency .row { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; height: 26px; font-size: 12px; color: #8FA0B3; }
.ui-latency .track { position: relative; height: 8px; }
.ui-latency .seg { position: absolute; top: 0; height: 8px; border-radius: 4px; background: var(--blue-300); transform-origin: left; }
.ui-latency .seg.hot { background: var(--gold-500); }

/* Orchestrated hero sequence (once, on load) */
@media (prefers-reduced-motion: no-preference) {
  .stage .win { animation: rise .9s var(--ease) both; }
  .stage .w-diagram { animation-delay: .25s; } .stage .w-latency { animation-delay: .4s; }
  .ink path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.1s 1.1s var(--ease) forwards; }
  .ui-diagram .step { opacity: 0; animation: fade .5s var(--ease) forwards; }
  .ui-diagram .s1 { animation-delay: 1.2s; } .ui-diagram .s2 { animation-delay: 1.6s; } .ui-diagram .s3 { animation-delay: 2s; }
  .ui-latency .seg { transform: scaleX(0); animation: grow .7s var(--ease) forwards; }
  .ui-latency .row:nth-child(1) .seg { animation-delay: 1.3s; } .ui-latency .row:nth-child(2) .seg { animation-delay: 1.45s; }
  .ui-latency .row:nth-child(3) .seg { animation-delay: 1.6s; } .ui-latency .row:nth-child(4) .seg { animation-delay: 1.75s; }
  .ui-latency .row:nth-child(5) .seg { animation-delay: 1.9s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes grow { to { transform: scaleX(1); } }

/* Bento of Mac tools */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.tile { position: relative; display: flex; flex-direction: column; background: var(--navy-900); color: var(--on-dark); border-radius: 24px; padding: 32px; min-height: 360px; overflow: hidden; border: 1px solid rgba(255,255,255,.06); transition: border-color .2s; }
.tile:hover { border-color: rgba(122,178,236,.45); }
.tile h3 { color: #fff; font-size: 24px; letter-spacing: -.02em; font-weight: 700; }
.tile .cn { font-size: 14px; color: #8FA0B3; margin-top: 4px; }
.tile p { margin: 12px 0 0; max-width: 34em; }
.tile .shot { margin-top: auto; padding-top: 28px; }
.tile .shot .win { position: relative; }
.t-notes { grid-column: span 4; } .t-annotate { grid-column: span 2; }
.t-diagrams { grid-column: span 2; } .t-capture { grid-column: span 4; }
.t-latency { grid-column: span 6; min-height: 300px; }
.t-latency .inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: end; height: 100%; }
.status { display: inline-flex; align-self: flex-start; margin-bottom: 20px; font-size: 12px; font-weight: 600; color: var(--blue-300); border: 1px solid rgba(122,178,236,.35); border-radius: 999px; padding: 4px 10px; }

/* Annotate mini */
.ui-annotate { position: relative; height: 150px; padding: 16px; }
.ui-annotate .ln { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); margin: 10px 0; }
.ui-annotate svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ui-annotate path { fill: none; stroke: var(--gold-500); stroke-width: 3; stroke-linecap: round; }

/* Capture mini */
.ui-capture { display: flex; gap: 16px; align-items: flex-end; }
.ui-capture .screen { position: relative; flex: 1; aspect-ratio: 16/9; background: #13304C; border-radius: 10px; border: 1px solid var(--glass-line); padding: 14px; }
.ui-capture .screen .ln { height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); margin: 8px 0; }
.ui-capture .cam { position: absolute; right: 12px; bottom: 12px; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #7AB2EC 0 16%, transparent 17%), radial-gradient(ellipse at 50% 100%, #3471C2 0 42%, transparent 43%), #0E2236; border: 2px solid var(--gold-500); }
.ui-capture .vert { width: 70px; aspect-ratio: 9/16; border-radius: 10px; background: #13304C; border: 1px solid var(--glass-line); position: relative; }
.ui-capture .vert .cam { width: 36px; height: 36px; right: 50%; transform: translateX(50%); bottom: 10px; }
.ui-capture .lbl { font-size: 11px; color: #8FA0B3; margin-top: 6px; text-align: center; }

/* Learning apps: phone frames */
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.phone-card { display: flex; flex-direction: column; align-items: flex-start; }
.phone { width: 100%; max-width: 260px; aspect-ratio: 9/17; background: #fff; border: 1px solid var(--line); border-radius: 36px; padding: 18px 16px; box-shadow: 0 24px 60px rgba(11,27,43,.10); position: relative; margin-bottom: 28px; }
.phone::before { content: ""; position: absolute; top: 10px; left: 50%; width: 70px; height: 18px; border-radius: 10px; background: var(--ink); transform: translateX(-50%); }
.phone .scr { margin-top: 30px; font-size: 12px; color: var(--ink-2); }
.phone .t { font-weight: 700; color: var(--ink); font-size: 15px; margin-bottom: 12px; }
.phone .q { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.phone .q .ln { height: 6px; background: #E4E8EE; border-radius: 3px; margin: 6px 0; }
.phone .tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--blue-700); background: var(--blue-50); border-radius: 999px; padding: 3px 9px; }
.phone .bubble { background: var(--mist); border-radius: 14px 14px 14px 4px; padding: 10px 12px; margin-bottom: 14px; line-height: 1.5; }
.phone .task { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.phone .task i { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--blue-500); flex: none; }
.phone .wave { display: flex; gap: 4px; align-items: center; height: 80px; margin: 24px 0; }
.phone .wave span { flex: 1; border-radius: 3px; background: var(--blue-500); opacity: .75; }
.phone .play { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); margin: 0 auto; position: relative; }
.phone .play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
.phone-card h3 { font-size: 22px; letter-spacing: -.02em; }
.phone-card .cn { color: var(--ink-3); font-size: 14px; margin: 2px 0 10px; }

/* Values (not a sequence: no numbering) */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.values h3 { color: #fff; font-size: 19px; margin-bottom: 10px; }
.values p { margin: 0; }
.values div { border-top: 1px solid rgba(122,178,236,.35); padding-top: 24px; }

.plain-link { color: var(--blue-700); font-weight: 600; }
.dark .plain-link, .tile .plain-link { color: var(--gold-300); }
.kicker { display: block; font-size: 15px; font-weight: 600; color: var(--blue-700); margin-bottom: 14px; }
.dark .kicker { color: var(--gold-300); }

/* App detail hero with visual */
.app-hero { background: var(--navy-900); color: var(--on-dark); padding: 88px 0 96px; }
.app-hero .grid-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.app-hero h1 { color: #fff; }
.app-hero .lead { color: var(--on-dark); margin-top: 20px; }
.app-hero .cn { color: #8FA0B3; margin-top: 8px; }
.app-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.app-hero .btn-primary { background: var(--gold-500); color: var(--ink); }
.app-hero .btn-secondary { color: #fff; border-color: rgba(255,255,255,.24); }
.app-hero .win { position: relative; }
.app-hero .phone { margin: 0 auto; }

@media (max-width: 959px) {
  .x-hero .grid-hero, .app-hero .grid-hero { grid-template-columns: 1fr; }
  .stage { height: 440px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .t-notes, .t-capture, .t-latency { grid-column: span 2; } .t-annotate, .t-diagrams { grid-column: span 1; }
  .t-latency .inner { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
  .phones { grid-template-columns: 1fr; justify-items: center; }
  .phone-card { align-items: center; text-align: center; }
}
@media (max-width: 639px) {
  .x-hero { padding: 64px 0 80px; }
  .stage { height: 380px; }
  .stage .w-notes { width: 100%; height: 250px; }
  .stage .w-diagram { width: 58%; height: 160px; left: 0; }
  .stage .w-latency { width: 56%; height: 170px; bottom: 20px; }
  .ui-notes { grid-template-columns: 1fr; } .ui-notes .src { display: none; }
  .bento { grid-template-columns: 1fr; }
  .t-notes, .t-capture, .t-latency, .t-annotate, .t-diagrams { grid-column: span 1; }
  .values { grid-template-columns: 1fr; }
  .tile { padding: 24px; }
}
/* v2 fixes */
.lattice { overflow: hidden; }
body { overflow-x: clip; }
.tile .win { position: relative; }
.tile .ui-diagram, .app-hero .ui-diagram { height: 160px; }
.t-latency .win { max-width: 560px; margin-left: auto; }
.app-hero .ui-notes { height: 300px; }
.ui-capture > div:first-child { flex: 1; max-width: 420px; }
.ui-capture .vert { width: 90px; }
.site-header.on-dark { background: rgba(6,17,28,.94); }

/* v3: company-only home (2026-11-30) */
.hero-mark{display:grid;place-items:center}
.hero-logo{width:clamp(200px,30vw,380px);height:auto;filter:drop-shadow(0 24px 60px rgba(42,105,182,.45))}
@media (prefers-reduced-motion:no-preference){.hero-logo{animation:markin 1.2s cubic-bezier(.2,.7,.2,1) both}@keyframes markin{from{opacity:0;transform:rotate(-30deg) scale(.85)}to{opacity:1;transform:none}}}
