/* ==========================================================================
   Beyond The Horizon Labs — site.css
   White, high-resolution, futuristic. One accent system: indigo → violet → cyan.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --ink: #0b1024;
  --ink-2: #2a3150;
  --muted: #5b6382;
  --faint: #8a91ad;
  --line: #e7e9f3;
  --line-2: #d9dcec;

  --indigo: #4f46e5;
  --violet: #7c3aed;
  --cyan: #0891b2;
  --emerald: #059669;
  --amber: #d97706;
  --magenta: #db2777;

  --grad: linear-gradient(120deg, #4f46e5 0%, #7c3aed 45%, #06b6d4 100%);
  --grad-soft: linear-gradient(120deg, rgba(79,70,229,.08), rgba(124,58,237,.06) 45%, rgba(6,182,212,.08));

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 2px 8px rgba(15,23,42,.04);
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 30px -10px rgba(30,27,75,.16);
  --shadow-lg: 0 2px 4px rgba(15,23,42,.04), 0 24px 60px -20px rgba(30,27,75,.28);

  --header-h: 72px;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 1rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--violet); }
:focus-visible { outline: 3px solid rgba(79,70,229,.45); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.2em; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 200; }
.skip-link:focus { top: 12px; color: #fff; }
.mono { font-family: var(--font-mono); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); line-height: 1.7; max-width: 46rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ── Header & navigation ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(30,27,75,.35); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .06em; }
.brand-text small { font-size: .7rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  font: 500 .95rem/1 var(--font-body); color: var(--ink-2);
  padding: 12px 14px; border-radius: 10px; border: 0; background: none; cursor: pointer;
  position: relative;
}
.nav-link:hover, .nav-item.is-open > .nav-link { color: var(--indigo); background: rgba(79,70,229,.06); }
.nav-link.is-active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--grad); }
.nav-caret { display: inline-flex; transition: transform .2s; }
.nav-item.is-open .nav-caret { transform: rotate(180deg); }

.menu-panel {
  position: absolute; top: calc(100% + 10px); left: 50%;
  width: min(560px, 92vw);
  transform: translate(-50%, 8px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 12px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s, transform .18s, visibility .18s;
}
.menu-panel::before { content: ""; position: absolute; inset: -12px 0 auto 0; height: 12px; } /* hover bridge */
.nav-item.is-open .menu-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 1101px) {
  .nav-item.has-menu:hover .menu-panel, .nav-item.has-menu:focus-within .menu-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
  .nav-item.has-menu:hover .nav-caret { transform: rotate(180deg); }
}
.menu-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.menu-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; color: var(--ink); transition: background .15s, transform .15s; }
.menu-card:hover, .menu-card.is-active { background: var(--surface-2); color: var(--ink); }
.menu-card:hover .icon3d-float { transform: translateY(-3px); }
.menu-icon { flex: none; }
.menu-text { display: flex; flex-direction: column; min-width: 0; }
.menu-title { font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 4px; }
.menu-desc { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.nav-cta { margin-left: 8px; }

.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle-close { display: none; }
.nav-open .nav-toggle-open { display: none; }
.nav-open .nav-toggle-close { display: inline-flex; }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 12px 20px 32px; overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
    border-top: 1px solid var(--line);
  }
  .nav-open .site-nav { opacity: 1; transform: none; visibility: visible; }
  /* backdrop-filter makes the header the containing block for position:fixed children,
     which would size the menu panel to the 72px header. Drop it while the menu is open. */
  .nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; justify-content: space-between; padding: 18px 6px; font-size: 1.05rem; border-radius: 0; }
  .nav-link:hover, .nav-item.is-open > .nav-link { background: none; }
  .nav-link.is-active::after { left: 6px; right: auto; width: 28px; bottom: 10px; }
  .menu-panel { position: static; width: auto; transform: none; box-shadow: none; border: 0; padding: 0 0 12px; display: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .menu-panel::before { display: none; }
  .nav-item.is-open .menu-panel { display: block; transform: none; }
  .menu-grid { grid-template-columns: 1fr; }
  .nav-cta { margin: 20px 0 0; justify-content: center; }
  body.nav-open { overflow: hidden; }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  --bh: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--bh); padding: 0 22px; border-radius: 999px;
  font: 600 .98rem/1 var(--font-body); letter-spacing: .005em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background-position .4s ease, color .15s, border-color .15s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { color: #fff; background: var(--grad); background-size: 160% 100%; box-shadow: 0 8px 22px -10px rgba(79,70,229,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { color: #fff; background-position: 100% 0; box-shadow: 0 14px 30px -12px rgba(79,70,229,.75), inset 0 1px 0 rgba(255,255,255,.25); transform: translateY(-1px); }
.btn-secondary { color: var(--ink); background: #fff; border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { color: var(--indigo); border-color: rgba(79,70,229,.45); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { color: var(--indigo); background: rgba(79,70,229,.07); }
.btn-ghost:hover { color: var(--violet); background: rgba(124,58,237,.11); }
.btn-sm { --bh: 40px; padding: 0 16px; font-size: .9rem; }
.btn-lg { --bh: 56px; padding: 0 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.center .btn-row { justify-content: center; }
.btn .icon-flat { transition: transform .15s; }
.btn:hover .icon-flat { transform: translateX(2px); }
@media (max-width: 480px) { .btn-row .btn { flex: 1 1 100%; } }

/* ── Sections & layout ─────────────────────────────────────────────────── */
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-alt { background: linear-gradient(180deg, #fff 0%, var(--surface-2) 18%, var(--surface-2) 82%, #fff 100%); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .74rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--indigo); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad); }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-rev > :first-child { order: 2; }
/* Grid items default to min-width:auto, which lets wide content (tables) stretch a
   column past the viewport. 0 lets .table-wrap scroll inside its column instead. */
.grid > *, .split > *, .hero-inner > *, .cta-inner > * { min-width: 0; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-rev > :first-child { order: 0; }
  .container { padding: 0 18px; }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 10vw, 128px); isolation: isolate; }
.hero::before { /* blueprint grid */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(rgba(79,70,229,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(79,70,229,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
}
.hero::after { /* soft colour bloom — every blob fades out inside the box (no clipped edges) */
  content: ""; position: absolute; z-index: -3; width: 1400px; height: 1100px; left: 50%; top: -520px; transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 38% 50%, rgba(99,102,241,.15), transparent) 0 0 / 70% 100% no-repeat,
    radial-gradient(closest-side at 62% 55%, rgba(6,182,212,.13), transparent) 100% 0 / 70% 100% no-repeat,
    radial-gradient(closest-side at 50% 72%, rgba(139,92,246,.11), transparent) 50% 0 / 80% 100% no-repeat;
  pointer-events: none;
}
.hero-horizon { /* perspective floor */
  position: absolute; left: -10%; right: -10%; bottom: -1px; height: 46%; z-index: -1;
  background-image: linear-gradient(rgba(79,70,229,.16) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(79,70,229,.16) 1.5px, transparent 1.5px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(62deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  animation: horizon-scroll 6s linear infinite;
}
@keyframes horizon-scroll { to { background-position: 0 64px, 0 0; } }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 32px; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 520px; justify-self: center; width: 100%; }
.hero-visual svg { width: 100%; height: 100%; overflow: visible; }
.orbit-spin { transform-origin: 260px 260px; animation: spin 40s linear infinite; }
.orbit-spin-rev { transform-origin: 260px 260px; animation: spin 60s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 .8rem/1 var(--font-mono); color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; box-shadow: var(--shadow-sm); }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); display: inline-block; }
@media (max-width: 1000px) { .hero-inner { grid-template-columns: 1fr; } .hero-visual { max-width: 380px; order: -1; } }

.page-hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); isolation: isolate; border-bottom: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(79,70,229,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(79,70,229,.05) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(to bottom, #000, transparent 90%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%); }
.page-hero::after { /* blooms fade out inside the box: no clipped edges */
  content: ""; position: absolute; z-index: -2; right: -220px; top: -260px; width: 820px; height: 820px; pointer-events: none;
  background: radial-gradient(closest-side at 45% 45%, rgba(124,58,237,.13), transparent), radial-gradient(closest-side at 62% 64%, rgba(6,182,212,.12), transparent);
}
.page-hero-inner { display: flex; align-items: center; gap: 40px; justify-content: space-between; }
.page-hero-icon { flex: none; }
.page-hero-icon .icon3d { width: clamp(110px, 16vw, 168px); height: auto; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.breadcrumb { font: 500 .8rem/1 var(--font-mono); color: var(--faint); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
@media (max-width: 760px) { .page-hero-inner { flex-direction: column-reverse; align-items: flex-start; gap: 16px; } .page-hero-icon .icon3d { width: 96px; } }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .25s ease, border-color .2s;
}
a.card, .card-hover { color: inherit; }
a.card:hover, .card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; color: inherit; }
a.card::after, .card-hover::after { /* gradient hairline on hover */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
a.card:hover::after, .card-hover:hover::after { opacity: 1; }
a.card:hover .icon3d-float, .card-hover:hover .icon3d-float { transform: translateY(-5px); }
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); font-size: .96rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon { margin: -6px 0 14px -8px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.card-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .9rem; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--indigo); }
.card-feature { padding: 36px; }
.card-compact { display: flex; gap: 18px; align-items: center; padding: 20px 22px; }
.card-compact .card-icon { margin: 0; flex: none; }
.card-compact h3 { font-size: 1.08rem; margin-bottom: 4px; }
.card-compact .card-meta { margin-bottom: 6px; }
.card-compact p { font-size: .9rem; line-height: 1.5; }
.section-tight + .section { padding-top: clamp(40px, 6vw, 80px); }
.card-glass { background: linear-gradient(160deg, #fff 0%, #fbfbff 60%, #f5fbff 100%); }
.tech { font: 500 .78rem/1.5 var(--font-mono); color: var(--faint); }
.icon3d { display: block; overflow: visible; }
.icon3d-float { transition: transform .3s cubic-bezier(.2,.8,.2,1); }

.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 .7rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px; border-radius: 999px; border: 1px solid; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.badge--beta { color: #4338ca; background: #eef2ff; border-color: #c7d2fe; }
.badge--dev { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.badge--theory { color: #6d28d9; background: #f5f3ff; border-color: #ddd6fe; }
.badge--muted { color: #475569; background: #f8fafc; border-color: #e2e8f0; }
.tag { display: inline-block; font: 500 .75rem/1 var(--font-mono); padding: 6px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num { font: 700 clamp(1.8rem, 3.2vw, 2.5rem)/1 var(--font-display); letter-spacing: -.03em; }
.stat-label { margin-top: 8px; font: 500 .78rem/1.3 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ── Lists, tables, prose ──────────────────────────────────────────────── */
.check-list { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 7px; background: var(--grad-soft) , #fff; border: 1px solid #c7d2fe; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%234f46e5' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 16px; background-position: center; background-repeat: no-repeat; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 66px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 18px; top: 18px; font: 700 .9rem/1 var(--font-mono); color: #fff; background: var(--grad); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.steps strong { display: block; color: var(--ink); margin-bottom: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 .74rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--ink); }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--ink-2); font-size: 1.04rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.pullquote { margin: 2em 0; padding: 28px 32px; border-radius: var(--r-lg); background: var(--grad-soft); border: 1px solid #e0e3fb; font: 500 clamp(1.15rem, 2vw, 1.4rem)/1.5 var(--font-display); color: var(--ink); }
.pullquote cite { display: block; margin-top: 12px; font: 500 .82rem/1 var(--font-mono); color: var(--muted); font-style: normal; }
.label { font: 600 .72rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; }
.label-est { color: #047857; background: #ecfdf5; }
.label-eng { color: #0369a1; background: #f0f9ff; }
.label-theory { color: #6d28d9; background: #f5f3ff; }

/* ── Callout / CTA band ────────────────────────────────────────────────── */
.cta-band { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(40px, 6vw, 72px); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 0% 0%, rgba(99,102,241,.13), transparent 45%), radial-gradient(circle at 100% 100%, rgba(6,182,212,.13), transparent 45%); }
.cta-band h2 { max-width: 640px; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

/* ── Timeline ──────────────────────────────────────────────────────────── */
.timeline { position: relative; display: grid; gap: 18px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--indigo), var(--cyan)); border-radius: 2px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -27px; top: 26px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--violet); }
.timeline-meta { font: 500 .78rem/1.4 var(--font-mono); color: var(--faint); margin-top: 8px; }

/* ── Media: gallery, lightbox, video ───────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.shot { margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; cursor: zoom-in; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.shot:hover, .shot:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }
.shot img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-2); }
.shot figcaption { padding: 10px 14px; font-size: .82rem; color: var(--muted); }
.shot-group { font: 600 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--indigo); display: block; margin-bottom: 4px; }
.tour-step { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; padding: 36px 0; border-bottom: 1px solid var(--line); }
.tour-step:nth-child(even) { grid-template-columns: .85fr 1.15fr; }
.tour-step:nth-child(even) .tour-shot { order: 2; }
.tour-shot img { border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow-lg); cursor: zoom-in; }
.tour-num { font: 700 .8rem/1 var(--font-mono); color: var(--indigo); letter-spacing: .1em; margin-bottom: 10px; display: block; }
@media (max-width: 860px) { .tour-step, .tour-step:nth-child(even) { grid-template-columns: 1fr; } .tour-step:nth-child(even) .tour-shot { order: 0; } }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 24px; flex-direction: column; gap: 14px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 82vh; width: auto; border-radius: var(--r); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.lightbox p { color: var(--ink-2); font-weight: 500; text-align: center; margin: 0; }
.lightbox-close { position: absolute; top: 16px; right: 16px; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface-2); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: 7px; }
.field .opt { font-weight: 400; color: var(--faint); }
.input, .select, .textarea {
  width: 100%; font: 400 1rem/1.4 var(--font-body); color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 170px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(79,70,229,.14); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .84rem; color: var(--muted); }
.alert { padding: 14px 16px; border-radius: 12px; font-size: .95rem; display: none; }
.alert.is-shown { display: block; }
.alert-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-err { background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ── Empty state ───────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 48px 24px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface-2); }
.empty .icon3d { margin: 0 auto 12px; }
.empty p { color: var(--muted); max-width: 520px; margin: 0 auto 18px; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 64px 0 28px; margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 32px; }
.footer-brand p { color: var(--muted); font-size: .92rem; margin: 16px 0; max-width: 320px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); color: var(--ink-2); transition: color .15s, border-color .15s, transform .15s; }
.footer-social a:hover { color: var(--indigo); border-color: #c7d2fe; transform: translateY(-2px); }
.footer-col h2 { font: 600 .74rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--ink); margin: 6px 0 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); font-size: .9rem; }
.footer-col a:hover { color: var(--indigo); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--faint); }
.footer-bottom a { color: var(--muted); }
@media (max-width: 1100px) { .footer-top { grid-template-columns: repeat(3, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr 1fr; } }

/* ── Reveal on scroll ──────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Home hero floating icons ──────────────────────────────────────────── */
.hero-float { position: absolute; animation: bob 7s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(30,27,75,.12)); }
.hero-float .icon3d { width: clamp(64px, 9vw, 96px); height: auto; }
.hf-1 { top: 2%; left: 4%; }
.hf-2 { top: 10%; right: 0; animation-delay: -2s; }
.hf-3 { bottom: 6%; left: 0; animation-delay: -4s; }
.hf-4 { bottom: 2%; right: 8%; animation-delay: -1s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
