/**
 * AMAYA Hubs — Shared Site System v1
 *
 * Premium primitives every hub uses to build above the floor.
 * Each hub overrides brand tokens (--bg, --ink, --accent, --serif, --sans)
 * in its own <style> block above this import. Everything below is brand-neutral.
 *
 * Built around: native CSS, no framework, no build step, no JS dependencies
 * except the companion site-system.js for reveals + accordion.
 */

/* ═══════════════════════════════════════════════════════════════════════
   FRONTIER TECHNIQUES (2026 award-winner standard)
   Applied per recommendations in _docs/WEB-DESIGN-FRONTIER-REPORT-MAY-2026.md
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── View Transitions API — native cross-page transitions ────────────
   Triggers automatically on same-origin navigation when CSS opts in.
   Browsers: Chrome 115+, Edge 115+, Safari 26+. Progressive enhancement. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
::view-transition-old(root) {
  animation-name: vt-fade-out;
}
::view-transition-new(root) {
  animation-name: vt-fade-in;
}
@keyframes vt-fade-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-fade-in  { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* ─── CSS Scroll-Driven Animations — no JS, no GSAP ───────────────────
   Replaces IntersectionObserver-based reveals for browsers that support
   animation-timeline. Falls back to JS reveal (existing data-reveal). */
