/* ---------------------------------------------------------------
   Hercules Versus... — prototype stylesheet
   Palette + type tokens are declared once below; everything else
   derives from them so the whole site can be retoned from here.
------------------------------------------------------------------ */

:root {
  --ink: #14100c;
  --ink-soft: #1b1510;
  --surface: #241b14;
  --surface-alt: #2b2016;
  --gold: #e8b34e;
  --gold-deep: #b9822f;
  --ember: #d4491f;
  --ember-deep: #8f2a17;
  --parchment: #f3ead9;
  --parchment-muted: #b9a88e;
  --border: rgba(232, 179, 78, 0.16);

  --font-display: 'Cinzel', Georgia, serif;
  --font-accent: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  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: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
  margin: 0 0 0.5em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}
h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1em;
}

.eyebrow {
  font-family: var(--font-accent);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--ember);
  margin: 0 0 0.75em;
}

.eyebrow--light {
  color: var(--gold);
}

section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

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

/* -------------------- buttons -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.75em;
  border-radius: 3px;
  font-family: var(--font-accent);
  letter-spacing: 0.12em;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.btn--small {
  padding: 0.55em 1.25em;
  font-size: 0.85rem;
}

.btn--ember {
  background: linear-gradient(180deg, var(--ember) 0%, var(--ember-deep) 100%);
  color: var(--parchment);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(232, 179, 78, 0.25);
}

.btn--ember:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 18px rgba(212, 73, 31, 0.55),
    0 0 0 1px var(--gold);
}

.btn--ghost {
  background: rgba(20, 16, 12, 0.35);
  border-color: rgba(243, 234, 217, 0.6);
  color: var(--parchment);
  backdrop-filter: blur(2px);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn--outline {
  background: transparent;
  border-color: var(--gold-deep);
  color: var(--gold);
}

.btn--outline:hover {
  background: var(--gold);
  color: var(--ink);
}

/* -------------------- nav -------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(
    180deg,
    rgba(20, 16, 12, 0.92),
    rgba(20, 16, 12, 0.75)
  );
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-nav__brand {
  display: block;
  line-height: 0;
}

.site-nav__logo {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.site-nav__links {
  display: flex;
  gap: 2rem;
  font-family: var(--font-accent);
  letter-spacing: 0.1em;
  font-size: 0.95rem;
}

.site-nav__links a {
  text-decoration: none;
  color: var(--parchment-muted);
  transition: color 0.15s ease;
}

.site-nav__links a:hover {
  color: var(--gold);
}

.site-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.site-nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--gold);
  display: block;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0 1.5rem 1.25rem;
  font-family: var(--font-accent);
  letter-spacing: 0.1em;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--parchment);
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.site-nav.is-open .mobile-nav {
  display: flex;
}

@media (max-width: 780px) {
  .site-nav__links {
    display: none;
  }
  .site-nav__toggle {
    display: flex;
  }
}

/* -------------------- hero -------------------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 0;
  max-width: none;
}

.hero__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.02);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(20, 16, 12, 0.35) 0%,
      rgba(20, 16, 12, 0.35) 40%,
      rgba(20, 16, 12, 0.96) 92%
    ),
    linear-gradient(
      90deg,
      rgba(20, 16, 12, 0.55) 0%,
      transparent 35%,
      transparent 65%,
      rgba(20, 16, 12, 0.55) 100%
    );
}

.hero__ember {
  position: absolute;
  top: 12%;
  right: 18%;
  width: 340px;
  height: 340px;
  background: radial-gradient(
    circle,
    rgba(232, 179, 78, 0.55) 0%,
    rgba(212, 73, 31, 0.28) 45%,
    transparent 72%
  );
  filter: blur(10px);
  animation: emberFlicker 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes emberFlicker {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
  75% {
    opacity: 0.85;
    transform: scale(0.97);
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem 4.5rem;
  text-align: center;
  animation: heroRise 0.9s ease-out both;
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__logo {
  max-width: 420px;
  width: 70%;
  margin: 0.5rem auto 1rem;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6));
  transform: rotate(-1deg);
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--parchment);
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(243, 234, 217, 0.5);
  border-radius: 14px;
}

.hero__scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--gold);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollCue 1.8s ease-in-out infinite;
}

@keyframes scrollCue {
  0% {
    opacity: 1;
    top: 6px;
  }
  70% {
    opacity: 0;
    top: 20px;
  }
  100% {
    opacity: 0;
    top: 6px;
  }
}

@media (max-width: 780px) {
  .hero {
    min-height: 100vh;
  }
  .hero__image {
    background-attachment: scroll;
  }
}

/* -------------------- divider (greek key motif) -------------------- */

