/* ==========================================================================
   Imaginatron — marketing site design system
   Palette derives from the app: gold #E5AF42 / #E8A000 on near-black #0B0B0F.
   Dark-first, with a light theme via prefers-color-scheme and [data-theme].
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --gold:        #E5AF42;
  --gold-bright: #F5C95F;
  --gold-deep:   #B97808;
  --violet:      #7B3FCF;
  --blue:        #2E7CF6;
  --teal:        #1AC48C;
  --rose:        #C04472;

  --bg:          #0B0B0F;
  --bg-alt:      #101017;
  --bg-elev:     #16161F;
  --bg-elev-2:   #1D1D28;
  --line:        rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);
  --text:        #F4F4F7;
  --text-mid:    #B4B4C2;
  --text-faint:  #7C7C8C;
  --shadow:      0 24px 60px -20px rgba(0,0,0,.7);
  --shadow-sm:   0 8px 24px -12px rgba(0,0,0,.6);

  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 40px);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:          #FBFBFD;
    --bg-alt:      #F3F3F7;
    --bg-elev:     #FFFFFF;
    --bg-elev-2:   #F7F7FB;
    --line:        rgba(10,10,20,.10);
    --line-strong: rgba(10,10,20,.18);
    --text:        #14141C;
    --text-mid:    #4B4B5C;
    --text-faint:  #75758A;
    --gold-bright: #A97400;
    --shadow:      0 24px 60px -24px rgba(20,20,40,.22);
    --shadow-sm:   0 8px 22px -14px rgba(20,20,40,.25);
  }
}

:root[data-theme="light"] {
  --bg:          #FBFBFD;
  --bg-alt:      #F3F3F7;
  --bg-elev:     #FFFFFF;
  --bg-elev-2:   #F7F7FB;
  --line:        rgba(10,10,20,.10);
  --line-strong: rgba(10,10,20,.18);
  --text:        #14141C;
  --text-mid:    #4B4B5C;
  --text-faint:  #75758A;
  --gold-bright: #A97400;
  --shadow:      0 24px 60px -24px rgba(20,20,40,.22);
  --shadow-sm:   0 8px 22px -14px rgba(20,20,40,.25);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(64px, 10vw, 128px); position: relative; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: clamp(48px, 7vw, 84px); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -.022em; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: 1.02rem; }
p  { color: var(--text-mid); }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--text-mid); max-width: 62ch; }
.eyebrow {
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-bright); display: inline-flex; align-items: center; gap: .55rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.center .eyebrow::before { display: none; }
.gradient-text {
  background: linear-gradient(100deg, var(--gold-bright) 0%, var(--gold) 45%, var(--violet) 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head { max-width: 44rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; }
.muted { color: var(--text-faint); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1A1206; box-shadow: 0 12px 28px -12px rgba(229,175,66,.65);
}
.btn--primary:hover { box-shadow: 0 18px 36px -12px rgba(229,175,66,.8); }
.btn--ghost { border-color: var(--line-strong); background: transparent; color: var(--text); }
.btn--ghost:hover { border-color: var(--gold); background: rgba(229,175,66,.08); }
.btn--sm { padding: .55rem 1rem; font-size: .85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.link-arrow { color: var(--gold-bright); font-weight: 600; display: inline-flex; gap: .35rem; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* Store badges (CSS-drawn, no external assets) */
.stores { display: flex; flex-wrap: wrap; gap: .75rem; }
.store-badge {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .6rem 1.15rem; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--bg-elev);
  transition: border-color .2s ease, transform .2s ease;
}
.store-badge:hover { border-color: var(--gold); transform: translateY(-2px); }
.store-badge svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.store-badge span { display: block; line-height: 1.15; }
.store-badge .sb-top { font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.store-badge .sb-main { font-size: .95rem; font-weight: 600; font-family: var(--font-display); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent; transition: border-color .25s ease, background .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 1.25rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--gold-bright), var(--gold-deep) 60%, var(--violet));
  display: grid; place-items: center; color: #1A1206; font-size: .95rem; font-weight: 800;
  box-shadow: 0 6px 16px -8px rgba(229,175,66,.9);
}
.nav-links { display: flex; gap: .35rem; margin-left: auto; align-items: center; }
.nav-links a {
  padding: .45rem .8rem; border-radius: 999px; font-size: .9rem; color: var(--text-mid);
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-elev); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--text-mid);
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle { display: none; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .sun { display: none; }
}

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed; inset: 68px 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem var(--pad) 1.25rem;
    transform: translateY(-120%); transition: transform .3s cubic-bezier(.3,.8,.3,1); box-shadow: var(--shadow);
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-links a { padding: .8rem .4rem; border-radius: 10px; font-size: 1rem; }
  .nav-actions .btn { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 9vw, 104px) clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 72px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { margin-block: 1rem .9rem; }
