/*
 * Uličník — web
 *
 * Palette and type are the app's own tokens (src/theme.ts, src/tokens.ts), so the site and the app
 * read as one thing. The previous page used the retired cream palette, which stopped matching the app
 * when the plate redesign landed.
 *
 * Body text is a step larger than the app's 15pt: a phone is held at arm's length and a browser is
 * further away, and the app's scale was measured for the former.
 */

:root {
  --bg: #FBFAFF;
  --surface: #FFFFFF;
  --surface2: #EFEDF8;
  --ink: #1E1140;
  --ink-soft: #4A4270;
  --ink-faint: #6F6796;
  --line: #DAD5EE;
  --navy: #33009F;
  --red: #F01F26;
  --skyline: url("skyline-navy.png");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0A22;
    --surface: #171034;
    --surface2: #1D1540;
    --ink: #F2F0FA;
    --ink-soft: #B7B1D4;
    --ink-faint: #8A83AE;
    --line: #2A2154;
    /* Navy carries letters here, so it lightens; red never moves. */
    --navy: #9B86FF;
    --skyline: url("skyline-violet.png");
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.62;
  /* The riverfront closes the page, as it closes a short screen in the app. Fixed to the bottom of
     the document rather than the viewport, so it is a footer and not a watermark over the text. */
  background-image: var(--skyline);
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: min(1100px, 100%) auto;
  background-attachment: scroll;
}

/* A white sheet over the skyline: the drawing must sit behind empty space, never under prose. */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 44px 0 320px;
}

.plate {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 0 28px;
}

nav {
  display: flex;
  gap: 8px;
  margin: 0 0 36px;
  padding: 4px;
  background: var(--surface2);
  border-radius: 10px;
  width: fit-content;
}
nav a {
  display: block;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
}
nav a[aria-current="page"] { background: var(--navy); color: #FFFFFF; }

h1 { font-size: 28px; line-height: 1.24; letter-spacing: -0.01em; margin: 0 0 8px; }
.updated { color: var(--ink-faint); font-size: 14px; margin: 0 0 34px; }

h2 {
  font-size: 12.5px;
  line-height: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 40px 0 10px;
}

p { margin: 0 0 15px; color: var(--ink-soft); }
p.lede { font-size: 19px; line-height: 1.55; color: var(--ink); margin-bottom: 28px; }
strong { color: var(--ink); font-weight: 600; }

ul { margin: 0 0 15px; padding-left: 22px; color: var(--ink-soft); }
li { margin-bottom: 8px; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* One accent, used where the app uses it: a red rule beside something that matters. */
.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  padding: 18px 20px;
  border-radius: 10px;
  margin: 0 0 30px;
}
.callout p:last-child { margin-bottom: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 15px;
}
.card p:last-child { margin-bottom: 0; }

footer {
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 14px;
}
footer p { color: var(--ink-faint); }
footer a { color: var(--ink-faint); }

/*
 * The author's own voice — the origin story and the beer ask — as one raised panel.
 *
 * Everything else on this page is description or attribution; this is the one place a person is
 * speaking. A navy left rule rather than the red one `.callout` uses, because red is the accent that
 * means "read this" and this is not a warning, just a different voice.
 */
.author {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  border-radius: 12px;
  padding: 26px 28px 24px;
  margin: 0 0 34px;
}
.author h2:first-child { margin-top: 0; }
.author p:last-child { margin-bottom: 0; }

/*
 * The two ways to send a beer: Revolut and a bank transfer, as two matching panels rather than
 * one row of loose parts. Each panel is one route, and carries its own QR above its own
 * scannable-by-hand detail — the handle or the account number. The earlier single-row version
 * put a button, a sentence and a QR side by side, which read as three unrelated options.
 *
 * Panels sit side by side on a wide screen and stack on a phone.
 */
.pay { display: flex; flex-wrap: wrap; gap: 16px; margin: 20px 0 0; }
.way {
  flex: 1 1 210px;
  background: var(--surface2);
  border-radius: 12px;
  padding: 18px 18px 20px;
  text-align: center;
  /* Centred rather than top-aligned so the panels stay balanced while one of them is still
     waiting for its QR and is therefore much shorter than the other. */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.way h3 {
  font-size: 12.5px; line-height: 17px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--navy); margin: 0 0 14px;
}
/*
 * No background is imposed here. Each code carries its own quiet zone in its own colour — the
 * bank's is black on white, Revolut's is the reverse, white dots on near-black with their logo
 * over the centre. Forcing white behind both would frame the Revolut tile in a white border it
 * was never drawn with. Nothing here is theme-dependent, which is what matters: a QR whose
 * colours get flipped by dark mode may not scan.
 */
.way .qr {
  display: block; width: 100%; max-width: 152px; height: auto;
  margin: 0 auto 14px; border-radius: 10px;
}
.way .acct { margin: 0; font-size: 14px; color: var(--ink-faint); }
.way .acct code {
  display: inline-block; margin-top: 5px; background: var(--surface); border-radius: 5px;
  padding: 3px 9px; font-size: 15.5px; color: var(--ink);
}
.way .btn { margin-top: 2px; }
.btn {
  display: inline-block; background: var(--navy); color: #fff; text-decoration: none;
  font-weight: 600; padding: 11px 20px; border-radius: 10px; font-size: 15px;
}

/* Deliberately loud, so it cannot ship by accident. Delete the block, not just the styling. */
.todo {
  background: #FFF3B0;
  border: 2px dashed #B31217;
  color: #241f1a;
  padding: 18px 20px;
  border-radius: 10px;
  margin: 0 0 30px;
}
.todo p { color: #241f1a; }
.todo strong { color: #B31217; }

/* Stažení. Odznak má kolem sebe povinný volný prostor (10 % výšky), takže margin je
   pravidlo, ne vkus. Poměr stran se nemění — proto width i height v HTML. */
.get {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 30px 0 6px;
}
.badge {
  display: inline-block;
  margin: 6px 0;
  line-height: 0;
  border-radius: 9px;
}
/* Výška se zadává, šířka se dopočítá z viewBoxu (119.66 : 40). Kdyby se zadalo obojí
   natvrdo, odznak by se o zlomek procenta roztáhl — a to je „změna", kterou Applova
   pravidla zakazují. Takhle poměr nemůže ujet. */
.badge img { display: block; height: 58px; width: auto; }
.badge:focus-visible { outline: 3px solid #F01F26; outline-offset: 3px; }
.get-note { font-size: 0.9rem; opacity: 0.72; }

/* Podpis pod prosbou o pivo. Byl to inline style="margin-top:20px" — a netlify.toml teď posílá
   CSP se style-src 'self', která inline styly blokuje, takže by ten odsazený řádek tiše přilnul
   k QR kódům nad ním. Radši třída než 'unsafe-inline' v hlavičce. */
.author .signoff { margin-top: 20px; }