.divider {
  height: 26px;
  max-width: none;
  margin: 0;
  padding: 0;
  background-color: var(--ink-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20'%3E%3Cpath d='M1,19 L1,1 L19,1 L19,9 L10,9 L10,19 L29,19 L29,1 L39,1' fill='none' stroke='%23e8b34e' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  background-size: 40px 20px;
  opacity: 0.55;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* -------------------- intro -------------------- */

.intro {
  text-align: center;
}

.intro__body {
  max-width: 62ch;
  margin: 0 auto;
  color: var(--parchment-muted);
  font-size: 1.15rem;
}

.intro__subtitle {
  font-family: var(--font-display);
  text-transform: none;
  font-size: 1.2rem;
  color: var(--ember);
  letter-spacing: 0.03em;
  margin-top: -0.35rem;
}

/* -------------------- book grid -------------------- */

.books {
  text-align: center;
}

.books h2 {
  margin-bottom: 2.5rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
  text-align: left;
}

.book-card {
  position: relative;
  background: linear-gradient(
    180deg,
    var(--surface) 0%,
    var(--surface-alt) 100%
  );
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: rotate(var(--tilt, 0deg));
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.book-card:nth-child(1) {
  --tilt: -1.1deg;
}
.book-card:nth-child(2) {
  --tilt: 0.6deg;
}
.book-card:nth-child(3) {
  --tilt: -0.6deg;
}

.book-card:hover {
  transform: rotate(0deg) translateY(-6px);
  border-color: var(--accent, var(--gold));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--accent, var(--gold));
}

.book-card__cover-link {
  display: block;
  line-height: 0;
}

.book-card__cover {
  width: 100%;
  aspect-ratio: 5 / 8;
  object-fit: contain;
  background: var(--ink-soft);
}

/* Cover-art fallback: shown in place of an <img> wherever a book has no
   cover yet. Combined with the same sizing class the <img> would have used
   (book-card__cover, coming-soon__item img's rules, etc.) so it always
   matches the slot's shape — only the look of "no art yet" is defined here. */
.cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(232, 179, 78, 0.05) 0 2px,
      transparent 2px 14px
    ),
    linear-gradient(160deg, var(--surface-alt), var(--ink-soft));
  border: 1px dashed var(--accent, var(--gold-deep));
}

.cover-fallback__label {
  font-family: var(--font-accent);
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--accent, var(--parchment-muted));
  text-transform: uppercase;
}

.book-card__body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-card__number {
  font-family: var(--font-accent);
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--accent, var(--ember));
  margin-bottom: 0.35rem;
}

.book-card__title {
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.book-card__title-link {
  color: inherit;
  text-decoration: none;
}

/* Stretches the title link's hit area over the whole card, so clicking
   anywhere (the blurb text included) opens the book page. The actions row
   is lifted above it (z-index) so "Buy the Book" still opens its own link. */
.book-card__title-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.book-card__tagline {
  font-family: var(--font-display);
  font-style: normal;
  color: var(--accent-soft, var(--gold));
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.book-card__blurb {
  color: var(--parchment-muted);
  font-size: 0.98rem;
  flex: 1;
}

.book-card__actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.coming-soon {
  margin-top: 4rem;
  text-align: center;
}

.coming-soon__strip {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.coming-soon__item {
  display: block;
  width: 140px;
  text-decoration: none;
  color: inherit;
  opacity: 0.8;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.coming-soon__item:hover {
  opacity: 1;
  transform: translateY(-3px);
}

.coming-soon__item img,
.coming-soon__item .cover-fallback {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 58%;
  border: 2px solid var(--gold-deep);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.45),
    inset 0 0 0 4px var(--ink-soft);
  filter: grayscale(45%) contrast(1.05);
}

.coming-soon__item p {
  font-family: var(--font-accent);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--accent, var(--parchment-muted));
  margin: 0.6rem 0 0;
  text-align: center;
}

/* -------------------- author teaser (home) -------------------- */

.author-teaser {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
}

.author-teaser__portrait,
.author-page__portrait {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  transform: rotate(-2deg);
}

.author-teaser__content p {
  color: var(--parchment-muted);
}

/* -------------------- cta band -------------------- */

.cta-band {
  text-align: center;
  background: radial-gradient(
    ellipse at center,
    var(--surface-alt) 0%,
    var(--ink) 75%
  );
  border-radius: 8px;
  max-width: calc(var(--container) - 3rem);
}

.cta-band p {
  color: var(--parchment-muted);
  max-width: 50ch;
  margin: 0 auto 2rem;
}

/* -------------------- footer -------------------- */

.site-footer {
  background: var(--ink-soft);
  padding: 3.5rem 1.5rem 2rem;
}

.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-footer__logo {
  height: 30px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.site-footer__brand p {
  margin: 0;
  color: var(--parchment-muted);
  font-size: 0.9rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.75rem;
  column-gap: 1.5rem;
  font-family: var(--font-accent);
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}

.site-footer__links a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--parchment-muted);
}

.site-footer__links a:hover {
  color: var(--gold);
}

.site-footer__fine-print {
  max-width: var(--container);
  margin: 1.5rem auto 0;
  text-align: center;
  color: var(--parchment-muted);
  font-size: 0.8rem;
}

/* -------------------- generic page header (about / feedback / 404) -------------------- */

.page-header {
  text-align: center;
  padding-bottom: 2rem;
}

.page-header__sub {
  max-width: 56ch;
  margin: 0 auto;
  color: var(--parchment-muted);
}

/* -------------------- long-form article (why hercules, etc.) -------------------- */

.article {
  max-width: 700px;
}

.article__byline {
  font-family: var(--font-accent);
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--ember);
  margin-top: -0.5rem;
}