.hero .lede { margin-bottom: 1.75rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.5rem; color: var(--text-faint); font-size: .84rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }

.aurora { position: absolute; inset: -20% -10% auto; height: 620px; pointer-events: none; z-index: -1; opacity: .55; filter: blur(70px); }
.aurora i { position: absolute; border-radius: 50%; display: block; }
.aurora i:nth-child(1) { width: 460px; height: 460px; left: 4%;  top: 6%;  background: radial-gradient(circle, rgba(229,175,66,.55), transparent 68%); animation: drift 22s ease-in-out infinite; }
.aurora i:nth-child(2) { width: 420px; height: 420px; right: 8%; top: 0;   background: radial-gradient(circle, rgba(123,63,207,.55), transparent 68%); animation: drift 26s ease-in-out infinite reverse; }
.aurora i:nth-child(3) { width: 380px; height: 380px; left: 42%; top: 30%; background: radial-gradient(circle, rgba(46,124,246,.42), transparent 68%); animation: drift 30s ease-in-out infinite; }
@keyframes drift {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50%     { transform: translate3d(40px,-30px,0) scale(1.12); }
}

/* ---------- Phone mockup — replica of the app's Create screen ---------- */
/* Everything inside .phone-screen keeps its own dark palette in both site
   themes: it is a device screen showing a dark app, not part of the page.   */

.hero-demo { display: grid; gap: 1.15rem; justify-items: center; }

