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

:root {
  --orange: rgb(228, 90, 0);
  --dark: rgb(34, 34, 34);
  --cream: rgb(242, 240, 233);
  --mid: rgb(136, 136, 136);
  --white: rgb(255, 255, 255);
  --near-black: rgb(17, 17, 17);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background: var(--cream);
  color: var(--dark);
  overflow-x: hidden;
  max-width: 100%;
  font-family: 'Space Grotesk', sans-serif;
}

/* ── HERO ── */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

#hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.08);
  animation: kenBurns 16s ease-in-out infinite;
}

@keyframes kenBurns {
  0%   { transform: scale(1.08) translate(0%, 0%); }
  25%  { transform: scale(1.14) translate(-1.5%, 1%); }
  50%  { transform: scale(1.18) translate(1%, -1.5%); }
  75%  { transform: scale(1.13) translate(1.5%, 0.5%); }
  100% { transform: scale(1.08) translate(0%, 0%); }
}

#hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(17,17,17,0.72) 0%,
    rgba(17,17,17,0.45) 50%,
    rgba(17,17,17,0.1) 100%
  );
}

#hero-content {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 280px 190px 280px;
  gap: 36px;
}

#hero-byline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.16em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: -4px;
}

#hero-logo {
  height: 230px;
  width: auto;
  max-width: 100%;
  display: block;
}

#hero-logo path {
  fill: var(--white);
}

#hero-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 48px;
  margin-top: 12px;
  max-width: none;
}

#hero-life {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 85px;
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-left: -4px;
}

#hero-tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.5;
  color: var(--white);
  padding-bottom: 8px;
}

#hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 2s 1.5s both;
}

#hero-scroll-hint span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.3);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.6); transform-origin: top; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── SECTION 1 — DESCRIPTION ── */
#description {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--dark);
  overflow: hidden;
  display: flex;
  align-items: center;
}

#desc-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#desc-content {
  position: relative;
  z-index: 2;
  padding: clamp(80px, 10vw, 196px) clamp(28px, 9.375vw, 180px);
  width: 100%;
  max-width: none;
}

.section-number {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: 0.18em;
  color: var(--mid);
  margin-bottom: clamp(40px, 5vw, 80px);
}

#desc-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: clamp(40px, 6vw, 120px);
  align-items: end;
  width: 100%;
}

#desc-headline {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 0.8vw, 16px);
}

.headline-line {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1;
  letter-spacing: 0.015em;
  color: var(--white);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.headline-line .orange-word { color: var(--orange); }
.headline-line.orange { color: var(--orange); }

.headline-line.visible {
  opacity: 1;
  transform: translateY(0);
}

#desc-body {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.55;
  color: var(--white);
  width: 720px;
  max-width: 100%;
  justify-self: end;
  padding-bottom: clamp(6px, 1vw, 14px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s 0.4s ease, transform 0.9s 0.4s ease;
}

#desc-body.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── SECTION 2 — EXCERPT ── */
#excerpt {
  width: 100%;
  background: var(--cream);
}

#excerpt-heading {
  padding: clamp(60px, 10vw, 196px) clamp(32px, 9.375vw, 180px) clamp(40px, 6vw, 96px);
  border-bottom: 1px solid var(--mid);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
}

#excerpt-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(28px, 2.5vw, 48px);
  letter-spacing: 0.1em;
  color: var(--orange);
}

#excerpt-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 1.875vw, 36px);
  letter-spacing: 0.1em;
  color: var(--mid);
}

#excerpt-body {
  padding: clamp(40px, 5vw, 96px) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#chapter-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(16px, 1.875vw, 36px);
  letter-spacing: 0.1em;
  color: var(--near-black);
  margin-bottom: 32px;
  width: 100%;
  max-width: 960px;
}

#chapter-title {
  font-family: 'Lora', serif;
  font-weight: 500;
  font-size: clamp(36px, 3.75vw, 72px);
  line-height: 1;
  color: var(--near-black);
  margin-bottom: clamp(40px, 5vw, 80px);
  width: 100%;
  max-width: 960px;
}

#excerpt-text {
  font-family: 'Lora', serif;
  font-size: clamp(16px, 1.3vw, 25px);
  line-height: 1.88;
  letter-spacing: 0.012em;
  color: var(--dark);
  text-align: justify;
  width: 100%;
  max-width: 960px;
}

#excerpt-text p {
  margin-bottom: 1.6em;
}

#excerpt-text p:last-child {
  margin-bottom: 0;
}

.excerpt-divider {
  text-align: center;
  color: var(--mid);
  font-size: 1.2em;
  letter-spacing: 0.5em;
  margin: 2.5em 0;
}

