/* ==========================================================================
   Forever and a Game — author site
   Tokens live at the top. Change these six values and the whole site retints.
   ========================================================================== */

:root {
  /* color */
  --forest-950: #0f1f16;
  --forest-900: #16281f;
  --forest-800: #1f3a2c;
  --forest-700: #2c4f3a;
  --gold-500: #c9a227;
  --gold-400: #d9b94a;
  --parchment: #ede6d6;
  --parchment-dim: #cfc8b8;
  --sage: #8aa38f;
  --rust: #a8552e;

  /* type */
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Literata", Georgia, serif;
  --font-ui: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* layout */
  --header-h: 76px;
  --max-w: 1080px;
  --edge: clamp(1.25rem, 5vw, 4rem);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--forest-950);
  color: var(--parchment);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--parchment);
}
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--gold-400); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold-500); color: var(--forest-950);
  padding: 0.75em 1.25em; z-index: 200; font-family: var(--font-ui);
}
.skip-link:focus { left: var(--edge); }

:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--gold-400);
  margin-bottom: 0.9em;
}
.eyebrow-brand {
  display: flex;
  align-items: center;
  gap: 0.55em;
}
.press-mark { display: block; }
.press-mark-eyebrow { opacity: 0.95; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(15, 31, 22, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--parchment);
}
.brand-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand-text em { color: var(--sage); font-style: italic; }

.site-nav {
  display: flex;
  gap: 2.1rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--parchment-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--gold-400); }
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--gold-500);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--parchment);
  border-radius: 1px;
}

/* ---------- hero type ---------- */
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  margin-bottom: 0.35em;
}
.hero-title em { font-style: italic; color: var(--sage); }
.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--parchment-dim);
  max-width: 34ch;
  margin-bottom: 1.8em;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3.2rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.85em 1.7em;
  border-radius: 3px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold-500);
  color: var(--forest-950);
  font-weight: 600;
}
.btn-primary:hover { background: var(--gold-400); }
.btn-ghost {
  border-color: rgba(237, 230, 214, 0.35);
  color: var(--parchment);
}
.btn-ghost:hover { border-color: var(--gold-400); color: var(--gold-400); }

/* ---------- sections ---------- */
.section { padding: 6.5rem 0; scroll-margin-top: var(--header-h); }
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* the merged hero + book section at the top of the page */
.section.hero-book {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--header-h) + 4rem);
  background:
    radial-gradient(ellipse at 78% 18%, rgba(44, 79, 58, 0.5), transparent 55%),
    linear-gradient(180deg, var(--forest-900) 0%, var(--forest-950) 45%);
}
.section-dark {
  background: var(--forest-900);
  border-top: 1px solid rgba(201, 162, 39, 0.12);
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
}

.divider {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

/* ---------- book section ---------- */
.book-grid {
  display: grid;
  grid-template-columns: clamp(300px, 29vw, 460px) 1fr;
  gap: 4rem;
  align-items: start;
}
.cover-frame {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  z-index: 0;
}
.cover-frame::before {
  content: "";
  position: absolute;
  inset: -10% -20%;
  background: radial-gradient(ellipse at 50% 40%, rgba(201, 162, 39, 0.18), transparent 65%);
  filter: blur(30px);
  z-index: -1;
  pointer-events: none;
}
.cover-img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease, filter 0.25s ease;
}
.cover-frame a:hover .cover-img {
  transform: translateY(-4px);
  filter: drop-shadow(0 36px 46px rgba(0, 0, 0, 0.55));
}

.book-blurb { margin-top: 3rem; }
.comp-line { color: var(--sage); font-size: 0.98rem; margin-bottom: 1.4em; }
.book-description { max-width: 62ch; }

.pulled-quote {
  margin: 1.8em 0;
  padding-left: 1.3em;
  border-left: 2px solid var(--gold-500);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold-400);
}
.closing-line {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--parchment);
  font-size: 1.1rem;
}

.retailer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}
.retailer-btn {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  padding: 0.6em 1.1em;
  border: 1px solid rgba(138, 163, 143, 0.4);
  border-radius: 3px;
  color: var(--parchment-dim);
  cursor: default;
  text-decoration: none;
}
a.retailer-btn {
  cursor: pointer;
  border-color: var(--gold-500);
  color: var(--parchment);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
a.retailer-btn:hover {
  background: var(--gold-500);
  color: var(--forest-950);
}
.retailer-more {
  background: none;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.retailer-more:hover { border-color: var(--gold-400); color: var(--parchment); }
.retailer-note {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--sage);
  margin-top: 0.9rem;
}

.more-panel {
  position: fixed;
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 4px;
  background: var(--forest-800);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  min-width: 210px;
}
.more-panel::backdrop { background: transparent; }
.more-panel-close {
  position: absolute;
  top: 0.3rem;
  right: 0.4rem;
  background: none;
  border: none;
  color: var(--sage);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.35rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.more-panel-close:hover { color: var(--gold-400); }
.more-panel-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.more-panel-list .retailer-btn { text-align: center; }

/* ---------- author section ---------- */
.author-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3.5rem;
  align-items: start;
}
.author-photo-frame { text-align: center; }
.author-photo {
  display: block;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.4);
  object-fit: cover;
  margin: 0 auto;
}
.author-copy p { max-width: 62ch; }

/* ---------- updates section ---------- */
.updates-inner { max-width: 620px; text-align: left; }
.updates-copy { color: var(--parchment-dim); max-width: 52ch; }
.newsletter-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.newsletter-input {
  flex: 1 1 260px;
  padding: 0.85em 1.1em;
  background: var(--forest-950);
  border: 1px solid rgba(138, 163, 143, 0.4);
  border-radius: 3px;
  color: var(--parchment);
  font-family: var(--font-ui);
  font-size: 0.95rem;
}
.newsletter-input::placeholder { color: var(--sage); }
.newsletter-input:focus { outline: none; border-color: var(--gold-400); }
.newsletter-embed {
  margin-top: 1.5rem;
}

/* ---------- contact section ---------- */
.contact-inner { text-align: left; }
.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-400);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 162, 39, 0.4);
}
.email-link:hover { color: var(--gold-500); }
.email-icon { flex-shrink: 0; }
.social-row { display: flex; gap: 1.4rem; margin-top: 1.4rem; }
.social-icon {
  color: var(--sage);
  transition: color 0.2s ease;
}
.social-icon:hover { color: var(--gold-400); }

/* ---------- footer ---------- */
.site-footer {
  text-align: center;
  padding: 2.5rem var(--edge);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--sage);
  border-top: 1px solid rgba(201, 162, 39, 0.12);
}
.press-mark-footer {
  margin: 0 auto 0.9rem;
  opacity: 0.9;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .book-grid, .author-grid { grid-template-columns: 1fr; }
  .cover-frame { position: relative; max-width: min(66vw, 320px); margin: 0 auto 2.5rem; }
  .author-photo-frame { margin-bottom: 1rem; }
}

@media (max-width: 720px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--forest-950);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--edge) 1.5rem;
    border-bottom: 1px solid rgba(201, 162, 39, 0.18);
    transform: translateY(-130%);
    transition: transform 0.25s ease;
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { padding: 0.9rem 0; border-bottom: 1px solid rgba(138, 163, 143, 0.15); }
  .nav-toggle { display: flex; }
  .section { padding: 4.5rem 0; }
  .section.hero-book { padding-top: calc(var(--header-h) + 2rem); min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
