/* ==========================================================================
   partyquestions.app
   Flat colour, no gradients, no decoration without a job. Each game is a
   deck with one colour; the top of a game page is a dark "table" with that
   deck's card on it. Reading parts (home, lists, rules) are light paper,
   and follow the phone's dark mode.
   ========================================================================== */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal; font-weight: 800; font-display: swap;
  src: url('/fonts/bricolage-800.woff2') format('woff2');
}

:root {
  --paper: #FAF7F2;
  --paper-2: #F1ECE4;
  --surface: #FFFFFF;
  --ink: #16131F;
  --ink-2: #5D5869;
  --line: rgba(22, 19, 31, .12);

  --table: #13101B;
  --table-2: #221E2D;
  --on-table: #F4F1FA;
  --on-table-2: #A7A1B6;

  --pink: #FF4F8B;
  --blue: #5B86FF;
  --coral: #FF6247;
  --yellow: #FFCF3A;
  --green: #2AD891;
  --violet: #A07BFF;
  --c: var(--pink);

  --display: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --r: 22px;
  --wrap: 40rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17141F;
    --paper-2: #221E2D;
    --surface: #1E1A28;
    --ink: #F4F1FA;
    --ink-2: #A7A1B6;
    --line: rgba(244, 241, 250, .12);
    color-scheme: dark;
  }
}

.c-pink { --c: var(--pink); }
.c-blue { --c: var(--blue); }
.c-coral { --c: var(--coral); }
.c-yellow { --c: var(--yellow); }
.c-green { --c: var(--green); }
.c-violet { --c: var(--violet); }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; border-radius: 6px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.15rem; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font: 800 1.08rem/1 var(--display); letter-spacing: -.01em; }
.logo small { font: inherit; color: var(--ink-2); }
.mark { --face: var(--ink); width: 1.75rem; height: 1.75rem; color: var(--yellow); display: grid; place-items: center; position: relative; isolation: isolate; font: 800 1.05rem/1 var(--display); }
.mark::before, .mark::after { content: ""; position: absolute; inset: 0; border-radius: .55rem; z-index: -1; }
.mark::before { background: var(--pink); transform: rotate(-10deg) translate(-3px, 1px); }
.mark::after { background: var(--face); }

/* ---------- Light header (home, about, privacy) ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 3.6rem; }
.site-header nav a { font-weight: 600; font-size: .9rem; color: var(--ink-2); text-decoration: none; }

/* ---------- Home ---------- */
.hero { padding: 2.2rem 0 .5rem; }
.hero h1 { font: 800 clamp(2.2rem, 9vw, 3.4rem)/1 var(--display); letter-spacing: -.025em; max-width: 14ch; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--yellow) 62%); }
@media (prefers-color-scheme: dark) { .hero h1 em { background: none; color: var(--yellow); } }
.hero p { margin-top: .9rem; color: var(--ink-2); font-size: 1.05rem; max-width: 34ch; }

