/* ============================================================================
   gregstreetauthor.com — dark edition
   ============================================================================ */

:root {
  /* Colour palette (from the cover's night side) */
  --night:   #0b1026;   /* base background */
  --night-2: #070b1c;   /* deepest — footer */
  --panel:   #161c3d;   /* raised surfaces */
  --line:    rgba(244,182,105,.16);  /* faint gold hairlines */
  --cream:   #f4ecda;   /* primary text */
  --muted:   #a6a4cc;   /* secondary text */
  --gold:    #f4b669;   /* labels, accents */
  --ember:   #ef7c2e;   /* primary buttons, links */
  --rust:    #c76a41;   /* decorative accent */

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2 {
  font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.01em;
  line-height: 0.98; margin: 0;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ember); color: var(--night);
  padding: 0.75rem 1.25rem; font-weight: 600; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Labels */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--gold); margin: 0 0 1.25rem;
}
.kicker--center { text-align: center; }

.section { padding-block: clamp(4rem, 10vw, 8rem); }
.section__heading {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--cream); letter-spacing: 0.01em;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--night) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--wrap); margin-inline: auto;
  padding: 1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--cream); text-decoration: none;
}
.nav__links { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); text-decoration: none; transition: color 0.2s ease;
}
.nav__links a:hover, .nav__links a:focus-visible { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 500;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.95rem 1.75rem; border-radius: 4px;
  text-decoration: none; border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn--solid {
  background: var(--ember); color: var(--night);
  box-shadow: 0 8px 30px -10px rgba(239,124,46,.7);
}
.btn--solid:hover, .btn--solid:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -10px rgba(239,124,46,.85);
}
.btn--ghost {
  background: transparent; color: var(--cream); border-color: rgba(244,236,218,.28);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  border-color: var(--gold); color: var(--gold);
}
.btn--lg { padding: 1.05rem 2.25rem; font-size: 1rem; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover, .btn:focus-visible { transform: none; }
}

/* ============================================================================
   BOOK HERO
   ============================================================================ */
.hero { position: relative; overflow: clip; isolation: isolate; }
/* sunset glow, echoing the cover */
.hero__glow {
  position: absolute; inset: -20% -10% auto -10%; height: 130%; z-index: -2;
  background:
    radial-gradient(60% 55% at 72% 30%, rgba(239,124,46,.30) 0%, transparent 60%),
    radial-gradient(70% 60% at 85% 55%, rgba(151,58,110,.30) 0%, transparent 62%),
    radial-gradient(90% 80% at 50% 0%, #131a3c 0%, var(--night) 60%);
}
/* faint starfield */
.hero__stars {
  position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(244,236,218,.9) 50%, transparent),
    radial-gradient(1.5px 1.5px at 28% 68%, rgba(244,236,218,.7) 50%, transparent),
    radial-gradient(1px 1px at 46% 34%, rgba(244,182,105,.8) 50%, transparent),
    radial-gradient(1.5px 1.5px at 63% 12%, rgba(244,236,218,.6) 50%, transparent),
    radial-gradient(1px 1px at 78% 58%, rgba(244,236,218,.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 91% 27%, rgba(244,182,105,.7) 50%, transparent);
}
.hero__inner {
  max-width: var(--wrap); margin-inline: auto;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(3.5rem, 8vw, 6.5rem);
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero__cover { margin: 0; justify-self: center; max-width: 360px; position: relative; }
.hero__cover::after {
  content: ""; position: absolute; inset: -8% -8% -14%; z-index: -1;
  background: radial-gradient(60% 55% at 50% 45%, rgba(239,124,46,.55), transparent 70%);
  filter: blur(24px);
}
.hero__cover img {
  width: 100%; border-radius: 3px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(244,182,105,.18);
}
.hero__text { min-width: 0; }
.hero__title {
  font-size: clamp(3.25rem, 9vw, 6.5rem); letter-spacing: 0;
  /* Overexposed / outlined lettering (echoing site 1's hero), tuned for dark:
     bright fill, crisp dark edge, and a hard ember echo so the outline reads. */
  color: var(--cream);
  -webkit-text-stroke: 1px rgba(7,11,28,.9);
  text-shadow:
    3px 4px 0 var(--ember),
    0 0 46px rgba(239,124,46,.28);
}
.hero__byline {
  font-family: var(--font-body); font-style: italic; font-weight: 500;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--muted);
  margin: 1rem 0 0;
}
.hero__byline span { color: var(--gold); }
.hero__hook {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--cream);
  max-width: 40ch; margin: 1.75rem 0 0; line-height: 1.5;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

/* reveal on load */
[data-reveal] { opacity: 1; }
.reveal-ready [data-reveal] { animation: rise-in 900ms cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); letter-spacing: 0.02em; }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal] { animation: none; }
}

/* ============================================================================
   THE STORY (no cover)
   ============================================================================ */
.story { border-top: 1px solid var(--line); }
.story__wrap { max-width: 760px; text-align: center; }
.story .section__heading { margin-bottom: 2.5rem; }
.story__body { text-align: left; font-size: 1.12rem; }
.story__body p { margin: 0 0 1.25rem; }
.story__lead {
  font-family: var(--font-body); font-weight: 500;
  font-size: clamp(1.2rem, 2.1vw, 1.5rem); line-height: 1.5; color: var(--cream);
}
.story__note {
  font-family: var(--font-body); font-style: italic; font-size: 1.02rem;
  color: var(--gold); margin: 2.5rem 0 0;
  padding-top: 2rem; border-top: 1px solid var(--line);
}
.story__cta { margin-top: 2.5rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }

/* ============================================================================
   THE AUTHOR
   ============================================================================ */
.author { background: var(--panel); }
.author__grid {
  display: grid; grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 6vw, 5rem); align-items: start;
}
.author__photo { margin: 0; max-width: 340px; position: sticky; top: 5.5rem; }
.author__photo img {
  width: 100%; border-radius: 4px;
  box-shadow: 0 24px 50px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(244,182,105,.2);
}
.author__bio { font-size: 1.08rem; }
.author__bio p { margin: 0 0 1.15rem; }
.author__bio p:last-child { margin-bottom: 0; }

/* ============================================================================
   CONTACT
   ============================================================================ */
.contact__wrap { max-width: 640px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact__lead { color: var(--muted); margin: 0 0 2rem; max-width: 44ch; }

/* ---------- Footer ---------- */
.footer { background: var(--night-2); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4rem); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; }
.footer__brand { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 1.3rem; color: var(--cream); margin: 0; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 3vw, 2rem); }
.footer__nav a {
  font-family: var(--font-mono);
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); text-decoration: none; transition: color 0.2s ease;
}
.footer__nav a:hover, .footer__nav a:focus-visible { color: var(--gold); }
.footer__legal { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); margin: 0; opacity: 0.8; }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__cover { order: -1; max-width: 280px; }
  .hero__hook { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .author__grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .author__photo { position: static; max-width: 260px; }
  .author__bio { text-align: left; }
  .kicker { text-align: center; }
}

@media (max-width: 560px) {
  .nav__inner { gap: 0.5rem; }
  .nav__brand { font-size: 1.05rem; }
  .nav__links { gap: 0.9rem; }
  .nav__links a { font-size: 0.72rem; letter-spacing: 0.08em; }
  .btn { width: 100%; }
  .hero__cta, .story__cta { flex-direction: column; }
  .story__body { font-size: 1.05rem; }
}

@media print {
  body { background: #fff; color: #000; }
  .nav, .hero__glow, .hero__stars, .btn { display: none; }
}
