﻿/* WAND â€” palette drawn from the book cover */
:root {
  --night: #1b1538;
  --night-deep: #120e27;
  --plum: #3a2a6b;
  --gold: #f2d491;
  --gold-strong: #e9bd5e;
  --rose: #e79ab8;
  --cream: #f6efe2;
  --ink: #2a2140;
  --text: #ece6f7;
  --muted: #b9afd6;
  --display: "Fondamento", "Palatino Linotype", Georgia, serif;
  --body: "Quicksand", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--night-deep);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 680px; }
.center { text-align: center; }
.section { padding: clamp(64px, 9vw, 112px) 0; }

/* Watercolour night backgrounds */
.night {
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(95, 62, 150, .45), transparent 70%),
    radial-gradient(50% 60% at 90% 80%, rgba(120, 60, 130, .30), transparent 70%),
    var(--night);
}
.night-deep { background: var(--night-deep); }
.parchment { background: var(--cream); color: var(--ink); }

/* Type */
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(3rem, 8vw, 5.25rem); color: #fff; }
h1 .small { font-size: .55em; display: inline-block; transform: translateY(-.1em); }
h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin-bottom: 20px; }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
p + p { margin-top: 1em; }
.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.parchment .eyebrow { color: #8a5a17; }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem var(--body); text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(180deg, var(--gold), var(--gold-strong)); color: var(--ink); box-shadow: 0 6px 24px rgba(242, 212, 145, .25); }
.btn-gold:hover { box-shadow: 0 8px 30px rgba(242, 212, 145, .45); }
.btn-ghost { border-color: rgba(242, 212, 145, .6); color: var(--gold); }
.btn-ghost:hover { background: rgba(242, 212, 145, .1); }
.btn-small { padding: 8px 18px; font-size: .9rem; }
.center .btn { margin-top: 28px; }
.text-link { display: inline-block; margin-top: 22px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 10px max(20px, calc((100% - 1080px) / 2));
  background: rgba(18, 14, 39, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(242, 212, 145, .15);
}
.wordmark {
  display: flex; align-items: center; gap: 8px;
  font: 400 1.5rem var(--display); letter-spacing: .12em; color: #fff; text-decoration: none;
}
.wordmark svg { width: 20px; height: 20px; fill: var(--gold); }
.site-header nav { display: flex; gap: 22px; margin-left: auto; }
.site-header nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-header nav a:hover { color: var(--gold); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 104px); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.subtitle { font-weight: 600; letter-spacing: .22em; text-transform: uppercase; margin-top: 14px; color: #fff; }
.lede { font-family: var(--display); font-style: italic; font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.45; color: var(--gold); margin-top: 28px; max-width: 30ch; }
.byline { margin-top: 22px; color: var(--muted); }
.byline strong { color: var(--text); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.actions .text-link { margin-top: 0; align-self: center; }
.hero-cover { justify-self: center; max-width: 380px; transform: rotate(2.5deg); transition: transform .3s; }
.hero-cover:hover { transform: rotate(0) scale(1.02); }
.hero-cover img {
  border-radius: 4px 10px 10px 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 60px rgba(0, 0, 0, .55), 0 0 90px rgba(242, 212, 145, .28);
}

/* Twinkling stars (filled in by JS) */
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars i {
  position: absolute; width: var(--s); height: var(--s); background: var(--gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  opacity: .15; animation: twinkle var(--d) ease-in-out var(--delay) infinite;
}
@keyframes twinkle { 50% { opacity: .9; transform: scale(1.25); } }

/* Counts */
.counts { border-block: 1px solid rgba(242, 212, 145, .15); padding: 30px 0; }
.counts ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.counts b { display: block; font: 400 clamp(2.2rem, 5vw, 3.2rem)/1 var(--display); color: var(--gold); }
.counts span { display: block; margin-top: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* The book */
.book-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.back-cover { max-width: 340px; justify-self: center; transform: rotate(-2deg); }
.back-cover img { border-radius: 10px 4px 4px 10px; box-shadow: 0 24px 50px rgba(0, 0, 0, .5); }
.treasures { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.treasures li {
  padding: 6px 18px; border: 1px solid rgba(242, 212, 145, .5); border-radius: 999px;
  font: 400 1.15rem var(--display); color: var(--gold);
}

/* Quote */
.quote { text-align: center; padding: clamp(56px, 8vw, 96px) 0; }
.quote blockquote p { font: italic 400 clamp(1.9rem, 5vw, 3.2rem)/1.25 var(--display); color: var(--gold); }
.quote-note { max-width: 56ch; margin: 24px auto 0; color: var(--muted); }

/* Inside */
.makes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 36px; }
.makes li {
  background: #fff; border: 1px solid #e6dcc8; border-radius: 16px; padding: 22px 14px; text-align: center;
  box-shadow: 0 4px 14px rgba(60, 40, 90, .06);
}
.makes span { display: block; font-size: 2rem; margin-bottom: 8px; }
.makes h3 { font-size: 1rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }
.features article { border-top: 2px solid #c9a65a; padding-top: 18px; }
.features h3 { font: 400 1.45rem/1.2 var(--display); margin-bottom: 10px; }

/* Join */
.join { position: relative; overflow: hidden; }
.join .wrap { position: relative; }
.signup {
  margin-top: 36px; padding: clamp(22px, 4vw, 36px); text-align: left;
  background: rgba(58, 42, 107, .35); border: 1px solid rgba(242, 212, 145, .25); border-radius: 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.signup label { font-weight: 600; font-size: .95rem; }
.signup small { font-weight: 400; color: var(--muted); }
.field input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  font: 500 1rem var(--body); color: var(--ink); background: #fff;
  border: 2px solid transparent; border-radius: 10px;
}
.field input:focus { outline: none; border-color: var(--gold-strong); }
.signup fieldset { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.signup legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: .95rem; }
.signup fieldset label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.signup input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold-strong); }
.signup .btn, .form-status, .fineprint { grid-column: 1 / -1; }
.signup .btn { justify-self: start; }
.signup .btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.hp { position: absolute; left: -9999px; }
.form-status:empty { display: none; }
.form-status { padding: 12px 16px; border-radius: 10px; font-weight: 600; background: rgba(242, 212, 145, .14); color: var(--gold); }
.form-status.error { background: rgba(231, 154, 184, .16); color: #ffc4d9; }
.fineprint { font-size: .85rem; color: var(--muted); }

/* Footer */
.site-footer { background: #0c091b; padding: 40px 0; font-size: .9rem; color: var(--muted); }
.footer-grid { display: flex; align-items: center; gap: 28px; }
.press img { width: 150px; opacity: .85; transition: opacity .2s; }
.press:hover img { opacity: 1; }

/* Small screens */
@media (max-width: 820px) {
  .site-header nav { display: none; }
  .site-header .btn { margin-left: auto; }
  .hero-grid, .book-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .lede { margin-inline: auto; }
  .actions { justify-content: center; }
  .hero-cover { max-width: 280px; }
  .back-cover { max-width: 260px; }
  .counts ul { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .makes { grid-template-columns: repeat(2, 1fr); }
  .makes li:last-child { grid-column: 1 / -1; }
  .features { grid-template-columns: 1fr; margin-top: 40px; }
  .signup { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; text-align: center; }
}

/* Book details line */
.book-details { margin-top: 22px; font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* Policy pages (privacy.html, terms.html) */
.policy { padding: clamp(40px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.policy .wrap { max-width: 760px; }
.policy h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 8px; }
.policy h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 2em 0 .5em; color: var(--gold); }
.policy .updated { color: var(--muted); font-size: .95rem; margin-bottom: 1.5em; }
.policy p + p, .policy ul + p, .policy ol + p, .policy p + ul, .policy p + ol { margin-top: 1em; }
.policy ul, .policy ol { padding-left: 1.4em; margin-top: 1em; }
.policy ul { list-style: disc; }
.policy li + li { margin-top: .5em; }
.policy address { font-style: normal; margin-top: 1em; }
.policy .back { display: inline-block; margin-top: 2.5em; font-weight: 600; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--gold); }
@media (max-width: 820px) { .footer-links { justify-content: center; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars i { animation: none; opacity: .5; }
  .btn, .hero-cover { transition: none; }
}