.phone {
  position: relative; width: min(320px, 84vw); margin-inline: auto;
  aspect-ratio: 9 / 19.5; border-radius: 42px; padding: 11px;
  background: linear-gradient(160deg, #2A2A36, #111118);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.07);
}
.phone::after {
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 88px; height: 24px; border-radius: 999px; background: #000; z-index: 5;
}
.phone-screen {
  --g:  #E5AF42;
  --gb: #F5C95F;
  --gd: #B97808;
  --ink:   #F4F4F7;
  --ink-2: #A9A9BA;
  --ink-3: #74748A;
  --hair:  rgba(255,255,255,.09);
  position: relative; height: 100%; border-radius: 32px; overflow: hidden;
  background: radial-gradient(120% 60% at 50% 0%, #14141D 0%, #07070B 62%);
  display: flex; flex-direction: column;
  color: var(--ink); font-size: 10px; line-height: 1.35;
  font-family: var(--font); -webkit-font-smoothing: antialiased;
}

/* status bar */
.ps-status {
  flex: none; height: 34px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
}
.ps-status-r { display: flex; align-items: center; gap: 4px; }
.ps-status i { display: block; background: var(--ink); }
.ps-sig  { width: 12px; height: 8px; clip-path: polygon(0 70%,22% 70%,22% 100%,0 100%,0 70%,33% 45%,55% 45%,55% 100%,33% 100%,33% 45%,66% 20%,88% 20%,88% 100%,66% 100%); }
.ps-wifi { width: 11px; height: 8px; border-radius: 1px; clip-path: polygon(50% 100%,0 32%,50% 0,100% 32%); }
.ps-batt { width: 16px; height: 8px; border-radius: 2px; background: none; border: 1px solid rgba(255,255,255,.55); position: relative; }
.ps-batt::before { content: ""; position: absolute; inset: 1.5px; background: var(--ink); border-radius: 1px; }
.ps-batt::after  { content: ""; position: absolute; right: -3px; top: 2.5px; width: 1.5px; height: 3px; background: rgba(255,255,255,.55); border-radius: 0 1px 1px 0; }

/* app bar */
.ps-appbar {
  flex: none; height: 36px; padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.ps-brand {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 9.5px;
  letter-spacing: .06em;
  background: linear-gradient(100deg, var(--gb), var(--g) 45%, #C98F1E);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ps-mark {
  width: 15px; height: 15px; border-radius: 5px; flex: none;
  background: conic-gradient(from 210deg, var(--gb), var(--gd), #7B3FCF, var(--gb));
  box-shadow: 0 0 8px rgba(229,175,66,.45);
}
.ps-pro {
  margin-left: 3px; padding: 1px 4px; border-radius: 999px;
  border: 1px solid rgba(229,175,66,.6); color: var(--gb);
  font-size: 6.5px; letter-spacing: .08em; -webkit-text-fill-color: var(--gb);
}
.ps-credits {
  display: flex; align-items: center; gap: 3px; flex: none;
  padding: 3px 4px 3px 5px; border-radius: 999px;
  border: 1px solid rgba(229,175,66,.42); background: rgba(229,175,66,.09);
  font-size: 8px; color: var(--ink-2); white-space: nowrap;
}
.ps-credits b { color: var(--ink); font-family: var(--font-mono); font-size: 8.5px; }
.ps-star { color: var(--gb); font-size: 8px; }
.ps-credits i {
  display: grid; place-items: center; width: 12px; height: 12px; margin-left: 1px;
  border-radius: 999px; background: rgba(229,175,66,.22); color: var(--gb);
  font-style: normal; font-size: 9px; line-height: 1;
}

/* creation-type tabs */
.ps-tabs {
  flex: none; display: flex; gap: 2px; margin: 2px 8px 0; padding: 4px;
  border-radius: 13px; background: rgba(255,255,255,.045); border: 1px solid var(--hair);
  overflow: hidden;
}
.ps-tab {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 0 4px; border-radius: 9px;
  font-size: 6.6px; color: var(--ink-3); letter-spacing: .01em;
}
.ps-tab svg { width: 13px; height: 13px; stroke-linecap: round; stroke-linejoin: round; }
.ps-tab.is-on { background: rgba(229,175,66,.16); color: var(--gb); }

/* body / panes */
.ps-body { position: relative; flex: 1 1 auto; min-height: 0; }
.ps-pane {
  position: absolute; inset: 0; padding: 9px 0 0;
  display: flex; flex-direction: column; gap: 9px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .32s ease, transform .32s ease, visibility .32s;
}
.ps-pane.is-on { opacity: 1; visibility: visible; transform: none; }

.ps-headrow { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 0 12px; }
.ps-h3  { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: -.01em; }
.ps-sub { font-size: 8px; color: var(--ink-3); margin-top: 1px; }
.ps-link { flex: none; font-size: 8px; color: var(--gb); font-weight: 600; }

/* style cards */
.ps-styles {
  flex: none; display: flex; gap: 7px; padding: 0 12px 2px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.ps-styles::-webkit-scrollbar { display: none; }
.ps-style {
  position: relative; flex: 0 0 92px; height: 124px; border-radius: 13px;
  overflow: hidden; scroll-snap-align: start;
  border: 1px solid var(--hair); background: #12121A;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.ps-style img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ps-style::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(4,4,8,.86) 62%, rgba(4,4,8,.96));
}
.ps-style b, .ps-style em, .ps-cr { position: absolute; left: 7px; right: 7px; z-index: 2; }
.ps-style b  { bottom: 27px; font-size: 9.5px; font-weight: 700; }
.ps-style em {
  bottom: 16px; font-style: normal; font-size: 7px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-cr { bottom: 5px; font-size: 7.5px; color: var(--gb); font-family: var(--font-mono); }
.ps-style.is-on { border-color: var(--g); box-shadow: 0 0 0 1px var(--g), 0 6px 18px -8px rgba(229,175,66,.6); transform: translateY(-1px); }
.ps-style.is-on::before {
  content: "✓"; position: absolute; z-index: 3; top: 6px; right: 6px;
  width: 15px; height: 15px; border-radius: 999px;
  display: grid; place-items: center; font-size: 9px; font-weight: 700;
  color: #1A1206; background: linear-gradient(135deg, var(--gb), var(--gd));
}

/* prompt field */
.ps-field, .ps-quality, .ps-recent {
  flex: none; margin: 0 12px; padding: 8px 9px; border-radius: 13px;
  background: rgba(255,255,255,.045); border: 1px solid var(--hair);
}
.ps-field-top {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 8px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em;
}
.ps-improve {
  display: inline-flex; align-items: center; gap: 3px; text-transform: none; letter-spacing: 0;
  padding: 3px 7px; border-radius: 999px; font-size: 8px; font-weight: 700;
  color: var(--gb); border: 1px solid rgba(229,175,66,.42); background: rgba(229,175,66,.1);
}
.ps-improve svg { width: 9px; height: 9px; stroke-linecap: round; }
.ps-input {
  margin-top: 6px; min-height: 34px; font-size: 9.5px; color: #DDDDE8;
  display: block; overflow: hidden;
}
.ps-ph { color: var(--ink-3); }
.ps-caret { display: inline-block; width: 1.5px; height: 10px; vertical-align: -1px; margin-left: 1px; background: var(--g); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ps-count { margin-top: 4px; text-align: right; font-size: 7.5px; color: var(--ink-3); font-family: var(--font-mono); }

/* recent prompts */
.ps-recents {
  display: flex; gap: 5px; margin-top: 7px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 84%, transparent);
          mask-image: linear-gradient(90deg, #000 84%, transparent);
}
.ps-rec {
  flex: 0 0 auto; max-width: 118px; padding: 5px 8px; border-radius: 999px;
  border: 1px solid var(--hair); background: rgba(255,255,255,.04);
  font-size: 8px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ps-rec.is-new { animation: recIn .45s cubic-bezier(.2,.8,.3,1) both; }
@keyframes recIn { from { opacity: 0; transform: translateX(-8px) scale(.94); } }

/* quick ideas */
.ps-ideas {
  flex: none; display: flex; gap: 5px; margin: 0 12px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
          mask-image: linear-gradient(90deg, #000 90%, transparent);
}
.ps-idea {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 9px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--hair); background: rgba(255,255,255,.045);
  font: inherit; font-size: 8px; color: var(--ink-2); cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.ps-idea:hover { color: var(--gb); border-color: rgba(229,175,66,.45); background: rgba(229,175,66,.1); }
.ps-idea:focus-visible { outline: 2px solid var(--g); outline-offset: 2px; }
.ps-idea[aria-pressed="true"] { color: var(--gb); border-color: rgba(229,175,66,.55); background: rgba(229,175,66,.13); }
.ps-idea svg { width: 9px; height: 9px; stroke-linecap: round; stroke-linejoin: round; }

/* quality tiers */
.ps-tiers { display: flex; gap: 5px; margin-top: 7px; }
.ps-tier {
  flex: 1 1 0; min-width: 0; padding: 6px 2px 5px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid var(--hair); background: rgba(255,255,255,.04);
  font-size: 8px; color: var(--ink-2);
  transition: border-color .25s ease, background .25s ease, color .25s ease;
}
.ps-tier b { font-family: var(--font-mono); font-size: 7.5px; color: var(--ink-3); font-weight: 500; }
.ps-tier.is-on { border-color: var(--g); background: rgba(229,175,66,.15); color: var(--gb); }
.ps-tier.is-on b { color: var(--gb); }

/* result pane */
.ps-pane[data-pane="result"] { padding: 9px 12px 0; }
.ps-canvas {
  position: relative; flex: 1 1 auto; min-height: 0; width: 100%;
  border-radius: 15px; overflow: hidden; background: #0E0E15; border: 1px solid var(--hair);
}
.ps-backdrop {
  position: absolute; inset: -14%; width: 128%; height: 128%; object-fit: cover;
  opacity: 0; transition: opacity .7s ease;
  filter: blur(26px) saturate(1.4) brightness(.62);
}
.ps-backdrop.is-in { opacity: 1; }
.ps-shimmer {
  position: absolute; inset: 0; opacity: 0; transition: opacity .3s ease;
  background: linear-gradient(100deg, #12121A 30%, #21212E 50%, #12121A 70%);
  background-size: 220% 100%; animation: shimmer 1.4s linear infinite;
}
.ps-shimmer.is-on { opacity: 1; }
@keyframes shimmer { to { background-position: -220% 0; } }
.ps-result {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transform: scale(1.05); filter: blur(10px);
  transition: opacity .7s ease, transform 1s ease, filter .7s ease;
}
.ps-result.is-in { opacity: 1; transform: none; filter: none; }
.ps-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 10px 11px 11px; opacity: 0; transition: opacity .3s ease;
  background: linear-gradient(180deg, transparent, rgba(4,4,8,.9));
}
.ps-overlay.is-on { opacity: 1; }
.ps-stage { font-size: 9px; font-weight: 600; color: var(--ink); }
.ps-track { margin-top: 5px; height: 3px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.ps-track i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gd), var(--gb)); transition: width .35s ease; }
.ps-pct { margin-top: 4px; text-align: right; font-size: 7.5px; color: var(--gb); font-family: var(--font-mono); }
.ps-resprompt {
  flex: none; margin-top: 9px; font-size: 8.5px; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ps-resbar { flex: none; display: flex; gap: 5px; margin-top: 9px; }
.ps-resact {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0 6px; border-radius: 11px;
  border: 1px solid var(--hair); background: rgba(255,255,255,.045);
  font-size: 7.5px; color: var(--ink-2);
}
.ps-resact svg { width: 13px; height: 13px; stroke-linecap: round; stroke-linejoin: round; }

/* bottom action bar */
.ps-actionbar {
  flex: none; margin: 9px 10px 0; padding: 7px 8px 7px 10px; border-radius: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 7px;
  background: rgba(255,255,255,.055); border: 1px solid var(--hair);
  backdrop-filter: blur(6px);
}
.ps-actionmeta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; font-size: 8px; color: var(--ink-3); min-width: 0; }
.ps-pill { color: var(--ink); font-weight: 600; }
.ps-dot { opacity: .5; }
.ps-arrow { color: var(--ink-3); margin: 0 1px; }
.ps-price { color: var(--gb); font-family: var(--font-mono); font-size: 8.5px; display: inline-flex; align-items: center; gap: 2px; }
.ps-generate {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 11px; border-radius: 11px; font-size: 9px; font-weight: 700;
  color: #1A1206; background: linear-gradient(135deg, var(--gb), var(--gd));
  box-shadow: 0 6px 16px -8px rgba(229,175,66,.9);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.ps-generate svg { width: 11px; height: 11px; stroke-linecap: round; stroke-linejoin: round; }
.ps-generate.is-press { transform: scale(.94); box-shadow: 0 2px 8px -6px rgba(229,175,66,.9); }
.ps-generate.is-busy { opacity: .55; }

/* bottom nav */
.ps-nav {
  flex: none; margin-top: 8px; padding: 7px 6px 11px;
  display: flex; border-top: 1px solid var(--hair); background: rgba(6,6,10,.7);
}
.ps-navi {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 7px; color: var(--ink-3);
}
.ps-navi svg { width: 15px; height: 15px; stroke-linecap: round; stroke-linejoin: round; }
.ps-navi.is-on { color: var(--gb); }

/* ---------- prompt picker (below the phone) ---------- */
.demo-picker { width: min(408px, 94vw); text-align: center; }
.demo-picker-label {
  font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: .6rem;
}
.demo-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.demo-chip {
  font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer;
  padding: .4rem .75rem; border-radius: 999px;
  color: var(--text-mid); background: var(--bg-elev); border: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.demo-chip:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.demo-chip[aria-pressed="true"] {
  color: var(--gold-bright); border-color: rgba(229,175,66,.55); background: rgba(229,175,66,.1);
}
.demo-chip:disabled { opacity: .45; cursor: progress; transform: none; }
.demo-note { margin-top: .65rem; font-size: .68rem; color: var(--text-faint); }

@media (max-width: 400px) {
  .phone-screen { font-size: 9.4px; }
  .ps-h3 { font-size: 11px; }
  .ps-style { flex-basis: 86px; height: 116px; }
}

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); }

.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .93rem; }
.card--feature { display: flex; flex-direction: column; gap: .85rem; }
.card ul { margin: .35rem 0 0; padding-left: 1.05rem; color: var(--text-mid); font-size: .9rem; }
.card ul li { margin-bottom: .3rem; }

.ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, var(--c1, var(--gold-bright)), var(--c2, var(--gold-deep)));
  color: #0E0E14; box-shadow: 0 8px 20px -12px rgba(0,0,0,.9);
}
.ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.pill {
  display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 999px;
  font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--text-faint);
}
.pill--pro { color: var(--gold-bright); border-color: rgba(229,175,66,.4); background: rgba(229,175,66,.1); }
.pill--new { color: var(--teal); border-color: rgba(26,196,140,.4); background: rgba(26,196,140,.1); }
.pill--free { color: var(--blue); border-color: rgba(46,124,246,.4); background: rgba(46,124,246,.1); }

/* ---------- Tool catalog ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between;
  margin-bottom: 1.6rem; position: sticky; top: 68px; z-index: 20;
  padding-block: .85rem; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter {
  padding: .45rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text-mid);
  transition: all .18s ease;
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1A1206; }
.search {
  display: flex; align-items: center; gap: .55rem; padding: .5rem .9rem; min-width: 220px; flex: 1 1 220px; max-width: 340px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev);
}
.search:focus-within { border-color: var(--gold); }
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: .9rem; min-width: 0; }
.search svg { width: 16px; height: 16px; flex: none; stroke: var(--text-faint); fill: none; stroke-width: 1.8; }

.tool-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.tool {
  display: flex; gap: .85rem; align-items: flex-start; padding: 1.05rem;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.tool:hover { border-color: var(--gold); transform: translateY(-2px); }
.tool.is-hidden { display: none; }
.tool-body { min-width: 0; }
.tool-name { font-weight: 650; font-size: .96rem; font-family: var(--font-display); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.tool-desc { font-size: .82rem; color: var(--text-faint); margin-top: .25rem; }
.tool-route { font-family: var(--font-mono); font-size: .68rem; color: var(--text-faint); opacity: .65; margin-top: .45rem; }
.count-note { font-size: .85rem; color: var(--text-faint); }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--text-faint); }

/* ---------- Stats ---------- */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { padding: 1.4rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-elev); text-align: center; }
.stat-num { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 700; line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-faint); margin-top: .45rem; letter-spacing: .03em; }

/* ---------- App screenshot rail ---------- */
.shots { overflow: hidden; }
.shots-rail {
  display: flex; gap: clamp(.9rem, 2vw, 1.4rem);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: thin;
  padding-block: .25rem 1.25rem;
  padding-inline: max(var(--pad), calc((100% - var(--wrap)) / 2 + var(--pad)));
}
.shot { flex: 0 0 clamp(196px, 42vw, 250px); scroll-snap-align: center; margin: 0; }
.shot img {
  display: block; width: 100%; height: auto;
  border-radius: 26px; border: 1px solid var(--line-strong);
  background: #000; box-shadow: var(--shadow);
}
.shot figcaption { margin-top: .85rem; font-size: .8rem; line-height: 1.5; color: var(--text-mid); }
.shot figcaption b {
  display: block; margin-bottom: .2rem; font-size: .9rem;
  font-weight: 700; color: var(--text); font-family: var(--font-display);
}
@media (prefers-reduced-motion: reduce) { .shots-rail { scroll-snap-type: none; } }

/* ---------- Before / after slider ---------- */
.ba {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1;
  border: 1px solid var(--line); cursor: ew-resize; touch-action: none; user-select: none;
  background: #14141b;
}
.ba-layer {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center; pointer-events: none;
}
.ba-after {
  /* the cutout is a transparent PNG — checkerboard reads as "no background" */
  background-color: #23232b;
  background-image:
    conic-gradient(#2e2e38 25%, #1c1c23 0 50%, #2e2e38 0 75%, #1c1c23 0);
  background-size: 24px 24px;
  clip-path: inset(0 0 0 var(--split, 50%));
}
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; background: var(--gold);
  box-shadow: 0 0 22px rgba(229,175,66,.8); pointer-events: none;
}
.ba-handle::after {
  content: "⇄"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #1A1206; font-size: .95rem; font-weight: 700;
}
.ba-tag {
  position: absolute; bottom: 12px; padding: .25rem .6rem; border-radius: 999px; font-size: .68rem;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(0,0,0,.6); color: #fff;
  backdrop-filter: blur(6px);
}
.ba-tag--l { left: 12px; } .ba-tag--r { right: 12px; }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); align-items: start; }
.plan { position: relative; padding: 1.75rem 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--bg-elev); }
.plan--featured { border-color: var(--gold); background: linear-gradient(180deg, rgba(229,175,66,.09), transparent 40%), var(--bg-elev); box-shadow: 0 24px 60px -30px rgba(229,175,66,.6); }
.plan-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: .2rem .75rem; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--gold); color: #1A1206; }
.plan-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.plan-price { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; margin: .5rem 0 .15rem; }
.plan-price small { font-size: .85rem; font-weight: 500; color: var(--text-faint); }
.plan ul { list-style: none; padding: 0; margin: 1.15rem 0 1.5rem; font-size: .9rem; }
.plan li { display: flex; gap: .55rem; align-items: flex-start; padding: .38rem 0; color: var(--text-mid); }
.plan li::before { content: "✓"; color: var(--gold-bright); font-weight: 800; flex: none; }
.plan li.no::before { content: "—"; color: var(--text-faint); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .9rem; }
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-display); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); font-weight: 700; background: var(--bg-elev-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-elev-2); }
td b, td strong { color: var(--gold-bright); font-family: var(--font-mono); }

