/* =====================================================================
   immersive.css  -  the homepage journey. A fixed Three.js canvas sits
   behind; DOM sections float above it as rooms you travel through.
   Soft asymmetry, circular frames, botanical accents, spacious rhythm.
   =====================================================================*/

/* The 3D world. */
canvas.world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* Calm fallback (no WebGL / reduced motion / scene.enabled:false). */
body.no3d canvas.world { display: none; }
body.no3d { background: var(--cream); }

/* -------- Journey layout -------- */
.journey { position: relative; z-index: 1; }

/* Sections size to their content with a uniform vertical rhythm, so the
   gap between any two sections is the same (each room's top + bottom
   padding). The hero gets extra top padding to clear the fixed bar. */
.room {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.6rem, 6vh, 4.4rem) clamp(1.2rem, 5vw, 3rem);
}
.hero-room { padding-top: clamp(6rem, 13vh, 8.5rem); }
.room > .inner { width: 100%; max-width: 1080px; }

/* Content drifts in as you arrive. */
.drift {
  opacity: 0;
  transform: translateY(46px) scale(.985);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.16, .6, .24, 1);
}
.drift.in { opacity: 1; transform: none; }
.drift.d2 { transition-delay: .15s; }
.drift.d3 { transition-delay: .3s; }

/* ============================ HERO ============================ */
.hero-room { text-align: left; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.hero-copy .eyebrow {
  font-weight: 800;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-size: .74rem;
  color: var(--coral);
  margin-bottom: 1.1rem;
}
.hero-copy h1 {
  font-size: clamp(3rem, 7.5vw, 5.4rem);
  font-weight: 600;
  margin-bottom: .35em;
}
.hero-copy h1 em {
  font-style: italic;
  color: var(--coral);
}
.hero-copy .lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-soft);
  max-width: 34em;
  margin-bottom: 1.6rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.hero-note {
  margin-top: 1.1rem;
  margin-bottom: 0;
  font-size: .85rem;
  color: var(--text-soft);
}
.hero-note b { color: var(--coral); }
.hero-note.stat {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--charcoal);
}
.hero-note.stat b { font-size: 1.3em; }

/* The hero's circular picture stack. */
.hero-art {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 460px;
  margin-left: auto;
}
.hero-art .disc {
  position: absolute;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 6px solid var(--white);
}
/* Stacked, cross-fading images inside a circular frame. */
.disc img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.disc img.on { opacity: 1; }
.disc img:only-child { opacity: 1; }
.hero-art .disc.main { inset: 6% 14% 14% 6%; }
.hero-art .disc.small {
  width: 34%; aspect-ratio: 1;
  right: 0; bottom: 4%;
  border-color: var(--white);
}
.hero-art .star {
  position: absolute;
  width: 46px; height: 46px;
  left: 8%; bottom: 2%;
  color: var(--coral);
  transform: rotate(14deg);
}

/* ====================== SECTION HEADINGS ====================== */
.room-head { text-align: center; margin-bottom: clamp(2rem, 5vh, 3.4rem); }
.room-head .eyebrow {
  font-weight: 800; letter-spacing: .26em; text-transform: uppercase;
  font-size: .72rem; color: var(--coral); margin-bottom: .8rem;
}
.room-head h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.room-head p { color: var(--text-soft); max-width: 38em; margin: 0 auto; }

/* ========================= BOOK SHELF ========================= */
.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
}
.book-card {
  display: block; text-decoration: none; color: inherit;
  background: color-mix(in srgb, var(--white) 88%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 14px 14px 1.2rem;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-pop); }
.book-card img {
  width: 100%;
  aspect-ratio: 16 / 10;         /* every cover box the same size */
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius-card) - 10px);
}
.book-card .title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--charcoal);
  margin: .8rem 0 .35rem;
  line-height: 1.3;
}
.book-card .tag {
  display: inline-block;
  font-size: .68rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  padding: .3em .9em; border-radius: var(--radius-pill);
}
.book-card .tag.enter { background: var(--coral); color: var(--text-on-accent); }
.book-card .tag.soon { background: var(--mist); color: var(--ink-soft); }

/* ========================= ABOUT ROOM ========================= */
.about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.about-art { position: relative; max-width: 400px; }
.about-art .disc {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  aspect-ratio: 1;
  border: 6px solid var(--white);
  box-shadow: var(--shadow-card);
}
.about-copy h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.about-copy p { color: var(--text-soft); max-width: 36em; }
.about-copy .sig {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--sage-deep);
}

/* ========================= HELLO ROOM ========================= */
.hello-room .inner { max-width: 720px; text-align: center; }
.hello-card {
  background: color-mix(in srgb, var(--white) 90%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(2rem, 5vw, 3.4rem);
}
.hello-card h2 { font-size: clamp(2rem, 4.6vw, 3rem); }
.hello-card p { color: var(--text-soft); max-width: 30em; margin: 0 auto 1.5rem; }
/* The email pop-up card. */
.email-pop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(56, 53, 47, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.email-pop.open { opacity: 1; pointer-events: auto; }
.email-pop-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  max-width: 420px;
  width: 100%;
  text-align: center;
  transform: translateY(14px);
  transition: transform .3s ease;
}
.email-pop.open .email-pop-card { transform: none; }
.email-pop-card p { color: var(--text-soft); margin-bottom: .4rem; }
.email-pop-card .addr {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--charcoal);
  margin-bottom: 1.2rem;
  user-select: all;          /* one tap selects the whole address */
}
.email-pop-card .pop-row { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.email-pop-close {
  position: absolute;
  top: .6rem; right: .9rem;
  border: none; background: none;
  font-size: 1.5rem; line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}
.footer-row {
  margin-top: 2.2rem;
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  justify-content: center;
  font-size: .85rem; color: var(--text-soft);
}
.footer-row a { color: var(--sage-deep); font-weight: 700; }

/* ------------------- small screens ------------------- */
@media (max-width: 780px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-art { margin: 0 auto; max-width: 320px; }
  .hero-room { text-align: center; }
  .hero-copy .lede { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .about-art { margin: 0 auto; }
  .about-copy { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .drift { transition: none; opacity: 1; transform: none; }
  .book-card { transition: none; }
  html { scroll-behavior: auto; }
}
