/* The City Detective: storefront styles.
   Look: a vintage case file. Cream paper with grain, ink-brown type, a vermilion rubber stamp
   and mustard highlights, matching the warm illustrated style of the games. */

@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces.woff2') format('woff2'); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-italic.woff2') format('woff2'); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('fonts/instrument-sans.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('fonts/courier-prime-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('fonts/courier-prime-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --paper: #f4ead6;
  --paper-2: #ebdcbf;
  --paper-3: #e2cfa8;
  --manila: #e9cf96;
  --ink: #1f1611;
  --ink-2: #4a3a2e;
  --ink-3: #7a6553;
  --red: #d8452a;
  --red-dark: #a9311b;
  --mustard: #f0b13c;
  --line: rgba(31, 22, 17, .16);
  --ok: #2f6b3a;
  --display: 'Fraunces', 'Georgia', serif;
  --body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --type: 'Courier Prime', 'Courier New', monospace;
  --gutter: 16px;
  --max: 1160px;
  --radius: 6px;
  --shadow: 0 1px 0 rgba(31, 22, 17, .08), 0 18px 40px -18px rgba(31, 22, 17, .45);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .09 0 0 0 0 .07 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: 'SOFT' 50, 'WONK' 1;
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: 0 0 .4em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.7rem, 8vw, 5.6rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 5vw, 3.3rem); }
h3 { font-size: 1.45rem; font-weight: 700; }
h1 em, h2 em { color: var(--red); font-style: italic; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.label {
  font-family: var(--type);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label.red { color: var(--red-dark); }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-2); max-width: 36em; }
