/* Hearthling website: one stylesheet for every page (home, support, terms, privacy, beta, 404 and the guides).
   Colours and type match the app (index.html) and the brand kit. Each page keeps only its own layout rules.
   build:web copies this file to www/, so it is also there for the Terms and Privacy pages inside the iPhone app. */

@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url("/fonts/playfair-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url("/fonts/playfair-display-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light dark;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --bg:#f5f0e8; --card:#ffffff; --ink:#2c2416; --ink-2:#5a4a35; --accent:#805f14;
  --gold:#d4a854; --line:#d4c5a9; --line-2:#ede5d5; --tint:rgba(212,168,84,.12);
  --dark:#2c2416; --on-dark:#f2ebdf; --on-dark-2:#d8ccb6;
  --bad:#a8352a; --ok:#3f6b48;
  --read: 720px; --wide: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#191510; --card:#231d15; --ink:#f2ebdf; --ink-2:#ddd2be; --accent:#e6bd6a;
    --line:#3d3324; --line-2:#332a1e; --tint:rgba(230,189,106,.10); --dark:#0f0c08; --bad:#f0897b; --ok:#86c08e; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; background:var(--bg); color:var(--ink); font:16px/1.65 var(--font-ui); }
a { color:var(--accent); }
h1 { font-family: var(--font-display); font-weight:700; letter-spacing:-0.5px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 22px; }
.wrap.read, main.read { max-width: var(--read); margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* ── header: the walnut bar with the gold wordmark, the same on every page ── */
header.top { background:var(--dark); color:var(--on-dark); }
.nav { display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 8px 0; }
.brand { font-family: var(--font-display); font-weight:700; font-size:1.5rem; color:var(--gold); text-decoration:none; letter-spacing:-0.5px; padding: 8px 0; }
.nav .links { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:0 20px; }
.nav a.link { color:var(--on-dark); text-decoration:none; font-size:0.95rem; opacity:.88; padding: 12px 0; white-space:nowrap; }
.nav a.link:hover { opacity:1; }
header.top a:focus-visible { outline-color: var(--gold); }
@media (max-width: 420px) { .nav .links { gap:0 14px; } .brand { font-size:1.35rem; } }

/* ── footer: wraps on a phone, 48px-tall links ── */
footer.site { border-top:1px solid var(--line); margin-top:48px; padding: 20px 0 40px; color:var(--ink-2); font-size:0.92rem; }
footer.site .row { display:flex; flex-wrap:wrap; gap:4px 24px; justify-content:space-between; align-items:center; }
footer.site .row > div { min-width:0; }
footer.site .links { display:flex; flex-wrap:wrap; gap:0 18px; }
footer.site .links a { padding:12px 0; white-space:nowrap; }

/* ── buttons ── */
.btn { display:inline-block; padding:13px 22px; border-radius:12px; font-weight:700; text-decoration:none; font-size:1rem; text-align:center; }
.btn.gold { background:var(--gold); color:#2c2416; }
.btn.ghost { border:1.5px solid var(--line); color:var(--ink); background:var(--card); }
.on-dark .btn.ghost, header.top .btn.ghost { border-color: rgba(242,235,223,.5); color:var(--on-dark); background:transparent; }

/* ── cards and callouts: a full 1px border, no coloured edge stripe ── */
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; }
.callout, .note { background:var(--tint); border:1px solid var(--line); border-radius:14px; padding:14px 16px; color:var(--ink); }
.callout.icon { display:flex; gap:12px; align-items:flex-start; }
.callout.icon > svg { flex:none; margin-top:2px; color:var(--accent); }
.callout.icon p { margin:0; color:var(--ink); }

/* small outline icons from the app's set, in a soft tile */
.ico { width:44px; height:44px; border-radius:12px; background:var(--tint); border:1px solid var(--line-2); color:var(--accent);
  display:flex; align-items:center; justify-content:center; margin-bottom:12px; }
