:root {
  --room: #0d0b0a;
  --ink: #f7ebd1;
  --ink-soft: rgba(247, 235, 209, 0.68);
  --paper: #eceee8;
  --surface: #f8f8f3;
  --text: #1c1a17;
  --text-soft: #5d5a53;
  --wine: #7a2e3a;
  --brass: #d2a443;
  --wood: #6b4a2f;
  --wood-dark: #4a321f;
  --wood-light: #8a6240;
  --wall: #dfe5d9;
  --serif: "Newsreader", "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --book: 150px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--room);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* The bar */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  color: var(--ink);
  background: rgba(13, 11, 10, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(247, 235, 209, 0.07);
}
.mark { font-family: var(--serif); font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -0.01em; }
.bar nav { display: flex; gap: clamp(12px, 2.4vw, 28px); font-size: 14px; }
.bar nav a { text-decoration: none; opacity: 0.72; transition: opacity 0.2s; }
.bar nav a:hover { opacity: 1; }
@media (max-width: 560px) { .bar nav { display: none; } }

/* The room */
.room { position: relative; background: var(--room); color: var(--ink); overflow: hidden; }
#top { min-height: 100svh; display: flex; flex-direction: column; }

.bookcase { position: relative; background: var(--wall); border-inline: 9px solid var(--wood); }
#hero-case { margin: 76px auto 0; width: min(1040px, 100% - 2 * clamp(0px, 4vw, 40px)); background: #cdd3c6; border-radius: 4px; box-shadow: 0 40px 90px -40px #000; }
@media (max-width: 560px) { #hero-case { width: 100%; border-radius: 0; } }
.board {
  height: 15px;
  background: linear-gradient(var(--wood-light), var(--wood) 45%, var(--wood-dark));
  box-shadow: 0 5px 9px rgba(0, 0, 0, 0.28);
  position: relative; z-index: 2;
}
.shelf-row {
  display: flex; align-items: flex-end; gap: 0;
  height: calc(var(--book) + 20px);
  padding: 0 6px; overflow: hidden;
  background: linear-gradient(rgba(0, 0, 0, 0.14), transparent 26%);
}
.spine {
  flex: none; position: relative;
  height: calc(var(--book) * var(--h, 1));
  width: calc(var(--w, 28) * 1px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 22%, transparent 74%, rgba(0, 0, 0, 0.26)),
    var(--c);
  color: var(--k);
  border-radius: 2.5px 2.5px 0 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600; font-size: 11.5px; line-height: 1.05; letter-spacing: 0.01em;
  writing-mode: vertical-rl;
  padding: 9px 0; text-align: center; overflow: hidden;
  box-shadow: inset 0 9px 0 -7px rgba(255, 255, 255, 0.12), inset 0 -11px 0 -8px rgba(0, 0, 0, 0.2);
}
.spine.caps { text-transform: uppercase; font-size: 9.5px; letter-spacing: 0.08em; font-family: var(--sans); font-weight: 700; }
.spine.band::before, .spine.band::after {
  content: ""; position: absolute; inset-inline: 3px; height: 1.5px; background: currentColor; opacity: 0.55;
}
.spine.band::before { top: 7px; }
.spine.band::after { bottom: 7px; }
.spine span { max-height: 100%; overflow: hidden; }

/* The first shelf of the page: books come out of the dark as the candle catches. */
#hero-case .spine { opacity: 0; transform: translateY(-16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2); transition-delay: calc(var(--i) * 34ms + 250ms); }
.lit #hero-case .spine { opacity: 1; transform: none; }
.dark {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(circle at var(--fx, 82%) var(--fy, 62%), rgba(13, 11, 10, 0.2) 0, rgba(13, 11, 10, 0.46) 30%, rgba(13, 11, 10, 0.8) 78%);
  transition: opacity 1.6s ease;
}
.dark::before { content: ""; position: absolute; inset: 0; background: var(--room); opacity: 0.93; transition: opacity 1.6s ease; }
.lit .dark::before { opacity: 0; }
/* Blown out after it has burned: the room is dim, not black, and the books stay where they are. */
.was-lit:not(.lit) .dark::before { opacity: 0.62; }
.was-lit #hero-case .spine { opacity: 1; transform: none; }

.with-candle { justify-content: flex-start; }
.candle {
  all: unset; cursor: pointer; position: relative; z-index: 5;
  margin-left: auto; margin-right: clamp(10px, 5vw, 64px);
  height: calc(var(--book) * 0.98); aspect-ratio: 120 / 220; display: block;
  -webkit-tap-highlight-color: transparent;
}
.candle svg { width: 100%; height: 100%; display: block; overflow: visible; }
.candle:focus-visible { outline: 2px solid var(--brass); outline-offset: 6px; border-radius: 8px; }
.flame { transform-origin: 60px 66px; transform: scale(0); opacity: 0; transition: transform 0.5s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.3s; }
.lit .flame { transform: scale(1); opacity: 1; animation: flicker 3.1s ease-in-out infinite 0.6s; }
@keyframes flicker {
  0%, 100% { transform: scale(1) skewX(0deg); }
  18% { transform: scale(1.03, 0.97) skewX(-2.2deg); }
  37% { transform: scale(0.97, 1.05) skewX(1.6deg); }
  55% { transform: scale(1.02, 0.98) skewX(-1deg); }
  73% { transform: scale(0.98, 1.03) skewX(2.4deg); }
}
.glow {
  position: absolute; left: 50%; top: 18%; width: 420%; aspect-ratio: 1; translate: -50% -50%;
  background: radial-gradient(circle, rgba(255, 196, 96, 0.5), rgba(255, 170, 70, 0.16) 36%, transparent 66%);
  opacity: 0; transition: opacity 1.4s ease; pointer-events: none; mix-blend-mode: screen;
}
.lit .glow { opacity: 1; animation: breathe 3.1s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.86; scale: 0.985; } }
.candle:not(.was-lit)::after {
  content: ""; position: absolute; left: 50%; top: 12%; width: 150%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; border: 1.5px solid rgba(210, 164, 67, 0.55);
  animation: ring 2.2s ease-out infinite;
}
@keyframes ring { from { scale: 0.35; opacity: 0.9; } to { scale: 1; opacity: 0; } }

.pitch { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vh, 56px) 0 40px; width: min(1040px, 100% - 2 * clamp(20px, 5vw, 48px)); margin-inline: auto; }
h1 { font-size: clamp(46px, 9.5vw, 92px); line-height: 0.98; font-weight: 700; }
.lede { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-soft); max-width: 34em; margin: 22px 0 28px; }
.pitch > * { transition: opacity 1.4s ease 0.3s; }
body:not(.was-lit) .pitch > :not(.hint) { opacity: 0.3; }
.hint { font-size: 14px; color: var(--brass); letter-spacing: 0.04em; margin: 18px 0 0; transition: opacity 0.5s; }
.was-lit .hint { opacity: 0; }

