/* ==========================================================================
   Operating Environments — Homepage
   Visual DNA reference: "Behind the Door" cover — warm ivory/parchment,
   strong near-black type, restrained dark wooden door, narrow amber light.

   Interaction model: guided full-screen sequence. Each major section is a
   self-contained viewport-height "frame" (see .frame / .frame__stack /
   .frame__cue below). Content within a frame is vertically centered in the
   space above its cue; the cue itself is pinned near the bottom edge and is
   always visible without scrolling.
   ========================================================================== */

:root {
  --ivory: #F1E8D6;      /* hero */
  --cream: #F4EEE2;      /* look-closer */
  --parchment: #EAE2CF;  /* definition */
  --ink: #1C1712;        /* near-black type */
  --charcoal-soft: #4A4038;
  --charcoal-faint: #7A6F63;
  --amber: #D98B3F;
  --amber-soft: #F1B26B;
  --line: rgba(28, 23, 18, 0.12);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Archivo Black", "Inter", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p { margin: 0; }

/* ==========================================================================
   FULL-SCREEN FRAME SYSTEM
   Every major section (.hero, .definition, .look-closer, .field-guide)
   also carries .frame. Each frame is exactly one viewport tall; its content
   block is vertically centered in the space above the cue, and the cue is
   pinned near the bottom so it is always visible without scrolling.
   ========================================================================== */

.frame {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.frame__stack {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 3vh, 2.25rem) 1.5rem 0;
}

.frame__cue {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(0.75rem, 2.5vh, 1.5rem) 1.5rem clamp(1.5rem, 5vh, 3rem);
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  background: var(--ivory);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 40rem;
  width: 100%;
}

.hero__headline {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, min(5vw, 4.6vh), 2.9rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.14;
  margin: 0 0 clamp(1.2rem, min(4.5vw, 4vh), 2.4rem) 0;
}

/* Door — the central, still visual object. It is the actual canonical
   door from the "Behind the Door" cover artwork (isolated from a
   high-resolution source), not a redrawn approximation. Only the light
   leaking from the gap breathes; the door itself never moves. */
.hero__door-wrap {
  position: relative;
  width: clamp(128px, min(20vw, 22vh), 220px);
  margin: 0 auto;
  filter: drop-shadow(0 18px 28px rgba(28, 20, 12, 0.14));
}

.hero__door-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Warm amber light spilling through the right-side opening of the door.
   The door itself is completely static — only this overlay's intensity
   breathes. Kept on the same ~5s rhythm as the nav-cue pulses below. */
.hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 30% 46% at 77% 39%, rgba(255, 214, 158, 0.98) 0%, rgba(255, 197, 132, 0.85) 24%, rgba(244, 178, 107, 0.5) 46%, rgba(217, 139, 63, 0.16) 68%, rgba(217, 139, 63, 0) 82%);
  mix-blend-mode: screen;
  animation: doorGlow 5s ease-in-out infinite;
  pointer-events: none;
  transform-origin: 77% 39%;
}

@keyframes doorGlow {
  0%, 100% { opacity: 0.55; filter: brightness(1) saturate(1); }
  50%      { opacity: 1;    filter: brightness(1.75) saturate(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__glow { animation: none; opacity: 0.92; filter: brightness(1.3); }
}

.hero__subhead {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(1.05rem, min(2.6vw, 2.6vh), 1.7rem);
  color: var(--charcoal-soft);
  letter-spacing: 0.01em;
  line-height: 1.45;
  margin-top: clamp(1.2rem, min(4.5vw, 4vh), 2.4rem);
  max-width: 30rem;
}

.hero__cta-arrow {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.hero__cta:hover .hero__cta-arrow,
.hero__cta:focus-visible .hero__cta-arrow {
  transform: translateY(2px);
}

/* ==========================================================================
   SHARED NAV-CUE PULSE SYSTEM
   Used by "Look closer", "Look again", and the video section's "Field
   Guide" cue. Same restrained ~5s breathing rhythm as the door glow so all
   four (including the Field Guide CTA) read as one calm, related system.
   Larger and more legible than before; still editorial, not app-chrome.
   ========================================================================== */

.nav-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--charcoal-faint);
  font-family: var(--sans);
  font-size: clamp(0.92rem, 1.3vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
  animation: cuePulse 5s ease-in-out infinite;
}

.nav-cue:hover,
.nav-cue:focus-visible {
  color: var(--ink);
  letter-spacing: 0.26em;
}

@keyframes cuePulse {
  0%, 100% { opacity: 0.55; color: var(--charcoal-faint); }
  50%      { opacity: 1;    color: var(--amber); }
}

@media (prefers-reduced-motion: reduce) {
  .nav-cue { animation: none; opacity: 1; color: var(--ink); }
}

/* "Get the Field Guide" joins the same bottom-of-frame progression — it
   keeps its own button styling (underline, no arrow, opens the modal
   instead of scrolling) but breathes on the identical 5s rhythm. */
.field-guide__cta {
  font-size: clamp(0.86rem, 1.1vw, 0.95rem);
  animation: cuePulse 5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .field-guide__cta { animation: none; opacity: 1; color: var(--ink); border-color: var(--ink); }
}

/* ==========================================================================
   SECTION 2 — DEFINITION
   ========================================================================== */

.definition {
  background: var(--parchment);
  border-top: 1px solid var(--line);
}

.definition__inner {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

.definition__label {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--charcoal-faint);
  margin-bottom: clamp(1rem, min(3.2vw, 3.2vh), 1.8rem);
}

.definition__primary {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.25rem, min(3vw, 3.4vh), 2.1rem);
  line-height: 1.42;
  color: var(--ink);
  margin-bottom: clamp(1.2rem, min(3.6vw, 3.4vh), 2.2rem);
}

.definition__supporting {
  max-width: 34rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.definition__supporting p {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.92rem, min(1.6vw, 2vh), 1.05rem);
  line-height: 1.6;
  color: var(--charcoal-soft);
}

.definition__final {
  font-family: var(--serif) !important;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.006em;
  font-size: clamp(1.05rem, min(2vw, 2.4vh), 1.3rem) !important;
  color: var(--ink) !important;
  margin-top: 0.3rem;
  line-height: 1.5 !important;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 480px) {
  .hero__door-wrap { width: clamp(120px, 40vw, 200px); }
}

/* ==========================================================================
   SECTION 3 — LOOK CLOSER (video)
   ========================================================================== */

.look-closer {
  background: var(--cream);
  border-top: 1px solid var(--line);
}

.look-closer__inner {
  max-width: 44rem;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.look-closer__copy {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1rem, min(1.9vw, 2.4vh), 1.3rem);
  line-height: 1.5;
  color: var(--charcoal-soft);
  max-width: 34rem;
  margin: 0 auto clamp(1.2rem, min(3.4vw, 3.2vh), 2.2rem);
}

.look-closer__video {
  position: relative;
  width: min(46rem, 88vw, calc(46vh * 16 / 9));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: 1px solid var(--line);
  overflow: hidden;
}

.look-closer__video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   SECTION 4 — FIELD GUIDE
   ========================================================================== */

.field-guide {
  background: var(--parchment);
  border-top: 1px solid var(--line);
}

.field-guide__inner {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.field-guide__label {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--charcoal-faint);
  line-height: 1.6;
  margin-bottom: clamp(1.2rem, min(3.6vw, 3.4vh), 2.4rem);
}

.field-guide__copy {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 34rem;
  margin: 0 auto clamp(1.1rem, min(3vw, 2.6vh), 2rem);
}

.field-guide__copy p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(0.95rem, min(1.7vw, 2.1vh), 1.2rem);
  line-height: 1.5;
  color: var(--ink);
}

