/* Spell and Chill: a café table in the morning (light) and the evening (dark).
   Layout: generous single column, big type everywhere, wood and paper surfaces. */
:root {
  --paper: #f7efe2;
  --paper-2: #efe2cc;
  --card: #fffaf2;
  --ink: #2b1b12;
  --ink-2: #5a4232;
  --line: #e2cfb1;
  --wood: #a8672f;
  --wood-deep: #6e3b17;
  --tile: #f3dfb8;
  --tile-ink: #3a2414;
  --accent: #8a4316;
  --accent-ink: #fffaf2;
  --leaf: #4f7a3a;
  --shadow: 0 24px 60px rgba(76, 40, 14, 0.18);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1b1410;
    --paper-2: #231a14;
    --card: #2a2019;
    --ink: #f6ebdc;
    --ink-2: #cdb8a2;
    --line: #3e3027;
    --wood: #c88a4f;
    --wood-deep: #e2a35e;
    --tile: #ead2a6;
    --tile-ink: #2b1b12;
    --accent: #e8a865;
    --accent-ink: #1b1410;
    --leaf: #8fbf73;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1b1410; --paper-2: #231a14; --card: #2a2019; --ink: #f6ebdc; --ink-2: #cdb8a2; --line: #3e3027;
  --wood: #c88a4f; --wood-deep: #e2a35e; --tile: #ead2a6; --tile-ink: #2b1b12; --accent: #e8a865; --accent-ink: #1b1410;
  --leaf: #8fbf73; --shadow: 0 24px 60px rgba(0, 0, 0, 0.45); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 19px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; margin: 0; text-wrap: balance; font-variation-settings: "SOFT" 100, "WONK" 0; }
h1 { font-size: clamp(46px, 7.4vw, 84px); }
h2 { font-size: clamp(34px, 4.8vw, 54px); }
h3 { font-size: 26px; }
p { margin: 0; }
.lede { font-size: clamp(20px, 2.2vw, 23px); color: var(--ink-2); max-width: 36ch; }
.kicker { font: 800 15px/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--wood); }
em.script { font-style: italic; font-weight: 500; color: var(--accent); }

/* nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--paper); }
.nav .wrap { display: flex; align-items: center; gap: 18px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 600 25px/1 var(--display); white-space: nowrap; }
@media (max-width: 420px) { .brand { font-size: 21px; gap: 10px; } .brand img { width: 34px; height: 34px; } .nav .btn { padding: 0 16px; font-size: 16px; } }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav-links { display: none; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 17px; }
.nav-links a:hover { color: var(--ink); }
.nav .btn { margin-left: auto; }
@media (min-width: 860px) { .nav-links { display: flex; } .nav .btn { margin-left: 6px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap; font: 800 17px/1 var(--body); background: var(--accent); color: var(--accent-ink); transition: transform 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.soft { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 24px 0 18px; border-radius: 16px; background: var(--ink); color: var(--paper); text-decoration: none; }
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font: 700 12px/1.1 var(--body); opacity: 0.75; }
.store strong { display: block; font: 600 21px/1.15 var(--display); }
.store.soon { cursor: default; }

/* hero */
.hero { padding-block: 56px 24px; }
.hero-top { display: grid; gap: 22px; }
.hero .lede { margin-top: 4px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; }
.notes { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); font-weight: 700; font-size: 17px; }
.notes span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 10px; border-radius: 3px; background: var(--wood); vertical-align: 2px; }
.table {
  position: relative; margin-top: 40px; border-radius: 28px; overflow: hidden;
  aspect-ratio: 3840 / 1646; max-width: 100%; box-shadow: var(--shadow);
  background: var(--wood) url("img/cafe.webp") center / cover no-repeat;
}
@media (max-width: 700px) { .table { aspect-ratio: 4 / 3; background-position: 30% center; } }
.steam { position: absolute; left: 11.2%; top: 0; width: 7%; height: 22%; pointer-events: none; }
.steam i { position: absolute; bottom: 0; width: 28%; height: 100%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.55), transparent); filter: blur(6px); animation: rise 5s ease-in-out infinite; opacity: 0; }
.steam i:nth-child(1) { left: 10%; } .steam i:nth-child(2) { left: 38%; animation-delay: 1.6s; } .steam i:nth-child(3) { left: 64%; animation-delay: 3.2s; }
@keyframes rise { 0% { transform: translateY(30%) scaleX(0.8); opacity: 0; } 30% { opacity: 0.8; } 100% { transform: translateY(-60%) scaleX(1.4); opacity: 0; } }
@media (max-width: 700px) { .steam { left: 16%; width: 12%; } }

