/* =========================================================================
   D.K. Hookton site stylesheet
   Fantasy / sci-fi tone. Pure CSS, no build step.
   Palette, type, and layout tokens live in :root so you can rebrand fast.
   ========================================================================= */

:root {
  /* Color: ink, antique gold, and emerald magic-shimmer */
  --bg:        #0e0f12;
  --bg-2:      #131419;
  --surface:   #1a1c23;
  --surface-2: #232632;
  --border:    rgba(214, 198, 150, 0.12);
  --border-strong: rgba(214, 198, 150, 0.26);

  --text:      #efe9dc;
  --text-soft: #c6c0b2;
  --text-mute: #948e80;

  --gold:      #d9b366;   /* primary accent, antique gold */
  --gold-deep: #b58f3c;
  --violet:    #4fbf9c;   /* "shimmer", the glow of magic (emerald) */
  --cyan:      #79d0c4;   /* paler magic highlight (teal) */

  --glow-violet: rgba(79, 191, 156, 0.40);
  --glow-cyan:   rgba(121, 208, 196, 0.28);

  /* Type */
  --font-display: "Cinzel", Georgia, serif;
  --font-serif:   "Cormorant Garamond", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Layout */
  --maxw: 1120px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --radius: 14px;
  --radius-sm: 8px;

  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --shadow-gold: 0 10px 40px -12px rgba(232, 200, 126, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Backdrop: magic-mist glow + vignette ---------- */
body::before {
  /* soft shimmer of fading magic, gathered at the edges */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(55% 48% at 14% 8%, rgba(79, 191, 156, 0.16), transparent 60%),
    radial-gradient(50% 42% at 88% 4%, rgba(217, 179, 102, 0.13), transparent 55%),
    radial-gradient(80% 65% at 50% 116%, rgba(79, 191, 156, 0.10), transparent 62%),
    var(--bg);
}
body::after {
  /* gentle vignette for depth */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(125% 115% at 50% 38%, transparent 52%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gap); }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: 0.01em; }
.h-xl { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.h-lg { font-size: clamp(1.9rem, 4vw, 3rem); }
.h-md { font-size: clamp(1.4rem, 2.6vw, 2rem); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
}
.lead { font-family: var(--font-serif); font-size: clamp(1.25rem, 2.4vw, 1.7rem); color: var(--text-soft); font-weight: 500; }
.muted { color: var(--text-mute); }
.gold { color: var(--gold); }

.section-head { max-width: 620px; margin-inline: auto; margin-bottom: 2.75rem; }
.section-head.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1a1505;
  box-shadow: var(--shadow-gold);
}
.btn--ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--block { width: 100%; justify-content: center; }
/* not-yet-released, looks intentionally inert */
.btn--soon { background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-mute); cursor: default; }
.btn--soon:hover { transform: none; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10, 11, 22, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 0.65rem; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.08em; }
.brand .mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--violet), #2a2360 70%);
  box-shadow: 0 0 18px var(--glow-violet);
  font-family: var(--font-display); font-size: 0.85rem; color: #fff;
}
.brand strong { font-weight: 600; }
.brand .brand-sub { color: var(--gold); }

.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a { font-size: 0.92rem; color: var(--text-soft); transition: color 0.15s; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.nav-cta { margin-left: 0.5rem; }

.nav-toggle { display: none; background: none; border: 0; color: var(--text); padding: 0.4rem; }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem var(--gap) 1.25rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
  .nav-cta { margin: 0.85rem 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(4rem, 11vw, 8.5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-block: 1rem 1.25rem; }
.hero .lead { max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* floating featured cover */
.hero-cover { position: relative; justify-self: center; }
.hero-cover .cover { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-cover .cover { animation: none; } }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-cover { order: -1; }
}

/* ---------- Book cover (CSS placeholder art) ---------- */
.cover {
  position: relative;
  width: 260px; aspect-ratio: 2 / 3;
  border-radius: 6px;
  background: linear-gradient(150deg, #1f2b27, #11130f 60%);
  box-shadow: var(--shadow), 0 0 60px -20px var(--glow-violet);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  display: grid; grid-template-rows: 1fr auto; padding: 1.4rem;
}
.cover::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(40% 30% at 70% 20%, var(--glow-violet), transparent 70%),
    radial-gradient(35% 25% at 25% 75%, var(--glow-cyan), transparent 70%);
  opacity: 0.8;
}
.cover .cover-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: linear-gradient(var(--gold), var(--gold-deep)); opacity: 0.55; }
.cover .cover-author { position: relative; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.62rem; color: var(--gold); }
.cover .cover-title { position: relative; align-self: end; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.cover.cover--lg { width: 300px; }
.cover.cover--sm { width: 100%; max-width: 220px; }
/* when a real cover image is used instead of the CSS placeholder */
img.cover { display: block; padding: 0; object-fit: cover; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card .card-icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 1rem;
  display: grid; place-items: center;
  background: rgba(139,124,246,0.12); color: var(--violet);
  border: 1px solid var(--border);
}
.card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-soft); font-size: 0.98rem; }