@supports (animation-timeline: view()) {
  [data-reveal-css] {
    animation: reveal-on-scroll linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 50%;
  }
  @keyframes reveal-on-scroll {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ─── Squircle / corner-shape (Apple-grade UI) ────────────────────────
   Native `corner-shape` is Chrome 137+ only. Provide both modern + fallback. */
.squircle {
  border-radius: 22%;
  corner-shape: squircle;
}
.squircle--md { border-radius: 14%; }
.squircle--lg { border-radius: 28%; }

/* ─── Magnetic button — mouse-follow elastic interaction ──────────────
   Companion JS in site-system.js applies translate via mouse position.
   CSS provides the transition and rest state. */
.btn-magnet {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* ─── Variable-font scroll-linked weight ──────────────────────────────
   Used on .headline-variable elements that have a variable font loaded.
   The font-variation-settings shift as the element scrolls into view. */
@supports (animation-timeline: view()) and (font-variation-settings: "wght" 100) {
  .headline-variable {
    animation: variable-weight-shift linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 50%;
  }
  @keyframes variable-weight-shift {
    from { font-variation-settings: "wght" 400, "wdth" 100; }
    to   { font-variation-settings: "wght" 800, "wdth" 100; }
  }
}

/* ─── Bento grid — asymmetric modular layout (Apple/Notion pattern) ───
   Use as a wrapper around 4-6 .bento-tile children with varied spans. */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 1rem;
}
.bento-tile {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.bento-tile:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.bento-tile--wide   { grid-column: span 4; }
.bento-tile--full   { grid-column: span 6; }
.bento-tile--narrow { grid-column: span 2; }
.bento-tile--tall   { grid-row: span 2; }
.bento-tile--square { grid-column: span 3; }
@media (max-width: 880px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-tile--wide, .bento-tile--full, .bento-tile--square { grid-column: span 2; }
  .bento-tile--narrow { grid-column: span 1; }
  .bento-tile--tall { grid-row: auto; }
}

/* ─── Sound toggle — ambient audio with discreet UI ───────────────────
   Pairs with JS that wires up the <audio> element + mute state. */
.sound-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  transition: background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.sound-toggle:hover { background: rgba(0,0,0,0.8); transform: scale(1.05); }
.sound-toggle::after { content: "🔇"; }
.sound-toggle.is-on::after { content: "🔊"; }

/* ─── Custom cursor companion classes ─────────────────────────────────
   JS toggles these on body when entering specific zones for cursor variants. */
body.cursor-magnetic .btn { cursor: none; }
body.cursor-hover-text [data-cursor-text] { cursor: none; }

/* ─── Accessibility: skip-to-main link ───────────────────────────────── */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background: var(--accent, #d4a843);
  color: #000;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-to-main:focus {
  top: 1rem;
  outline: 2px solid var(--accent, #d4a843);
  outline-offset: 2px;
}

/* ─── Reset + Defaults ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; line-height: 1.55; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; }

/* ─── Default brand tokens (each hub overrides) ────────────────────────── */
:root {
  --bg:            #0a0a0c;
  --bg-2:          #131318;
  --bg-3:          #1e1e25;
  --ink:           #f2f0eb;
  --ink-2:         rgba(242,240,235,0.68);
  --ink-3:         rgba(242,240,235,0.38);
  --accent:        #d4a843;
  --accent-2:      #f5d97a;
  --border:        rgba(242,240,235,0.10);
  --border-strong: rgba(242,240,235,0.18);
  --serif:         "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans:          "Inter", "Manrope", system-ui, -apple-system, sans-serif;
  --mono:          "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --container:     1200px;
  --container-tight: 880px;
  --radius:        14px;
  --radius-sm:     6px;
  --shadow:        0 30px 60px -20px rgba(0,0,0,0.5), 0 8px 20px -10px rgba(0,0,0,0.3);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Layout primitives ────────────────────────────────────────────────── */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section + .section { border-top: 1px solid var(--border); }
.section--hero    { padding-top: clamp(5rem, 11vw, 9rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.section--tight   { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--bleed   { background: var(--bg-2); }

.container        { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.container--tight { max-width: var(--container-tight); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

/* ─── Typographic primitives ───────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1vw, 0.78rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: clamp(1.25rem, 2vw, 1.75rem);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.headline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.2vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: clamp(1.25rem, 2vw, 1.75rem);
  text-wrap: balance;
}
.headline em { font-style: italic; color: var(--accent); font-weight: 400; }
.headline .accent { color: var(--accent); }

.headline--display {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.lede {
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  font-weight: 300;
  color: var(--ink-2);
  max-width: 56ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  text-wrap: pretty;
}

.body-copy { font-size: 1rem; color: var(--ink-2); max-width: 58ch; line-height: 1.65; }
.body-copy + .body-copy { margin-top: 1.1rem; }

.kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.7rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn--ghost { color: var(--ink); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(255,255,255,0.04); }
.btn--lg { padding: 1.1rem 2rem; font-size: 0.92rem; }

/* ─── Stat strip / proof tiles ────────────────────────────────────────── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-tile {
  background: var(--bg);
  padding: 2rem 1.5rem;
  text-align: center;
}
.stat-tile__value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.stat-tile__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ─── Card grid (features / services / portfolio) ──────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--bg-3); }
.card__num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.card__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.8vw, 1.55rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.card__body { font-size: 0.95rem; color: var(--ink-2); flex: 1; }
.card__footer {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.card a.card__footer-link { color: var(--accent); text-decoration: none; }

/* ─── Process / Steps ──────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  counter-reset: step;
}
.step {
  position: relative;
  padding: 2rem 1.5rem 2rem 4.5rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 1.6rem;
  left: 1.5rem;
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.step__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.step__body { font-size: 0.92rem; color: var(--ink-2); }

/* ─── Manifesto / pull quote ───────────────────────────────────────────── */
.manifesto { max-width: 760px; margin: 0 auto; text-align: center; }
.manifesto__line {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  line-height: 1.35;
  color: var(--ink);
  margin: 0.4rem 0;
  text-wrap: balance;
}
.manifesto__line em { color: var(--accent); font-style: italic; font-weight: 500; }
.manifesto__line--quiet { color: var(--ink-2); font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* ─── Testimonial block ────────────────────────────────────────────────── */
.testimonial {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3rem);
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.testimonial::before {
  content: "“";
  position: absolute;
  top: 0.4rem;
  left: 1.5rem;
  font-family: var(--serif);
  font-size: 6rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.25;
}
.testimonial__quote {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.testimonial__attr {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.testimonial__attr strong { color: var(--ink); font-weight: 600; }

/* ─── FAQ accordion ────────────────────────────────────────────────────── */
.faq { max-width: 800px; margin: 0 auto; }
.faq__item {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0;
}
.faq__item:last-child { border-bottom: 1px solid var(--border); }
.faq__trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink);
  transition: color 0.2s var(--ease-out);
}
.faq__trigger:hover { color: var(--accent); }
.faq__trigger::after {
  content: "+";
  font-family: var(--mono);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
}
.faq__item[open] .faq__trigger::after { transform: rotate(45deg); }
.faq__body {
  margin-top: 0.8rem;
  font-size: 0.98rem;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 62ch;
}

/* ─── Ticker / kinetic ─────────────────────────────────────────────────── */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  background: var(--bg);
}
.ticker__track {
  display: inline-flex;
  gap: 3rem;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
  will-change: transform;
}
.ticker__item {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.ticker__item::after { content: " ◆"; color: var(--accent); margin-left: 1rem; opacity: 0.5; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: clamp(3rem, 5vw, 4rem) 0 clamp(1.5rem, 2vw, 2rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.site-footer__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.site-footer__tagline { color: var(--ink-2); font-size: 0.92rem; max-width: 32ch; }
.site-footer__col-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1rem;
}
.site-footer__links { display: flex; flex-direction: column; gap: 0.55rem; }
.site-footer__links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s var(--ease-out);
}
.site-footer__links a:hover { color: var(--accent); }
.site-footer__legal {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ─── Reveal-on-scroll primitive ──────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.40s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ─── Background depth (gradient mesh + grain) ────────────────────────── */
.bg-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 40% at 15% 12%, color-mix(in srgb, var(--accent) 14%, transparent), transparent),
    radial-gradient(50% 35% at 85% 88%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent);
  opacity: 0.85;
}
.bg-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px;
}
.section > .container { position: relative; z-index: 2; }

/* ─── Navigation ───────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1.15rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-nav__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav__brand .accent { color: var(--accent); }
.site-nav__links { display: flex; gap: 1.8rem; align-items: center; }
.site-nav__links a {
  color: var(--ink-2);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.site-nav__links a:hover { color: var(--ink); }

/* ─── Forms ────────────────────────────────────────────────────────────── */
.lead-form {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  max-width: 480px;
}
.lead-form__input {
  flex: 1;
  min-width: 220px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  padding: 0.95rem 1.15rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s var(--ease-out);
}
.lead-form__input::placeholder { color: var(--ink-3); }
.lead-form__input:focus { border-color: var(--accent); }
.lead-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.lead-form__note {
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lead-form__status {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  min-height: 1.2em;
}

/* ─── Section header (eyebrow + headline + lede block) ────────────────── */
.section-head { max-width: 740px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .headline { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
.section-head .lede { font-size: clamp(1rem, 1.5vw, 1.18rem); }

/* ─── Spline block — 3D scene embed ───────────────────────────────────
   Used by the <spline-embed> custom element. Spline scenes are heavier
   than static media; the block reserves layout space and the viewer
   lazy-loads its module on first paint. */
.spline-block {
  position: relative;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 400px;
}
.spline-block spline-viewer {
  display: block;
  width: 100%;
  height: 100%;
}

/* ─── Video block (HeyGen / Sasha tutorials / brand films) ────────────
   Standard slot for autoplay+muted+loop videos with poster fallback,
   in-viewport-only playback, reduced-motion respect.

   Usage:
     <div class="video-block" data-video-src="https://.../clip.mp4"
          data-video-poster="https://.../poster.jpg"
          data-video-aspect="16/9">
       <noscript>...</noscript>
     </div>

   Or for a HeyGen embed iframe (auto-detected when src ends .html / contains share.heygen):
     <div class="video-block" data-video-embed="https://app.heygen.com/share/..."></div>
*/
.video-block {
  position: relative;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.video-block--portrait { aspect-ratio: 9 / 16; max-width: 360px; margin: 0 auto; }
.video-block--square   { aspect-ratio: 1 / 1; }
.video-block--wide     { aspect-ratio: 21 / 9; }

.video-block__player,
.video-block__iframe,
.video-block__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}
.video-block__poster {
  z-index: 1;
  transition: opacity 0.5s var(--ease-out);
  background: var(--bg-3);
}
.video-block__player { z-index: 2; opacity: 0; transition: opacity 0.6s var(--ease-out); }
.video-block.is-ready .video-block__player { opacity: 1; }
.video-block.is-ready .video-block__poster { opacity: 0; }

.video-block__overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  padding: 1.4rem clamp(1rem, 2vw, 1.6rem);
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  color: #fff;
  pointer-events: none;
}
.video-block__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}
.video-block__meta {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.82;
}

.video-block__unmute {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.2s var(--ease-out);
  pointer-events: auto;
}
.video-block__unmute:hover { background: rgba(0,0,0,0.8); }
.video-block.is-unmuted .video-block__unmute::after { content: "🔊"; }
.video-block:not(.is-unmuted) .video-block__unmute::after { content: "🔇"; }

/* When user prefers reduced motion: show poster only, no autoplay video. */
@media (prefers-reduced-motion: reduce) {
  .video-block__player { display: none; }
  .video-block__poster { opacity: 1 !important; }
}

/* Video grid layout (for tutorial libraries) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

/* ─── Blog post featured image ──────────────────────────────────────── */
.post__featured {
  margin: 0 0 2.5rem;
  border-radius: var(--radius, 14px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-2, #18181c);
}
.post__featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── Hero media — generated brand illustration ──────────────────────
   Sits as an aside within .section--hero, positioned absolute on
   desktop (right-side panel, ~45% width), stacked above content on
   mobile. Generated per hub via Replicate (Flux 1.1 Pro / Recraft v3). */
.hero-media {
  position: absolute;
  top: 8rem;
  right: clamp(1.5rem, 4vw, 3rem);
  width: clamp(280px, 38vw, 560px);
  max-height: calc(100% - 12rem);
  border-radius: var(--radius, 14px);
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.45);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.section--hero { position: relative; }
.section--hero .container { position: relative; z-index: 2; max-width: min(56ch, 60%); }

@media (max-width: 1024px) {
  .hero-media {
    position: relative;
    top: auto; right: auto;
    width: 100%;
    max-width: 560px;
    margin: 2rem 0 0;
    aspect-ratio: 16/9;
  }
  .section--hero .container { max-width: none; }
}

/* ─── Mobile performance pass ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
  }
  .bg-grain { mix-blend-mode: normal; opacity: 0.025; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 540px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-nav__links { gap: 1rem; }
  .site-nav__links a:not(.btn) { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   STOCK LIBRARY — editorial / trust / detail bands
   Each hub ships /assets/stock/{editorial,trust,detail}.webp. These
   primitives turn those into mid-page atmospheric moments without
   touching the hero or footer.
   ═══════════════════════════════════════════════════════════════════════ */

.stock-strip {
  position: relative;
  margin: 6rem 0;
  min-height: clamp(360px, 50vw, 560px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: grid;
  place-items: end start;
  overflow: hidden;
  isolation: isolate;
}
.stock-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--bg, #0b0b10) 0%, transparent) 0%,
    color-mix(in srgb, var(--bg, #0b0b10) 30%, transparent) 55%,
    color-mix(in srgb, var(--bg, #0b0b10) 85%, transparent) 100%
  );
  z-index: -1;
}
.stock-strip__inner {
  max-width: min(56rem, 92vw);
  padding: clamp(2rem, 4vw, 4rem);
  color: var(--ink, #f6f5ef);
}
.stock-strip__kicker {
  display: inline-block;
  font-family: var(--sans, system-ui);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent, #d4a843);
  margin-bottom: 0.8rem;
  opacity: 0.92;
}
.stock-strip__title {
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
  color: var(--ink, #f6f5ef);
  text-wrap: balance;
}
.stock-strip__sub {
  font-family: var(--sans, system-ui);
  font-size: clamp(0.95rem, 1.1vw, 1.06rem);
  line-height: 1.5;
  color: color-mix(in srgb, var(--ink, #f6f5ef) 82%, transparent);
  max-width: 38rem;
  margin: 0;
}

/* Light-themed hubs (attoh.casa, pharoah, aibritains light) get an
   inverted overlay so type stays readable on a warm photo */
.stock-strip[data-tone="light"]::after {
  background: linear-gradient(
    180deg,
    rgba(255, 251, 244, 0) 0%,
    rgba(255, 251, 244, 0.55) 60%,
    rgba(255, 251, 244, 0.9) 100%
  );
}
.stock-strip[data-tone="light"] .stock-strip__title,
.stock-strip[data-tone="light"] .stock-strip__sub {
  color: #1a1a1a;
}
.stock-strip[data-tone="light"] .stock-strip__sub {
  color: rgba(26, 26, 26, 0.78);
}

/* Stock card pair — used when you want trust + detail side by side */
.stock-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  margin: 5rem 0;
}
.stock-pair__card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 40px -16px rgba(0, 0, 0, 0.45);
}
.stock-pair__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(0, 0, 0, 0.5) 100%
  );
}
.stock-pair__caption {
  position: absolute;
  left: 1.4rem;
  bottom: 1.2rem;
  z-index: 1;
  color: #fff;
  font-family: var(--sans, system-ui);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .stock-pair { grid-template-columns: 1fr; }
  .stock-strip { min-height: 320px; margin: 4rem 0; }
}

/* ═══════════════════════════════════════════════════════════════════════
   FUTURISTIC FX LAYER — image treatments and cinematic primitives
   Opt-in via data-fx="..." on .stock-strip, .hero-media, .post__featured
   Each fx is composable; stack multiple via space-separated values.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── HUD GRID — engineering-blueprint overlay (tech/industrial hubs) ─── */
[data-fx~="hud"] { position: relative; isolation: isolate; }
[data-fx~="hud"]::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent, #d4a843) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent, #d4a843) 22%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  mix-blend-mode: screen;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 90%);
}

/* HUD corner brackets — bottom-left + top-right L marks */
[data-fx~="hud"]::after {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  background:
    /* top-left L */
    linear-gradient(var(--accent, #d4a843), var(--accent, #d4a843)) left top / 28px 1.5px no-repeat,
    linear-gradient(var(--accent, #d4a843), var(--accent, #d4a843)) left top / 1.5px 28px no-repeat,
    /* top-right L */
    linear-gradient(var(--accent, #d4a843), var(--accent, #d4a843)) right top / 28px 1.5px no-repeat,
    linear-gradient(var(--accent, #d4a843), var(--accent, #d4a843)) right top / 1.5px 28px no-repeat,
    /* bottom-left L */
    linear-gradient(var(--accent, #d4a843), var(--accent, #d4a843)) left bottom / 28px 1.5px no-repeat,
    linear-gradient(var(--accent, #d4a843), var(--accent, #d4a843)) left bottom / 1.5px 28px no-repeat,
    /* bottom-right L */
    linear-gradient(var(--accent, #d4a843), var(--accent, #d4a843)) right bottom / 28px 1.5px no-repeat,
    linear-gradient(var(--accent, #d4a843), var(--accent, #d4a843)) right bottom / 1.5px 28px no-repeat;
  opacity: 0.75;
  z-index: 2;
}

/* ─── DUOTONE — grade photo to brand accent + base ───────────────────── */
[data-fx~="duotone"] {
  position: relative;
  isolation: isolate;
}
[data-fx~="duotone"]::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--bg, #0b0b10) 85%, var(--accent, #d4a843)) 0%,
    color-mix(in srgb, var(--accent, #d4a843) 65%, var(--bg, #0b0b10)) 100%
  );
  mix-blend-mode: color;
  pointer-events: none;
  z-index: 0;
}
[data-fx~="duotone"] > * { position: relative; z-index: 1; }

/* ─── SCANLINES — CRT terminal feel ──────────────────────────────────── */
[data-fx~="scanlines"] { position: relative; isolation: isolate; }
[data-fx~="scanlines"]::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.22) 2px,
    rgba(0, 0, 0, 0.22) 3px
  );
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

/* ─── FILM GRAIN — animated noise (warm-photo hubs) ──────────────────── */
[data-fx~="grain"] { position: relative; isolation: isolate; }
[data-fx~="grain"]::before {
  content: "";
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='240' height='240' filter='url(%23n)' opacity='0.85'/></svg>");
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  z-index: 0;
  animation: fx-grain 8s steps(8) infinite;
}
@keyframes fx-grain {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -3%); }
  25%  { transform: translate(3%, -1%); }
  40%  { transform: translate(-1%, 2%); }
  60%  { transform: translate(2%, -4%); }
  80%  { transform: translate(-3%, 1%); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  [data-fx~="grain"]::before { animation: none; }
}

/* ─── SPOTLIGHT — cursor-tracked accent light ────────────────────────── */
[data-fx~="spotlight"] {
  position: relative;
  isolation: isolate;
  --fx-mx: 50%;
  --fx-my: 50%;
}
[data-fx~="spotlight"]::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(
    circle 240px at var(--fx-mx) var(--fx-my),
    color-mix(in srgb, var(--accent, #d4a843) 38%, transparent),
    transparent 70%
  );
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 2;
}

/* ─── CHROMATIC ABERRATION — RGB shift on hover (tech hubs only) ─────── */
[data-fx~="chroma"] {
  position: relative;
  overflow: hidden;
  transition: filter 0.45s ease;
}
[data-fx~="chroma"]:hover {
  filter:
    drop-shadow(-3px 0 0 rgba(255, 0, 90, 0.55))
    drop-shadow(3px 0 0 rgba(0, 200, 255, 0.55));
}

/* ─── HOLOGRAPHIC — animated iridescent edge ─────────────────────────── */
[data-fx~="holo"] {
  position: relative;
  isolation: isolate;
}
[data-fx~="holo"]::before {
  content: "";
  position: absolute; inset: -3px;
  background: conic-gradient(
    from 0deg,
    #d4a843, #5b8de8, #c95cff, #2dd4bf, #ffd166, #d4a843
  );
  filter: blur(22px);
  opacity: 0.45;
  z-index: -1;
  animation: fx-holo 9s linear infinite;
  border-radius: inherit;
}
@keyframes fx-holo { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  [data-fx~="holo"]::before { animation: none; }
}

/* ─── DEPTH MASK — scroll-driven clip reveal (modern browsers) ───────── */
@supports (animation-timeline: view()) {
  [data-fx~="mask-reveal"] {
    animation: fx-mask-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
  @keyframes fx-mask-reveal {
    from {
      clip-path: inset(35% 45% 35% 45% round 6px);
      filter: saturate(0.4) contrast(0.95);
    }
    to {
      clip-path: inset(0 0 0 0 round 0);
      filter: saturate(1) contrast(1);
    }
  }
}

/* ─── PARALLAX — JS-driven Y-translate (data-parallax="0.25") ────────── */
[data-parallax] {
  will-change: transform;
  transition: transform 0.05s linear;
}

/* ─── KEN-BURNS — slow zoom + drift on background-image bands ────────── */
[data-fx~="ken-burns"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
[data-fx~="ken-burns"]::before {
  content: "";
  position: absolute; inset: -8%;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  z-index: -1;
  animation: fx-ken-burns 26s ease-in-out infinite alternate;
}
@keyframes fx-ken-burns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1%, -2%); }
}
@media (prefers-reduced-motion: reduce) {
  [data-fx~="ken-burns"]::before { animation: none; }
}

/* When ken-burns is on .stock-strip, hide the element's own
   background-image and let the ::before layer animate it. */
.stock-strip[data-fx~="ken-burns"] {
  background-image: none !important;
}
.stock-strip[data-fx~="ken-burns"]::before {
  background-image: var(--fx-bg) !important;
}

/* ─── SHIFT — text reveals split / scramble (used on stock-strip title) ─ */
[data-fx~="shift"] .stock-strip__title {
  background: linear-gradient(
    90deg,
    var(--ink, #f6f5ef) 0%,
    var(--accent, #d4a843) 40%,
    var(--ink, #f6f5ef) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fx-shift 8s linear infinite;
}
@keyframes fx-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  [data-fx~="shift"] .stock-strip__title { animation: none; }
}