/* ── SECTION 3 — AUTHOR ── */
#author {
  width: 100%;
  background: var(--dark);
  padding: clamp(60px, 10vw, 196px) clamp(32px, 9.375vw, 180px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  overflow: hidden;
}

#author-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(80px, 12vw, 240px);
  line-height: 0.95;
  color: var(--white);
}

#author-right {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: clamp(20px, 3vw, 60px);
}

#author-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 1.875vw, 36px);
  letter-spacing: 0.1em;
  color: var(--mid);
  margin-bottom: 32px;
}

#author-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 3.75vw, 72px);
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 36px;
}

#author-bio {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(16px, 1.35vw, 26px);
  line-height: 1.85;
  color: var(--white);
}

/* ── SECTION 4 — FOOTER ── */
#footer {
  width: 100%;
  background: var(--dark);
  border-top: 1px solid rgba(136,136,136,0.25);
  padding: clamp(60px, 5vw, 98px) clamp(32px, 9.375vw, 180px) clamp(80px, 15vw, 280px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  overflow: hidden;
}

#footer-left {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#footer-available {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(24px, 2.5vw, 48px);
  letter-spacing: 0.02em;
  color: var(--mid);
  margin-bottom: 32px;
}

#book-cover-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

#book-cover {
  width: 100%;
  display: block;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

#buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 72px;
  border-radius: 100px;
  background: var(--white);
  color: var(--orange);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 1.35vw, 22px);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease,
    background 0.2s ease;
  position: relative;
  overflow: hidden;
}

#buy-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  box-shadow: 0 0 0 0 rgba(228,90,0,0);
  transition: box-shadow 0.3s ease;
}

#buy-btn:hover {
  transform: scale(1.04);
  background: var(--white);
  box-shadow: 0 8px 40px rgba(228,90,0,0.45), 0 2px 12px rgba(228,90,0,0.2);
}

#buy-btn:hover::after {
  box-shadow: 0 0 0 3px rgba(228,90,0,0.25);
}

#buy-btn:active {
  transform: scale(0.98);
}

#footer-right {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: clamp(0px, 2vw, 40px);
}

#footer-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 1.875vw, 36px);
  letter-spacing: 0.1em;
  color: var(--mid);
  margin-bottom: 32px;
}

#footer-thanks-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 3.75vw, 72px);
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 36px;
}

#footer-thanks-body {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(15px, 1.35vw, 26px);
  line-height: 1.85;
  color: var(--white);
  margin-bottom: 60px;
}

#footer-contact-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 1.875vw, 36px);
  letter-spacing: 0.1em;
  color: var(--mid);
  margin-bottom: 16px;
  margin-top: 24px;
}

#footer-contact-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 3.75vw, 72px);
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 16px;
}

#footer-contact-body {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: clamp(14px, 1.1vw, 22px);
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
}

#footer-contact-body a {
  color: var(--orange);
  text-decoration: none;
  transition: opacity 0.2s;
}

#footer-contact-body a:hover { opacity: 0.75; }

#footer-domain {
  margin-top: 60px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(136,136,136,0.5);
  text-transform: uppercase;
}

/* ══════════════════════════════════════════
   DYNAMIC ENHANCEMENTS
   All new rules are additive — no overrides
   to existing layout or visual design.
══════════════════════════════════════════ */

/* ── STICKY NAV ── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 80px);
  height: 64px;
  pointer-events: none;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease, height 0.35s ease;
}

#site-nav.nav-scrolled {
  pointer-events: auto;
  background: rgba(17, 17, 17, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  height: 52px;
}

.nav-logo-mark {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--white);
  pointer-events: none;
  user-select: none;
}

#site-nav.nav-scrolled .nav-logo-mark {
  opacity: 1;
  transform: translateY(0);
}

.nav-buy-link {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s 0.05s ease, transform 0.3s 0.05s ease, color 0.2s ease;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  text-decoration: none;
  pointer-events: none;
}

#site-nav.nav-scrolled .nav-buy-link {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-buy-link:hover {
  color: var(--white);
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  --reveal-y: 24px;
  --reveal-x: 0px;
  transform: translateX(var(--reveal-x)) translateY(var(--reveal-y));
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal-left {
  --reveal-x: -32px;
  --reveal-y: 0px;
}

.reveal.reveal-right {
  --reveal-x: 32px;
  --reveal-y: 0px;
}

.reveal.reveal-scale {
  transform: scale(0.96) translateY(16px);
}

.reveal.is-visible {
  opacity: 1;
  --reveal-y: 0px;
  --reveal-x: 0px;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.18s; }
.reveal-delay-3 { transition-delay: 0.28s; }
.reveal-delay-4 { transition-delay: 0.40s; }



/* ── HOVER STATES ── */

