/* Landing page for Hidden in the Story. Every color is sampled from the logo: its navy outline, the steel-blue
   badge, the parchment scroll, the teal-green rim, the star gold and the coral of the lettering.
   Fonts are Google Fonts (Baloo 2, Nunito) on purpose: the game's own fonts are not licensed for a website. */
:root {
  --outline: #141d44;      /* the logo's dark outline */
  --night: #1d4a78;        /* the steel-blue badge */
  --night-deep: #142a52;
  --night-soft: #2c64a0;
  --parchment: #fbe8c2;    /* the scroll */
  --cream: #f4d9a6;
  --paper: #fff5df;
  --tan: #d9a66c;          /* the scroll's shading */
  --gold: #f9c444;         /* the stars */
  --gold-deep: #d9952a;
  --green: #2f9468;        /* the badge rim */
  --teal: #237f80;
  --coral: #e2704f;
  --ink: #23263f;
  --muted: #6b5d4d;
  --line: #e7c993;
  --rainbow: linear-gradient(90deg, #4b8ad8 0%, #5cbf62 26%, #2fa6a2 48%, #f8c246 72%, #ef7d56 100%);
  --display: "Baloo 2", "Avenir Next Rounded", "Arial Rounded MT Bold", sans-serif;
  --body: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--parchment); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--night-soft); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; margin: 0; color: var(--outline); letter-spacing: -.005em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 2px 24px 0; border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 18px; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .12s, box-shadow .12s; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(#fbd56a, var(--gold) 55%, #f0ae2f); color: var(--outline); border: 2.5px solid var(--outline); box-shadow: 0 5px 0 var(--outline); }
.btn-gold:hover { box-shadow: 0 3px 0 var(--outline); transform: translateY(2px); }
.btn-ghost { background: var(--paper); color: var(--outline); border: 2.5px solid var(--outline); box-shadow: 0 5px 0 var(--outline); }
.btn-ghost:hover { box-shadow: 0 3px 0 var(--outline); transform: translateY(2px); }

/* Sticky nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; background: rgba(251, 232, 194, .94); backdrop-filter: blur(10px); border-bottom: 2.5px solid var(--outline); }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--outline); text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 20px; }
.nav-brand sup { font-size: .5em; margin-left: 1px; }
.nav-links { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover { border-bottom-color: var(--gold); }
.nav-links .nav-cta { background: var(--night); color: #fff; padding: 7px 16px 6px; border-radius: 999px; border: 2px solid var(--outline); font-family: var(--display); font-weight: 800; }
.nav-links .nav-cta:hover { background: var(--night-soft); }
.nav-links .nav-cta { white-space: nowrap; }
@media (max-width: 760px) { .nav-links a:not(.nav-cta) { display: none; } }
@media (max-width: 420px) { .nav { padding: 8px 14px; } .nav-brand { font-size: 17px; gap: 8px; } .nav-brand img { width: 36px; height: 36px; } }

/* Hero */
.hero { max-width: var(--max); margin: 0 auto; padding: 48px 20px 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: center; }
.kicker { margin: 0 0 6px; font-family: var(--display); font-weight: 700; color: var(--teal); font-size: 19px; }
.hero h1 { font-size: clamp(46px, 6.2vw, 80px); font-weight: 800; line-height: .98; }
.hero h1 .ink { position: relative; display: inline-block; padding: 0 .04em .06em 0; }
.hero h1 .ink-o { color: var(--outline); -webkit-text-stroke: .16em var(--outline); text-shadow: 0 .07em 0 var(--outline); }
.hero h1 .ink-f { position: absolute; left: 0; top: 0; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 em { font-style: normal; }
.lede { font-size: 19px; max-width: 34em; margin: 18px 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 26px 0 0; font-weight: 700; color: var(--muted); font-size: 15px; }
.hero-facts li::before { content: "★"; color: var(--gold); -webkit-text-stroke: 1px var(--outline); margin-right: 7px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 32px; } .hero-copy { text-align: center; } .hero-actions { justify-content: center; } .hero-facts { justify-content: center; } .lede { margin-left: auto; margin-right: auto; } }

/* The playable scene */
.find { background: var(--paper); border: 3px solid var(--outline); border-radius: 20px; box-shadow: 0 8px 0 var(--outline), 0 24px 40px rgba(20, 29, 68, .22); overflow: hidden; }
.find-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--night); color: #fff; border-bottom: 4px solid var(--green); }
.find-kicker { display: block; font-size: 13px; font-weight: 700; opacity: .8; }
.find-bar h2 { color: #fff; font-size: 24px; }
.find-hint { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--outline); background: var(--gold); border: 2px solid var(--outline); border-radius: 999px; padding: 5px 16px 3px; cursor: pointer; }
.find-hint:hover { background: #f2c654; }
.clues { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--cream); font-weight: 700; font-size: 14px; }
.clues li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 6px; background: var(--paper); border: 2px solid var(--outline); border-radius: 999px; }
.clues i, .hcard-clues i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); border: 1.5px solid rgba(0,0,0,.25); }
.scene { position: relative; aspect-ratio: 1 / 1; max-height: 560px; width: 100%; overflow: auto; overscroll-behavior: contain; cursor: grab; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scene::-webkit-scrollbar { display: none; }
.scene.dragging { cursor: grabbing; }
.scene-inner { position: relative; width: 1400px; }
.scene-img { display: block; width: 1400px; height: auto; user-select: none; -webkit-user-drag: none; }
.scene-hero { position: absolute; left: 58.6%; top: 57.5%; width: 30px; height: 40px; padding: 0; border: 0; background: transparent; cursor: pointer; transform: translate(-50%, -100%); }
.scene-hero svg { width: 100%; height: 100%; overflow: visible; display: block; }
.scene-hero.hinted::after { content: ""; position: absolute; inset: -14px -16px; border: 3px solid var(--gold); border-radius: 50%; animation: ping 1s ease-out 3; }
@keyframes ping { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.scene-nudge { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(10, 29, 58, .78); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; transition: opacity .4s; }
.scene-nudge.off { opacity: 0; }
.scene-wrap { position: relative; }
.found { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; background: rgba(10, 29, 58, .55); backdrop-filter: blur(2px); overflow: auto; }
.found[hidden] { display: none; }
.found-card { background: var(--paper); border: 3px solid var(--outline); border-radius: 16px; padding: 14px 18px; max-width: 360px; width: 100%; text-align: center; box-shadow: 0 18px 40px rgba(0,0,0,.35); animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.found-kicker { margin: 0; font-weight: 800; color: var(--green); font-size: 14px; }
.found-card h3 { font-size: 26px; }
.stars { margin: 2px 0 0; font-size: 26px; color: var(--gold); letter-spacing: 4px; line-height: 1; }
.found-time { margin: 4px 0 10px; font-weight: 700; color: var(--muted); font-size: 14px; }
.found-card blockquote { margin: 0; padding: 10px 12px; background: var(--cream); border-radius: 10px; font-style: italic; font-size: 14px; line-height: 1.5; }
.found-card cite { display: block; font-style: normal; font-weight: 700; margin-top: 4px; font-size: 13px; color: var(--muted); }
.found-more { font-size: 14px; margin: 10px 0; }
.found-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.found-actions .btn { min-height: 42px; font-size: 15px; padding: 0 16px; }
@media (prefers-reduced-motion: reduce) { .found-card, .scene-hero.hinted::after { animation: none; } .scene-hero.hinted::after { opacity: 1; transform: none; } }

/* Parade of hero figures */
.parade { overflow: hidden; border-top: 3px solid var(--outline); border-bottom: 3px solid var(--outline); background: var(--cream); padding: 10px 0 0; box-shadow: inset 0 -6px 0 var(--tan); }
.parade-track { display: flex; gap: 40px; width: max-content; padding: 0 20px; animation: parade 60s linear infinite; }
.parade-track figure { margin: 0; width: 64px; height: 72px; flex: none; }
.parade-track svg { width: 100%; height: 100%; overflow: visible; display: block; }
@keyframes parade { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .parade-track { animation: none; } }

/* Chapters */
.chapter { max-width: var(--max); margin: 0 auto; padding: 72px 20px; }
.chapter-num { margin: 0 0 6px; font-family: var(--display); font-weight: 700; color: var(--teal); font-size: 18px; }
.chapter-num::before { content: "★ "; color: var(--gold); -webkit-text-stroke: 1px var(--outline); }
.chapter h2 { font-size: clamp(32px, 4.2vw, 48px); max-width: 16em; }
.chapter-lede { font-size: 19px; max-width: 36em; margin: 14px 0 0; color: var(--muted); }

.row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; margin-top: 56px; }
.row-flip .row-art { order: 2; }
.row-art { margin: 0; border-radius: 16px; overflow: hidden; border: 3px solid var(--outline); box-shadow: 8px 8px 0 var(--outline); background: var(--night); }
.row-art img { display: block; }
.row-text h3 { font-size: 30px; margin-bottom: 8px; color: var(--night); }
.row-text p { margin: 0; }
@media (max-width: 820px) { .row { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; } .row-flip .row-art { order: 0; } }

/* Table of contents */
.chapter-night { max-width: none; background: var(--night); background-image: radial-gradient(ellipse 70% 60% at 50% 0%, var(--night-soft), var(--night) 70%); color: #fff; border-top: 6px solid var(--green); border-bottom: 6px solid var(--green); box-shadow: inset 0 3px 0 var(--outline), inset 0 -3px 0 var(--outline); }
.chapter-night > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.chapter-night h2 { color: #fff; max-width: var(--max); }
.chapter-night .chapter-num { color: #8fd6b0; }
.chapter-night .chapter-lede { color: rgba(255,255,255,.78); margin-top: 14px; }
.toc { list-style: none; counter-reset: story; margin: 36px auto 0; padding: 0; columns: 3; column-gap: 40px; }
.toc li { counter-increment: story; break-inside: avoid; display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px dotted rgba(255,255,255,.3); font-family: var(--display); font-weight: 600; font-size: 19px; }
.toc li::before { content: counter(story); flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--outline); border: 2px solid var(--outline); display: inline-grid; place-items: center; font-weight: 800; font-size: 15px; transform: translateY(6px); }
@media (max-width: 900px) { .toc { columns: 2; } }
@media (max-width: 560px) { .toc { columns: 1; } }

/* Hero cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.hcard { position: relative; background: var(--paper); border: 3px solid var(--outline); border-radius: 20px; padding: 18px 20px 22px; box-shadow: 0 7px 0 var(--outline); }
.hcard::before { content: ""; position: absolute; left: 14px; right: 14px; top: 12px; height: 150px; border-radius: 14px; background: radial-gradient(circle at 50% 60%, #fff5df, var(--cream)); border: 2px solid var(--line); }
.hcard > * { position: relative; }
.hcard-art { height: 140px; margin: 14px auto 12px; width: 170px; }
.hcard-art svg { transform: scale(1.12); transform-origin: 50% 100%; }
.hcard-art svg { width: 100%; height: 100%; overflow: visible; display: block; filter: drop-shadow(0 0 2px var(--cream)) drop-shadow(0 0 2px var(--cream)); }
.hcard-kicker { margin: 0; font-weight: 800; font-size: 13px; color: var(--muted); }
.hcard h3 { font-size: 34px; color: var(--night); }
.hcard-clues { list-style: none; padding: 0; margin: 10px 0 12px; display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
.hcard-clues li { display: flex; align-items: center; gap: 9px; }
.hcard p:last-child { margin: 0; font-size: 15px; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; } }

/* Parents band: a scene behind a parchment panel */
.chapter-band { max-width: none; padding: 0; position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 520px; }
.band-img { background-size: cover; background-position: center; }
.band-panel { padding: 64px 48px; background: var(--paper); border-left: 3px solid var(--outline); }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; max-width: 34em; }
.checks li { padding-left: 32px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; transform: translateY(3px); }
.band-note { margin: 24px 0 0; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .chapter-band { grid-template-columns: 1fr; } .band-img { min-height: 240px; } .band-panel { border-left: 0; border-top: 2px solid var(--night); padding: 40px 20px; } }

/* Get the game */
.chapter-get { text-align: center; }
.chapter-get h2, .chapter-get .chapter-lede { margin-left: auto; margin-right: auto; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
.store { display: inline-flex; align-items: center; gap: 12px; min-width: 230px; padding: 12px 20px 12px 16px; border-radius: 16px; background: var(--outline); color: #fff; text-decoration: none; text-align: left; border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--night); }
.store svg { width: 34px; height: 34px; fill: currentColor; flex: none; }
.store span { display: flex; flex-direction: column; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.05; }
.store small { font-family: var(--body); font-weight: 700; font-size: 12px; opacity: .8; margin-bottom: 2px; }
.store-soon { opacity: .9; cursor: default; }
.get-note { max-width: 36em; margin: 28px auto 0; color: var(--muted); }

/* FAQ */
.chapter-faq { max-width: 720px; padding-top: 24px; }
.chapter-faq h2 { font-size: 30px; margin-bottom: 18px; }
.chapter-faq details { background: var(--paper); border: 2px solid var(--outline); border-radius: 14px; padding: 0 18px; margin: 10px 0; }
.chapter-faq summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--outline); padding: 14px 0; list-style: none; display: flex; gap: 10px; align-items: center; }
.chapter-faq summary::-webkit-details-marker { display: none; }
.chapter-faq summary::before { content: "▸"; color: var(--gold-deep); transition: transform .15s; }
.chapter-faq details[open] summary::before { transform: rotate(90deg); }
.chapter-faq details p { margin: 0 0 16px; }
.faq-more { color: var(--muted); margin: 18px 0 0; }

/* Footer */
.foot { background: var(--outline); border-top: 6px solid var(--green); color: #c9d4e6; text-align: center; padding: 36px 20px 40px; font-size: 14px; }
.foot img { display: block; margin: 0 auto 12px; }
.foot p { margin: 6px 0; }
.foot a { color: #fff; }
@media (max-width: 480px) { .found-more { display: none; } .found-card blockquote { font-size: 13px; } .found-card h3 { font-size: 23px; } }