/* ---------- Book listing ---------- */
.book {
  display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start;
  padding: 2rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}
.book + .book { margin-top: 1.75rem; }
.book .cover { width: 100%; }
.book-meta .series { color: var(--gold); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em; }
.book-meta h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-block: 0.35rem 0.25rem; }
.book-meta .tagline { font-family: var(--font-serif); font-size: 1.2rem; color: var(--text-soft); font-style: italic; }
.book-meta .desc { margin-top: 1rem; color: var(--text-soft); }
.book-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; align-items: center; }
.badge {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-mute);
}
.badge--new { color: var(--cyan); border-color: rgba(90,209,230,0.4); }
@media (max-width: 620px) {
  .book { grid-template-columns: 1fr; }
  .book .cover { max-width: 200px; margin-inline: auto; }
  .book-meta { text-align: center; }
  .book-actions { justify-content: center; }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem,5vw,4rem); align-items: center; }
.portrait {
  aspect-ratio: 4/5; border-radius: var(--radius); border: 1px solid var(--border-strong);
  background:
    radial-gradient(60% 50% at 50% 20%, rgba(139,124,246,0.3), transparent 70%),
    linear-gradient(160deg, var(--surface-2), var(--bg-2));
  display: grid; place-items: center; color: var(--text-mute); text-align: center; padding: 2rem;
  box-shadow: var(--shadow);
}
.portrait .glyph { font-family: var(--font-display); font-size: 4rem; color: var(--gold); opacity: 0.8; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } .portrait { max-width: 360px; margin-inline: auto; } }

.prose p + p { margin-top: 1.1rem; }
.prose p { color: var(--text-soft); }

/* ---------- Quote / testimonial ---------- */
.quote {
  max-width: 760px; margin-inline: auto; text-align: center;
  font-family: var(--font-serif); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.4; color: var(--text);
}
.quote::before { content: "“"; font-family: var(--font-display); color: var(--gold); font-size: 3rem; display: block; line-height: 0.4; margin-bottom: 1rem; }
.quote cite { display: block; margin-top: 1.25rem; font-family: var(--font-body); font-style: normal; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-mute); }

/* ---------- Newsletter / CTA band ---------- */
.band {
  position: relative; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: calc(var(--radius) * 1.4);
  background: linear-gradient(135deg, rgba(139,124,246,0.14), rgba(90,209,230,0.08));
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}
.band h2 { margin-bottom: 0.75rem; }
.newsletter-form { display: flex; gap: 0.7rem; max-width: 480px; margin: 1.75rem auto 0; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1 1 240px; min-width: 0;
  padding: 0.85rem 1.1rem; border-radius: 999px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--border-strong); color: var(--text); font-size: 0.95rem;
}
.newsletter-form input::placeholder { color: var(--text-mute); }
.newsletter-form input:focus { outline: none; border-color: var(--gold); }
.form-note { font-size: 0.8rem; color: var(--text-mute); margin-top: 0.9rem; }

/* ---------- Contact form ---------- */
.form { display: grid; gap: 1.1rem; max-width: 620px; }
.form .row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 0.45rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.28); border: 1px solid var(--border-strong); color: var(--text); font-size: 0.97rem; font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field textarea { min-height: 150px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-block: 3rem 2rem; margin-top: 2rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--text-mute); font-size: 0.92rem; margin-top: 0.75rem; }
.footer-cols { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-cols h4 { font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.74rem; color: var(--text-mute); margin-bottom: 0.9rem; }
.footer-cols a { display: block; color: var(--text-soft); font-size: 0.92rem; padding: 0.25rem 0; transition: color 0.15s; }
.footer-cols a:hover { color: var(--gold); }
.socials { display: flex; gap: 0.75rem; margin-top: 1rem; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--text-soft); transition: all 0.18s; }
.socials a:hover { color: var(--gold); border-color: var(--gold); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; color: var(--text-mute); font-size: 0.84rem; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 3vw, 2.5rem); text-align: center; }
.page-hero .lead { margin-inline: auto; max-width: 60ch; }

/* ---------- Utility ---------- */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); margin-block: 1rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1.25rem; }