.article p {
  color: var(--parchment);
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1.4em;
}

.article h2 {
  font-size: 1.4rem;
  margin-top: 3rem;
}

.article a {
  color: var(--gold);
}

.pull-quote {
  margin: 2rem 0;
  padding: 1.25rem 1.75rem;
  border-left: 3px solid var(--ember);
  font-family: var(--font-body);
  font-style: italic;
  color: var(--parchment);
  background: rgba(255, 255, 255, 0.03);
}

.intro__quote {
  max-width: 52ch;
  margin: 2rem auto 0;
  text-align: center;
  font-size: 1.2rem;
  border-right: 3px solid var(--ember);
}

.intro__quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-accent);
  font-style: normal;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--gold);
  text-transform: uppercase;
}

/* -------------------- about page -------------------- */

.author-page {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3.5rem;
  align-items: start;
  padding-top: 0;
}

.author-page__content p {
  color: var(--parchment-muted);
}

.author-page__content em,
.author-teaser__content em {
  color: var(--gold);
  font-style: italic;
}

.author-page__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0 2.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.author-page__fact-label {
  font-family: var(--font-accent);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--ember);
  margin-bottom: 0.25rem;
}

.author-page__fact-value {
  color: var(--parchment);
  margin: 0;
  font-weight: 600;
}

/* -------------------- feedback page -------------------- */

.feedback-section {
  max-width: 640px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feedback-form__row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Honeypot: kept in the layout (not display:none) and off-screen, so simple
   bots that skip hidden inputs still find and fill it. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.feedback-form label {
  font-family: var(--font-accent);
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--parchment-muted);
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75em 0.9em;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 1rem;
}

.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
  border-color: var(--gold);
}

.feedback-form .btn {
  align-self: flex-start;
}

.form-notice {
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.form-notice--success {
  background: rgba(232, 179, 78, 0.1);
  border: 1px solid var(--gold-deep);
}

.form-notice--success h2 {
  margin-bottom: 0.5rem;
}

.form-notice--error {
  background: rgba(212, 73, 31, 0.12);
  border: 1px solid var(--ember);
  color: var(--parchment);
}

/* -------------------- book detail page -------------------- */

.book-detail {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.book-detail__cover img,
.book-detail__cover .cover-fallback {
  width: 100%;
  aspect-ratio: 5 / 8;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.book-detail__tagline {
  font-family: var(--font-display);
  color: var(--accent-soft, var(--gold));
  font-size: 1.15rem;
}

.book-detail__blurb {
  color: var(--parchment-muted);
  font-size: 1.05rem;
}

.book-detail__excerpt {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--accent, var(--ember));
  font-style: italic;
  color: var(--parchment);
  background: rgba(255, 255, 255, 0.03);
}

.book-detail__retailers-label {
  font-family: var(--font-accent);
  letter-spacing: 0.1em;
  color: var(--parchment-muted);
  margin-bottom: 0.75rem;
}

.book-detail__retailer-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.book-detail__coming-soon {
  color: var(--parchment-muted);
}

.book-detail__coming-soon a {
  color: var(--gold);
}

.book-detail__series-nav {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.book-detail__series-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  flex: 1;
}

.book-detail__series-link--next {
  text-align: right;
  margin-left: auto;
}

.book-detail__series-label {
  font-family: var(--font-accent);
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--parchment-muted);
}

.book-detail__series-title {
  font-family: var(--font-display);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.book-detail__series-link:hover .book-detail__series-label,
.book-detail__series-link:hover .book-detail__series-title {
  color: var(--accent, var(--ember));
}

@media (max-width: 560px) {
  .book-detail__series-nav {
    flex-direction: column;
  }

  .book-detail__series-link--next {
    text-align: left;
  }
}

/* -------------------- why hercules page -------------------- */

h1.why_page,
h3.why_page {
  margin-bottom: 0;
}

/* -------------------- responsive -------------------- */

@media (max-width: 900px) {
  .book-grid {
    grid-template-columns: 1fr;
  }

  .author-teaser,
  .author-page,
  .book-detail {
    grid-template-columns: 1fr;
  }

  .author-teaser__portrait,
  .author-page__portrait {
    max-width: 280px;
    margin: 0 auto;
  }

  .author-page__facts {
    grid-template-columns: 1fr;
  }

  section {
    padding: 3.5rem 1.25rem;
  }
}
