/* Plushie base: fonts, tokens, reset, type, buttons, header, footer, consent.
   Page-specific styles live in home.css and page.css. layout-defence.css is linked last. */

@font-face { font-family: "Pally"; src: url("/fonts/pally-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Pally"; src: url("/fonts/pally-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/fonts/satoshi-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/fonts/satoshi-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Pally Fallback"; src: local("Arial Rounded MT Bold"), local("Arial"); size-adjust: 104%; ascent-override: 92%; }
@font-face { font-family: "Satoshi Fallback"; src: local("Arial"); size-adjust: 100%; ascent-override: 98%; }

:root {
  --cream: #fbf7f0;
  --oat: #f3ebdf;
  --sand: #e6dccb;
  --ink: #151935;
  --night: #11152e;
  --night-2: #1c2247;
  --muted: #555a75;
  --muted-on-night: #b9bdd6;
  --butter: #ffcf5c;
  --butter-deep: #f2b93b;
  --sky: #dce8f7;
  --blush: #f09ab5;
  --white: #ffffff;
  --ok: #2f7d57;
  --error: #b3261e;

  --font-display: "Pally", "Pally Fallback", ui-rounded, system-ui, sans-serif;
  --font-body: "Satoshi", "Satoshi Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: 20px;
  --radius: 24px;
  --radius-sm: 14px;
  --pill: 999px;
  --section: 80px;
  --shadow: 0 1px 2px rgba(21, 25, 53, .06), 0 12px 32px -12px rgba(21, 25, 53, .18);
}
@media (min-width: 768px) { :root { --gutter: 32px; --section: 112px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--cream); scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; font-weight: 400; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 4.2vw + 1rem, 4rem); }
h2 { font-size: clamp(2rem, 2.6vw + 1rem, 3rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 50; background: var(--butter); color: var(--ink); padding: 8px 16px; border-radius: var(--pill); font-weight: 700; }
.skip:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--butter-deep); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 28px; border: 0; border-radius: var(--pill); background: var(--butter); color: var(--ink); font-family: var(--font-body); font-weight: 700; font-size: 1rem; text-align: start; text-decoration: none; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(21, 25, 53, .12); transition: transform .15s ease, background-color .15s ease; }
.btn:hover { background: var(--butter); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: .9375rem; }
.btn-lg { min-height: 60px; padding: 0 36px; font-size: 1.0625rem; }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }

/* Announcement bar */
.announce { background: var(--night); color: var(--cream); font-size: .8125rem; font-weight: 500; letter-spacing: .02em; }
.announce { padding: 0 var(--gutter); }
.announce p { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 40px; padding: 8px 0; text-align: center; }
.announce .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--butter); flex: none; }
@media (max-width: 599px) { .hide-sm { display: none; } }

/* Header */
.site-header { background: var(--cream); border-bottom: 1px solid var(--sand); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.logo-mark { width: 32px; height: 32px; flex: none; }
.logo-head { fill: var(--blush); }
.logo-word { font-family: var(--font-display); font-weight: 700; font-size: 1.625rem; letter-spacing: -0.02em; line-height: 1; }
.header-nav { display: none; gap: 32px; font-weight: 500; }
.header-nav a { text-decoration: none; color: var(--muted); }
.header-nav a:hover { color: var(--ink); }
@media (min-width: 768px) { .header-nav { display: flex; } }

/* Footer */
.site-footer { background: var(--night); color: var(--muted-on-night); padding: 56px 0; font-size: .9375rem; }
.site-footer a { color: var(--cream); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }
.footer-brand p { margin-top: 16px; max-width: 32ch; }
.logo-light { color: var(--cream); }
.footer-h { font-family: var(--font-body); font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cream); margin-bottom: 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-pay p { max-width: 36ch; }
.pay-icons { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pay-icons svg { display: block; width: 46px; height: 30px; }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 8px; font-size: .8125rem; }

/* Cookie consent */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 560px; margin: 0 auto; background: var(--night); color: var(--cream); border-radius: var(--radius-sm); padding: 20px; box-shadow: var(--shadow); display: grid; gap: 16px; font-size: .9375rem; }
.consent[hidden] { display: none; }
.consent a { color: var(--butter); }
.consent-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.consent .btn-ghost { color: var(--cream); }

/* Layout gate: balanced body copy (beats the defence file's "pretty" on specificity),
   centred blocks really centred, 44px tap targets. */
body p, body li, body dd, body summary { text-wrap: balance; }
.announce p { max-inline-size: none; }
.skip, .logo { min-height: 44px; }
body th { text-wrap: balance; }

/* Room under the footer for the sticky buy bar (home page, phones and tablets) */
@media (max-width: 959px) { body.home::after { content: ""; display: block; height: 72px; background: var(--night); } }

/* layout-defence.css stretches anything whose class contains "row", "grid" or "cards".
   These scoped rules win on specificity and put back the intended alignment. */
.site-header .header-row { align-items: center; }
