/* Spellbury website: the same colours and feel as the app. */
:root {
  --bg: #FFF7E8;
  --surface: #FFFFFF;
  --sunk: #F4EBDA;
  --border: #E8DCC6;
  --shelf: #E3D6BF;
  --text: #1F2A44;
  --muted: #5E6577;
  --accent: #0F766E;
  --accent-dark: #0A524C;
  --accent-soft: #D7F0EC;
  --go: #15803D;
  --go-soft: #DCFCE7;
  --danger: #B42318;
  --danger-soft: #FDE8E6;
  --star: #F5B700;
  --spell: #2054C8;
  --letters: #4D7C0F;
  --scramble: #B8336A;
  --search: #A15C07;
  --test: #6D3FC0;
  --icecream: #7B4B2A;
  --radius: 24px;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 18px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

/* Header */
.site-head { padding-block: 18px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 24px; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 3px 0 var(--shelf); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 700; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a:focus-visible { background: var(--surface); color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 999px; border: 0;
  font: 800 19px var(--font); text-decoration: none; cursor: pointer;
  background: var(--accent); color: #fff; box-shadow: 0 6px 0 var(--accent-dark);
  transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-dark); }
.btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
.btn.quiet { background: var(--surface); color: var(--text); box-shadow: 0 6px 0 var(--shelf), inset 0 0 0 2px var(--border); }
.btn.quiet:active { box-shadow: 0 2px 0 var(--shelf), inset 0 0 0 2px var(--border); }
.btn.go { background: var(--go); box-shadow: 0 6px 0 #0E5A2B; }
.btn.small { min-height: 46px; padding: 0 20px; font-size: 17px; }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: 0 6px 0 var(--shelf), 0 14px 28px rgba(31,42,68,.06); }
.muted { color: var(--muted); }
.caps { text-transform: uppercase; letter-spacing: .08em; font-size: 14px; font-weight: 800; }

/* Small screens: keep the header on one line */
@media (max-width: 520px) {
  .site-head .wrap { flex-wrap: nowrap; }
  .brand { font-size: 21px; gap: 10px; }
  .brand img { width: 38px; height: 38px; }
  .nav { gap: 0; flex-wrap: nowrap; }
  .nav a { padding: 8px 8px; font-size: 16px; white-space: nowrap; }
  .nav a[href="/privacy/"] { display: none; }
}

/* Footer */
.site-foot { padding-block: 40px 56px; color: var(--muted); font-size: 16px; }
.site-foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Plain text pages (support, privacy) */
.page { max-width: 760px; margin: 0 auto; padding: 24px 20px 40px; }
.page h1 { font-size: clamp(34px, 6vw, 46px); margin: 8px 0 8px; }
.page h2 { font-size: 22px; margin: 34px 0 10px; }
.page p, .page li { max-width: 68ch; }
.contact { background: var(--accent-soft); border-radius: 20px; padding: 18px 22px; margin: 24px 0; }
.contact p { margin: 0 0 12px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0; margin: 10px 0; }
summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-radius: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 3px solid var(--muted); border-bottom: 3px solid var(--muted); transform: translateY(-3px) rotate(45deg); transition: transform .15s ease-out; }
details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
summary:hover { background: var(--bg); }
details p { margin: 0; padding: 0 20px 16px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