/* ---------- Calculator ---------- */
.calc { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .calc { grid-template-columns: 1.15fr .85fr; } }
.calc-panel { padding: 1.6rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--bg-elev); }
.field { margin-bottom: 1.35rem; }
.field label { display: flex; justify-content: space-between; align-items: baseline; font-size: .85rem; font-weight: 600; margin-bottom: .55rem; }
.field label b { font-family: var(--font-mono); color: var(--gold-bright); font-weight: 700; }
.seg { display: grid; grid-auto-flow: column; gap: .35rem; padding: .3rem; border-radius: 14px; background: var(--bg-elev-2); border: 1px solid var(--line); overflow-x: auto; }
.seg button {
  padding: .55rem .5rem; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  font-size: .82rem; font-weight: 600; color: var(--text-mid); white-space: nowrap; transition: all .16s ease;
}
.seg button[aria-pressed="true"] { background: var(--gold); color: #1A1206; }
input[type="range"] { width: 100%; accent-color: var(--gold); height: 26px; }
.switch { display: flex; align-items: center; gap: .7rem; cursor: pointer; font-size: .9rem; }
.switch input { width: 42px; height: 24px; appearance: none; -webkit-appearance: none; border-radius: 999px; background: var(--bg-elev-2); border: 1px solid var(--line-strong); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-faint); transition: transform .2s, background .2s; }
.switch input:checked { background: rgba(229,175,66,.28); border-color: var(--gold); }
.switch input:checked::after { transform: translateX(18px); background: var(--gold); }

