/* Book Box website: shared styles for the landing, support and 404 pages. */

:root {
  --bg: #f7f2e9;
  --bg-2: #efe7da;
  --card: #fffcf8;
  --ink: #1a1613;
  --ink-2: #4a423b;
  --muted: #7a6f64;
  --rule: #e2d8c9;
  --accent: #c85627;
  --accent-2: #e08a5c;
  --accent-ink: #ba4a1c;
  --accent-soft: #f6dccd;
  --night: #161412;
  --night-2: #221f1b;
  --night-ink: #f7f3ee;
  --night-muted: #b3a89c;
  --shadow: 0 1px 2px rgba(40, 28, 16, .06), 0 12px 32px -12px rgba(40, 28, 16, .18);
  --shadow-lg: 0 2px 6px rgba(40, 28, 16, .06), 0 40px 80px -28px rgba(40, 28, 16, .35);
  --radius: 22px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120f;
    --bg-2: #1c1916;
    --card: #221f1b;
    --ink: #f7f3ee;
    --ink-2: #d9d0c6;
    --muted: #a3988c;
    --rule: #332c25;
    --accent: #ff9f66;
    --accent-2: #ffc299;
    --accent-ink: #ffa873;
    --accent-soft: #3a261a;
    --night: #0c0b0a;
    --night-2: #1a1714;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 40px 80px -28px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-color: var(--rule); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 19px/1 var(--serif); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 16px/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--ink); color: var(--bg);
  box-shadow: 0 10px 24px -10px rgba(26, 22, 19, .5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(26, 22, 19, .55); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Footer ---------- */
.footer { background: var(--night); color: var(--night-muted); padding: 56px 0 40px; font-size: 15px; }
.footer .wrap { display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr 1fr; }
.footer .brand { color: var(--night-ink); margin-bottom: 12px; }
.footer h4 { color: var(--night-ink); font: 600 14px/1 var(--sans); margin: 4px 0 14px; letter-spacing: .02em; }
.footer a { color: var(--night-muted); text-decoration: none; display: block; padding: 4px 0; }
.footer a:hover { color: var(--night-ink); }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid #2a2622; padding-top: 24px; font-size: 13px; }
@media (max-width: 700px) { .footer .wrap { grid-template-columns: 1fr 1fr; } .footer .about { grid-column: 1 / -1; } }
.footer .brand img { box-shadow: 0 0 0 1px #342e28; }