/* The way in: a date, a form or the store */
.cta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.center .cta, .cta.reveal { align-items: center; }
.coming { margin: 0; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--brass); }
.waitlist { display: flex; flex-wrap: wrap; gap: 8px; width: min(100%, 470px); }
.waitlist input {
  flex: 1 1 210px; min-width: 0; height: 52px; padding: 0 18px; border-radius: 26px;
  border: 1px solid rgba(247, 235, 209, 0.24); background: rgba(247, 235, 209, 0.07); color: var(--ink);
  font: inherit;
}
.waitlist input::placeholder { color: rgba(247, 235, 209, 0.4); }
.waitlist input:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.waitlist button, .store {
  height: 52px; padding: 0 24px; border-radius: 26px; border: 0; cursor: pointer;
  background: linear-gradient(#e3b958, #c4962f); color: #2b1c0d; font: inherit; font-weight: 650;
  box-shadow: 0 8px 28px rgba(210, 164, 67, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.15s, box-shadow 0.2s;
}
.waitlist button:hover, .store:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(210, 164, 67, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.waitlist button[disabled] { opacity: 0.6; cursor: default; transform: none; }
.store { display: inline-flex; flex-direction: column; justify-content: center; text-decoration: none; line-height: 1.05; }
.store .small { font-size: 11px; font-weight: 500; }
.store .big { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.note { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--ink-soft); }
.form-fine { margin: 0; max-width: 470px; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
.form-fine a { color: inherit; text-underline-offset: 2px; }

/* Paper sections */
.paper { background: var(--paper); padding: clamp(64px, 11vw, 132px) 0; position: relative; }
.paper.tint { background: #e4e7de; }
.wrap { width: min(1080px, 100% - 2 * clamp(20px, 5vw, 48px)); margin-inline: auto; }
.two { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 6vw, 84px); align-items: center; }
.two.flip { grid-template-columns: 0.95fr 1.05fr; }
@media (max-width: 800px) {
  .two, .two.flip { grid-template-columns: 1fr; }
  .two.flip .copy { order: -1; }
}
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wine); margin-bottom: 14px; }
.room .kicker { color: var(--brass); }
h2 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.04; margin-bottom: 20px; }
.copy p { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-soft); max-width: 31em; }
.room .copy p, .room .plain { color: var(--ink-soft); }
.plain { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; font-size: 16px; }
.plain li { padding-left: 26px; position: relative; }
.plain li::before { content: ""; position: absolute; left: 4px; top: 0.5em; width: 7px; height: 10px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: var(--brass); }

