/* -------------------------------------------------------------------------
 * The Book of Pure Life, page-specific overrides on top of the APANI
 * template CSS (main.css / plugins.css / template-overrides.css).
 *
 * Keeps the APANI visual identity, tokens and download components while
 * flattening the header positioning and removing the fancy scroll/pin
 * behaviour the original Audiophile site relied on (Lenis + GSAP
 * ScrollTrigger). A standard scrolling static page instead.
 * ------------------------------------------------------------------------- */

:root {
  color-scheme: light;
}
html { scroll-behavior: smooth; }
body { background-color: var(--base, #ffffff); }

/* Header, sits over the white hero and the white page. Transparent at the
   very top, picks up a subtle white surface once we scroll for legibility
   over the intro/downloads sections. Text/logo stays black throughout. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(20px, 4vw, 40px);
  color: var(--t-bright, #121212);
  transition: background-color 240ms ease, backdrop-filter 240ms ease,
    box-shadow 240ms ease;
}
.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 rgba(18, 18, 18, 0.08);
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
}
.site-header__logo img {
  display: block;
  height: 34px;
  width: auto;
}
@media (min-width: 992px) { .site-header__logo img { height: 40px; } }
@media (min-width: 1400px) { .site-header__logo img { height: 46px; } }

.site-header__nav a.site-header__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 6px;
  color: inherit;
  font-family: var(--_font-accent, "JetBrains Mono", ui-monospace, monospace);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, opacity 200ms ease;
}
.site-header__nav a.site-header__link:hover,
.site-header__nav a.site-header__link:focus-visible {
  border-bottom-color: currentColor;
  opacity: 0.9;
}
@media (min-width: 768px) {
  .site-header__nav a.site-header__link { font-size: 15px; padding: 10px 10px; }
}

/* Hero, full-bleed responsive banner. The box's aspect ratio matches the
   image at each breakpoint (portrait 9:16 for tablet/mobile, landscape
   16:9 for laptop+), so `object-fit: cover` fills the box AND shows the
   entire image without cropping or letterboxing. */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #ffffff;
  aspect-ratio: 9 / 16;
}
@media (min-width: 768px) {
  .hero {
    aspect-ratio: 16 / 9;
    max-height: 92vh;
  }
}
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Intro, clean, centered, uses APANI typography. */
.intro {
  padding-block: clamp(56px, 8vw, 120px);
  background-color: var(--base, #ffffff);
  color: var(--t-bright, #121212);
}
.intro__inner {
  max-width: 780px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 40px);
  text-align: center;
}
.intro__eyebrow {
  display: inline-block;
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: clamp(16px, 1.6vw, 24px);
  color: var(--t-medium, #575960);
}
.intro__title {
  font-family: var(--_font-default, "Manrope", Helvetica, Arial, sans-serif);
  font-weight: 300;
  font-size: clamp(32px, 5.2vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(16px, 2vw, 28px);
  color: var(--t-bright, #121212);
}
.intro__lead {
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.65;
  margin: 0;
}

/* Three Books section, uses the same APANI system tokens and spacing
   as the downloads section directly beneath it. Restrained, editorial. */
.three-books {
  padding-block: clamp(56px, 8vw, 120px);
  background-color: var(--base, #ffffff);
  color: var(--t-bright, #121212);
  border-top: 1px solid rgba(18, 18, 18, 0.06);
}
.three-books__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 40px);
}
.three-books__head {
  max-width: 780px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.three-books__eyebrow {
  display: inline-block;
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: clamp(16px, 1.6vw, 24px);
  color: var(--t-medium, #575960);
}
.three-books__title {
  font-family: var(--_font-default, "Manrope", Helvetica, Arial, sans-serif);
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(16px, 1.8vw, 24px);
}
.three-books__intro {
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.65;
  margin: 0;
}
.three-books__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
@media (min-width: 768px) {
  .three-books__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .three-books__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.book-card {
  border: 1px solid rgba(18, 18, 18, 0.12);
  border-radius: 6px;
  padding: clamp(24px, 2.6vw, 36px);
  background-color: rgba(18, 18, 18, 0.02);
  transition: border-color 220ms ease, background-color 220ms ease;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.4vw, 18px);
  height: 100%;
}
.book-card:hover { border-color: rgba(18, 18, 18, 0.22); }
.book-card__eyebrow {
  font-family: var(--_font-accent, "JetBrains Mono", ui-monospace, monospace);
  font-size: clamp(11px, 0.85vw, 12px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--t-medium, #575960);
}
.book-card__title {
  font-family: var(--_font-default, "Manrope", Helvetica, Arial, sans-serif);
  font-weight: 500;
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* Stronger than --t-medium / weight 300 so the subtitle stays readable,
   but still lighter than the title (#121212 / 500 / 20–24px). */
h3.book-card__title .book-card__subtitle,
.book-card__subtitle {
  font-weight: 500;
  font-size: clamp(14px, 1vw, 16px);
  letter-spacing: 0.02em;
  color: #2c2d33;
  opacity: 1;
  text-transform: none;
}
.book-card__description {
  margin: 0;
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.65;
}
.book-card__pull {
  margin: auto 0 0;
  padding-top: clamp(12px, 1.2vw, 16px);
  border-top: 1px solid rgba(18, 18, 18, 0.1);
  font-family: var(--_font-default, "Manrope", Helvetica, Arial, sans-serif);
  font-weight: 500;
  font-size: clamp(14px, 1vw, 16px);
  letter-spacing: -0.005em;
  color: var(--t-bright, #121212);
}
.three-books__signature {
  margin: clamp(32px, 4vw, 56px) 0 0;
  font-family: var(--_font-accent, "JetBrains Mono", ui-monospace, monospace);
  font-size: clamp(11px, 0.85vw, 13px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--t-medium, #575960);
  text-align: right;
}

/* Reading-action emphasis inside download cards. Flipbook (primary) keeps
   the standard APANI btn-line treatment at full ink; PDF (secondary) sits
   at reduced weight so the visual hierarchy tells the reader that online
   reading is the first-class experience. */
.apani-download-row--primary .apani-download-row__kind {
  font-weight: 700;
  color: var(--t-bright, #121212);
}
.apani-download-row--primary .apani-download-row__cta {
  font-weight: 600;
}
.apani-download-row--secondary .apani-download-row__kind {
  color: var(--t-medium, #575960);
}

/* Contact & copyright sections, minimal, premium. */
.site-contact {
  padding-block: clamp(48px, 6vw, 80px);
  background-color: var(--base, #ffffff);
  color: var(--t-bright, #121212);
  border-top: 1px solid rgba(18, 18, 18, 0.08);
}
.site-contact__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
}
.site-contact__label {
  font-size: clamp(12px, 0.9vw, 13px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--t-medium, #575960);
}
.site-contact__email {
  font-family: var(--_font-default, "Manrope", Helvetica, Arial, sans-serif);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 300;
  letter-spacing: -0.005em;
  color: var(--t-bright, #121212);
  transition: letter-spacing 200ms ease;
}

.site-copyright {
  padding-block: clamp(20px, 2.4vw, 36px) clamp(28px, 3vw, 48px);
  background-color: var(--base, #ffffff);
  color: var(--t-bright, #121212);
}
.site-copyright__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 40px);
  font-size: clamp(11px, 0.85vw, 13px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--t-medium, #575960);
  line-height: 1.5;
}

/* Nudge the downloads section: the site is a single scrolling page here
   (no pinned hero), so drop the z-index trick that lifted it above a
   pinned element in the source project. */
.apani-downloads { z-index: auto; }

/* Container fallback, plugins.css supplies `.container-xxl` from
   Bootstrap; if a future trim removes it, this keeps the block sane. */
.container-xxl {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

/* Prevent horizontal overflow at every viewport. */
html, body { overflow-x: hidden; }

/* Buttons: the .btn-line component from main.css needs a little padding
   headroom to sit comfortably at mobile widths inside a download row. */
@media (max-width: 480px) {
  .apani-download-row__cta { min-height: 44px; }
}

