/* tsaw.co.za — the book's advert: deep navy, gold and a sunset glow. One dark theme. */
:root {
  color-scheme: dark;
  --bg: #0b1424;
  --bg-alt: #101c33;
  --surface: #14223d;
  --ink: #f3ecdc;
  --ink-soft: #d6ccb6;
  --muted: #a99f8a;
  --line: #2a3a5c;
  --accent: #e2b04a;        /* gold */
  --accent-ink: #0b1424;
  --accent-strong: #f2c96a;
  --glow: #f0903a;          /* sunset */
  --ok: #9fd3a6;
  --ok-bg: #16301f;
  --error: #f3a69b;
  --error-bg: #3a1c1c;
  --star-off: #3a4a6a;
  --whatsapp: #25d366;
  --whatsapp-ink: #062b14;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--serif); }
a { color: var(--accent-strong); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: 0.01em; }
nav { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--sans); font-size: 15px; }
nav a { color: var(--ink-soft); text-decoration: none; }
nav a:hover { color: var(--accent); }
nav .nav-buy { color: var(--accent-strong); font-weight: 600; }

/* Hero */
.hero { padding: 56px 0 40px; background:
  radial-gradient(120% 70% at 85% 100%, color-mix(in srgb, var(--glow) 28%, transparent), transparent 60%),
  linear-gradient(180deg, var(--bg-alt), var(--bg)); border-bottom: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.hero-grid { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 48px; align-items: center; }
.cover { width: 100%; border-radius: 4px; box-shadow: var(--shadow); }
.kicker { font-family: var(--sans); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; margin: 0; color: var(--ink); }
h1, h2 { letter-spacing: 0.005em; }
h2 { color: var(--accent-strong); }
.tagline { font-style: italic; font-size: clamp(19px, 2.4vw, 24px); color: var(--ink); margin: 0 0 10px; }
.subtitle { font-style: italic; font-size: clamp(20px, 2.6vw, 26px); color: var(--accent-strong); margin: 10px 0 18px; }
.lead { font-size: 20px; color: var(--ink-soft); max-width: 34em; }
.rating-line { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 15px; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Buttons */
.btn { display: inline-block; font: 600 16px/1 var(--sans); padding: 14px 22px; border-radius: 6px; text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn-ghost { border-color: var(--accent); color: var(--accent-strong); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: var(--error); color: var(--surface); }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
h2 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 20px; }
h3 { font-size: 22px; margin: 0 0 10px; }
.pull { margin: 28px 0 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); font-size: 22px; font-style: italic; color: var(--ink-soft); }
.muted { color: var(--muted); }
.hint { font-family: var(--sans); font-size: 14px; color: var(--muted); font-weight: 400; }

/* Buy */
.buy-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
#buy h2 { max-width: 760px; }
@media (max-width: 860px) { .buy-grid { grid-template-columns: 1fr; } }
.buy-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.buy-card p { margin: 0 0 14px; }
.soon { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Stars */
.stars { display: inline-flex; gap: 1px; font-size: 18px; line-height: 1; }
.star { color: var(--star-off); }
.star.on { color: var(--accent); }

/* Review summary */
.summary { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 24px; margin-bottom: 24px; }
.summary-score { display: grid; justify-items: center; gap: 4px; font-family: var(--sans); }
.summary-score .big { font: 700 44px/1 var(--serif); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-family: var(--sans); font-size: 14px; }
.bars li { display: grid; grid-template-columns: 52px 1fr 28px; gap: 10px; align-items: center; }
.bar { width: 100%; height: 10px; appearance: none; border: 0; border-radius: 5px; background: var(--bg-alt); overflow: hidden; }
.bar::-webkit-progress-bar { background: var(--bg-alt); border-radius: 5px; }
.bar::-webkit-progress-value { background: var(--accent); border-radius: 5px; }
.bar::-moz-progress-bar { background: var(--accent); border-radius: 5px; }
.bar-n { text-align: right; color: var(--muted); }

/* Reviews */
.review-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-title { font-size: 18px; }
.review-body { margin: 0 0 10px; overflow-wrap: anywhere; }
.review-by { margin: 0; font-family: var(--sans); font-size: 14px; color: var(--muted); }

/* Notices */
.notice { border-radius: 8px; padding: 12px 16px; margin: 0 0 20px; font-family: var(--sans); font-size: 15px; }
.notice ul { margin: 0; padding-left: 18px; }
.notice-ok { background: var(--ok-bg); color: var(--ok); }
.notice-error { background: var(--error-bg); color: var(--error); }

/* Form */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-top: 32px; }
form { display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
label { font-family: var(--sans); font-size: 15px; font-weight: 600; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input:not([type]), textarea {
  width: 100%; font: 16px/1.5 var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
}
textarea { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; }

/* Star rating input: radios in reverse order so ~ can light up the lower stars */
.rate { border: 0; margin: 0; padding: 0; }
.rate legend { font-family: var(--sans); font-size: 15px; font-weight: 600; margin-bottom: 4px; padding: 0; }
.rate-stars { position: relative; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-stars label { font-size: 34px; line-height: 1; color: var(--star-off); cursor: pointer; padding: 0 2px; }
.rate-stars label:hover, .rate-stars label:hover ~ label,
.rate-stars input:checked ~ label { color: var(--accent); }
.rate-stars input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.prose h2 { font-size: 24px; margin-top: 32px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-row p { margin: 0; }

/* Phones */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 32px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .cover { max-width: 260px; margin: 0 auto; display: block; }
  .hero-text { text-align: center; }
  .rating-line, .actions { justify-content: center; }
  .section { padding: 44px 0; }
  .summary { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  nav { gap: 12px; font-size: 14px; }
}

/* Jump links land below the sticky header */
section[id], #write-review { scroll-margin-top: 76px; }

/* Advert pieces: the four themes, prices, WhatsApp, motto */
.themes { list-style: none; margin: 36px auto 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 880px; }
.themes li { display: grid; justify-items: center; gap: 10px; text-align: center; font-family: var(--serif); font-size: 16px; color: var(--ink); }
.themes svg { width: 54px; height: 54px; padding: 12px; border-radius: 50%; border: 2px solid var(--accent); fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.buy-main { border-color: var(--accent); }
.prices { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 16px; }
.prices p { margin: 0; padding: 10px 16px; border-radius: 10px; background: linear-gradient(180deg, var(--accent-strong), var(--accent)); color: var(--accent-ink); font-family: var(--serif); font-size: 15px; text-align: center; min-width: 110px; }
.price { display: block; font-size: 28px; font-weight: 700; line-height: 1.1; }
.btn-whatsapp { background: var(--whatsapp); color: var(--whatsapp-ink); }
.btn-whatsapp:hover { filter: brightness(1.08); color: var(--whatsapp-ink); }
.buy-card .hint { margin: 10px 0 14px; }
.motto { font-style: italic; color: var(--accent); font-family: var(--serif); font-size: 16px; }
.motto span { color: var(--muted); margin-left: 8px; }
@media (max-width: 760px) {
  .themes { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
}

/* ---- Order form ---- */
.order-form { margin: 6px 0 4px; }
.order-form .field { margin-bottom: 12px; }
.copies { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.copies legend { grid-column: 1 / -1; }
@media (max-width: 560px) { .copies { grid-template-columns: 1fr; } }
.copies legend { font-family: var(--sans); font-weight: 600; margin-bottom: 6px; }
.choice { display: flex; gap: 10px; align-items: center; font-family: var(--sans); font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-alt); cursor: pointer; }
.choice input { accent-color: var(--accent); }
.or { text-align: center; font-family: var(--sans); color: var(--muted); margin: 14px 0 !important; }

/* ---- Dashboard ---- */
.admin h1 { margin: 0; }
.narrow-box { max-width: 460px; margin: 0 auto; }
.narrow-box .field { margin-bottom: 14px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-top form { display: flex; align-items: center; gap: 10px; font-family: var(--sans); }
.btn-small { padding: 8px 14px; font-size: 14px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; font-family: var(--sans); flex-wrap: wrap; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--ink-soft); border-bottom: 3px solid transparent; }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 100px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--sans); font-size: 14px; margin: 0 0 18px; }
.filters a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 100px; text-decoration: none; color: var(--ink-soft); }
.filters a[aria-current] { background: var(--surface); color: var(--ink); border-color: var(--accent); }
.pill { font-family: var(--sans); font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 100px; background: var(--bg-alt); color: var(--ink-soft); border: 1px solid var(--line); }
.pill-pending, .pill-new { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill-approved, .pill-paid, .pill-sent { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill-rejected, .pill-cancelled { background: var(--error-bg); color: var(--error); border-color: transparent; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; font-family: var(--sans); }
.row-actions form { margin: 0; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form.grow { flex: 1 1 280px; }
.inline-form.grow input { flex: 1 1 180px; }
.row-actions select, .row-actions input { font: 15px var(--sans); padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-alt); color: var(--ink); }
.danger-zone summary { cursor: pointer; color: var(--error); font-size: 14px; padding: 8px 4px; }
.danger-zone[open] { display: flex; gap: 8px; align-items: center; }
.order-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 6px 0 0; font-family: var(--sans); font-size: 15px; }
.order-dl dt { color: var(--muted); }
.order-dl dd { margin: 0; overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; }
.code { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: 13px; white-space: pre; }
@media (max-width: 560px) { .order-dl { grid-template-columns: 1fr; } .order-dl dt { margin-top: 6px; } }
.choice small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
