#dreama.dreama-chapter {
  position: relative;
  z-index: 19;
  isolation: isolate;
  padding: 0;
  min-height: 0;
  overflow: visible;
  background: #12111d;
  color: #faf9fc;
}
#dreama.dreama-chapter::before { content: none; }
.dreama-chapter h2, .dreama-chapter h3, .dreama-chapter p, .dreama-chapter figure { margin: 0; }
.dreama-chapter h2, .dreama-chapter h3 { font-weight: 450; line-height: .98; letter-spacing: 0; text-transform: uppercase; }
.dreama-chapter .section-index { margin-bottom: 28px; font-size: 11px; line-height: 1.6; text-transform: uppercase; letter-spacing: 0; }

.dreama-scene { position: absolute; inset: 0 0 auto; height: var(--dreama-opening-height, max(780px, calc(100svh - 32px))); overflow: hidden; pointer-events: none; background: #12111d; z-index: -1; }
.dreama-scene img, #dreama-scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dreama-depth-stage, .dreama-depth-layer { position: absolute; inset: 0; }
.dreama-depth-stage { transform-origin: 57% 53%; }
.dreama-depth-stage { animation: dreama-camera-push 14s linear infinite alternate; }
.dreama-depth-layer[data-dreama-depth="background"] { animation: dreama-far-drift 34s ease-in-out infinite; }
.dreama-depth-layer[data-dreama-depth="midground"] { animation: dreama-landscape-drift 38s ease-in-out infinite; }
.dreama-depth-layer[data-dreama-depth="foreground"] { animation: dreama-near-drift 28s ease-in-out infinite; }
.dreama-scene .dreama-portal-light { animation: dreama-portal-breathe 5.2s ease-in-out infinite; }
.dreama-scene .dreama-house-light { animation: dreama-house-breathe 8.6s ease-in-out infinite; }
.dreama-motion-paused .dreama-depth-stage,
.dreama-motion-paused .dreama-depth-layer,
.dreama-motion-paused .dreama-portal-light,
.dreama-motion-paused .dreama-house-light { animation-play-state: paused; }
@keyframes dreama-camera-push {
  0% { transform: scale(1); animation-timing-function: cubic-bezier(.33, 0, .67, .33); }
  8% { transform: scale(1.002174); animation-timing-function: linear; }
  92% { transform: scale(1.047826); animation-timing-function: cubic-bezier(.33, .67, .67, 1); }
  100% { transform: scale(1.05); }
}
@keyframes dreama-far-drift {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.003); }
}
@keyframes dreama-landscape-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  20% { transform: translate3d(5px, 3px, 0) scale(1.0035); }
  50% { transform: translate3d(0, -1px, 0) scale(1.001); }
  80% { transform: translate3d(-5px, -3px, 0) scale(1.0035); }
}
@keyframes dreama-near-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  18% { transform: translate3d(14px, 8px, 0) scale(1.008); }
  50% { transform: translate3d(2px, -2px, 0) scale(1.004); }
  82% { transform: translate3d(-14px, -8px, 0) scale(1.008); }
}
@keyframes dreama-portal-breathe {
  0%, 50%, 100% { filter: brightness(1); transform: scale(1); }
  25% { filter: brightness(1.1); transform: scale(1.006); }
  75% { filter: brightness(.9); transform: scale(.994); }
}
@keyframes dreama-house-breathe {
  0%, 50%, 100% { filter: brightness(1); }
  25% { filter: brightness(1.022); }
  75% { filter: brightness(.978); }
}
@media (prefers-reduced-motion: reduce) {
  .dreama-scene .dreama-depth-stage,
  .dreama-scene .dreama-depth-layer,
  .dreama-scene .dreama-portal-light,
  .dreama-scene .dreama-house-light { animation: none !important; transform: none; translate: none !important; }
}
.dreama-scene.is-active .dreama-depth-stage,
.dreama-scene.is-active .dreama-depth-layer { will-change: transform; }
.dreama-depth-layer[data-dreama-depth="midground"] {
  --dreama-mask: linear-gradient(to bottom, transparent 44%, #000 61%, #000 80%, transparent 95%);
}
.dreama-depth-layer[data-dreama-depth="foreground"] {
  --dreama-mask: radial-gradient(ellipse 62% 50% at 55% 48%, transparent 52%, #000 96%);
}
.dreama-portal-light {
  --dreama-mask: radial-gradient(ellipse 7% 10% at 57.6% 52.5%, #000 16%, transparent 100%);
  transform-origin: var(--dreama-portal-x, 57.6%) var(--dreama-portal-y, 52.5%);
}
.dreama-house-light {
  --dreama-mask: radial-gradient(ellipse 3.6% 4.8% at 38.4% 68.5%, #000 12%, transparent 100%), radial-gradient(ellipse 2.8% 4% at 52% 61%, #000 12%, transparent 100%);
}
.dreama-depth-layer[data-dreama-depth="midground"],
.dreama-depth-layer[data-dreama-depth="foreground"], .dreama-portal-light, .dreama-house-light {
  -webkit-mask-image: var(--dreama-mask);
  mask-image: var(--dreama-mask);
  -webkit-mask-size: var(--dreama-source-width, 100%) var(--dreama-source-height, 100%);
  mask-size: var(--dreama-source-width, 100%) var(--dreama-source-height, 100%);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
#dreama-scene-canvas { pointer-events: none; }
.has-dreama-scene .dreama-scene { position: fixed; height: 100%; visibility: hidden; }
.has-dreama-scene .dreama-scene.is-active { visibility: visible; }
.has-dreama-entry #dreama { margin-top: -100svh; }
.has-dreama-entry #imagination { height: calc(var(--dreama-base-height) + var(--dreama-exit-distance)); }

.dreama-entry { position: relative; min-height: max(780px, calc(100svh - 32px)); padding: 118px var(--page-x) 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 92px; }
.dreama-opening-copy { width: min(100%, 660px); text-shadow: 0 2px 22px #12111d55; }
.dreama-chapter #dreama-title { font-size: 120px; line-height: .9; }
.dreama-opening-title { font-size: 64px; line-height: 1.04; text-transform: uppercase; padding-top: 24px; }
.dreama-opening-footer { width: min(100%, 370px); text-shadow: 0 2px 16px #12111d; }
.dreama-opening-footer h3 { font-size: 42px; line-height: 1.04; }
.dreama-opening-footer > p { margin-top: 22px; font-size: 15px; line-height: 1.65; }

.dreama-human { position: relative; background: #14131d; padding-top: 104px; }
.dreama-human-heading { padding: 0 var(--page-x) 72px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 8%; align-items: end; }
.dreama-human-heading h3 { font-size: 76px; }
.dreama-human-heading > p { max-width: 340px; font-size: 17px; line-height: 1.7; color: #d0ced9; }
.dreama-human-image img { display: block; width: 100%; height: auto; }

/* Preserve the existing next-project teaser, outside the two Dreama pages. */
.future-reality-section { position: relative; z-index: 19; background: #101014; color: #f6f5f7; padding: 124px var(--page-x) 140px; }
.future-reality-section .section-index { margin: 0 0 28px; font-size: 11px; line-height: 1.6; text-transform: uppercase; letter-spacing: 0; }
.future-reality-section h2 { margin: 0; font-size: 88px; font-weight: 450; line-height: .98; letter-spacing: 0; text-transform: uppercase; }
.dreama-dark-nav .site-nav, .dreama-dark-nav .nav-identity { color: #fcfbff; text-shadow: 0 1px 12px #1118; }

/* Exit-only framing. Resting Section 02 styles and interaction remain unchanged. */
.dreama-bridge-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; }
.has-dreama-entry #imagination.dreama-exiting,
.has-dreama-entry #imagination.dreama-passed { background: transparent; }
.dreama-passed { pointer-events: none; }
.dreama-exiting .imagination-frame { position: fixed; inset: 0; height: 100svh; opacity: var(--dreama-frame-alpha, 1); }
.dreama-passed .imagination-frame { visibility: hidden; }
.dreama-exiting .imagination-object { position: absolute; margin: 0; left: var(--dreama-object-x); top: var(--dreama-object-y); width: var(--dreama-object-width); height: var(--dreama-object-height); transform: translate(-50%, -50%); }
.dreama-exiting .imagination-ground { opacity: var(--dreama-ground-alpha, 1); }
.dreama-exiting .dreama-bridge-backdrop { opacity: var(--dreama-backdrop-alpha, 0); }
.dreama-exiting .imagination-copy { opacity: var(--dreama-copy-alpha, 1) !important; }

@media (min-width: 1700px) {
  .dreama-chapter #dreama-title { font-size: 152px; }
  .dreama-opening-title { font-size: 80px; }
  .dreama-opening-footer h3 { font-size: 48px; }
  .dreama-human-heading h3 { font-size: 90px; }
}
@media (max-width: 1100px) {
  .dreama-chapter #dreama-title { font-size: 90px; }
  .dreama-opening-title { font-size: 48px; }
  .dreama-opening-footer h3 { font-size: 36px; }
  .dreama-human-heading { gap: 6%; }
  .dreama-human-heading h3 { font-size: 58px; }
}
@media (max-width: 700px) {
  .dreama-exiting .imagination-copy { opacity: 0 !important; }
  .dreama-entry { min-height: max(720px, calc(100svh - 24px)); padding-top: 104px; padding-bottom: 38px; gap: 110px; }
  .dreama-chapter #dreama-title { font-size: 66px; }
  .dreama-opening-title { font-size: 40px; padding-top: 18px; }
  .dreama-opening-footer { width: min(100%, 310px); }
  .dreama-opening-footer h3 { font-size: 32px; }
  .dreama-opening-footer > p { margin-top: 18px; font-size: 14px; line-height: 1.6; }
  .dreama-human { padding-top: 76px; }
  .dreama-human-heading { display: block; padding-bottom: 44px; }
  .dreama-human-heading h3 { font-size: 44px; }
  .dreama-human-heading > p { margin-top: 30px; font-size: 16px; }
  .future-reality-section { padding-top: 85px; padding-bottom: 90px; }
  .future-reality-section h2 { font-size: 56px; }
}
@media (max-width: 360px) {
  .dreama-chapter #dreama-title { font-size: 58px; }
  .dreama-opening-title { font-size: 36px; }
  .dreama-human-heading h3 { font-size: 38px; }
}
@media (max-height: 650px) and (min-width: 701px) {
  .dreama-entry { min-height: max(520px, calc(100svh - 24px)); padding-top: 85px; padding-bottom: 32px; gap: 44px; }
  .dreama-chapter #dreama-title { font-size: 78px; }
  .dreama-opening-title { font-size: 42px; padding-top: 18px; }
  .dreama-opening-copy .section-index { margin-bottom: 18px; }
  .dreama-opening-footer h3 { font-size: 28px; }
  .dreama-opening-footer > p { font-size: 13px; margin-top: 14px; }
}