.small { font-size: .9rem; color: var(--ink-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line); background: rgba(244, 234, 214, .86); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1; letter-spacing: -.01em; }
.brand-name small { display: block; font-family: var(--type); font-weight: 700; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav .nav-hide { display: none; }
@media (min-width: 720px) { .nav .nav-hide { display: inline; } }

/* ---------- Buttons ---------- */

.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 54px; padding: 0 26px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--b); color: var(--paper);
  font: 700 1.02rem/1 var(--body); text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { color: var(--paper); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.red { --b: var(--red); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn.small { min-height: 44px; padding: 0 18px; font-size: .95rem; box-shadow: 3px 3px 0 var(--ink); }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 2px 2px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- Hero ---------- */

.hero { padding: 48px 0 56px; position: relative; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 940px) { .hero .wrap { grid-template-columns: 1.02fr 1fr; gap: 56px; } .hero { padding: 72px 0 88px; } }
.hero h1 { margin: 14px 0 22px; }
.hero .lede { margin-bottom: 30px; }
.hero-note { margin-top: 18px; font-size: .92rem; color: var(--ink-3); }

.reveal { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .16s; } .reveal.d3 { animation-delay: .24s; } .reveal.d4 { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* The case folder holding the cover illustration */
.folder { position: relative; padding: 18px 18px 22px; background: var(--manila) var(--grain); border-radius: 4px 14px 6px 6px; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.folder::before { content: attr(data-tab); position: absolute; left: 22px; top: -26px; height: 28px; padding: 6px 18px 0; background: var(--manila); border-radius: 8px 8px 0 0; font: 700 .72rem/1 var(--type); letter-spacing: .16em; color: var(--ink-2); }
.photo { position: relative; background: #fff; padding: 10px 10px 12px; box-shadow: 0 2px 8px rgba(31, 22, 17, .2); transform: rotate(-2deg); }
.photo img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; height: auto; }
.photo figcaption { margin: 10px 4px 0; font: 700 .85rem/1.3 var(--type); color: var(--ink-2); }
.tape { position: absolute; width: 110px; height: 30px; background: rgba(240, 177, 60, .55); top: -12px; left: 50%; transform: translateX(-50%) rotate(-4deg); mix-blend-mode: multiply; }
.lens-host { position: relative; overflow: hidden; cursor: none; }
.lens {
  position: absolute; width: 170px; height: 170px; border-radius: 50%;
  border: 7px solid var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .5);
  background-repeat: no-repeat; pointer-events: none; opacity: 0; transition: opacity .2s; transform: translate(-50%, -50%);
}
.lens-host:hover .lens { opacity: 1; }
@media (hover: none) { .lens { display: none; } .lens-host { cursor: auto; } }

.stamp {
  position: absolute; display: inline-block; padding: 8px 14px 6px;
  border: 3px solid currentColor; border-radius: 6px; color: var(--red);
  font: 700 1.05rem/1 var(--type); letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(-12deg); background: rgba(244, 234, 214, .2);
  mask-image: var(--grain), linear-gradient(#000, #000); mask-composite: exclude;
  -webkit-mask-image: var(--grain), linear-gradient(#000, #000); -webkit-mask-composite: xor;
}
.folder .stamp { right: 6px; top: 30px; font-size: 1.25rem; animation: thunk .5s .9s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes thunk { from { opacity: 0; transform: rotate(-20deg) scale(2.2); } to { opacity: .95; transform: rotate(-12deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .reveal, .folder .stamp { animation: none; } }

/* ---------- Ticker ---------- */

.ticker { background: var(--ink); color: var(--paper); overflow: hidden; border-block: 3px solid var(--mustard); }
.ticker-track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker span { font: 700 .9rem/1 var(--type); letter-spacing: .16em; text-transform: uppercase; padding: 15px 0; white-space: nowrap; }
.ticker span::after { content: '✦'; color: var(--mustard); margin: 0 28px; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { margin-top: 10px; }
.rule { border: 0; border-top: 1px dashed var(--line); margin: 0; }

.steps { display: grid; gap: 28px; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; } }
.step { border-top: 2px solid var(--ink); padding-top: 18px; }
.step-num { font: italic 800 3.4rem/1 var(--display); color: var(--red); display: block; margin-bottom: 10px; }
.step p { color: var(--ink-2); margin: 0; }

/* ---------- Case dossiers ---------- */

.cases { display: grid; gap: 34px; }
@media (min-width: 760px) { .cases { grid-template-columns: repeat(2, 1fr); } .cases .dossier.live { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .cases { grid-template-columns: 1.35fr 1fr; } .cases .dossier.live { grid-column: auto; grid-row: span 2; } }

.dossier { position: relative; margin-top: 26px; background: var(--manila) var(--grain); border-radius: 4px 12px 6px 6px; box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; }
.dossier::before { content: attr(data-tab); position: absolute; left: 18px; top: -24px; height: 26px; padding: 6px 16px 0; background: inherit; border-radius: 8px 8px 0 0; font: 700 .7rem/1 var(--type); letter-spacing: .16em; color: var(--ink-2); }
.dossier .photo { transform: rotate(-1deg); margin-bottom: 22px; }
.dossier h3 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin: 6px 0 10px; }
.dossier p { color: var(--ink-2); }
.dossier .price-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; border-top: 1px dashed rgba(31, 22, 17, .3); }
.price { font: 800 2.2rem/1 var(--display); }
.price small { font: 400 .85rem var(--body); color: var(--ink-3); margin-left: 6px; }

.dossier.soon { background-color: var(--paper-2); min-height: 260px; justify-content: flex-end; overflow: hidden; }
.dossier.soon .city { font: italic 900 clamp(2.6rem, 6vw, 3.6rem)/.95 var(--display); color: var(--ink); opacity: .9; }
.dossier.soon .stamp { position: static; align-self: flex-start; margin: 4px 0 14px; transform: rotate(-6deg); color: var(--ink-2); font-size: .85rem; }
.skyline { position: absolute; inset: 22px 18px auto auto; width: 50%; opacity: .12; }
.dossier.soon .stamp + .label { margin-top: 6px; }

.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; padding: 0; list-style: none; }
.facts li { font: 700 .78rem/1 var(--type); letter-spacing: .06em; padding: 7px 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: rgba(255, 255, 255, .35); }

/* ---------- Inside a case ---------- */

.inside { display: grid; gap: 40px; }
@media (min-width: 900px) { .inside { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.feature-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; }
.feature-list .ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--mustard); font-size: 1.15rem; }
.feature-list strong { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 700; margin-bottom: 2px; }
.feature-list p { margin: 0; color: var(--ink-2); }

.lineup { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 14px; }
.suspect { text-align: center; }
.suspect img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper-2); filter: sepia(.15); transition: filter .2s, transform .2s; }
.suspect:hover img { filter: none; transform: rotate(-3deg) scale(1.03); }
.suspect b { display: block; font-family: var(--display); font-size: 1rem; line-height: 1.15; margin-top: 8px; }
.suspect span { font: 700 .68rem/1.2 var(--type); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.lineup-board { background: var(--paper-2) var(--grain); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 24px 20px; position: relative; }
.lineup-board .stamp { position: absolute; top: -16px; right: 16px; font-size: .85rem; background: var(--paper); transform: rotate(4deg); }

/* ---------- Code box, buy box ---------- */

.dark { background: var(--ink) var(--grain); color: var(--paper); }
.dark .label { color: var(--mustard); }
.dark .lede, .dark p { color: #d9cbb3; }
.dark .btn { --b: var(--mustard); color: var(--ink); border-color: var(--mustard); box-shadow: 4px 4px 0 #000; }

.code-form { display: flex; flex-wrap: wrap; gap: 12px; max-width: 560px; }
.code-input {
  flex: 1 1 260px; min-height: 56px; padding: 0 18px;
  border: 2px dashed currentColor; border-radius: 10px; background: transparent; color: inherit;
  font: 700 1.2rem/1 var(--type); letter-spacing: .12em; text-transform: uppercase;
}
.code-input::placeholder { color: inherit; opacity: .45; }
.code-input:focus { outline: none; border-style: solid; border-color: var(--mustard); }
.form-msg { flex-basis: 100%; min-height: 1.4em; margin: 2px 0 0; font-weight: 600; }
.form-msg.bad { color: #ff9d83; }
.light-msg.bad { color: var(--red-dark); }

.buy-box { background: #fffaf0; border: 2px solid var(--ink); border-radius: 14px; padding: 26px 22px; box-shadow: 8px 8px 0 var(--ink); position: relative; }
.buy-box .price { font-size: 3rem; }
.buy-box ul { padding-left: 1.1em; margin: 14px 0 18px; color: var(--ink-2); }
.buy-box li { margin: 4px 0; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: .88rem; color: var(--ink-2); margin: 16px 0; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--red); }
.pay-note { text-align: center; margin: 14px 0 0; font-size: .85rem; color: var(--ink-3); }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font: 700 1.2rem/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 14px; font: 400 1.8rem/1 var(--display); color: var(--red); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 0 0 20px; max-width: 46em; }

/* ---------- Case page ---------- */

.case-hero { padding: 40px 0 56px; }
.case-hero .wrap { display: grid; gap: 40px; }
@media (min-width: 960px) { .case-hero .wrap { grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: start; } .buy-col { position: sticky; top: 92px; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 26px 0; }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats div { background: var(--paper); padding: 14px 16px; }
.stats b { display: block; font: 800 1.6rem/1.1 var(--display); }
.stats span { font: 700 .7rem/1 var(--type); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.route-line { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .98rem; }
.route-line dt { font: 700 .75rem/1.9 var(--type); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.route-line dd { margin: 0; }
.prose p { font-size: 1.12rem; color: var(--ink-2); max-width: 38em; }
.prose p:first-of-type::first-letter { float: left; font: 900 4.2rem/.8 var(--display); color: var(--red); margin: 8px 10px 0 0; }

/* ---------- Ticket page ---------- */

.ticket {
  max-width: 560px; margin: 0 auto; background: #fffaf0; border: 2px solid var(--ink); border-radius: 16px;
  box-shadow: 8px 8px 0 var(--ink); position: relative; overflow: hidden;
}
.ticket-top { padding: 28px 24px 22px; border-bottom: 2px dashed var(--ink); position: relative; }
.ticket-top::before, .ticket-top::after { content: ''; position: absolute; bottom: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.ticket-top::before { left: -15px; } .ticket-top::after { right: -15px; }
.ticket-code { font: 700 clamp(1.45rem, 6.4vw, 2.1rem)/1.2 var(--type); letter-spacing: .08em; margin: 10px 0 4px; word-break: break-all; user-select: all; }
.ticket-body { padding: 24px; }
.ticket-body .btn { margin-bottom: 12px; }
.ticket .stamp { top: 22px; right: 18px; font-size: .9rem; color: var(--ok); }
.spinner { width: 34px; height: 34px; border: 4px solid var(--paper-3); border-top-color: var(--red); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 10px 0 18px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Legal ---------- */

.legal { max-width: 760px; }
.legal h2 { font-size: 2rem; margin-top: 1.6em; scroll-margin-top: 90px; }
.legal h3 { font-size: 1.2rem; margin-top: 1.4em; }
.legal p, .legal li { color: var(--ink-2); }
.todo { background: #fff1b8; padding: 0 4px; border-radius: 3px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink) var(--grain); color: #cbbca4; padding: 48px 0 40px; font-size: .92rem; }
.site-footer .wrap { display: grid; gap: 26px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { color: var(--mustard); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { color: var(--paper); margin-bottom: 12px; }
.site-footer .brand-name small { color: #a8977e; }
.footer-base { grid-column: 1 / -1; border-top: 1px solid rgba(244, 234, 214, .14); padding-top: 18px; font-size: .82rem; color: #a8977e; }
