/* Story landing: crossfading full-screen pages on warm off-white paper, black ink,
   thin borders and one rose accent, close to the EchoMelon app's own look. */
:root {
  /* Night palette taken from the Captain Everett illustration: deep night blue, warm lamplight amber. */
  --bg: #0b0e18;
  --paper: #0f1321;
  --card: #161a27;
  --ink: #f4f1ea;
  --muted: #bdb8ad;
  --line: rgba(255, 255, 255, .12);
  --hot: #f2b35b;
  --hot-dark: #f6c57c;
  --on-hot: #1b1406;
  --blush: rgba(242, 179, 91, .1);
  --night: #0b0e18;
  --sun: #f6c57c;
  --display: "Fraunces", Georgia, serif;
  --ease: cubic-bezier(.22, .7, .2, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
.has-deck body { overflow: hidden; overscroll-behavior: none; }

/* Light paper grain over everything. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 25; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}
.has-deck .deck { z-index: 1; }

a { color: inherit; }
img { display: block; max-width: 100%; }
em { font-style: italic; color: var(--hot); }
h1, h2, h3 { text-wrap: balance; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100% - 1120px) / 2));
  background: linear-gradient(rgba(251, 248, 242, .95), rgba(251, 248, 242, 0));
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 18px; }
.nav__links { display: flex; gap: 20px; font-size: 14px; }
.nav__links a, .nav__signin { text-decoration: none; opacity: .8; }
.nav__links a:hover, .nav__signin:hover { opacity: 1; }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; }

/* Page dots */
.dots { position: fixed; right: max(14px, env(safe-area-inset-right, 0px)); top: 50%; z-index: 30; display: grid; gap: 10px; transform: translateY(-50%); }
.dots button { width: 10px; height: 10px; padding: 0; border: 1.5px solid var(--ink); border-radius: 50%; background: transparent; opacity: .45; cursor: pointer; transition: all .3s; }
.dots button[aria-current="true"] { height: 26px; border-radius: 6px; background: var(--hot); border-color: var(--hot); opacity: 1; }
.dots:empty { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border: 2px solid currentColor; border-radius: 999px;
  background: transparent; color: inherit;
  font-weight: 800; font-size: 15px; text-decoration: none;
  transition: transform .15s, background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--hot { background: var(--hot); border-color: var(--hot); color: #fff; box-shadow: 0 8px 24px rgba(226, 69, 122, .28); }
.btn--hot:hover { background: var(--hot-dark); border-color: var(--hot-dark); color: #fff; }
.btn--light { color: var(--ink); }
.btn--small { padding: 6px 14px; font-size: 13px; }
.btn--big { padding: 18px 34px; font-size: 19px; }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }

/* Pages. Without JS they stack as a normal scrolling page. */
.slide { position: relative; min-height: 100svh; display: grid; place-items: center; align-content: safe center; overflow: hidden; }
.slide > * { min-height: auto; }
.slide__inner { position: relative; z-index: 1; width: min(1120px, 100% - 32px); }

.has-deck .deck { position: fixed; inset: 0; }
.has-deck .slide {
  position: absolute; inset: 0; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  opacity: 0; visibility: hidden;
  transform: translateY(60px) scale(.98);
  transition: opacity .9s var(--ease), transform .9s var(--ease), visibility 0s linear .9s;
}
.has-deck .slide::-webkit-scrollbar { display: none; }
.has-deck .slide.is-above { transform: translateY(-60px) scale(.98); }
.has-deck .slide.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .9s var(--ease) .15s, transform .9s var(--ease) .15s, visibility 0s;
}
/* Content of the incoming page rises in a beat after its background. */
.has-deck .slide .slide__inner { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.has-deck .slide.is-active .slide__inner { opacity: 1; transform: none; transition-delay: .45s; }
.has-deck .slide.is-active .types__more { transition-delay: .7s; }

/* Page 1: hero. Captain Everett's rainy night (the same scene as the Reddit ad) behind one big sign-up button,
   with a story chat where he answers right away while other apps keep typing (story-demo.mjs). */
.hero, .has-deck .slide.hero { background: var(--bg); overflow: hidden; }
.hero__art { position: absolute; inset: 0; background: url("./assets/night/everett-1600.webp") 72% 30% / cover no-repeat; }
.hero__art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(11, 14, 24, .94) 30%, rgba(11, 14, 24, .55) 58%, rgba(11, 14, 24, .2) 100%),
    linear-gradient(0deg, rgba(11, 14, 24, .75), rgba(11, 14, 24, 0) 32%);
}
/* Light rain over the right half. */
.rain {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(104deg, transparent 49.6%, rgba(205, 218, 255, .28) 50%, transparent 50.4%);
  background-size: 41px 97px; animation: rain .7s linear infinite;
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 75%); mask-image: linear-gradient(90deg, transparent 35%, #000 75%);
}
@keyframes rain { to { background-position: -10px 97px; } }
.hero__layout {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(32px, 5vw, 72px);
  padding: clamp(80px, 14svh, 120px) 0 clamp(32px, 8svh, 72px);
}
.hero__copy { display: grid; justify-items: start; text-align: left; }
.sticker {
  margin: 0 0 18px; padding: 6px 14px; border: 1px solid rgba(242, 179, 91, .45); border-radius: 999px;
  background: rgba(242, 179, 91, .08); color: var(--hot); font-weight: 700; font-size: 14px;
}
.hero h1 { margin: 0; max-width: 11ch; font-family: var(--display); font-weight: 700; font-size: clamp(44px, min(5.4vw, 10svh), 84px); line-height: 1.02; letter-spacing: -0.02em; }
.hero h1 em { font-style: italic; color: var(--hot); }
.hero__lede { margin: 22px 0 30px; max-width: 30em; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; color: var(--muted); }
.btn--huge { padding: 20px 56px; font-size: 23px; letter-spacing: .01em; }
.hero__note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.hero__alt { margin-top: 22px; font-size: 14px; opacity: .75; text-decoration: none; }
.hero__alt span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }

.story { width: min(420px, 36vw); display: grid; gap: 12px; }
.story__chat {
  display: flex; flex-direction: column; height: min(440px, 56svh); padding: 18px;
  background: rgba(16, 19, 28, .86); border: 1px solid rgba(255, 255, 255, .13); border-radius: 22px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}
.story__head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.story__head img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255, 255, 255, .3); }
.story__head b { display: block; font-size: 15px; }
.story__head span { font-size: 12px; color: #9aa0ad; }
.story__log { flex: 1; min-height: 0; overflow: hidden; list-style: none; margin: 0; padding: 12px 0 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; transition: opacity .5s; }
.story__scene { flex: none; margin: 2px 0 4px; padding-left: 12px; border-left: 2px solid rgba(242, 179, 91, .5); font-family: var(--display); font-style: italic; font-size: 14px; line-height: 1.6; color: #b7b0a3; }
.m { flex: none; max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; }
.m--you { align-self: flex-end; background: #2b3247; border-bottom-right-radius: 4px; }
.m--them { align-self: flex-start; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .11); border-bottom-left-radius: 4px; }
.m--typing { align-self: flex-start; display: inline-flex; gap: 5px; padding: 11px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.m--typing i { width: 7px; height: 7px; border-radius: 50%; background: #9aa0ad; animation: dot 1.2s ease-in-out infinite; }
.m--typing i:nth-child(2) { animation-delay: .15s; }
.m--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.stamp { flex: none; align-self: flex-start; margin: -4px 4px 0; color: var(--hot); font-size: 11.5px; }
.story__vs {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .05); border: 1px dashed rgba(255, 255, 255, .22); color: #9aa0ad; font-size: 13px;
}
.story__vs .m--typing { padding: 7px 9px; }
.story__vs .m--typing i { width: 6px; height: 6px; }
.story__vs b { color: #d8d4ca; }
/* Without JS (or with reduced motion) the demo rests on its last frame. */
.story [data-vs] { display: none; }
.story:not(.is-live) [data-vs="4"], .story.is-live [data-vs].is-on { display: inline; }
.story:not(.is-live) .story__log .m--typing { display: none; }
.story.is-live [data-step]:not(.is-on) { display: none; }
.story.is-live [data-step].is-on { animation: pop .35s var(--ease) both; }
.story.is-live [data-stream] span { opacity: 0; transition: opacity .12s; }
.story.is-live [data-stream] span.is-on { opacity: 1; }
.story.is-fading .story__log { opacity: 0; }

/* Tablets held upright: stack the story above the copy instead of squeezing two columns. */
@media (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
  .hero__layout { grid-template-columns: 1fr; justify-items: center; gap: 36px; }
  .story { order: -1; width: min(460px, 70vw); }
  .story__chat { height: min(400px, 34svh); }
  .hero__copy { justify-items: center; text-align: center; }
  .hero h1 { max-width: 14ch; font-size: clamp(44px, 7vw, 72px); }
  .hero__art { background-position: 40% 0; }
}

/* Page 2: pick a story */
.types, .has-deck .slide.types { background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: clamp(12px, 3svh, 28px); padding: 90px 0 40px; }
.types > * { flex: none; }
.types__head { text-align: center; }
.types h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(40px, min(7vw, 11svh), 92px); line-height: .95; letter-spacing: -0.02em; }
.types__pick { display: inline-block; font-size: 1.55em; color: var(--hot); transform: rotate(-5deg); text-shadow: 4px 4px 0 var(--ink); margin-right: .1em; }
/* "story": italic ink with a hand-drawn rose underline. */
.types__word {
  position: relative; display: inline-block; font-style: italic; padding-right: .06em; color: var(--ink);
  text-decoration: underline wavy var(--hot); text-decoration-thickness: .05em; text-underline-offset: .14em;
}
.types__lede { margin: 14px 0 0; font-size: 18px; color: var(--muted); }
.types__more { text-align: center; }

/* Auto-running loop. Not draggable, not scrollable; it pauses while you hover a card. */
.carousel { width: 100%; overflow: hidden; padding: 16px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.carousel__track { display: flex; gap: 22px; width: max-content; animation: drift 46s linear infinite; }
.carousel:hover .carousel__track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(calc(-50% - 11px)); } }

.tc {
  position: relative; flex: none; width: clamp(180px, min(24vw, (100svh - 330px) / 1.47), 300px); margin: 0;
  aspect-ratio: 3 / 4.4; border-radius: 22px; overflow: hidden; color: #fff;
  background: var(--night); border: 1px solid var(--line); transition: transform .25s var(--ease);
  user-select: none; -webkit-user-drag: none;
}
.tc:nth-child(odd) { transform: rotate(-2deg); }
.tc:nth-child(even) { transform: rotate(2deg) translateY(10px); }
.tc:hover { transform: rotate(0) scale(1.05); z-index: 2; box-shadow: 0 0 0 2px var(--hot), 0 20px 50px rgba(26, 23, 32, .2); }
.tc img { transition: filter .4s; }
.tc:hover img { filter: brightness(.6); }
.tc__whisper {
  position: absolute; z-index: 1; left: 16px; right: 16px; top: 22%;
  font-family: var(--display); font-style: italic; font-weight: 900; font-size: 24px; line-height: 1.15;
  color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(8px); filter: blur(4px); pointer-events: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease), filter .45s var(--ease);
}
.tc:hover .tc__whisper { opacity: 1; transform: none; filter: none; }
.tc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tc__body { position: absolute; inset: auto 0 0; padding: 80px 18px 18px; background: linear-gradient(transparent, rgba(10, 5, 12, .94) 42%); display: grid; gap: 7px; }
.tc__type { justify-self: start; padding: 3px 10px; background: var(--hot); border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.tc h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 28px; line-height: 1; }
.tc q { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 15px; line-height: 1.35; }
.tc__go { font-weight: 800; font-size: 14px; color: var(--sun); text-decoration: none; }
/* The whole card is clickable through the chat link. */
.tc__go::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span { padding: 2px 9px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; font-size: 11.5px; font-weight: 700; }

/* Page 3: group chat */
.group { background: var(--bg); padding: 90px 0 40px; }
.group__layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.group h2, .memory h2, .final h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(36px, min(6vw, 10svh), 80px); line-height: .98; letter-spacing: -0.02em; }
.group h2 em { color: var(--hot); }
.group p { max-width: 460px; margin: 20px 0 30px; font-size: 19px; color: var(--muted); }