.field-guide__supporting {
  max-width: 32rem;
  margin: 0 auto clamp(1.4rem, min(3.4vw, 3vh), 2.6rem);
}

.field-guide__supporting p {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.86rem, min(1.4vw, 1.8vh), 1rem);
  line-height: 1.6;
  color: var(--charcoal-soft);
}

/* Book + companion Field Guide pairing — approved composition. Sizes,
   z-index, overlap and offsets are LOCKED and must not change. */
.field-guide__pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0 auto;
}

.field-guide__book {
  position: relative;
  z-index: 2;
  width: clamp(8rem, min(26vw, 24vh), 12.5rem);
  flex-shrink: 0;
  box-shadow: 0 20px 44px -14px rgba(28, 23, 18, 0.38);
}

.field-guide__book img {
  display: block;
  width: 100%;
  height: auto;
}

.field-guide__companion {
  position: relative;
  z-index: 1;
  width: clamp(5.5rem, min(18vw, 16.8vh), 8.5rem);
  aspect-ratio: 0.7727;
  flex-shrink: 0;
  margin-left: clamp(-2.6rem, -8vw, -1.8rem);
  transform: translateY(12%);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px -12px rgba(28, 23, 18, 0.28);
}

.field-guide__companion img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.field-guide__cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--ink);
  transition: opacity 0.3s ease;
}

.field-guide__cta:hover,
.field-guide__cta:focus-visible {
  opacity: 0.6;
}

/* ==========================================================================
   FIELD GUIDE — CAPTURE MODAL
   ========================================================================== */

.fg-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fg-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.fg-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 23, 18, 0.55);
}

.fg-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 26rem;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--ivory);
  border: 1px solid var(--line);
  padding: clamp(2.4rem, 6vw, 3.2rem) clamp(1.8rem, 5vw, 2.6rem);
  transform: translateY(8px);
  transition: transform 0.25s ease;
}

.fg-modal.is-open .fg-modal__dialog {
  transform: translateY(0);
}

.fg-modal__close {
  position: absolute;
  top: clamp(0.8rem, 2vw, 1.2rem);
  right: clamp(0.8rem, 2vw, 1.2rem);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--charcoal-faint);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.fg-modal__close:hover,
.fg-modal__close:focus-visible {
  color: var(--ink);
}

.fg-modal__intro {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
  margin: 0 0 clamp(1.8rem, 4.5vw, 2.4rem);
}

.fg-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.fg-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fg-form__field label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal-faint);
}

.fg-form__field input {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.fg-form__field input:focus {
  border-color: var(--ink);
}

.fg-form__field input:invalid.is-touched {
  border-color: var(--charcoal-soft);
}

.fg-form__error {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: #A6402A;
  margin: -0.4rem 0 0;
}

.fg-form__submit {
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory);
  background: var(--ink);
  border: none;
  padding: 0.95rem 1.4rem;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.fg-form__submit:hover,
.fg-form__submit:focus-visible {
  opacity: 0.85;
}

.fg-form__submit:disabled {
  opacity: 0.55;
  cursor: default;
}

.fg-modal__confirmation {
  text-align: center;
}

.fg-confirmation__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 0.9rem;
}

.fg-confirmation__body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--charcoal-soft);
  margin: 0;
}
