.portals {
  position: relative;
  z-index: 35;
  padding-top: clamp(6rem, 12vw, 11rem);
  padding-bottom: clamp(6rem, 12vw, 11rem);
  background:
    radial-gradient(circle at 85% 12%, rgba(119, 133, 109, .13), transparent 25rem),
    var(--paper);
}
.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 7rem);
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}
.section-intro .section-number { grid-column: 1 / -1; }
.section-intro h2 {
  margin: 0;
  max-width: 10ch;
  font-family: var(--serif);
  font-size: clamp(4rem, 7vw, 8rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .88;
}
.section-intro > p:last-child {
  margin: 0;
  max-width: 32rem;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.5;
}

.portal-fallback {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--sage-dark) 16%, transparent);
  border-radius: clamp(1.25rem, 2.8vw, 2.75rem);
  background: color-mix(in srgb, var(--sage-dark) 16%, transparent);
}
.portal-fallback__card {
  position: relative;
  min-height: 24rem;
  padding: clamp(1.5rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--paper-bright);
}
.portal-fallback__card:nth-child(even) {
  background: var(--forest);
  color: var(--white);
}
.portal-fallback__card > p:first-child {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  left: 1.4rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  color: var(--coral-deep);
  font-size: .63rem;
  font-weight: 600;
  letter-spacing: .14em;
}
.portal-fallback__card:nth-child(even) > p:first-child { color: var(--gold); }
.portal-fallback__card > p:first-child span:last-child {
  font-family: var(--han);
  font-size: clamp(4.5rem, 8vw, 8rem);
  font-weight: 500;
  line-height: .8;
  opacity: .13;
}
.portal-fallback__card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 4.4vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .86;
}
.portal-fallback__card > p:nth-of-type(2) {
  position: relative;
  z-index: 1;
  margin: 1.2rem 0 0;
  max-width: 26rem;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.5;
}
.portal-fallback__card:nth-child(even) > p:nth-of-type(2) { color: rgba(255, 255, 255, .72); }
.portal-fallback__card small {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  padding-top: .75rem;
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.portal-ready .portal-fallback { display: none; }
.portal-ready .portal-stage { display: block; }

.portal-stage {
  display: none;
  position: relative;
  min-height: min(78rem, 84svh);
  overflow: hidden;
  isolation: isolate;
  border-radius: clamp(1.5rem, 3vw, 3.5rem);
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 36px 90px rgba(23, 43, 34, .16);
}
.portal-stage__images,
.portal-stage__images img,
.portal-stage__wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.portal-stage__images { z-index: -2; }
.portal-stage__images img {
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.07);
  filter: saturate(.7) contrast(1.05) brightness(.72);
  transition: opacity 1s ease, transform 1.6s var(--ease-out), filter 1s ease;
}
.portal-stage__images img.is-active {
  opacity: 1;
  transform: scale(1.015);
  filter: saturate(.92) contrast(1.03) brightness(.74);
}
/* The quiet second state of each room: while a door is active its alt plate
   breathes in and out over ~18s (board empty -> board prepped, midday ->
   golden, table set -> mid-meal). Reduced motion leaves the primary plate. */