.readout { position: sticky; top: 90px; padding: 1.6rem; border-radius: var(--radius-lg); border: 1px solid var(--gold); background: linear-gradient(180deg, rgba(229,175,66,.1), transparent 45%), var(--bg-elev); }
.readout-total { font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 700; line-height: 1; color: var(--gold-bright); }
.readout-total small { font-size: .9rem; color: var(--text-faint); font-weight: 500; margin-left: .35rem; }
.readout-line { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .87rem; }
.readout-line:last-of-type { border-bottom: 0; }
.readout-line span:last-child { font-family: var(--font-mono); color: var(--text); }
.formula { font-family: var(--font-mono); font-size: .74rem; color: var(--text-faint); background: var(--bg-elev-2); padding: .7rem .8rem; border-radius: 10px; margin-top: 1rem; overflow-x: auto; white-space: nowrap; }

/* ---------- Steps / workflows ---------- */
.steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.step { position: relative; padding: 1.5rem 1.3rem 1.3rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-elev); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: .8rem; font-weight: 800; color: var(--gold);
  letter-spacing: .05em; display: block; margin-bottom: .6rem;
}
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .85rem; font-size: .78rem; color: var(--text-faint); }
.flow em { font-style: normal; padding: .28rem .6rem; border-radius: 8px; background: var(--bg-elev-2); border: 1px solid var(--line); color: var(--text-mid); }
.flow span { color: var(--gold); }