/* Section numbers — subtle lift */
.section-number {
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.section-number:hover {
  color: var(--white);
  transform: translateX(4px);
}

/* Book cover — lift + shadow */
#book-cover {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

#book-cover:hover {
  transform: translateY(-8px) rotate(-1deg) scale(1.025);
  box-shadow: 0 40px 80px rgba(0,0,0,0.65), 0 8px 24px rgba(228,90,0,0.18);
}

/* Contact link — animated underline */
#footer-contact-body a {
  position: relative;
}

#footer-contact-body a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--orange);
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

#footer-contact-body a:hover::after {
  width: 100%;
}

/* Excerpt heading label hover */
#excerpt-label {
  transition: color 0.2s ease;
  cursor: default;
}

/* ── CLICK / TAP RIPPLE ── */
.ripple-host {
  position: relative;
  overflow: hidden;
}

@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}

.ripple-circle {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,0.25);
  pointer-events: none;
  animation: ripple-expand 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ── HERO IMAGE LOAD STATE ── */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--near-black);
  z-index: 1;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

#hero.hero-loaded::before {
  opacity: 0;
}

/* ── CHAPTER TITLE HOVER ── */
#chapter-title {
  transition: color 0.2s ease;
}

/* ── AUTHOR NAME HOVER ── */
#author-name {
  transition: letter-spacing 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#author-name:hover {
  letter-spacing: 0.01em;
}

/* ── SCROLL PROGRESS BAR ── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--orange);
  z-index: 200;
  transform-origin: left;
  transition: width 0.1s linear;
  pointer-events: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .headline-line {
    opacity: 1 !important;
    transform: none !important;
  }

  #desc-body {
    opacity: 1 !important;
    transform: none !important;
  }

  #hero-img {
    animation: none !important;
  }


}

/* ── RESPONSIVE ── */
@media (max-width: 1400px) {
  #hero-content {
    padding: 0 clamp(40px, 8vw, 280px) clamp(60px, 12vw, 190px);
  }
  #hero-logo {
    height: clamp(140px, 16vw, 230px);
  }
  #hero-life {
    font-size: clamp(56px, 6vw, 85px);
  }
  #hero-tagline {
    font-size: clamp(18px, 1.8vw, 26px);
  }
  #hero-byline {
    font-size: clamp(16px, 1.6vw, 22px);
  }
}

@media (max-width: 900px) {
  #hero-content {
    width: 85%;
  }

  #desc-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  #author {
    grid-template-columns: 1fr;
  }

  #author-name {
    font-size: clamp(80px, 25vw, 160px);
  }

  #footer {
    grid-template-columns: 1fr;
  }

  #excerpt-body {
    padding: clamp(40px, 5vw, 96px) clamp(24px, 8vw, 80px);
  }
}

@media (max-width: 600px) {
  #hero-content {
    width: 100%;
    padding: 40px 28px 72px;
  }

  #excerpt-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  #excerpt-body {
    padding: 40px 24px;
  }
}

/* ══════════════════════════════════════════
   RESPONSIVE — fluid widths & mobile fit
   Converts the hard-coded pixel widths/insets
   from direct edits into fluid caps so the
   layout reflows on tablet & phone. Desktop
   composition is preserved (values cap at the
   original sizes on wide viewports).
══════════════════════════════════════════ */

/* Fixed px widths become max-width caps so columns can shrink */
#desc-body,
#author-right, #author-heading, #author-bio,
#footer-right, #footer-num, #footer-thanks-heading, #footer-thanks-body,
#footer-contact-num, #footer-contact-label, #footer-contact-body {
  width: 100% !important;
  max-width: 720px !important;
}
#desc-body { margin-right: 0 !important; }
#author-num { width: auto !important; }

/* Tablet & below */
@media (max-width: 900px) {
  #footer-right {
    align-items: flex-start !important;
  }
  #footer-contact-body a[href^="mailto"] {
    word-break: break-word;
  }
}

/* Phone */
@media (max-width: 700px) {
  #hero-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 8px;
  }
  #hero-life {
    font-size: clamp(46px, 13vw, 85px) !important;
  }
  #excerpt-heading {
    height: auto !important;
    min-height: 0 !important;
  }
  #author-name,
  #footer-available {
    padding-top: 0 !important;
  }
}

@media (max-width: 480px) {
  #site-nav {
    padding: 0 20px;
  }
  #excerpt-text {
    text-align: left;
  }
}