.portal-stage__images img.portal-stage__alt.is-active {
  animation: portal-alt-breathe 18s ease-in-out infinite;
}
@keyframes portal-alt-breathe {
  0%, 24% { opacity: 0; }
  46%, 58% { opacity: 1; }
  82%, 100% { opacity: 0; }
}
html[data-energy="wild"] .portal-stage__images img.is-active { filter: saturate(1.12) contrast(1.08) brightness(.68); }
.portal-stage__wash {
  background:
    linear-gradient(90deg, rgba(9, 23, 17, .88), rgba(9, 23, 17, .46) 52%, rgba(8, 18, 13, .2)),
    linear-gradient(0deg, rgba(4, 12, 8, .82), transparent 48%);
}
.portal-stage__copy {
  position: absolute;
  z-index: 4;
  top: clamp(4rem, 11vh, 8rem);
  left: clamp(2rem, 6vw, 6.5rem);
  width: min(34rem, 44%);
}
.portal-stage__number {
  margin: 0 0 1.6rem;
  color: rgba(255, 255, 255, .62);
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: .15em;
}
.portal-stage__han {
  position: absolute;
  top: -4.5rem;
  right: -2rem;
  margin: 0;
  color: rgba(255, 255, 255, .09);
  font-family: var(--han);
  font-size: clamp(10rem, 18vw, 22rem);
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
}
.portal-stage__copy h3 {
  margin: 0;
  max-width: 10ch;
  font-family: var(--serif);
  font-size: clamp(4.2rem, 7vw, 8.5rem);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .85;
}
.portal-stage__copy > p:not(.portal-stage__number, .portal-stage__han) {
  max-width: 31rem;
  margin: 1.6rem 0 0;
  color: rgba(255, 255, 255, .78);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.55vw, 1.5rem);
  line-height: 1.45;
}
.portal-stage__copy > span {
  display: inline-block;
  margin-top: 2.2rem;
  padding-top: .8rem;
  border-top: 1px solid rgba(255, 255, 255, .35);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.portal-stage__doors {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(10, 22, 16, .58);
  border-top: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}
.portal-door {
  position: relative;
  min-height: 8rem;
  padding: 1.5rem clamp(1rem, 2vw, 2rem);
  display: grid;
  align-content: center;
  gap: .35rem;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .16);
  background: transparent;
  color: rgba(255, 255, 255, .62);
  text-align: left;
  transition: color .4s ease, background-color .4s ease;
}
.portal-door:last-child { border-right: 0; }
.portal-door span {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1;
}
.portal-door small {
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.portal-door i {
  position: absolute;
  right: 1.4rem;
  bottom: 1rem;
  left: 1.4rem;
  height: 1px;
  background: rgba(255, 255, 255, .2);
  overflow: hidden;
}
.portal-door i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--coral-bright);
  transform: translateX(-102%);
  transition: transform .65s var(--ease-out);
}
.portal-door:is(:hover, :focus-visible, .is-active) { color: var(--white); background: rgba(255, 255, 255, .06); }
.portal-door.is-active i::after { transform: translateX(0); }

.light-passage {
  --light-mix: .12;
  position: relative;
  z-index: 34;
  min-height: max(100svh, 48rem);
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-items: center;
  color: var(--white);
  background: var(--forest);
}
.light-passage__media,
.light-passage__media > *,
.light-passage__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.light-passage__media { z-index: -4; }
.light-passage__still {
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.03) brightness(.94);
  transform: scale(1.08) translate3d(0, var(--parallax-y, 0), 0);
  will-change: transform;
}
/* Two aligned stills of the same room, afternoon and golden; the drift only
   moves --light-mix, so the dissolve is the motion. A slow shared breathe
   keeps the frame alive without ever disturbing the alignment. */