/* ---------- Accordion (FAQ / support) ---------- */
.qa { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-elev); margin-bottom: .65rem; overflow: hidden; }
.qa.is-hidden { display: none; }
.qa summary {
  list-style: none; cursor: pointer; padding: 1.05rem 1.25rem; display: flex; gap: 1rem;
  align-items: flex-start; justify-content: space-between; font-weight: 600; font-size: .97rem;
  font-family: var(--font-display);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-size: 1.35rem; line-height: 1; color: var(--gold); flex: none; transition: transform .22s ease; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa[open] { border-color: var(--line-strong); }
.qa-body { padding: 0 1.25rem 1.2rem; color: var(--text-mid); font-size: .93rem; }
.qa-body p + p { margin-top: .7rem; }
.qa-body a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }
.qa-star { color: var(--gold); }
.qa-cat { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); font-family: var(--font); font-weight: 700; }

/* ---------- Tutorials ---------- */
.tut { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); overflow: hidden; display: flex; flex-direction: column; }
.tut-thumb {
  aspect-ratio: 16/9; position: relative; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--c1, #2a2140), var(--c2, #0d0d14));
}
.tut-thumb::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(120deg, rgba(255,255,255,.045) 0 2px, transparent 2px 9px); }
.tut-play { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.14); backdrop-filter: blur(6px); display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); z-index: 1; }
.tut-play::after { content: ""; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.tut-dur { position: absolute; right: 10px; bottom: 10px; padding: .18rem .5rem; border-radius: 6px; background: rgba(0,0,0,.7); font-size: .7rem; font-family: var(--font-mono); z-index: 1; }
.tut-meta { padding: 1.1rem 1.15rem 1.3rem; }
.tut-meta h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.tut-chapters { margin-top: .8rem; font-size: .8rem; color: var(--text-faint); }
.tut-chapters li { margin-bottom: .2rem; }
.tut-chapters code { font-family: var(--font-mono); color: var(--gold-bright); }
.tut-chapters button.tut-chapter {
  display: block; width: calc(100% + .7rem); margin-left: -.35rem; text-align: left;
  padding: .12rem .35rem; border: 0; border-radius: 6px; background: none;
  font: inherit; color: inherit; cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.tut-chapters button.tut-chapter:hover,
.tut-chapters button.tut-chapter:focus-visible {
  background: rgba(255,255,255,.06); color: var(--text);
}

/* A card with a finished video: poster fills the frame, click opens the player. */
.tut-thumb--video { width: 100%; padding: 0; border: 0; font: inherit; color: inherit; cursor: pointer; }
.tut-thumb--video img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: top center; opacity: .9; transition: opacity .25s ease, transform .35s ease;
}
.tut-thumb--video .tut-play { transition: background .2s ease, transform .25s ease; }
.tut-thumb--video:hover img, .tut-thumb--video:focus-visible img { opacity: .9; transform: scale(1.03); }
.tut-thumb--video:hover .tut-play, .tut-thumb--video:focus-visible .tut-play { background: rgba(255,255,255,.24); transform: scale(1.08); }

.tut-lightbox { position: fixed; inset: 0; z-index: 200; display: flex; overflow: auto; padding: clamp(16px,4vw,48px); }
.tut-lightbox[hidden] { display: none; }
.tut-lightbox-backdrop { position: fixed; inset: 0; background: rgba(4,4,8,.86); backdrop-filter: blur(8px); }
.tut-lightbox-inner { position: relative; margin: auto; display: flex; flex-direction: column; align-items: center; gap: .8rem; max-width: 100%; }
.tut-lightbox video {
  display: block; max-width: min(100%, 440px); max-height: 78vh; width: auto; height: auto;
  aspect-ratio: 16 / 9; object-fit: contain;
  border-radius: var(--radius); border: 1px solid var(--line); background: #000;
}
.tut-lightbox[data-orient="portrait"] video { aspect-ratio: 9 / 16; max-height: 64vh; }
.tut-lightbox-title { color: var(--text-faint); margin: 0; text-align: center; }
.tut-lightbox-chapters {
  width: min(100%, 440px); margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 2px;
  max-height: 26vh; overflow-y: auto;
}
.tut-lightbox-chapters[hidden] { display: none; }
.tut-lightbox-chapter {
  display: flex; gap: .6rem; align-items: baseline; width: 100%; text-align: left;
  padding: .5rem .6rem; border: 0; border-radius: 8px; background: rgba(255,255,255,.04);
  color: var(--text-mid); font: inherit; font-size: .82rem; line-height: 1.35; cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.tut-lightbox-chapter:hover, .tut-lightbox-chapter:focus-visible { background: rgba(255,255,255,.1); color: var(--text); }
.tut-lightbox-chapter.is-active { background: rgba(229,175,66,.14); color: var(--text); }
.tut-lightbox-chapter code { font-family: var(--font-mono); color: var(--gold-bright); flex: none; }
.tut-lightbox-close {
  position: absolute; top: -2.6rem; right: 0; width: 36px; height: 36px; line-height: 1;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12);
  color: #fff; font-size: 1.35rem; cursor: pointer;
}
.tut-lightbox-close:hover { background: rgba(255,255,255,.22); }
@media (prefers-reduced-motion: reduce) {
  .tut-thumb--video img, .tut-thumb--video .tut-play { transition: none; }
  .tut-thumb--video:hover img, .tut-thumb--video:focus-visible img { transform: none; }
  .tut-thumb--video:hover .tut-play, .tut-thumb--video:focus-visible .tut-play { transform: none; }
}

/* ---------- Legal / doc pages ---------- */
.doc-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .doc-layout { grid-template-columns: 250px 1fr; } }
.toc { position: sticky; top: 92px; font-size: .87rem; }
.toc h4 { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: .7rem; }
.toc a { display: block; padding: .32rem 0 .32rem .75rem; border-left: 2px solid var(--line); color: var(--text-faint); transition: all .18s; }
.toc a:hover, .toc a.is-active { color: var(--gold-bright); border-left-color: var(--gold); }
@media (max-width: 999px) { .toc { position: static; display: none; } }