.phone {
  margin: 0 auto; width: min(100%, 318px); border-radius: 44px; overflow: hidden;
  border: 9px solid #17140f; background: #17140f;
  box-shadow: 0 34px 70px -26px rgba(28, 26, 23, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.phone img { width: 100%; height: auto; border-radius: 35px; }
.dark-phone { border-color: #26211a; box-shadow: 0 0 120px -10px rgba(255, 176, 76, 0.22), 0 40px 80px -30px #000; }
.pair { position: relative; display: grid; grid-template-columns: 1fr; justify-items: center; padding-right: clamp(0px, 9vw, 110px); }
.pair .back { position: absolute; right: 0; top: 9%; width: min(74%, 250px); z-index: 0; opacity: 0.96; transform: rotate(4deg); }
.pair .phone:first-child { position: relative; z-index: 1; transform: rotate(-2.5deg); }
@media (max-width: 800px) { .pair { padding-right: 0; } .pair .back { display: none; } .pair .phone:first-child { transform: none; } }

/* The shelf to play with */
.play { margin-top: clamp(48px, 8vw, 96px); }
.play-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.play-head .kicker { margin: 0; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(28, 26, 23, 0.07); }
.seg button {
  border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 550; color: var(--text-soft);
  padding: 8px 15px; border-radius: 999px; cursor: pointer; transition: background 0.25s, color 0.25s;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); }
.bookcase.light { border-radius: 6px; overflow: hidden; box-shadow: 0 30px 60px -34px rgba(28, 26, 23, 0.55); }
.bookcase.light .shelf-row { justify-content: flex-start; }
#play-case .spine { transition: transform 0.75s cubic-bezier(0.3, 0.9, 0.25, 1); will-change: transform; }

/* The second room */
.quiet { padding: clamp(72px, 12vw, 140px) 0; }
.quiet::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 28% 46%, rgba(170, 118, 52, 0.24), transparent 70%);
}
.quiet.end::before { background: radial-gradient(52% 70% at 50% 100%, rgba(190, 132, 58, 0.34), transparent 72%); }
.quiet .wrap { position: relative; }
.center { text-align: center; }
.narrow { max-width: 36em; margin-inline: auto; color: var(--text-soft); font-size: clamp(17px, 1.6vw, 19px); }

/* Free and Plus */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 40px; }
.tier { background: var(--surface); border-radius: 24px; padding: 28px 28px 24px; }
.tier.plus { background: #2a1a1d; color: var(--ink); box-shadow: 0 30px 60px -34px rgba(60, 20, 28, 0.7); }
.tier h3 { font-size: 26px; margin-bottom: 14px; }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 16px; }
.tier li { padding-left: 28px; position: relative; }
.tier li::before { content: ""; position: absolute; left: 3px; top: 0.42em; width: 13px; height: 7px; border-left: 2px solid var(--wine); border-bottom: 2px solid var(--wine); rotate: -45deg; }
.tier.plus li::before { border-color: var(--brass); }
.fine { font-size: 13.5px; color: var(--ink-soft); margin: 20px 0 0; }

footer {
  background: var(--room); color: var(--ink-soft); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 5vw, 48px) calc(26px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(247, 235, 209, 0.08);
}
footer .mark { color: var(--ink); font-size: 18px; }
footer nav { display: flex; gap: 22px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Things arrive as they are scrolled to */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.pair.reveal.in .phone:first-child { transform: rotate(-2.5deg); }

/* Plain pages: privacy and support */
.doc { background: var(--paper); min-height: 100svh; padding: 110px 0 80px; }
.doc .wrap { width: min(720px, 100% - 40px); }
.doc h1 { font-size: clamp(36px, 6vw, 52px); margin-bottom: 8px; color: var(--text); }
.doc h2 { font-size: 24px; margin: 34px 0 10px; }
.doc p, .doc li { color: #3c3933; }
.doc .date { color: var(--text-soft); font-size: 15px; }
.doc a { color: var(--wine); }
.doc-bar { background: var(--room); }

@media (max-width: 560px) { :root { --book: 118px; } .spine { font-size: 10px; } .spine.caps { font-size: 8.5px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
}
