/* Keepsake brand layer for the December games (Kind Notes, Roast Me, the
   group quiz, Secret Santa). Load it LAST, after the game's own stylesheet.
   It puts the games back on the site's own system:
     - Cabin for text, Ubuntu for headings and the logo
     - Mynerve, the homepage's handwriting ("Love, preserved."), for the
       accent word and anything written by hand
     - brand red #d70913 on the site's deep #071013
     - flat buttons with small corners, like the rest of the site
   The games keep their own props and motion; only the type, colour and
   shapes come from here. */
:root {
  --red: #d70913; --red-bright: #e3141d; --red-deep: #8a060c; --red-d: #8a060c;
  --ink: #071013; --night: #071013; --night-2: #0d161a; --night-3: #142027; --club: #071013;
  --edge: rgba(255,255,255,.1); --text: #f0ece6; --soft: #8b949e;
  --cream: #f5f0eb;
  --sans: "Cabin", system-ui, sans-serif;
  --head: "Ubuntu", system-ui, sans-serif;
  --serif: "Mynerve", cursive;
  --hand: "Mynerve", cursive;
  --marker: "Mynerve", cursive;
  --mono: "Ubuntu", system-ui, sans-serif;
}

/* Logo: the navbar's KEEPSAKE */
.logo { font-family: var(--head); font-weight: 700; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; }

/* Small labels: the site's red eyebrow (Games page, homepage hero) */
.mono { font-family: var(--head); font-weight: 700; font-size: 11px; letter-spacing: .28em; }

/* Headings: Ubuntu, regular tracking, with a handwritten accent word */
.big, h1, h2, h3 { font-family: var(--head); }
.big { font-weight: 500; letter-spacing: -.02em; line-height: 1.04; }
h2, h3 { font-weight: 500; letter-spacing: 0; }
.serif { font-family: var(--serif); font-style: normal; font-weight: 400; letter-spacing: 0; }
.big .serif { color: var(--red); font-size: 1.06em; }

/* Buttons: flat with small corners. !important because each game sets a
   pressed-down 3D shadow at different specificities. */
.btn { border-radius: 8px !important; font-weight: 600; box-shadow: none !important; transition: transform .2s, box-shadow .2s, background .2s, opacity .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(215,9,19,.65) !important; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, .linkbtn:focus-visible { outline: 2px solid var(--red) !important; outline-offset: 3px; }
.chip { font-weight: 600; }

/* Landing pages show the site navbar (navbar.js); push content below it */
body.has-nav .screen { padding-top: 88px; }
/* (the December bar already adds 36px to body) */
[hidden]#navbar, [hidden].ksd-bar, [hidden].ksd-bar__x { display: none !important; }
body.has-nav .screen > .top { display: none; }

/* The navbar reads the site's variable names; give it the site's values
   without touching the game's own variables. The games have one theme, so
   the light/dark toggle is hidden here. */
#navbar { --brand: #d70913; --text: #f0ece6; --muted: #8b949e; --border: rgba(255,255,255,.06); --bg: #071013; font-family: var(--sans); }
body.has-nav #theme-toggle { display: none; }

/* ── Landing pages: responsive layout ──
   Phones: one column. Text reads from the left; the picture (post-it notes,
   cue cards, gift tag, quiz cards) sits centred between the text and the form.
   Desktop (900px+): two columns, like the homepage and Games page. Text and
   the form on the left, the picture on the right, staying in view while you
   scroll the form. No HTML changes: .hero uses display: contents so its
   children join the page grid. */
.floaters, .bill, .peek { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }

@media (min-width: 900px) {
  body.has-nav .screen {
    max-width: 1160px; padding-left: 40px; padding-right: 40px;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 72px;
    align-content: start; grid-auto-flow: row dense;
  }
  body.has-nav .hero { display: contents; }
  body.has-nav .screen > *, body.has-nav .hero > * { grid-column: 1; }
  body.has-nav .floaters, body.has-nav .bill, body.has-nav .hero-tag, body.has-nav .peek {
    grid-column: 2; grid-row: 1 / span 6; align-self: start;
    position: sticky; top: 150px; width: 100%; max-width: 480px; margin: 40px auto 0;
  }
  body.has-nav .floaters { height: 360px; }
  body.has-nav .floaters .note p { font-size: 22px; }
  body.has-nav .floaters .f2 { top: 110px; } body.has-nav .floaters .f3 { top: 220px; }
  body.has-nav .floaters .seal { top: 200px; }
  body.has-nav .bill { height: 330px; }
  body.has-nav .peek { height: 260px; }
  body.has-nav .hero-tag { height: 520px; }
  body.has-nav .start, body.has-nav #mHelloForm { margin-top: 28px; }
  body.has-nav .pin { display: none; }
}

/* Quiz front page: extra cards only on desktop, so the right column is full */
.peek__opts, .peek__board { display: none; }
@media (min-width: 900px) {
  body.has-nav .peek { height: 560px; max-width: 520px; margin-top: 10px; }
  body.has-nav .peek__q { left: 0; right: 8%; top: 0; padding: 22px; }
  body.has-nav .peek__q b { font-size: 26px; }
  body.has-nav .peek__q span { font-size: 16px; padding: 8px 12px; }
  body.has-nav .peek__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; font-style: normal; }
  body.has-nav .peek__opts em { font-style: normal; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line); color: var(--muted); }
  body.has-nav .peek__q span { margin-right: 8px; }
  body.has-nav .peek__score { top: 250px; right: 0; width: 44%; padding: 22px 14px; z-index: 2; }
  body.has-nav .peek__score b { font-size: 60px; }
  body.has-nav .peek__board { display: block; left: 0; top: 300px; width: 58%; background: #fff; border: 2px solid var(--ink); transform: rotate(-1.5deg); padding: 16px 18px; }
  .peek__board small { display: block; margin-bottom: 8px; font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--red); }
  .peek__board p { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 16px; }
  .peek__board p b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 12px; }
  .peek__board p:nth-of-type(1) b { background: var(--gold); color: var(--ink); }
  .peek__board p span { margin-left: auto; font-family: var(--head); font-weight: 500; }
  .peek__board p.is-low { color: var(--muted); }

  /* Roast Me: bigger cards, stamp sitting fully on the cue card */
  body.has-nav .bill { height: 470px; max-width: 520px; margin-top: 10px; }
  body.has-nav .bill .cue { right: 0; padding: 18px 22px 20px; }
  body.has-nav .bill .cue::before { top: 44px; height: 3px; opacity: 1; }
  body.has-nav .bill .cue__label, body.has-nav .bill .toastcard__label { font-size: 13px; }
  body.has-nav .bill .cue__text { font-size: 28px; line-height: 38px; margin-top: 16px; padding-bottom: 54px; }
  body.has-nav .bill .r-stamp { top: 150px; left: 64%; font-size: 26px; padding: 6px 14px; border-width: 4px; background: rgba(247,241,230,.92); }
  body.has-nav .bill .toastcard { left: 10%; right: 0; top: 278px; padding: 16px 22px 18px; }
  body.has-nav .bill .toastcard__text { font-size: 26px; line-height: 1.3; }
}

/* Roast Me stamp on phones: keep it on the card, solid enough to read */
.bill .r-stamp { background: rgba(247,241,230,.92); color: var(--red); border-color: var(--red); }