/* sections */
section { padding-block: 88px; }
@media (min-width: 900px) { section { padding-block: 120px; } }
.band { background: var(--paper-2); border-block: 1px solid var(--line); }
.head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 44px; }
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } .split.flip > :first-child { order: 2; } }
.phone { width: min(330px, 82vw); margin: 0 auto; border-radius: 28px; box-shadow: var(--shadow); }
.points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.points li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.points b { display: block; font-size: 20px; }
.points span { color: var(--ink-2); }
.points .dot { color: var(--tile-ink); }
.dot { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tile); color: var(--tile-ink); font: 700 22px/1 var(--display); box-shadow: inset 0 -3px 0 rgba(110, 59, 23, 0.25); }

/* the playable board */
.play { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .play { grid-template-columns: 1fr 1fr; } }
.board { display: grid; justify-items: center; gap: 22px; padding: 28px 20px 30px; border-radius: 28px; background: radial-gradient(120% 90% at 50% 30%, #c98a4f, #8a5226); box-shadow: var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.answer { min-height: 64px; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.answer .t, .wheel button { width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center; font: 700 30px/1 var(--display); color: var(--tile-ink); background: linear-gradient(#f8e7c4, #e9cf9e); box-shadow: 0 3px 0 #b98a52, 0 6px 14px rgba(0, 0, 0, 0.25); }
.answer .hint { color: #fff3df; font-weight: 700; font-size: 17px; opacity: 0.9; }
.wheel { position: relative; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, #7a4320 0 58%, #5a2f14 59% 100%); box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(255, 255, 255, 0.15); }
.wheel button { position: absolute; border: 0; cursor: pointer; translate: -50% -50%; transition: transform 0.12s ease, opacity 0.12s ease; }
.wheel button:hover { transform: scale(1.06); }
.wheel button[aria-pressed="true"] { opacity: 0.35; transform: scale(0.92); }
.board-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.board-actions button { min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; font: 800 17px/1 var(--body); background: #fff6e6; color: #3a2414; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); }
.board-actions button.go { background: #3a2414; color: #fff6e6; }
.found { display: grid; gap: 16px; }
.progress { display: flex; align-items: center; gap: 14px; font-weight: 800; }
.bar { flex: 1; height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 0.3s ease; }
.words { display: flex; flex-wrap: wrap; gap: 10px; }
.word { border: 0; font-family: inherit; padding: 8px 14px; border-radius: 10px; font: 700 18px/1 var(--display); letter-spacing: 0.08em; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); }
.word.got { cursor: pointer; } .word.got { background: var(--tile); color: var(--tile-ink); box-shadow: none; }
.word.bonus { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.meaning { min-height: 92px; padding: 18px 20px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.meaning small { display: block; font-style: italic; color: var(--ink-2); }
.meaning strong { font: 600 24px/1.2 var(--display); letter-spacing: 0.04em; }
.toast { font-weight: 800; color: #fff6e6; min-height: 1.6em; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

/* text size demo */
.sizer { display: grid; gap: 18px; padding: 26px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.sizer label { font-weight: 800; }
.sizer input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 44px; }
.sample { display: flex; gap: 0.25em; font-size: var(--s, 30px); transition: font-size 0.15s ease; }
.sample span { width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 0.3em; font: 700 1em/1 var(--display); background: var(--tile); color: var(--tile-ink); box-shadow: 0 0.08em 0 rgba(110, 59, 23, 0.4); }

/* gallery */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(250px, 66vw); gap: 20px; overflow-x: auto; padding: 6px 2px 22px; scroll-snap-type: x mandatory; }
.strip figure { margin: 0; scroll-snap-align: start; display: grid; gap: 12px; }
.strip img { border-radius: 22px; box-shadow: 0 14px 34px rgba(76, 40, 14, 0.2); }
.strip figcaption { font-weight: 700; color: var(--ink-2); font-size: 17px; }
.scenes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.scenes span { padding: 9px 16px; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; font-size: 17px; }

/* facts */
.facts { display: grid; gap: 16px; }
@media (min-width: 820px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.fact { padding: 26px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; align-content: start; }
.fact h3 { font-size: 24px; }
.fact p { color: var(--ink-2); }

/* faq */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); padding-block: 20px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 18px; font: 600 23px/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font: 400 30px/1 var(--body); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; color: var(--ink-2); }

.final { text-align: center; }
.final .wrap { display: grid; justify-items: center; gap: 22px; }
.final img.icon { width: 104px; height: 104px; border-radius: 24px; box-shadow: var(--shadow); }

footer { padding-block: 48px 60px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 16px; }
footer .wrap { display: grid; gap: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer nav a { color: var(--ink); font-weight: 700; text-decoration: none; }

/* document pages */
.doc { padding-block: 56px 88px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(42px, 6vw, 60px); margin-bottom: 18px; }
.doc h2 { font-size: 30px; margin: 44px 0 10px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: 14px; }
.doc b, .doc strong { color: var(--ink); }
.doc details { border-top: 1px solid var(--line); padding-block: 16px; }
.doc details:last-of-type { border-bottom: 1px solid var(--line); }
.doc summary { cursor: pointer; font: 600 21px/1.35 var(--display); color: var(--ink); }
.doc details > p { margin-top: 10px; }
.doc .muted { color: var(--ink-2); }

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