.light-passage__still--day { opacity: calc(1 - var(--light-mix)); }
.light-passage__still--golden { opacity: var(--light-mix); }
.light-passage__scrim {
  background:
    linear-gradient(90deg, rgba(8, 20, 14, .84), rgba(7, 17, 12, .46) 55%, rgba(7, 14, 10, .42)),
    linear-gradient(180deg, rgba(6, 14, 10, .18), rgba(6, 14, 10, .65));
}
.light-passage__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: clamp(3rem, 9vw, 10rem);
  padding-top: 8rem;
  padding-bottom: 6rem;
}
.light-passage__copy h2 {
  margin: 1.2rem 0 0;
  max-width: 12ch;
  font-family: var(--serif);
  font-size: clamp(4rem, 8vw, 9rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .86;
}
.light-passage__copy > p:last-child {
  max-width: 33rem;
  margin: 2rem 0 0;
  color: rgba(255, 255, 255, .72);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.48;
}
.light-passage .section-number { color: rgba(255, 255, 255, .62); }

.flavor-wave {
  position: relative;
  z-index: 36;
  min-height: 42rem;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--coral);
  color: var(--paper-bright);
  transition: background-color .8s ease;
}
html[data-energy="wild"] .flavor-wave { background: var(--coral-deep); }
.flavor-wave__track {
  position: absolute;
  inset: 50% auto auto 0;
  display: flex;
  gap: clamp(2rem, 5vw, 6rem);
  width: max-content;
  color: rgba(255, 255, 255, .12);
  font-family: var(--han);
  font-size: clamp(12rem, 28vw, 32rem);
  font-weight: 600;
  line-height: .6;
  white-space: nowrap;
  transform: translateY(-50%);
  animation: flavor-marquee 30s linear infinite;
}
.flavor-wave__copy {
  position: relative;
  z-index: 2;
  text-align: center;
}
.flavor-wave .section-number { color: rgba(255, 255, 255, .7); }
.flavor-wave h2 {
  margin: 1rem auto 0;
  max-width: 12ch;
  font-family: var(--serif);
  font-size: clamp(4rem, 8vw, 9rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .86;
}
.flavor-wave__copy > p:last-child {
  margin: 1.5rem auto 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  opacity: .78;
}

.mother-maker {
  position: relative;
  z-index: 37;
  min-height: 82rem;
  padding-top: clamp(7rem, 12vw, 12rem);
  padding-bottom: clamp(7rem, 12vw, 12rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  overflow: hidden;
  background: var(--paper);
}
.mother-maker::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 50%, rgba(199, 161, 94, .16), transparent 23rem),
    linear-gradient(90deg, transparent 49.95%, rgba(66, 85, 72, .14) 50%, transparent 50.05%);
}
.mother-maker__panel {
  position: relative;
  min-height: 38rem;
  padding: clamp(2.5rem, 5vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: clamp(1.5rem, 3vw, 3rem);
  transform: perspective(1000px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transform-style: preserve-3d;
  transition: transform .5s var(--ease-out), box-shadow .5s ease;
}
.mother-maker__panel:hover { box-shadow: 0 35px 80px rgba(25, 48, 37, .16); }
.mother-maker__panel--mother {
  color: var(--forest);
  background:
    radial-gradient(circle at 80% 15%, rgba(255, 255, 255, .9), transparent 15rem),
    linear-gradient(145deg, var(--sage-pale), #edf0e8 70%);
}
.mother-maker__panel--maker {
  color: var(--white);
  background:
    radial-gradient(circle at 15% 15%, rgba(230, 107, 84, .2), transparent 18rem),
    linear-gradient(145deg, var(--forest-2), #10231b 74%);
}
.mother-maker__panel .section-number { color: currentColor; opacity: .62; }
.mother-maker__han {
  position: absolute;
  top: 1rem;
  right: 2rem;
  margin: 0;
  font-family: var(--han);
  font-size: clamp(10rem, 18vw, 20rem);
  line-height: 1;
  opacity: .08;
}
.mother-maker__panel h2 {
  position: relative;
  z-index: 2;
  margin: 1rem 0 0;
  max-width: 8ch;
  font-family: var(--serif);
  font-size: clamp(4rem, 6.5vw, 7.5rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .86;
}
.mother-maker__panel > p:last-child {
  position: relative;
  z-index: 2;
  max-width: 28rem;
  margin: 1.8rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.4vw, 1.4rem);
  line-height: 1.48;
  opacity: .75;
}
.mother-maker__mark {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  width: clamp(7rem, 11vw, 12rem);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 16px 26px rgba(24, 42, 32, .22));
  pointer-events: none;
}
.mother-maker__orbit {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: clamp(18rem, 33vw, 35rem);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--sage-dark) 15%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: maker-orbit 40s linear infinite;
  pointer-events: none;
}
.mother-maker__orbit span {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--ink-soft);
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.mother-maker__orbit span:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateX(50%) translateX(calc(clamp(18rem, 33vw, 35rem) / 2)) rotate(0deg); }
.mother-maker__orbit span:nth-child(2) { transform: translate(-50%, -50%) rotate(90deg) translateX(calc(clamp(18rem, 33vw, 35rem) / 2)) rotate(-90deg); }
.mother-maker__orbit span:nth-child(3) { transform: translate(-50%, -50%) rotate(180deg) translateX(calc(clamp(18rem, 33vw, 35rem) / 2)) rotate(-180deg); }
.mother-maker__orbit span:nth-child(4) { transform: translate(-50%, -50%) rotate(270deg) translateX(calc(clamp(18rem, 33vw, 35rem) / 2)) rotate(-270deg); }

.journal-scene {
  position: relative;
  z-index: 38;
  min-height: max(100svh, 52rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(22rem, .85fr);
  align-items: stretch;
  background: var(--paper-deep);
}
.journal-scene__image {
  position: relative;
  overflow: hidden;
  min-height: 40rem;
  transform: perspective(1200px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transform-style: preserve-3d;
}
.journal-scene__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.7) contrast(1.04);
  transform: scale(1.04);
  transition: transform 1.2s var(--ease-out), filter .8s ease;
}
.journal-scene__image:hover img { transform: scale(1.08); filter: saturate(.9) contrast(1.05); }
.journal-scene__shine {
  position: absolute;
  inset: -30%;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.28) 48%, transparent 61%);
  transform: translateX(var(--shine-x, -55%));
  mix-blend-mode: screen;
  pointer-events: none;
}
.journal-scene__copy {
  padding: clamp(5rem, 9vw, 9rem) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--forest);
}
.journal-scene__date {
  margin: 1.4rem 0 0;
  color: var(--ink-soft);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.journal-scene__copy h2 {
  margin: 1.2rem 0 0;
  max-width: 8ch;
  font-family: var(--serif);
  font-size: clamp(4rem, 7vw, 8rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .82;
}
.journal-scene__copy > p:not(.section-number, .journal-scene__date) {
  max-width: 31rem;
  margin: 1.8rem 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.45vw, 1.42rem);
  line-height: 1.5;
}
.journal-scene__copy .button-link { margin-top: 2.2rem; }
.journal-scene__copy .line-link { align-self: flex-start; margin-top: 1rem; }

.closing {
  position: relative;
  z-index: 39;
  min-height: max(100svh, 50rem);
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(120, 151, 126, .2), transparent 28rem),
    linear-gradient(145deg, var(--forest-2), #09170f 82%);
  color: var(--white);
}
.closing__rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: .45;
}
.closing__rings i {
  position: absolute;
  width: min(78vw, 76rem);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  animation: closing-ring 18s ease-in-out infinite;
}
.closing__rings i:nth-child(2) { width: min(58vw, 54rem); animation-delay: -6s; }
.closing__rings i:nth-child(3) { width: min(38vw, 34rem); animation-delay: -12s; }
.closing__mark {
  position: absolute;
  z-index: 1;
  right: 7vw;
  width: min(36vw, 34rem);
  opacity: .2;
  transform: rotate(7deg);
  filter: saturate(.5) drop-shadow(0 30px 60px rgba(0,0,0,.3));
}
.closing__copy {
  position: relative;
  z-index: 3;
  text-align: center;
}
.closing__copy > p:first-child {
  margin: 0;
  color: var(--gold);
  font-family: var(--han);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  letter-spacing: .55em;
}
.closing h2 {
  margin: 1.2rem auto 0;
  max-width: 11ch;
  font-family: var(--serif);
  font-size: clamp(4.6rem, 9vw, 10.5rem);
  font-weight: 400;
  letter-spacing: -.06em;
  line-height: .78;
}
.closing__copy > p:nth-of-type(2) {
  max-width: 39rem;
  margin: 2rem auto 0;
  color: rgba(255, 255, 255, .66);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  line-height: 1.48;
}
.closing .button-link { margin-top: 2.2rem; }

@keyframes flavor-marquee { to { transform: translate(-50%, -50%); } }
@keyframes maker-orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes closing-ring {
  0%, 100% { transform: scale(.92); opacity: .15; }
  50% { transform: scale(1.08); opacity: .5; }
}
