/* Claude wrapped: a dark shell around the story. Tokens are jjt-canvas kit.css (dark theme);
   buttons are its roll-button, switches its switches.html, the text box its float-input. */
:root {
  --bg: #161617; --card: #1E1E21; --fg: #F2F0EA; --muted: #A4A29B; --faint: #85858D;
  --line: #2C2C31; --soft: #26262A; --strong: #3A3A40; --hover: #232327;
  --accent: #B7A9FF; --bad: #F06A58; --bad-soft: #2E1816; --good: #3DBE74;
  --r: 14px;
  --sans: 'Archivo', system-ui, sans-serif;
  /* the slides' own type, so the pages read as part of the recap */
  --display: 'Mona Sans Wide', 'Archivo', system-ui, sans-serif;
  --text: 'Mona Sans', 'Archivo', system-ui, sans-serif;
  --violet: #a0a0f4;
  /* kit motion tokens, CRISP tempo: strong ease-out, nothing over 0.3 s */
  --tm: .62; --tcap: .3s;
  --expo: cubic-bezier(.23, 1, .32, 1);
  --spring: cubic-bezier(.23, 1, .32, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--fg); }
body { font: 500 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100svh; display: flex; flex-direction: column; }
button, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 16px; }
h1 { font: 800 clamp(38px, 6.4vw, 60px)/1 var(--display); letter-spacing: -.02em; }
/* each later screen's title is its page's h1, styled smaller than the landing's */
h2, .narrow h1 { font: 800 24px/1.1 var(--display); letter-spacing: -.01em; line-height: 1.1; text-wrap: balance; margin: 14px 0 18px; }

/* screens fade up a touch on arrival */
.screen { animation: arrive min(calc(.35s * var(--tm)), var(--tcap)) var(--expo); }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } }
.narrow { max-width: 520px; margin: 0 auto; }

