/* Nudge site. One dark theme, one orange accent.
   Radius rule: containers 28px, everything you press is a full pill. */

@font-face { font-family: Geist; src: url(../fonts/geist.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(../fonts/geist-mono.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #151517;
  --card: #1c1c1e;
  --raise: #232326;
  --line: rgb(255 255 255 / .09);
  --text: #f4f1ec;
  --mute: #a2a2ab;
  --orange: #ff7d3a;
  --ink: #1a0f08;
  --red: #ed4245;
  --blue: #5865f2;
  --grey: #4e5058;
  --r: 28px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: min(1240px, 100% - 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.6 Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
code { font: 500 .9em 'Geist Mono', monospace; color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
::selection { background: var(--orange); color: var(--ink); }

.skip { position: absolute; left: 12px; top: -60px; background: var(--orange); color: var(--ink); padding: 10px 18px; border-radius: 999px; z-index: 100; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1 Geist, sans-serif; text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease), background .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn--primary { background: var(--orange); color: var(--ink); }
.btn--primary:hover { background: #ff9158; }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgb(255 255 255 / .03); }
.btn--ghost:hover { border-color: rgb(255 255 255 / .28); }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 1.05rem; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgb(21 21 23 / .78); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav__inner { width: var(--wrap); margin-inline: auto; height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; margin-right: auto; }
.brand svg { width: 28px; height: 28px; fill: url(#face); }
.nav__links { display: flex; gap: 6px; }
.nav__links a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--mute); text-decoration: none; font-size: .95rem; font-weight: 500; transition: color .2s, background .2s; }
.nav__links a:hover { color: var(--text); background: rgb(255 255 255 / .06); }

/* ---------- hero ---------- */
/* --P is spare room on the right so the big orange blob sits beside the panel instead of hiding behind it. */
.hero {
  --P: 140px;
  position: relative; width: var(--wrap); margin-inline: auto; min-height: calc(100dvh - 68px);
  display: grid; grid-template-columns: minmax(0, 1fr) 470px; align-items: center; gap: 56px;
  padding: 48px var(--P) 72px 0;
}
.hero__copy { position: relative; z-index: 1; }
h1 { font-size: clamp(2.9rem, 5vw, 4.9rem); line-height: .98; letter-spacing: -.045em; font-weight: 700; text-wrap: balance; }
.lede { margin-top: 28px; max-width: 30ch; font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.45; color: var(--mute); }
.hero__cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero__art { position: absolute; inset: 0; pointer-events: none; }
.hero__art svg, .close__art svg { position: absolute; }
.hero__art .solid, .hero__art .ghost { width: 420px; top: 50%; margin-top: -210px; }
.hero__art .solid { right: calc(var(--P) - 300px); }
.hero__art .ghost { right: calc(var(--P) - 220px); }
.solid path { fill: url(#face); stroke: rgb(255 255 255 / .3); stroke-width: 1; }
.solid { filter: drop-shadow(0 18px 50px rgb(255 125 58 / .28)); }
.ghost path { fill: none; stroke: #7a7a82; stroke-width: 1.2; stroke-dasharray: 3 3.5; }

.motion .solid { animation: quarter 5.2s var(--ease) infinite; }
.motion .ghost { animation: spin 60s linear infinite reverse; }
@keyframes quarter { from { transform: rotate(0); } to { transform: rotate(45deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

.motion .hero__copy > *, .motion .hero__demo { animation: rise .9s var(--ease) both; }
.motion .hero__copy h1 { animation-delay: .05s; }
.motion .hero__copy .lede { animation-delay: .18s; }
.motion .hero__cta { animation-delay: .3s; }
.motion .hero__demo { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }

/* ---------- the live panel ---------- */
.hero__demo { position: relative; z-index: 1; justify-self: end; width: min(100%, 470px); }
.panel {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--orange); border-radius: var(--r);
  padding: 28px 26px 26px; box-shadow: 0 30px 80px rgb(0 0 0 / .45), 0 0 0 1px rgb(0 0 0 / .4);
}
.panel h2 { font-size: 1.3rem; letter-spacing: -.02em; font-weight: 700; }
.panel__intro { margin-top: 8px; color: var(--mute); font-size: .95rem; line-height: 1.5; }
.legend { margin-top: 20px; display: grid; gap: 10px; }
.legend li { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 1rem; }
.legend svg { width: 26px; height: 26px; flex: none; }
.legend b { font-weight: 700; }
.legend span { color: var(--mute); }
.legend .do { margin-left: auto; color: var(--text); font-weight: 600; font-style: normal; }

.stats { margin: 22px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { background: var(--bg); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.stats dt { font-size: .75rem; color: var(--mute); }
.stats dd { margin-top: 2px; font: 600 1.05rem/1.2 'Geist Mono', monospace; overflow-wrap: anywhere; }

.result { margin-top: 18px; min-height: 3.2em; font-size: .95rem; line-height: 1.45; color: var(--mute); transition: color .2s; }
.result[data-tone='good'] { color: #7fd99a; }
.result[data-tone='bad'] { color: #ff8f8f; }
.result[data-tone='warn'] { color: #ffc27a; }

.buttons { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.buttons button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 92px; padding: 12px 6px; border: 0; border-radius: 20px; color: #fff; cursor: pointer;
  font: 600 .85rem/1.15 Geist, sans-serif; text-align: center;
  transition: transform .3s var(--ease), filter .2s;
}
.buttons button:hover { filter: brightness(1.12); transform: translateY(-3px); }
.buttons button:active { transform: translateY(0) scale(.96); }
.buttons svg { width: 34px; height: 34px; fill: #fff; }
.buttons .red { background: var(--red); }
.buttons .blue { background: var(--blue); }
.buttons .grey { background: var(--grey); }
.motion .buttons.shuffled button { animation: pop .5s var(--ease) both; }
.motion .buttons.shuffled button:nth-child(2) { animation-delay: .06s; }
.motion .buttons.shuffled button:nth-child(3) { animation-delay: .12s; }
@keyframes pop { from { opacity: 0; transform: scale(.7) rotate(-12deg); } }

.reset { position: absolute; top: 22px; right: 22px; background: none; border: 1px solid var(--line); color: var(--mute); font: 500 .82rem Geist, sans-serif; cursor: pointer; padding: 6px 14px; border-radius: 999px; }
.reset:hover { color: var(--text); background: rgb(255 255 255 / .06); }

/* ---------- lean words: upright and blurred until you reach them, then they tip into italic behind a pane of glass ---------- */
em.lean {
  --tilt: skewX(-12deg);
  position: relative; display: inline-block; isolation: isolate; font-style: normal; color: var(--orange);
  padding: 0 .16em .08em; margin: 0 -.06em; transform: var(--tilt); transform-origin: 50% 85%;
}
em.lean::before, em.lean::after { content: ''; position: absolute; inset: .04em 0 0; border-radius: .3em; pointer-events: none; }
em.lean::before {
  z-index: -1;
  background: linear-gradient(135deg, rgb(255 125 58 / .3), rgb(255 125 58 / .06));
  border: 1px solid rgb(255 255 255 / .22);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .38), inset 0 -10px 24px rgb(255 125 58 / .12), 0 10px 40px rgb(255 125 58 / .14);
  backdrop-filter: blur(14px) saturate(170%); -webkit-backdrop-filter: blur(14px) saturate(170%);
}
em.lean::after {
  z-index: 1; clip-path: inset(0 round .3em);
  background: linear-gradient(90deg, transparent 40%, rgb(255 255 255 / .36) 50%, transparent 60%) 130% 0 / 260% 100% no-repeat;
}
@keyframes lean { from { transform: skewX(0); filter: blur(10px); } to { transform: var(--tilt); filter: none; } }
@keyframes pane { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes sheen { from { background-position: 130% 0; } to { background-position: -30% 0; } }

/* Hero: nobody scrolls to it, so it tips over on its own just after load. */
.motion em.hero-em { animation: lean 1.5s var(--ease) .8s both; }
.motion em.hero-em::before { animation: pane 1.2s var(--ease) .8s both; }

/* Everywhere else it follows the scroll, so it also un-tips if you go back up. */
@supports (animation-timeline: view()) {
  .motion em.lean:not(.hero-em) { animation: lean linear both; animation-timeline: view(); animation-range: entry 25% cover 38%; }
  .motion em.lean:not(.hero-em)::before { animation: pane linear both; animation-timeline: view(); animation-range: entry 25% cover 38%; }
}
/* No scroll-driven animations: tip over once, when it first appears. */
@supports not (animation-timeline: view()) {
  .motion em.lean:not(.hero-em) { transform: none; filter: blur(10px); transition: transform 1.3s var(--ease), filter 1.3s var(--ease); }
  .motion em.lean:not(.hero-em)::before { opacity: 0; transform: scale(.8); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
  .motion em.lean.in { transform: var(--tilt); filter: none; }
  .motion em.lean.in::before { opacity: 1; transform: none; }
}

/* Shine: a glint across the pane every few seconds once the word has arrived, and a quicker one whenever you hover it.
   On hover the letters also hop up one after another (JS wraps each in .ch), then settle back down. */
@keyframes shine { 0%, 72% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
@keyframes hop { 40% { transform: translateY(-.08em); } }
.motion em.lean.in::after { animation: shine 8s ease-in-out -4.4s infinite; }
.motion em.lean.in:hover::after { animation: sheen 1.6s ease-in-out both; }
em.lean .ch { display: inline-block; }
.motion em.lean:hover .ch { animation: hop .8s ease-in-out calc(var(--i) * 55ms) both; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- statement ---------- */
.statement { width: var(--wrap); margin-inline: auto; padding: 120px 0 140px; }
.statement p { max-width: 22ch; font-size: clamp(2.2rem, 5.6vw, 5rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 600; text-wrap: balance; }
@supports (animation-timeline: view()) {
  .motion .statement .w { color: #4a4a50; animation: lit linear both; animation-timeline: view(); animation-range: entry calc(30% + var(--i) * 2.2%) entry calc(55% + var(--i) * 2.2%); }
  @keyframes lit { to { color: var(--text); } }
}

/* ---------- features ---------- */
.features, .how, .commands { width: var(--wrap); margin-inline: auto; padding-block: 72px; }
.section-title { font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 650; max-width: 18ch; text-wrap: balance; }

.bento { margin-top: 56px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cell { position: relative; overflow: hidden; border-radius: var(--r); padding: 34px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 340px; }
.cell h3 { font-size: 1.6rem; line-height: 1.1; letter-spacing: -.03em; font-weight: 650; }
.cell p { margin-top: 12px; color: var(--mute); max-width: 44ch; font-size: 1rem; }
.cell__text { position: relative; z-index: 1; }

.cell--shuffle { grid-column: span 4; }
.cell--captcha { grid-column: span 2; background: var(--orange); border-color: transparent; color: var(--ink); }
.cell--captcha p { color: rgb(26 15 8 / .78); }
.cell--surprise { grid-column: span 2; }
.cell--ladder { grid-column: span 4; background: linear-gradient(150deg, #2a1d15, var(--card) 60%); flex-direction: row; align-items: stretch; }
.cell--ladder .cell__text { flex: 1 1 0; align-self: flex-end; }
.cell--report { grid-column: span 6; background: radial-gradient(90% 140% at 100% 0%, rgb(255 125 58 / .16), transparent 60%), var(--card); flex-direction: row; align-items: flex-end; }
.cell--report .cell__text { flex: 1 1 0; }

.motion [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.motion [data-reveal].in { opacity: 1; transform: none; }

/* live shuffle */
.shuffle { display: flex; gap: 12px; }
.shuffle span { flex: 1; display: flex; align-items: center; gap: 14px; padding: 22px 24px; border-radius: 999px; color: #fff; font-weight: 600; font-size: 1.05rem; animation: pop .6s var(--ease) both; }
.shuffle span:nth-child(2) { animation-delay: .08s; }
.shuffle span:nth-child(3) { animation-delay: .16s; }
.shuffle svg { width: 34px; height: 34px; fill: #fff; flex: none; }
.shuffle .red { background: var(--red); } .shuffle .blue { background: var(--blue); } .shuffle .grey { background: var(--grey); }

/* captcha */
.captcha { display: grid; gap: 14px; }
.captcha .sum { font: 700 clamp(2.4rem, 4vw, 3.4rem)/1 'Geist Mono', monospace; letter-spacing: -.04em; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tiles span { aspect-ratio: 1; border-radius: 16px; background: rgb(26 15 8 / .12); display: grid; place-items: center; }
.tiles svg { width: 58%; height: 58%; }

/* surprise */
.cell--surprise { background: var(--card); }
.cell__ghost { position: absolute; width: 380px; right: -150px; bottom: -150px; opacity: .8; }
.cell__ghost path { fill: none; stroke: #7a7a82; stroke-width: 1.2; stroke-dasharray: 3 3.5; }
.motion .cell__ghost { animation: spin 50s linear infinite; }

/* ladder */
.ladder { flex: 0 0 min(250px, 42%); display: grid; gap: 8px; align-content: center; }
.ladder li { padding: 13px 18px; border-radius: 999px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); font-weight: 600; color: var(--mute); transition: background .5s var(--ease), color .5s, transform .6s var(--ease), border-color .5s; }
.ladder li.on { background: var(--orange); color: var(--ink); border-color: transparent; transform: translateX(14px); }

/* podium */
.podium { flex: 0 0 min(340px, 40%); display: flex; align-items: flex-end; gap: 10px; height: 190px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; padding-top: 14px; border-radius: 20px 20px 0 0; background: rgb(255 255 255 / .07); border: 1px solid var(--line); border-bottom: 0; font-weight: 700; color: var(--mute); transform-origin: bottom; }
.step svg { width: 34px; height: 34px; fill: var(--orange); }
.step--1 { height: 100%; background: rgb(255 125 58 / .16); color: var(--orange); }
.step--2 { height: 72%; }
.step--3 { height: 52%; }
.motion .podium .step { transform: scaleY(.15); opacity: 0; transition: transform .9s var(--ease), opacity .6s; }
.motion .podium.in .step { transform: none; opacity: 1; }
.motion .podium.in .step--1 { transition-delay: .25s; }
.motion .podium.in .step--3 { transition-delay: .4s; }

/* ---------- how it works ---------- */
.how { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; padding-top: 96px; }
.how__head { position: sticky; top: 120px; display: grid; gap: 28px; justify-items: start; }
.flow { display: grid; gap: 14vh; padding: 4vh 0 10vh; }
.flow__item h3 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); line-height: 1; letter-spacing: -.045em; font-weight: 650; transition: color .5s; }
.flow__item p { margin-top: 18px; max-width: 42ch; font-size: 1.15rem; color: var(--mute); }
.motion .flow__item { opacity: .28; transform: none; transition: opacity .6s var(--ease); }
.motion .flow__item.in { opacity: 1; transform: none; }

/* ---------- commands ---------- */
.commands { position: relative; padding-top: 96px; }
.tabs { margin-top: 40px; display: inline-flex; gap: 4px; padding: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.tabs button { min-height: 42px; padding: 0 22px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 600 .95rem Geist, sans-serif; cursor: pointer; transition: background .25s, color .25s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected='true'] { background: var(--orange); color: var(--ink); }
.pane { margin-top: 20px; }
.pane[hidden] { display: none; }
.cmds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cmds div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 30px; }
.cmds dt { font: 600 1.15rem 'Geist Mono', monospace; color: var(--orange); overflow-wrap: anywhere; }
.cmds dd { margin-top: 10px; color: var(--mute); max-width: 46ch; }
.motion .pane:not([hidden]) .cmds div { animation: rise .6s var(--ease) both; }
.motion .pane:not([hidden]) .cmds div:nth-child(2) { animation-delay: .06s; }
.motion .pane:not([hidden]) .cmds div:nth-child(3) { animation-delay: .12s; }
.motion .pane:not([hidden]) .cmds div:nth-child(4) { animation-delay: .18s; }

/* ---------- closing ---------- */
.close { position: relative; overflow: hidden; width: var(--wrap); margin: 72px auto 96px; padding: clamp(48px, 8vw, 110px) clamp(28px, 6vw, 90px); border-radius: 40px; background: var(--card); border: 1px solid var(--line); }
.close h2 { position: relative; font-size: clamp(2.6rem, 6.4vw, 5.8rem); line-height: .98; letter-spacing: -.045em; font-weight: 700; max-width: 11ch; text-wrap: balance; }
.close p { position: relative; margin: 22px 0 36px; color: var(--mute); font-size: 1.2rem; }
.close .btn { position: relative; }
.close__art { position: absolute; inset: 0; pointer-events: none; }
.close__art .solid { width: 520px; right: -90px; top: 50%; margin-top: -260px; }
.close__art .ghost { width: 520px; right: 70px; top: 50%; margin-top: -260px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot__inner { width: var(--wrap); margin-inline: auto; padding: 32px 0 44px; display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; color: var(--mute); font-size: .95rem; }
.foot a { color: var(--text); text-decoration: none; }
.foot a:hover { color: var(--orange); }
.foot nav { display: flex; gap: 24px; }

/* ---------- little arrows: hand-drawn pointers that draw themselves as you reach them ---------- */
main { position: relative; }
.note { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; font: 500 .85rem/1.2 'Geist Mono', monospace; color: var(--mute); white-space: nowrap; pointer-events: none; }
.note svg { width: 92px; height: auto; flex: none; overflow: visible; fill: none; stroke: var(--orange); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.note--ink { color: rgb(26 15 8 / .78); }
.note--ink svg { stroke: var(--ink); }
.note path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.note.flip svg { transform: scaleX(-1); }
.note--hero { left: 4px; bottom: -92px; transform: rotate(-3deg); flex-direction: row-reverse; }
.note--shuffle { right: 64px; top: 128px; transform: rotate(-4deg); }
.note--ladder { right: 300px; top: 34px; transform: rotate(-3deg); flex-direction: row-reverse; }
.note--how { left: 150px; top: calc(100% + 4px); transform: rotate(-3deg); }
.note--tabs { left: 318px; top: 184px; transform: rotate(2deg); }
.note--close { left: clamp(250px, 24vw, 330px); bottom: clamp(48px, 7vw, 100px); transform: rotate(-4deg); }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
.motion .note path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease); }
.motion .note > span { opacity: 0; transition: opacity .7s var(--ease) .6s; }
.motion .note.in path { stroke-dashoffset: 0; }
.motion .note.in > span { opacity: 1; }
/* The hero one has nothing to scroll to, so it draws itself just after load. */
.motion .note--load path { transition: none; animation: draw 1.2s var(--ease) 2.2s both; }
.motion .note--load > span { transition: none; animation: fade .7s var(--ease) 2.5s both; }
@supports (animation-timeline: view()) {
  .motion .note:not(.note--load) { view-timeline: --n block; }
  .motion .note:not(.note--load) path { transition: none; animation: draw linear both; animation-timeline: --n; animation-range: entry 30% cover 40%; }
  .motion .note:not(.note--load) > span { transition: none; animation: fade linear both; animation-timeline: --n; animation-range: entry 60% cover 30%; }
}

/* ---------- floating shapes: the check's four shapes, drifting as you scroll ---------- */
.floaters { position: absolute; inset: 0; pointer-events: none; z-index: -1; overflow: clip; }
.fl { position: absolute; top: var(--top); width: var(--size); height: var(--size); }
.fl--l { left: clamp(10px, calc((100vw - 1240px) / 4), 150px); }
.fl--r { right: clamp(10px, calc((100vw - 1240px) / 4), 150px); }
.fl--red { fill: var(--red); } .fl--blue { fill: var(--blue); } .fl--grey { fill: var(--grey); } .fl--o { fill: var(--orange); }
.fl { opacity: .9; }
@keyframes drift { from { transform: translateY(90px) rotate(-45deg); } to { transform: translateY(-90px) rotate(45deg); } }
@supports (animation-timeline: view()) {
  .motion .fl { animation: drift linear both; animation-timeline: view(); animation-range: cover; }
}
@media (max-width: 1300px) { .floaters { display: none; } }

/* ---------- small playful touches ---------- */
.brand svg { transition: transform .6s var(--ease); }
.brand:hover svg { transform: rotate(90deg) scale(1.08); }
.btn--primary { transition: transform .35s var(--ease), background .2s, box-shadow .3s; }
.btn--primary:hover { transform: translateY(-2px) rotate(-1.5deg); box-shadow: 0 10px 30px rgb(255 125 58 / .35); }
.motion .cell.in { transition: opacity .8s var(--ease), transform .6s var(--ease), border-color .3s; }
.motion .cell.in:hover { transform: translateY(-6px) rotate(-.4deg); border-color: rgb(255 125 58 / .45); }
.motion .cmds div { transition: transform .4s var(--ease), border-color .3s; }
.motion .cmds div:hover { transform: translateY(-4px) rotate(.3deg); border-color: rgb(255 125 58 / .45); }
.shake { animation: shake .45s var(--ease); }
@keyframes shake { 20% { transform: translateX(-9px) rotate(-.6deg); } 45% { transform: translateX(7px) rotate(.5deg); } 70% { transform: translateX(-4px); } }
.pip { position: fixed; z-index: 90; width: 22px; height: 22px; pointer-events: none; }
.pip svg { display: block; width: 100%; height: 100%; }

/* ---------- glass everywhere: the "nudge" pill's recipe (tinted pane, bright top edge, blur) on every surface ---------- */
:root {
  --pane: linear-gradient(135deg, rgb(255 125 58 / .13), rgb(255 255 255 / .035) 55%);
  --edge: 1px solid rgb(255 255 255 / .13);
  --lip: inset 0 1px 0 rgb(255 255 255 / .16);
  --blur: blur(18px) saturate(165%);
}
/* Soft colour behind the page (the check's own palette) so there is something for the glass to blur. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 34% at 88% 18%, rgb(255 125 58 / .16), transparent),
    radial-gradient(34% 30% at 6% 62%, rgb(88 101 242 / .12), transparent),
    radial-gradient(30% 28% at 62% 104%, rgb(237 66 69 / .1), transparent);
}
.panel, .cell, .cmds div, .close, .tabs, .stats div, .ladder li, .btn--ghost, .reset {
  background: var(--pane), rgb(28 28 30 / .5); border: var(--edge);
  box-shadow: var(--lip), 0 20px 50px rgb(0 0 0 / .28);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.panel { background: var(--pane), rgb(26 26 28 / .86); box-shadow: var(--lip), 0 30px 80px rgb(0 0 0 / .45); }
.stats div, .ladder li, .reset { background: rgb(255 255 255 / .05); box-shadow: var(--lip); }
.cell--ladder { background: linear-gradient(150deg, rgb(255 125 58 / .22), rgb(255 255 255 / .03) 60%), rgb(28 28 30 / .5); }
.cell--report { background: radial-gradient(90% 140% at 100% 0%, rgb(255 125 58 / .24), transparent 60%), var(--pane), rgb(28 28 30 / .5); }
.nav { background: linear-gradient(180deg, rgb(255 125 58 / .07), transparent), rgb(21 21 23 / .6); }

/* Orange things become orange glass. */
.btn--primary, .tabs button[aria-selected='true'], .ladder li.on, .cell--captcha {
  position: relative; background: linear-gradient(135deg, rgb(255 138 74 / .96), rgb(255 125 58 / .74));
  border: 1px solid rgb(255 255 255 / .34); color: var(--ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), inset 0 -10px 22px rgb(255 125 58 / .3), 0 8px 30px rgb(255 125 58 / .22);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.btn--primary:hover { background: linear-gradient(135deg, rgb(255 155 96), rgb(255 133 70 / .82)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .55), inset 0 -10px 22px rgb(255 125 58 / .3), 0 12px 36px rgb(255 125 58 / .38); }
.cell--captcha { overflow: hidden; }
.ladder li.on { box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 6px 22px rgb(255 125 58 / .25); }
.btn--primary { overflow: hidden; }
.btn--primary::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / .5) 50%, transparent 62%) 130% 0 / 260% 100% no-repeat;
  transition: background-position .9s var(--ease);
}
.btn--primary:hover::after { background-position: -30% 0; }
.btn--ghost:hover { border-color: rgb(255 255 255 / .3); }

/* ---------- demo panel: its own thing, not a Discord embed ---------- */
.panel { padding: 30px 26px 26px; }
.panel h2 { font-size: 1.7rem; line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.panel h2::before {
  content: 'live demo'; display: block; width: max-content; margin-bottom: 14px; padding: 4px 11px 4px 24px; border-radius: 999px;
  font: 500 .72rem/1.4 'Geist Mono', monospace; letter-spacing: .04em; color: var(--orange);
  background: radial-gradient(circle at 12px 50%, var(--orange) 0 3px, transparent 4px), rgb(255 125 58 / .12); border: 1px solid rgb(255 125 58 / .3);
}
.motion .panel h2::before { animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { background: radial-gradient(circle at 12px 50%, rgb(255 125 58 / .25) 0 3px, transparent 4px), rgb(255 125 58 / .12); } }
.legend { gap: 8px; }
.legend li { padding: 8px 8px 8px 10px; border-radius: 999px; background: rgb(255 255 255 / .045); border: 1px solid rgb(255 255 255 / .08); font-size: .95rem; }
.legend .do { padding: 4px 12px; border-radius: 999px; background: rgb(255 255 255 / .08); font: 500 .8rem 'Geist Mono', monospace; }
.legend span { font-size: .85rem; }
.buttons { gap: 12px; }
.buttons button {
  min-height: 112px; border-radius: 26px; border: 1px solid rgb(255 255 255 / .28); position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -16px 28px rgb(0 0 0 / .14), 0 12px 30px var(--glow);
}
.buttons button::before { content: ''; position: absolute; inset: 0 0 50%; background: linear-gradient(180deg, rgb(255 255 255 / .22), transparent); pointer-events: none; }
.buttons svg { width: 40px; height: 40px; filter: drop-shadow(0 3px 6px rgb(0 0 0 / .25)); }
.buttons .red { --glow: rgb(237 66 69 / .35); background: linear-gradient(160deg, #f4686a, var(--red)); }
.buttons .blue { --glow: rgb(88 101 242 / .35); background: linear-gradient(160deg, #7b88ff, var(--blue)); }
.buttons .grey { --glow: rgb(150 155 170 / .2); background: linear-gradient(160deg, #6a6d78, var(--grey)); }
.buttons button:hover { filter: none; transform: translateY(-5px) rotate(-1.2deg); }
.buttons button:nth-child(2):hover { transform: translateY(-5px) rotate(1.2deg); }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding: 32px 0 56px; }
  .hero__demo { justify-self: stretch; width: 100%; max-width: 520px; }
  .hero__art, .note { display: none; }
}
@media (max-width: 960px) {
  .nav__links { display: none; }
  .how { grid-template-columns: 1fr; gap: 32px; }
  .how__head { position: static; }
  .flow { gap: 56px; padding: 0 0 32px; }
  .motion .flow__item { opacity: 1; }
  .cell--shuffle, .cell--captcha, .cell--surprise, .cell--ladder, .cell--report { grid-column: 1 / -1; }
  .cell--ladder, .cell--report { flex-direction: column; align-items: stretch; }
  .ladder, .podium { flex: none; width: 100%; }
  .cmds { grid-template-columns: 1fr; }
  .shuffle { flex-direction: column; }
}
@media (max-width: 520px) {
  .btn--lg { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .buttons button { min-height: 84px; font-size: .78rem; }
  .cell { padding: 26px; }
  .foot nav { flex-wrap: wrap; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