.tiles { list-style: none; display: grid; gap: .8rem; padding: 1.5rem 0 1rem; }
@media (min-width: 40rem) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { display: flex; flex-direction: column; height: 100%; background: var(--c); color: #16131F; border-radius: var(--r); padding: 1.05rem 1.05rem .9rem; text-decoration: none; transition: transform .12s ease; }
.tile:active { transform: scale(.98); }
.tile h2 { font: 800 1.5rem/1.05 var(--display); letter-spacing: -.01em; }
.tile .ex { margin-top: .55rem; font-weight: 600; font-size: .95rem; background: rgba(255, 255, 255, .55); border-radius: .8rem; padding: .55rem .7rem; flex: 1; }
.tile .meta { display: flex; justify-content: space-between; margin-top: .65rem; font-weight: 700; font-size: .82rem; }

.about-home { padding: 1rem 0 2.5rem; color: var(--ink-2); max-width: 36rem; }
.about-home h2 { font: 800 1.3rem/1.15 var(--display); color: var(--ink); margin-bottom: .4rem; }
.about-home p + p { margin-top: .6rem; }

/* ---------- Game: the dark top of every game page ---------- */
.game { background: var(--table); color: var(--on-table); min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.game-inner { width: 100%; max-width: 30rem; margin: 0 auto; padding: .8rem 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.game-bar { display: flex; align-items: center; justify-content: space-between; height: 2.6rem; }
.game-bar .logo small { color: var(--on-table-2); }
.game-bar .mark { --face: var(--on-table); color: var(--table); }
.game-bar a.all { font-weight: 600; font-size: .9rem; color: var(--on-table-2); text-decoration: none; white-space: nowrap; }
.game h1 { font: 800 1.35rem/1.1 var(--display); letter-spacing: -.01em; text-align: center; margin-top: 1.1rem; }

.levels { display: flex; gap: 2px; background: var(--table-2); border-radius: .8rem; padding: 3px; margin: .8rem auto 0; width: max-content; }
.levels button { font-weight: 700; font-size: .88rem; padding: .5rem .95rem; border-radius: .6rem; color: var(--on-table-2); }
.levels button[aria-pressed="true"] { background: var(--on-table); color: var(--table); }

.stage { flex: 1; display: grid; place-items: center; padding: 1.2rem .1rem .8rem; }
.deck { position: relative; width: 100%; }
.deck::before, .deck::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); background: var(--c); opacity: .35; transform: rotate(-3.5deg) translateY(6px); }
.deck::after { opacity: .18; transform: rotate(4.5deg) translateY(10px); }

.card {
  position: relative; z-index: 1; width: 100%; min-height: min(24rem, 58vh);
  display: flex; flex-direction: column; text-align: left;
  background: var(--c); color: #16131F; border-radius: var(--r);
  padding: 1.25rem 1.15rem 1rem;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  touch-action: pan-y; -webkit-tap-highlight-color: transparent;
}
.card .kick { display: block; font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
.card .q { display: block; flex: 1; margin-top: .85rem; font: 800 clamp(1.55rem, 7.2vw, 2rem)/1.12 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.card .q.long { font-size: clamp(1.3rem, 6vw, 1.65rem); }
.card .rule { display: block; margin-top: 1rem; font-weight: 700; font-size: .84rem; line-height: 1.3; background: rgba(255, 255, 255, .5); border-radius: .8rem; padding: .55rem .7rem; }
.card .tag { display: inline-block; background: #16131F; color: #fff; border-radius: .45rem; padding: .28rem .5rem; font-weight: 800; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; margin-right: .4rem; opacity: 1; }

/* Would You Rather */
.card .opts { flex: 1; display: flex; flex-direction: column; justify-content: center; margin-top: .9rem; }
.card .opt { display: block; background: rgba(255, 255, 255, .9); border-radius: 1rem; padding: .85rem .9rem; font: 800 clamp(1.2rem, 5.6vw, 1.45rem)/1.15 var(--display); letter-spacing: -.01em; }
.card .or { align-self: center; margin: -.45rem 0; position: relative; z-index: 1; background: #16131F; color: #fff; border-radius: 999px; font-weight: 800; font-size: .78rem; padding: .45rem .75rem; letter-spacing: .06em; }

/* Paranoia: face-down card */
.card.back { align-items: center; justify-content: center; text-align: center; background-color: var(--c); background-image: radial-gradient(rgba(255, 255, 255, .22) 2px, transparent 2.5px); background-size: 22px 22px; }
.card.back .big { font: 800 4.4rem/1 var(--display); background: rgba(255, 255, 255, .78); width: 7rem; height: 7rem; border-radius: 1.8rem; display: grid; place-items: center; transform: rotate(-6deg); }
.card.back .q { flex: 0; margin-top: 1.3rem; font-size: 1.45rem; }
.card.back .rule { background: none; padding: 0; margin-top: .4rem; }

.card.in { animation: deal .22s ease-out; }
.card.in-back { animation: deal-back .22s ease-out; }
@keyframes deal { from { transform: translateX(14%) rotate(3deg); opacity: 0; } }
@keyframes deal-back { from { transform: translateX(-14%) rotate(-3deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .card.in, .card.in-back { animation: none; } }

.under { min-height: 3.6rem; display: flex; flex-direction: column; justify-content: center; gap: .6rem; }
.tapnote { text-align: center; font-weight: 700; font-size: .84rem; color: var(--on-table-2); }
.tapnote b { color: var(--on-table); }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.btn { border-radius: 1rem; padding: .95rem .6rem; text-align: center; font: 800 1.15rem/1 var(--display); color: #16131F; background: var(--c); }
.btn.soft { background: var(--on-table); }
.btn.ghost { background: var(--table-2); color: var(--on-table); }
.btn:active { transform: scale(.98); }

.down { display: block; text-align: center; padding: .9rem 0 .2rem; font-weight: 700; font-size: .84rem; color: var(--on-table-2); text-decoration: none; }

/* ---------- Game: the reading part below ---------- */
.list { padding: 2rem 0 .5rem; }
.list > h2 { font: 800 1.7rem/1.1 var(--display); letter-spacing: -.015em; }
.list h3 { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; font: 800 1.12rem/1.2 var(--display); margin-top: 1.6rem; }
.list h3 small, .list summary small { font: 600 .78rem var(--body); color: var(--ink-2); white-space: nowrap; }
.list h4 { font: 800 .8rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 1rem; }
.list ol { list-style: none; counter-reset: q; margin-top: .4rem; }
.list li { counter-increment: q; display: flex; gap: .8rem; padding: .62rem 0; border-top: 1px solid var(--line); }
.list li::before { content: counter(q); flex: none; min-width: 1.5rem; font: 800 .88rem/1.65 var(--display); color: var(--ink-2); }
.list details { margin-top: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: .2rem 1rem; }
.list summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem 0; font: 800 1.12rem/1.2 var(--display); }
.list summary::-webkit-details-marker { display: none; }
.list summary .show { flex: none; font: 700 .82rem var(--body); background: var(--ink); color: var(--paper); border-radius: 999px; padding: .4rem .8rem; }
.list details[open] summary .show { display: none; }
.list details[open] { padding-bottom: .6rem; }

.how { padding: 1.6rem 0 .5rem; }
.how h2 { font: 800 1.45rem/1.1 var(--display); letter-spacing: -.01em; }
.how p { margin-top: .6rem; }
.how .drink { color: var(--ink-2); font-size: .94rem; }

.more { padding: 1.6rem 0 2rem; }
.more h2 { font: 800 1.25rem var(--display); }
.more ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-top: .7rem; }
.more a { display: block; height: 100%; background: var(--c); color: #16131F; border-radius: 1rem; padding: .85rem .8rem; font: 800 1.02rem/1.08 var(--display); text-decoration: none; }

/* ---------- Text pages ---------- */
.text { padding: 2rem 0 2.5rem; }
.text h1 { font: 800 2.1rem/1.05 var(--display); letter-spacing: -.02em; }
.text h2 { font: 800 1.2rem var(--display); margin-top: 1.5rem; }
.text p, .text ul { margin-top: .6rem; }
.text ul { padding-left: 1.2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 1.4rem 0 2.2rem; font-size: .88rem; color: var(--ink-2); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: .8rem; }
.site-footer a { text-decoration: none; font-weight: 600; }
.site-footer p + p { margin-top: .3rem; }