.banner { background: var(--accent); color: #141416; font-weight: 700; text-align: center; padding: 10px 16px; }

/* ---------- buttons (roll-button.html) ---------- */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 10px 0 22px; border-radius: 99px; font-weight: 700; font-size: 15px; position: relative; transition: transform min(calc(.2s * var(--tm)), var(--tcap)) var(--expo); -webkit-tap-highlight-color: transparent; }
.b:active { transform: scale(.97); }
.b.light { background: var(--fg); color: var(--bg); }
.b.ghost { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.b.wide { width: 100%; margin-top: 16px; }
.b.small { height: 40px; padding: 0 16px; font-size: 14px; }
.b:disabled { opacity: .5; cursor: default; }
/* flex-start, so each letter keeps both of its lines; stretched to one line, the hover roll only moved half way */
.lab { display: inline-flex; align-items: flex-start; overflow: hidden; height: 1.25em; line-height: 1.25; }
.lab span { display: inline-flex; flex-direction: column; transition: transform min(calc(.55s * var(--tm)), var(--tcap)) var(--expo); transition-delay: calc(var(--i) * 18ms); }
.lab span::after { content: attr(data-c); }
@media (hover: hover) and (pointer: fine) { .b:hover .lab span { transform: translateY(-50%); } }
.arr, .disc { position: relative; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; }
.light .arr, .light .disc { background: rgba(0, 0, 0, .1); }
.ghost .arr { background: var(--fg); color: var(--bg); }
.arr svg { position: absolute; inset: 8px; width: 16px; height: 16px; transition: transform min(calc(.5s * var(--tm)), var(--tcap)) var(--expo); }
.arr svg + svg { transform: translateX(-24px); }
@media (hover: hover) and (pointer: fine) {
  .b:hover .arr svg { transform: translateX(24px); }
  .b:hover .arr svg + svg { transform: none; transition-delay: calc(.05s * var(--tm)); }
}
/* copy feedback (copy-chip.html): the copy icon blurs out as a tick comes in, a 'Copied' tag lifts above */
.disc svg { position: absolute; inset: 8px; width: 16px; height: 16px; transition: opacity min(calc(.2s * var(--tm)), var(--tcap)), filter min(calc(.3s * var(--tm)), var(--tcap)), transform min(calc(.4s * var(--tm)), var(--tcap)) var(--spring); }
.disc .i-tick { opacity: 0; transform: scale(.9); filter: blur(4px); }
.copied .disc .i-copy { opacity: 0; transform: scale(.9); filter: blur(4px); }
.copied .disc .i-tick { opacity: 1; transform: none; filter: none; }
/* beside the button, not above it: above, it landed on the pitch's second line on narrow phones */
.tag { position: absolute; left: calc(100% + 10px); top: 50%; white-space: nowrap; font: 700 12px var(--sans); background: var(--fg); color: var(--bg); padding: 4px 8px; border-radius: 7px; opacity: 0; transform: translate(-4px, -50%); transition: opacity min(calc(.2s * var(--tm)), var(--tcap)), transform min(calc(.3s * var(--tm)), var(--tcap)) var(--expo); pointer-events: none; }
.copied .tag { opacity: 1; transform: translateY(-50%); }

.back { color: var(--muted); font-size: 14px; padding: 8px 0; }
@media (hover: hover) and (pointer: fine) { .back:hover { color: var(--fg); } }
.icon-btn { width: 48px; height: 48px; border-radius: 99px; display: grid; place-items: center; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: transform min(calc(.2s * var(--tm)), var(--tcap)) var(--expo); }
.icon-btn:active { transform: scale(.97); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn { position: relative; }
/* mute: the two icons cross-blur like the copy tick (copy-chip.html) */
.icon-btn svg { position: absolute; transition: opacity min(calc(.2s * var(--tm)), var(--tcap)), filter min(calc(.3s * var(--tm)), var(--tcap)), transform min(calc(.4s * var(--tm)), var(--tcap)) var(--spring); }
.icon-btn .i-off, .icon-btn[aria-pressed=true] .i-on { opacity: 0; transform: scale(.9); filter: blur(4px); }
.icon-btn[aria-pressed=true] .i-off { opacity: 1; transform: none; filter: none; }

/* ---------- landing ---------- */
/* the glow sits behind everything and only shows on the landing */
.glow { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0; filter: blur(36px); transform: scale(1.05); pointer-events: none; transition: opacity 1.2s var(--expo); }
body[data-screen="landing"] .glow.on { opacity: .75; }
/* Josh's mark, as on the slides: jt in Geist with a round full stop */
.jt { font: 400 26px/1 'Geist', var(--sans); letter-spacing: -.02em; margin-bottom: 8px; }
.jt i { display: inline-block; width: .18em; height: .18em; border-radius: 50%; background: currentColor; margin-left: .05em; }
.landing h1 span { color: var(--violet); }
.landing { --story-h: min(680px, calc(100svh - 140px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, calc(var(--story-h) * 9 / 16)); gap: 48px; align-items: center; min-height: calc(100svh - 120px); }
.intro { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; max-width: 460px; }
.pitch { font: 500 20px/1.35 var(--text); color: var(--muted); margin-top: -6px; text-wrap: balance; }
.where { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.where li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.where b { font-weight: 700; }
.where small { color: var(--muted); font-size: 13px; }
.how { color: var(--muted); font-size: 14px; max-width: 400px; }
.how summary { cursor: pointer; color: var(--fg); font-weight: 600; }
.how p { margin-top: 8px; }
.how a { color: var(--fg); text-underline-offset: 3px; }
.copy-blocked { width: 100%; }
.copy-blocked .note { margin: 0 0 8px; }
.copy-blocked textarea { width: 100%; height: 140px; resize: vertical; padding: 12px; font: 500 16px/1.4 var(--sans); background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.sample { min-width: 0; }
.sample figcaption { color: var(--faint); font-size: 13px; text-align: center; margin-top: 10px; }

/* ---------- the story frame: 9:16, as tall as its screen allows ---------- */
.story { position: relative; width: min(100%, calc(var(--story-h, calc(100svh - 132px)) * 9 / 16)); margin: 0 auto; }
#stage { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: var(--r); background: #232325; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.progress { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 1; pointer-events: none; }
.progress span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.progress i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.controls { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
/* save: the summary card you're saving, smaller, with no progress bar */
#save .story { --story-h: min(46svh, 420px); margin-bottom: 16px; }
#save .progress { display: none; }

/* ---------- paste (float-input.html, as a big text box) ---------- */
.f { position: relative; }
/* a strip behind the floated label, so pasted text scrolls under it instead of through it */
.f::before { content: ''; position: absolute; left: 1px; right: 16px; top: 1px; height: 32px; background: linear-gradient(var(--card) 26px, transparent); border-radius: 11px 0 0 0; pointer-events: none; }
.f textarea { width: 100%; height: min(42svh, 360px); resize: vertical; padding: 30px 16px 14px; font: 500 16px/1.4 var(--sans); background: var(--card); border: 1px solid var(--line); border-radius: 12px; outline: none; transition: border-color min(calc(.2s * var(--tm)), var(--tcap)), box-shadow min(calc(.25s * var(--tm)), var(--tcap)) var(--expo); }
.f textarea:focus { border-color: var(--fg); box-shadow: 0 0 0 4px rgba(242, 240, 234, .08); }
.f label { position: absolute; left: 17px; top: 20px; color: var(--muted); pointer-events: none; transform-origin: left top; transition: transform min(calc(.35s * var(--tm)), var(--tcap)) var(--expo), color min(calc(.2s * var(--tm)), var(--tcap)); }
.f textarea:focus + label, .f textarea:not(:placeholder-shown) + label { transform: translateY(-11px) scale(.78); }
.f.bad textarea { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.f.bad label { color: var(--bad); }
.f.shake { animation: shake min(calc(.4s * var(--tm)), var(--tcap)) var(--expo); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.f .msg { display: grid; grid-template-rows: 0fr; transition: grid-template-rows min(calc(.3s * var(--tm)), var(--tcap)) var(--expo); }
.f .msg span { overflow: hidden; font-size: 14px; color: var(--bad); padding-left: 4px; text-wrap: pretty; }
.f .msg span::before { content: ''; display: block; height: 8px; }
.f.bad .msg { grid-template-rows: 1fr; }

/* ---------- review and save lists (switches.html) ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 2px 18px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border: 0; }
.row > div { flex: 1; min-width: 0; }
.row b { display: block; font-weight: 700; font-size: 15px; }
.row small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.row.off b, .row.off small { color: var(--faint); }
/* review rows arrive top to bottom, 35 ms apart */
#slide-list .row { animation: arrive min(calc(.35s * var(--tm)), var(--tcap)) var(--expo) backwards; animation-delay: calc(min(var(--i, 0), 6) * 35ms); }
#review.screen { animation-name: fade; }   /* the rows carry the movement, so the screen only fades */
.row b, .row small { transition: color min(calc(.2s * var(--tm)), var(--tcap)) ease; }
.sw { appearance: none; -webkit-appearance: none; position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--strong); cursor: pointer; flex: none; transition: background min(calc(.3s * var(--tm)), var(--tcap)); }
.sw::before { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 99px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); transition: transform min(calc(.45s * var(--tm)), var(--tcap)) var(--spring), width min(calc(.2s * var(--tm)), var(--tcap)) var(--expo); }
.sw:active::before { width: 28px; }
.sw:checked { background: var(--fg); }
.sw:checked::before { transform: translateX(18px); background: #18181B; }
.sw:checked:active::before { transform: translateX(12px); }

.bar { height: 4px; border-radius: 2px; background: var(--soft); overflow: hidden; margin: 0 0 10px; }
.bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s linear; }
.note { color: var(--muted); font-size: 13px; margin: -4px 0 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); color: var(--faint); font-size: 13px; }
footer a { color: var(--muted); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { footer a:hover { color: var(--fg); } }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  main { padding-top: 16px; }
  .landing { grid-template-columns: minmax(0, 1fr); gap: 28px; min-height: 0; }
  .intro { max-width: none; }
  .landing { --story-h: 560px; }
  #player .story { --story-h: calc(100svh - 120px); }
}

/* ?fps overlay (dev check only) */
.fps { position: fixed; top: 8px; left: 8px; z-index: 9; font: 700 13px ui-monospace, monospace; background: #000; color: #0f0; padding: 4px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }

/* very narrow (a small phone at 200% zoom): the label gets the arrow disc's room */
@media (max-width: 260px) { .b .arr { display: none; } .b { padding-right: 22px; } }

/* reduced motion is gentler, not zero (kit.css) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-property: opacity, color, background-color, border-color, box-shadow, filter !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  /* screens and rows still fade in, they just don't move */
  .screen, #slide-list .row { animation-name: fade !important; animation-duration: min(calc(.35s * var(--tm)), var(--tcap)) !important; }
}
@keyframes fade { from { opacity: 0; } }
