/* ==========================================================================
   The Anchor Series — homepage (direction 1a · Dark · Cinematic Ocean)
   ========================================================================== */

:root {
  /* Colors */
  --bg-top: #0a1626;
  --bg-mid: #0b1a2e;
  --bg-bottom: #0a1524;
  --surface: #0c1c33;
  --surface-deep: #091422;
  --gold: #d6b06a;
  --gold-hover: #e6c684;
  --gold-btn-text: #0a1526;
  --text-primary: #eef2f7;
  --text-secondary: #a9b6c6;
  --text-card: #9fb0c4;
  --text-navlink: #c3ccd8;
  --text-muted: #6f8098;
  --text-signature: #8a99ac;
  --headline-italic: #cdd7e4;
  --quote: #dbe3ec;
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-soft: rgba(255, 255, 255, 0.06);
  --featured-bg: rgba(214, 176, 106, 0.07);
  --featured-border: rgba(214, 176, 106, 0.32);

  /* Type */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --content-max: 1440px;
  --gutter: 64px;
  --section-pad: 104px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Keep anchored sections clear of the sticky nav */
[id] {
  scroll-margin-top: 96px;
}

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

body {
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Shared pieces
   -------------------------------------------------------------------------- */

.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 13px;
}

.btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 18px 44px;
  border-radius: 2px;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn--gold {
  background: var(--gold);
  color: var(--gold-btn-text);
}

.btn--gold:hover,
.btn--gold:focus-visible {
  background: var(--gold-hover);
  color: var(--gold-btn-text);
}

.btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--text-primary);
  font-weight: 600;
}

.btn--outline:hover,
.btn--outline:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.btn--nav {
  font-size: 13px;
  padding: 12px 26px;
}

.btn--large {
  font-size: 15px;
  padding: 20px 56px;
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--hairline);
  background: rgba(10, 22, 38, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-primary);
}

.nav__mark {
  height: 38px;
  width: auto;
}

.nav__wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  color: var(--text-navlink);
  font-size: 14px;
  letter-spacing: 0.08em;
  transition: color 180ms ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--gold-hover);
}

/* Mobile menu toggle — hidden until the small breakpoint */
.nav__toggle-input {
  display: none;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  max-width: var(--content-max);
  margin: 0 auto;
  text-align: center;
  padding: 96px var(--gutter) 40px;
}

.hero__eyebrow {
  font-size: 14px;
  letter-spacing: 0.42em;
  margin-bottom: 34px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 104px;
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.hero__title em {
  font-style: italic;
  color: var(--headline-italic);
}

.hero__sub {
  max-width: 720px;
  margin: 38px auto 0;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.hero__actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 44px;
}

/* --------------------------------------------------------------------------
   Cover fan
   -------------------------------------------------------------------------- */

.fan {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 22px;
  padding: 56px var(--gutter) 104px;
}

.fan__cover {
  border-radius: 6px;
  flex-shrink: 0;
}

.fan__cover--outer {
  width: 186px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  transform: translateY(6px);
}

.fan__cover--inner {
  width: 200px;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.6);
}

.fan__cover--center {
  width: 246px;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.7);
  transform: translateY(-18px);
}

/* --------------------------------------------------------------------------
   Books
   -------------------------------------------------------------------------- */

.books {
  background: var(--surface);
  border-top: 1px solid var(--hairline-soft);
  padding: var(--section-pad) 0;
}

.books__header {
  text-align: center;
  margin-bottom: 64px;
  padding: 0 var(--gutter);
}

.books__eyebrow {
  margin-bottom: 18px;
}

.books__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 60px;
  line-height: 1.1;
}

.books__grid {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(214, 176, 106, 0.4);
}

.card--featured {
  background: var(--featured-bg);
  border-color: var(--featured-border);
}

.card--featured:hover {
  border-color: rgba(214, 176, 106, 0.6);
}

.card__flag {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.card__cover {
  width: 150px;
  border-radius: 5px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
}

.card__meta {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card__desc {
  font-size: 14px;
  color: var(--text-card);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Author
   -------------------------------------------------------------------------- */

.author {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 72px;
  padding: var(--section-pad) var(--gutter);
}

.author__media {
  flex: 0 0 300px;
  display: flex;
  justify-content: center;
}

.author__portrait {
  width: 230px;
  height: 290px;
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 22%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.author__body {
  flex: 1;
}

.author__eyebrow {
  margin-bottom: 20px;
}

.author__quote {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.45;
  font-style: italic;
  color: var(--quote);
  margin-bottom: 24px;
}

.author__para {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.author__para:last-of-type {
  margin-bottom: 28px;
}

.author__signoff {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-primary);
}

.author__name {
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-signature);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Order band
   -------------------------------------------------------------------------- */

.order {
  text-align: center;
  padding: var(--section-pad) var(--gutter);
  background: linear-gradient(180deg, var(--surface), var(--surface-deep));
  border-top: 1px solid var(--hairline-soft);
}

.order__mark {
  height: 56px;
  width: auto;
  margin: 0 auto 28px;
}

.order__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 58px;
  margin-bottom: 20px;
}

.order__sub {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 36px var(--gutter);
  background: var(--surface-deep);
  border-top: 1px solid var(--hairline-soft);
}

.footer__wordmark {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.footer__legal {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .hero__title {
    font-size: 64px;
  }

  .books__title {
    font-size: 48px;
  }

  .books__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .fan__cover--outer { width: 140px; }
  .fan__cover--inner { width: 152px; }
  .fan__cover--center { width: 188px; }

  .author {
    flex-direction: column;
    gap: 48px;
    text-align: center;
  }

  .author__media {
    flex: none;
  }

  .order__title {
    font-size: 46px;
  }
}

/* Nav collapses to a menu */
@media (max-width: 900px) {
  .nav {
    flex-wrap: wrap;
    padding: 20px 24px;
  }

  .nav__wordmark {
    font-size: 17px;
  }

  .nav__mark {
    height: 30px;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-top: 24px;
  }

  .nav__toggle-input:checked ~ .nav__links {
    display: flex;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 24px;
    --section-pad: 56px;
  }

  .hero {
    padding-top: 64px;
  }

  .hero__eyebrow {
    letter-spacing: 0.3em;
  }

  .hero__title {
    font-size: 40px;
  }

  .hero__sub {
    font-size: 16px;
    margin-top: 28px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 36px;
  }

  .hero__actions .btn {
    text-align: center;
  }

  /* Cover fan becomes a horizontal scroll strip */
  .fan {
    justify-content: flex-start;
    overflow-x: auto;
    gap: 16px;
    padding: 32px var(--gutter) 64px;
    -webkit-overflow-scrolling: touch;
  }

  .fan__cover--outer,
  .fan__cover--inner,
  .fan__cover--center {
    width: 150px;
    transform: none;
  }

  .books__title {
    font-size: 36px;
  }

  .books__header {
    margin-bottom: 40px;
  }

  .books__grid {
    grid-template-columns: 1fr;
  }

  .order__title {
    font-size: 36px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}