.doc { max-width: 74ch; }
.doc h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 2.6rem 0 .9rem; scroll-margin-top: 96px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 1.08rem; margin: 1.8rem 0 .6rem; scroll-margin-top: 96px; }
.doc p { margin-bottom: .95rem; }
.doc ul, .doc ol { margin: 0 0 1.1rem 1.15rem; color: var(--text-mid); }
.doc li { margin-bottom: .42rem; }
.doc strong { color: var(--text); }
.doc a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }
.doc table { margin-bottom: 1.2rem; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.doc code { font-family: var(--font-mono); font-size: .86em; background: var(--bg-elev-2); padding: .12em .4em; border-radius: 5px; color: var(--gold-bright); }

.notice {
  border-left: 3px solid var(--gold); background: rgba(229,175,66,.07);
  padding: 1.1rem 1.25rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 1.6rem;
}
.notice p { color: var(--text-mid); font-size: .92rem; }
.notice strong { color: var(--gold-bright); }
.notice--warn { border-left-color: var(--rose); background: rgba(192,68,114,.09); }
.notice--warn strong { color: #FF7EA8; }

.meta-line { font-size: .84rem; color: var(--text-faint); font-family: var(--font-mono); margin-bottom: 1.5rem; }

/* placeholder markers that must be replaced before launch */
.ph {
  font-family: var(--font-mono); font-size: .85em; padding: .08em .4em; border-radius: 5px;
  background: rgba(192,68,114,.16); color: #FF9BBD; border: 1px dashed rgba(192,68,114,.5);
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: .7rem; width: max-content; animation: slide 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); font-size: .85rem; white-space: nowrap; color: var(--text-mid); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- CTA band ---------- */
.cta-band {
  border-radius: var(--radius-lg); padding: clamp(2.4rem, 6vw, 4.2rem) clamp(1.5rem, 5vw, 3.5rem);
  background:
    radial-gradient(90% 130% at 12% 8%, rgba(229,175,66,.22), transparent 60%),
    radial-gradient(80% 120% at 88% 92%, rgba(123,63,207,.24), transparent 62%),
    var(--bg-elev);
  border: 1px solid var(--line-strong); text-align: center;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding-block: clamp(40px, 6vw, 72px) 32px; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 2.5rem; }
.footer-col h4 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: .85rem; }
.footer-col a { display: block; padding: .28rem 0; font-size: .89rem; color: var(--text-mid); transition: color .18s; }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; padding-top: 1.75rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--text-faint); }
.lang { display: flex; gap: .35rem; }
.lang button { padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: .78rem; color: var(--text-faint); }
.lang button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Utilities ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: .75rem 1.25rem; background: var(--gold); color: #1A1206; border-radius: 0 0 10px 0; font-weight: 700; }
.skip-link:focus { left: 0; }
.divider { height: 1px; background: var(--line); margin-block: clamp(40px, 6vw, 72px); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .75rem; } .mt-2 { margin-top: 1.5rem; } .mt-3 { margin-top: 2.25rem; }
.mb-2 { margin-bottom: 1.5rem; }