.chat { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 24px; padding: 18px; box-shadow: 0 24px 60px rgba(26, 23, 32, .12); transform: rotate(2deg); min-width: 0; }
.chat__head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chat__head b { display: block; font-size: 15px; }
.chat__head span { font-size: 12px; color: var(--muted); }
.chat__faces { display: flex; }
.chat__faces img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--card); margin-left: -10px; }
.chat__faces img:first-child { margin-left: 0; }
.chat__log { list-style: none; margin: 0; padding: 14px 0 0; display: grid; gap: 12px; }
.msg { display: flex; gap: 10px; align-items: flex-end; }
.msg img { width: 34px; height: 34px; flex: none; border-radius: 50%; object-fit: cover; }
.msg b { display: block; font-size: 12px; color: var(--hot-dark); margin: 0 0 2px 4px; }
.msg p { margin: 0; padding: 9px 14px; background: var(--paper); border-radius: 18px 18px 18px 4px; font-size: 14.5px; line-height: 1.4; }
.msg--me { justify-content: flex-end; }
.msg--me p { background: var(--hot); color: #fff; border-radius: 18px 18px 4px 18px; }
/* Messages pop in one after another each time the page appears. */
.has-deck .group .msg { opacity: 0; transform: translateY(12px) scale(.96); }
.has-deck .group.is-active .msg { animation: pop .5s var(--ease) forwards; }
.has-deck .group.is-active .msg:nth-child(1) { animation-delay: .8s; }
.has-deck .group.is-active .msg:nth-child(2) { animation-delay: 1.5s; }
.has-deck .group.is-active .msg:nth-child(3) { animation-delay: 2.2s; }
.has-deck .group.is-active .msg:nth-child(4) { animation-delay: 2.9s; }
.has-deck .group.is-active .msg:nth-child(5) { animation-delay: 3.6s; }
.has-deck .group.is-active .msg:nth-child(6) { animation-delay: 4.5s; }
@keyframes pop { to { opacity: 1; transform: none; } }

/* Page 4: memory. Same chat card as the group page, replaying a callback from weeks ago. */
.memory { background: var(--paper); padding: 90px 0 40px; }
.memory__glow { position: absolute; right: 0; top: 0; width: 55%; height: 100%; object-fit: cover; opacity: .16; filter: blur(2px) saturate(.8); -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
.memory__layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.memory h2 { font-size: clamp(32px, min(5vw, 8.5svh), 66px); }
.memory p { max-width: 520px; margin: 22px 0 30px; font-size: 18px; color: var(--muted); }
.memo { transform: rotate(-2deg); padding: 14px 16px; }
.memo .chat__log { gap: 9px; padding-top: 10px; }
.nowrap { white-space: nowrap; }
.memo__face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.day { justify-self: center; padding: 3px 12px; border-radius: 999px; background: #ebe7de; color: var(--muted); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.day--skip { background: var(--ink); color: #fff; }
.recall { justify-self: center; padding: 6px 12px; border: 1.5px dashed var(--hot); border-radius: 10px; color: var(--hot-dark); background: var(--blush); font-size: 12.5px; font-weight: 800; }
.has-deck .memo .chat__log > li { opacity: 0; transform: translateY(12px) scale(.96); }
.has-deck .memory.is-active .memo .chat__log > li { animation: pop .5s var(--ease) forwards; }
.has-deck .memory.is-active .memo .chat__log > li:nth-child(1) { animation-delay: .7s; }
.has-deck .memory.is-active .memo .chat__log > li:nth-child(2) { animation-delay: 1.1s; }
.has-deck .memory.is-active .memo .chat__log > li:nth-child(3) { animation-delay: 1.8s; }
.has-deck .memory.is-active .memo .chat__log > li:nth-child(4) { animation-delay: 2.7s; }
.has-deck .memory.is-active .memo .chat__log > li:nth-child(5) { animation: pop .5s var(--ease) forwards 3.3s, glow 1.6s ease-in-out 3.8s 2; }
.has-deck .memory.is-active .memo .chat__log > li:nth-child(6) { animation-delay: 4.1s; }
.has-deck .memory.is-active .memo .chat__log > li:nth-child(7) { animation-delay: 5s; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(226, 69, 122, .2); } }

/* Page 5: creator rewards */
.earn { background: var(--paper); padding: 90px 0 40px; }
.earn__layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.earn__tag { justify-self: start; display: inline-block; margin: 0 0 14px; padding: 5px 12px; background: var(--hot); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.earn h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(34px, min(4.6vw, 8.5svh), 62px); line-height: 1; letter-spacing: -0.02em; }
.earn__lede { max-width: 460px; margin: 18px 0 26px; font-size: 18px; color: var(--muted); }
.earn__side { display: grid; gap: 14px; min-width: 0; }
.tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tier { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.tier--top { border: 2px solid var(--hot); box-shadow: 0 12px 32px rgba(226, 69, 122, .14); }
.tier__name { font-weight: 800; font-size: 16px; }
.tier__name small { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--blush); color: var(--hot-dark); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.tier__pay { font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--hot-dark); text-align: right; }
.tier__pay small { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 12px; font-weight: 700; color: var(--muted); }
.tier p { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.early { padding: 14px 18px; border: 1.5px dashed var(--hot); border-radius: 16px; background: var(--blush); }
.early b { display: block; font-size: 14px; color: var(--hot-dark); text-transform: uppercase; letter-spacing: .05em; }
.early p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink); }

/* Page 6: final + footer */
.final { background: var(--bg); grid-template-rows: 1fr auto; padding: 90px 0 0; }
.final__inner { display: grid; justify-items: center; text-align: center; gap: 24px; }
.final__sub { margin: -8px 0 4px; font-family: var(--display); font-style: italic; font-size: 22px; color: var(--hot-dark); }
.final__creator { margin-top: 24px; font-size: 15px; font-weight: 700; color: var(--hot-dark); text-decoration: none; }
.final__creator:hover { text-decoration: underline; }
.footer { width: min(1120px, 100% - 32px); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; font-size: 14px; border-top: 1px solid var(--line); }
.footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer nav a { text-decoration: none; opacity: .65; }
.footer nav a:hover { opacity: 1; }

/* Wide but short windows (laptops with a docked taskbar, ultrawide monitors, small browser windows):
   size by height, drop the purely decorative bits, and trim the example chats so nothing overlaps. */
@media (min-width: 761px) and (max-height: 820px) {
  .sticker { margin-bottom: 12px; font-size: 13px; }
  .story__chat { height: min(400px, 60svh); }
  .story__scene { display: none; }
  .hero__lede { margin: 14px 0 20px; }
  .hero__alt { margin-top: 14px; }
  .btn--big { padding: 14px 28px; font-size: 17px; }
  .btn--huge { padding: 16px 44px; font-size: 21px; }
  .group, .memory, .earn { padding: 76px 0 24px; }
  .group p { margin: 14px 0 22px; font-size: 17px; }
  .memory p { margin: 16px 0 22px; font-size: 16px; }
  .memory__glow { display: none; }
  .chat { padding: 14px 16px; transform: none; }
  .chat__head { padding-bottom: 10px; }
  .chat__log { gap: 8px; padding-top: 10px; }
  .msg p { padding: 7px 12px; font-size: 13.5px; }
  .msg img { width: 28px; height: 28px; }
  .group .chat__log .msg:nth-child(4), .group .chat__log .msg:nth-child(5) { display: none; }
  .memo .chat__log > li:nth-child(3) { display: none; }
  .tc q { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .earn__lede { margin: 14px 0 20px; font-size: 16px; }
  .tier { padding: 10px 16px; }
  .tier p, .early p { font-size: 13px; }
  .early { padding: 10px 16px; }
  .final__inner { gap: 18px; }
}
@media (min-width: 761px) and (max-height: 620px) {
  .sticker { display: none; }
  .hero__lede { margin: 10px 0 16px; }
  .types__lede { display: none; }
  .types, .has-deck .slide.types { padding: 68px 0 16px; }
  .tc { width: clamp(170px, min(24vw, (100svh - 320px) / 1.47), 300px); }
  .tc q, .tc .tags { display: none; }
  .tc__type { font-size: 10px; }
  .group__copy .btn, .memory__layout .btn, .earn__copy .btn { margin-top: 24px; }
  .group__copy p { display: none; }
  .memory__layout > div:first-child > p { display: none; }
  .group .chat__log .msg:nth-child(3) { display: none; }
  .memo .chat__head, .memo .chat__log > li:nth-child(7) { display: none; }
  .tier p { display: none; }
  .tier--top p { display: block; }
  .earn__lede { display: none; }
}

@media (max-width: 760px) {
  .nav__links, .nav__signin { display: none; }
  .dots { display: none; }
  .group .chat__log .msg:nth-child(n + 4):not(:last-child) { display: none; }
  .memory__layout { grid-template-columns: 1fr; gap: 24px; }
  .memory__layout > div:first-child > p { display: none; }
  .memory h2 { margin-bottom: 18px; }
  .memo { transform: none; }
  .memory__glow { width: 100%; right: 0; opacity: .2; }
  .btn--big { padding: 16px 24px; font-size: 17px; }
  /* Phone hero fills exactly one screen: Everett's face at the top, then the story chat, the copy and the button.
     The chat takes only the space that is left, so the button never drops below the fold, even with the cookie banner open. */
  .hero__art { background: url("./assets/night/everett-800.webp") 42% 0 / auto 62% no-repeat; }
  .hero__art::after { background: linear-gradient(180deg, rgba(11, 14, 24, .55) 0%, rgba(11, 14, 24, .05) 18%, rgba(11, 14, 24, .55) 40%, var(--bg) 58%); }
  .rain { -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 55%); mask-image: linear-gradient(180deg, #000 20%, transparent 55%); }
  .hero__layout {
    height: 100svh; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; justify-items: stretch; align-items: stretch;
    gap: clamp(10px, 2svh, 18px); padding: 64px 0 16px;
  }
  .story { order: -1; width: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
  .story__chat { height: auto; max-height: 30svh; min-height: 0; padding: 10px 12px; border-radius: 18px; }
  .story__head { padding-bottom: 8px; }
  .story__head img { width: 28px; height: 28px; }
  .story__head b { font-size: 13px; }
  .story__head span, .story__scene { display: none; }
  .story__log { padding-top: 8px; gap: 7px; }
  .m { padding: 8px 11px; font-size: 12.5px; }
  .stamp { font-size: 10px; }
  .story__vs { padding: 7px 12px; font-size: 11.5px; }
  html:has(.consent:not([hidden])) .hero__layout { padding-bottom: 150px; }
  .hero__copy { justify-items: center; text-align: center; }
  .hero h1 { max-width: 18ch; font-size: clamp(30px, min(9vw, 4.8svh), 40px); line-height: 1.05; }
  .hero__lede { margin: 8px 0 14px; font-size: 14.5px; line-height: 1.45; }
  .btn--huge { width: 100%; max-width: 360px; padding: 16px 24px; font-size: 21px; }
  .hero__note { margin-top: 8px; font-size: 12.5px; }
  .hero__alt { margin-top: 8px; font-size: 13px; }
  .hero .sticker { margin-bottom: 8px; padding: 4px 12px; font-size: 12px; }
  .tc { width: 220px; }
  .tc h3 { font-size: 24px; }
  .group__layout { grid-template-columns: 1fr; gap: 28px; }
  .group p { margin: 14px 0 20px; font-size: 17px; }
  .chat { transform: none; }
  .msg p { font-size: 13.5px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* Phones: every page must fit one screen, because a swipe always flips the page. */
@media (max-width: 760px) {
  .group, .memory, .types { padding: 72px 0 24px; }
  .group h2, .memory h2, .final h2 { font-size: clamp(32px, 9vw, 44px); }
  .group__copy p { display: none; }
  .memory h2 { font-size: clamp(28px, 8vw, 36px); margin-bottom: 14px; }
  .memo .chat__log > li:nth-child(3), .memo .chat__log > li:nth-child(7) { display: none; }
  .memo .chat__log { gap: 7px; }
  .msg img { width: 28px; height: 28px; }
  .group__copy .btn--big { margin-top: 16px; }
  .group__layout { gap: 18px; }
  .group .chat__log .msg:nth-child(n + 3):not(:last-child) { display: none; }
  .chat { padding: 12px 14px; }
  .chat__head { padding-bottom: 10px; }
  .earn__layout { grid-template-columns: 1fr; gap: 14px; }
  .earn__lede { display: none; }
  .earn__copy .btn--big { margin-top: 12px; padding: 10px 20px; font-size: 15px; }
  .earn h2 { font-size: clamp(28px, 8vw, 36px); }
  .earn__tag { margin-bottom: 8px; }
  .tier { padding: 10px 14px; }
  .tier__name small { display: none; }
  .tier__pay { font-size: 18px; }
  .tier p { font-size: 12.5px; }
  .tier:not(.tier--top) p { display: none; }
  .early { padding: 10px 14px; }
  .early p { font-size: 12.5px; }
  .earn { padding: 72px 0 24px; }
  .final { padding: 72px 0 0; }
  .final__inner { gap: 16px; }
  .final__creator { margin-top: 8px; font-size: 14px; }
  .footer { padding: 14px 0; gap: 8px; font-size: 12px; }
  .footer nav { gap: 12px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .hero__alt, .hero .sticker { display: none; }
  .tc { width: 190px; }
  .types__lede { display: none; }
  .memo .chat__head { display: none; }
  .memory .btn--big { padding: 14px 22px; }
  .final .btn--big { padding: 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel__track, .hero__alt span, .rain, .m--typing i { animation: none; }
  .carousel { overflow-x: auto; }
  .has-deck .slide, .has-deck .slide .slide__inner { transition: none; transform: none; }
  .has-deck .group .msg, .has-deck .memo .chat__log > li { opacity: 1; transform: none; animation: none; }
}

/* Cookie banner */
.consent {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; width: min(340px, calc(100vw - 32px));
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); color: var(--ink);
  box-shadow: 0 16px 48px rgba(26, 23, 32, .15);
  font-size: 14px; line-height: 1.45;
}
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; color: var(--muted); }
.consent__actions { display: flex; justify-content: flex-end; gap: 8px; }
.consent button { padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.consent__no { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.consent__yes { border: 1px solid var(--hot); background: var(--hot); color: #fff; }
.consent__yes:hover { background: var(--hot-dark); border-color: var(--hot-dark); }
/* Phones: a shorter banner across the bottom, so it leaves room for the sign-up button above it. Same text and buttons. */
@media (max-width: 760px) {
  .consent { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 12px 14px; font-size: 12.5px; line-height: 1.4; border-radius: 14px; }
  .consent p { margin-bottom: 10px; }
  .consent button { padding: 7px 16px; }
}

/* Night theme: dark text on the amber buttons, darkened story art behind the pages, amber instead of rose glows. */
.nav { background: linear-gradient(rgba(11, 14, 24, .94), rgba(11, 14, 24, 0)); }
.btn--hot { color: var(--on-hot); box-shadow: 0 10px 30px rgba(242, 179, 91, .25); }
.btn--hot:hover { background: var(--hot-dark); border-color: var(--hot-dark); color: var(--on-hot); }
.msg--me p, .tc__type, .earn__tag, .consent__yes, .consent__yes:hover { color: var(--on-hot); }
.msg p { background: rgba(255, 255, 255, .07); }
.msg--me p { background: var(--hot); }
.day { background: rgba(255, 255, 255, .08); }
.day--skip { background: var(--hot); color: var(--on-hot); }
.types__pick { text-shadow: none; }
.tc:hover { box-shadow: 0 0 0 2px var(--hot), 0 20px 50px rgba(0, 0, 0, .4); }
.tier--top { box-shadow: 0 12px 32px rgba(242, 179, 91, .12); }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(242, 179, 91, .25); } }
.memory, .has-deck .slide.memory { background: linear-gradient(rgba(11, 14, 24, .9), rgba(11, 14, 24, .94)), url("./assets/night/book.webp") center / cover; }
.group, .has-deck .slide.group { background: linear-gradient(rgba(11, 14, 24, .9), rgba(11, 14, 24, .94)), url("./assets/night/company.webp") center / cover; }
.final, .has-deck .slide.final { background: linear-gradient(rgba(11, 14, 24, .86), rgba(11, 14, 24, .95)), url("./assets/night/mystery.webp") center / cover; }
.consent { background: rgba(22, 26, 39, .97); border-color: var(--line); box-shadow: 0 16px 48px rgba(0, 0, 0, .45); }

/* Story cards: keep the text in the lower part of the card so the character art always shows,
   whatever the window size. Text shrinks or drops lines as the card gets narrower. */
.tc { container-type: inline-size; }
.tc__body { padding: 56px 16px 16px; gap: 6px; background: linear-gradient(transparent, rgba(11, 14, 24, .92) 38%); }
.tc__type { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10.5px; }
.tc h3 { font-size: clamp(20px, 10.5cqi, 28px); line-height: 1.02; }
.tc q { font-size: clamp(13px, 5.6cqi, 15px); -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.tc .tags { flex-wrap: nowrap; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.tc .tags span { flex: none; }
.tc__go { font-size: 13.5px; }
@container (max-width: 250px) {
  .tc q { -webkit-line-clamp: 1; }
}
@container (max-width: 215px) {
  .tc q, .tc .tags { display: none; }
}

/* Older lines in the demo chat fade out under the header instead of being cut mid-line. */
.story__log { -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px); }
/* Short laptop windows: drop the story-page subtitle so the "See more stories" button stays on screen. */
@media (min-width: 761px) and (max-height: 720px) {
  .types__lede { display: none; }
  .types, .has-deck .slide.types { padding: 76px 0 20px; }
}
