:root {
  --page-bg: #0d1117;
  --page-fg: #f6efe7;
  --muted: rgba(246, 239, 231, 0.74);
  --muted-strong: rgba(246, 239, 231, 0.88);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --surface-border: rgba(255, 255, 255, 0.12);
  --accent-warm: #ffc88c;
  --accent-soft: #f6e2c4;
  --accent-deep: #9a6d44;
  --accent-teal: rgba(127, 214, 208, 0.6);
  --text-dark: #2d241c;
  --text-deep: #142036;
  --max-width: 1240px;
  --touch-x: 34%;
  --touch-y: 72%;
  --touch-strength: 0.62;
  --light-energy: 0.5;
  --hero-title-color: #2d241c;
  --hero-description-color: rgba(67, 51, 36, 0.84);
  --hero-accent-color: #7f6242;
  --hero-chip-color: #5a4736;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Onest", "Manrope", system-ui, sans-serif;
  background: #0a1220;
  color: var(--page-fg);
  overflow-x: hidden;
  transition: color 0.42s ease;
}

/* ---------------------------------------------------------------------------
   Unified fixed backdrop — single source of light & depth for every page.
   Layer order (bottom -> top):
     1. __base   — palette wash (normal blend). Diagonal: lower-left warm/light,
                   upper-right cooler/darker. This is what gives morning its
                   contrasted top/right corner instead of an even white wash.
     2. __depth  — multiply layer that can actually DARKEN: warm shadow pooled
                   into the upper-right corner + a soft vignette. Real depth.
     3. __ambient— slow drifting light ribbons (soft-light). Atmosphere.
     4. __grain  — faint noise texture so flat fills never look plastic.
     5. __touch  — additive finger light (screen) following pointer.
     6. __halo   — tight warm core of the finger light (screen).
--------------------------------------------------------------------------- */
.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* Smart-home "breathing light": a global brightness multiplier driven by
     --ambient-dim (1 = neutral). Tap / scroll nudge it down then it eases
     back up. Independent of the additive finger halo (--touch-*), so the two
     effects compose without fighting. */
  filter: brightness(var(--ambient-dim, 1));
  transition: filter 0.5s cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .site-backdrop {
    filter: none;
    transition: none;
  }
}

.site-backdrop > * {
  position: absolute;
  inset: 0;
}

.site-backdrop__base {
  transition: background 0.5s ease;
}

.site-backdrop__depth {
  mix-blend-mode: multiply;
  transition: background 0.5s ease, opacity 0.5s ease;
}

.site-backdrop__ambient {
  border-radius: 999px;
  filter: blur(52px);
  mix-blend-mode: soft-light;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  transition: background 0.5s ease, opacity 0.5s ease;
}

.site-backdrop__ambient--one {
  inset: auto;
  width: 52vw;
  max-width: 540px;
  height: 34vh;
  left: -10%;
  top: 8%;
  animation: ribbonOne 14s infinite;
}

.site-backdrop__ambient--two {
  inset: auto;
  width: 38vw;
  max-width: 380px;
  height: 26vh;
  right: -8%;
  top: 18%;
  animation: ribbonTwo 16s infinite;
}

.site-backdrop__ambient--three {
  inset: auto;
  width: 58vw;
  max-width: 580px;
  height: 26vh;
  left: 16%;
  bottom: 4%;
  animation: ribbonThree 12s infinite;
}

.site-backdrop__grain {
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-backdrop__touch {
  mix-blend-mode: screen;
  filter: blur(36px);
  opacity: 0.95;
  transition: opacity 0.18s ease, background 0.5s ease;
}

.site-backdrop__halo {
  inset: auto;
  width: 36vw;
  max-width: 340px;
  height: 36vw;
  max-height: 340px;
  left: calc(var(--touch-x) - 18vw);
  top: calc(var(--touch-y) - 18vw);
  filter: blur(22px);
  mix-blend-mode: screen;
  opacity: 0.8;
  transition: left 0.09s linear, top 0.09s linear, background 0.5s ease;
}

@media (max-width: 540px) {
  .site-backdrop__halo {
    left: calc(var(--touch-x) - 28vw);
    top: calc(var(--touch-y) - 28vw);
    width: 56vw;
    height: 56vw;
  }

  /* Tame the display type so long Russian words fit narrow screens. */
  .hero__title {
    font-size: clamp(2.4rem, 12vw, 3.4rem);
    max-width: none;
  }

  .subhero__title {
    font-size: clamp(2.1rem, 10vw, 3rem);
  }

  .section-head__title,
  .cta-card__title {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
  }

  /* Keep the morning/evening toggle from overflowing the top row. The toggle
     keeps its full width (never shrinks into its own overflow:hidden clip), the
     brand truncates instead, and the row wraps as a last resort. */
  .hero__topbar {
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 22px;
  }

  .hero__brand {
    font-size: 11px;
    padding: 8px 12px;
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero__mode-toggle {
    flex-shrink: 0;
  }

  /* Smaller toggle pills on phones — both the home hero toggle and the
     subpage scene toggle. */
  .hero__mode-toggle,
  .scene-toggle {
    padding: 4px;
    gap: 3px;
  }

  .hero__mode-option,
  .scene-toggle__option {
    min-width: 0;
    padding: 7px 12px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

/* ----- MORNING backdrop -----
   Dawn diagonal: deep navy in the LOWER-RIGHT corner, lightening smoothly
   along the diagonal toward an almost-white UPPER-LEFT. Multi-stop so the
   navy -> light transition reads as a soft, continuous sunrise wash. */
body[data-scene="morning"] .site-backdrop__base {
  background:
    /* Primary diagonal: bottom-right navy -> top-left near-white. Navy is held
       to the lower-right corner; the long warm dawn band fills the rest with
       many soft stops so the hand-off never looks grey or banded. */
    linear-gradient(318deg,
      #16233f 0%,
      #1c2b4a 7%,
      #283755 13%,
      #3c4863 19%,
      #5a5f78 26%,
      #837f8a 33%,
      #ab9f95 40%,
      #cbb89e 48%,
      #ddc8a8 56%,
      #e9d6b6 64%,
      #f1e2c5 73%,
      #f7ecd6 82%,
      #fbf4e6 91%,
      #fdf9f1 100%),
    /* Warm dawn light gathered into the upper-left, normal blend. */
    radial-gradient(110% 95% at 8% 6%, rgba(255, 250, 238, 0.92) 0%, rgba(255, 247, 232, 0.35) 32%, rgba(255, 247, 232, 0) 58%);
}

/* Multiply: deepen the lower-right navy pool so it reads as a real dark
   corner, plus the faintest vignette. Keeps the diagonal continuous. */
body[data-scene="morning"] .site-backdrop__depth {
  opacity: 1;
  background:
    radial-gradient(95% 90% at 100% 100%, rgba(16, 28, 54, 0.55) 0%, rgba(26, 40, 70, 0.28) 24%, rgba(255, 255, 255, 0) 56%),
    radial-gradient(70% 70% at 100% 100%, rgba(10, 20, 42, 0.40) 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(150% 130% at 6% 4%, rgba(255, 255, 255, 0) 60%, rgba(70, 80, 104, 0.10) 100%);
}

body[data-scene="morning"] .site-backdrop__ambient--one {
  background: linear-gradient(90deg, rgba(255, 214, 158, 0.55), rgba(255, 241, 215, 0.30), rgba(255, 187, 110, 0.50));
}

body[data-scene="morning"] .site-backdrop__ambient--two {
  background: linear-gradient(90deg, rgba(120, 150, 200, 0.40), rgba(255, 206, 145, 0.18), rgba(150, 120, 90, 0.40));
}

body[data-scene="morning"] .site-backdrop__ambient--three {
  background: linear-gradient(180deg, rgba(255, 226, 182, 0), rgba(255, 206, 145, 0.34), rgba(214, 158, 96, 0.46));
}

body[data-scene="morning"] .site-backdrop__touch {
  background:
    radial-gradient(circle at var(--touch-x) var(--touch-y),
      rgba(255, 244, 222, calc(0.34 + var(--light-energy) * 0.30)) 0%,
      rgba(255, 226, 180, calc(0.20 + var(--light-energy) * 0.22)) 12%,
      rgba(255, 204, 150, calc(0.10 + var(--light-energy) * 0.14)) 22%,
      transparent 42%);
}

body[data-scene="morning"] .site-backdrop__halo {
  background: radial-gradient(circle,
    rgba(255, 248, 232, calc(0.34 + var(--touch-strength) * 0.20)) 0%,
    rgba(255, 222, 176, calc(0.16 + var(--touch-strength) * 0.12)) 34%,
    transparent 66%);
}

/* ----- EVENING backdrop (reference look — preserved) ----- */
body[data-scene="evening"] .site-backdrop__base {
  background:
    radial-gradient(120% 100% at 18% 96%, #16243d 0%, #101b30 42%, #0b1426 74%, #080f1d 100%),
    linear-gradient(118deg, rgba(255, 191, 127, 0.06) 0%, transparent 46%);
}

body[data-scene="evening"] .site-backdrop__depth {
  opacity: 0.9;
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(4, 8, 16, 0.55) 0%, rgba(8, 14, 26, 0.20) 34%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(150% 130% at 20% 98%, rgba(255, 255, 255, 0) 44%, rgba(2, 6, 12, 0.5) 100%);
}

body[data-scene="evening"] .site-backdrop__ambient {
  mix-blend-mode: screen;
  filter: blur(46px);
}

body[data-scene="evening"] .site-backdrop__ambient--one {
  background: linear-gradient(90deg, rgba(255, 188, 118, 0.24), rgba(255, 188, 118, 0.10), rgba(255, 188, 118, 0.20));
}

body[data-scene="evening"] .site-backdrop__ambient--two {
  background: linear-gradient(90deg, rgba(118, 221, 214, 0.16), rgba(255, 191, 127, 0.14), rgba(118, 221, 214, 0.10));
}

body[data-scene="evening"] .site-backdrop__ambient--three {
  background: linear-gradient(180deg, rgba(255, 208, 150, 0), rgba(255, 181, 111, 0.12), rgba(255, 167, 95, 0.22));
}

body[data-scene="evening"] .site-backdrop__touch {
  background:
    radial-gradient(circle at var(--touch-x) var(--touch-y),
      rgba(255, 222, 176, calc(0.20 + var(--light-energy) * 0.22)) 0%,
      rgba(255, 196, 134, calc(0.12 + var(--light-energy) * 0.14)) 16%,
      rgba(126, 219, 211, calc(0.06 + var(--light-energy) * 0.08)) 24%,
      transparent 40%);
}

body[data-scene="evening"] .site-backdrop__halo {
  background: radial-gradient(circle,
    rgba(255, 226, 185, calc(0.24 + var(--touch-strength) * 0.16)) 0%,
    rgba(126, 219, 211, calc(0.12 + var(--touch-strength) * 0.08)) 36%,
    transparent 64%);
}

a {
  color: inherit;
}

.page-enter {
  animation: pageFadeIn 0.82s cubic-bezier(.22, 1, .36, 1);
}

.page-shell,
.subpage-shell {
  transition:
    transform 0.58s cubic-bezier(.22, 1, .36, 1),
    opacity 0.52s ease,
    filter 0.52s ease;
}

.page-enter .page-shell,
.page-enter .subpage-shell {
  animation: shellRise 0.95s cubic-bezier(.2, 1, .22, 1);
}

.page-leaving .page-shell,
.page-leaving .subpage-shell {
  transform: translate3d(40px, 0, 0) scale(0.972);
  opacity: 0;
  filter: blur(10px);
}

.page-leaving .transition-overlay {
  opacity: 1;
  transform: scale(1);
}

.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.14);
  transition:
    opacity 0.5s ease,
    transform 0.72s cubic-bezier(.22, 1, .36, 1);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 216, 168, 0.62) 0%, rgba(255, 216, 168, 0.18) 22%, transparent 46%),
    radial-gradient(circle at 78% 76%, rgba(120, 221, 214, 0.3) 0%, rgba(120, 221, 214, 0.08) 18%, transparent 36%),
    linear-gradient(135deg, rgba(251, 244, 234, 0.30), rgba(237, 216, 183, 0.16), rgba(13, 21, 40, 0.82));
  backdrop-filter: blur(12px) saturate(1.18);
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shellRise {
  from {
    opacity: 0;
    transform: translate3d(0, 36px, 0) scale(0.98);
    filter: blur(12px);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(11, 17, 28, 0.82), rgba(11, 17, 28, 0.42));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.34s ease, border-color 0.34s ease, box-shadow 0.34s ease;
}

.site-header__brand,
.site-header__navlink,
.site-header__back {
  text-decoration: none;
  color: var(--page-fg);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.interactive-link,
.interactive-button,
.page-link-card {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    background 0.32s ease,
    color 0.32s ease,
    border-color 0.32s ease;
}

.interactive-button {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  cursor: pointer;
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    background 0.32s ease,
    color 0.32s ease,
    border-color 0.32s ease;
}

.site-header__brand,
.site-header__navlink {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    background 0.32s ease,
    color 0.32s ease,
    border-color 0.32s ease;
}

.interactive-link::before,
.interactive-button::before,
.portal-card::before,
.page-link-card::before,
.scene-toggle__option::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.10) 36%, transparent 72%);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.36s ease, transform 0.36s ease;
}

.interactive-link::after,
.interactive-button::after,
.page-link-card::after,
.hero__mode-option::after,
.scene-toggle__option::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.interactive-link:hover,
.interactive-link:focus-visible,
.interactive-button:hover,
.interactive-button:focus-visible,
.portal-card:hover,
.portal-card:focus-visible,
.page-link-card:hover,
.page-link-card:focus-visible,
.scene-toggle__option:hover,
.scene-toggle__option:focus-visible {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 36px rgba(255, 255, 255, 0.10);
  outline: none;
}

.interactive-link:hover::before,
.interactive-link:focus-visible::before,
.interactive-button:hover::before,
.interactive-button:focus-visible::before,
.portal-card:hover::before,
.portal-card:focus-visible::before,
.page-link-card:hover::before,
.page-link-card:focus-visible::before,
.scene-toggle__option:hover::before,
.scene-toggle__option:focus-visible::before,
.scene-toggle__option--active::before {
  opacity: 1;
  transform: scale(1);
}

.interactive-link:hover::after,
.interactive-link:focus-visible::after,
.interactive-button:hover::after,
.interactive-button:focus-visible::after,
.page-link-card:hover::after,
.page-link-card:focus-visible::after,
.hero__mode-option:hover::after,
.hero__mode-option:focus-visible::after,
.hero__mode-option--active::after,
.scene-toggle__option:hover::after,
.scene-toggle__option:focus-visible::after,
.scene-toggle__option--active::after {
  opacity: 0.88;
  transform: scaleX(1);
}

.page-shell {
  width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  padding: 18px;
  transition: color 0.45s ease;
}

/* Hero no longer carries its own competing light runtime — the shared
   site-backdrop shows through. The markup layer is kept but inert. */
.hero__interactive-layer {
  display: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100svh - 36px);
}

.hero__text,
.hero__topbar {
  min-width: 0;
}

.hero__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.hero__brand {
  padding: 10px 14px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero__mode-toggle,
.scene-toggle {
  padding: 6px;
  border-radius: 999px;
  display: flex;
  gap: 4px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.hero__mode-option,
.scene-toggle__option {
  appearance: none;
  border: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  position: relative;
  overflow: hidden;
  transition:
    background 0.28s ease,
    color 0.28s ease,
    opacity 0.28s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease,
    letter-spacing 0.28s ease;
  z-index: 1;
  min-width: 86px;
  text-align: center;
}

.hero__mode-option:hover,
.hero__mode-option:focus-visible,
.scene-toggle__option:hover,
.scene-toggle__option:focus-visible,
.scene-toggle__option--active {
  transform: translateY(-2px) scale(1.03);
  letter-spacing: 0.11em;
  outline: none;
}

.hero__text {
  max-width: 760px;
}

.hero__eyebrow,
.section-head__eyebrow,
.portal-card__eyebrow,
.hero-card__label,
.subhero__eyebrow,
.timeline-card__time,
.insight-card__eyebrow,
.journey-step__eyebrow,
.note-card__eyebrow,
.page-links__eyebrow {
  margin: 0 0 12px 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__title,
.section-head__title,
.subhero__title,
.journey-step__title,
.cta-card__title {
  font-family: "Spectral", "Cormorant Garamond", Georgia, serif;
  margin: 0;
  min-width: 0;
  overflow-wrap: break-word;
}

.hero__title {
  font-size: clamp(3.2rem, 9vw, 6rem);
  line-height: 0.92;
  max-width: 12ch;
  color: var(--hero-title-color);
  transition: color 0.12s linear, text-shadow 0.12s linear;
}

.hero__description {
  margin: 18px 0 0;
  max-width: 620px;
  font-size: clamp(1rem, 2.8vw, 1.18rem);
  line-height: 1.65;
  color: var(--hero-description-color);
  transition: color 0.12s linear;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero__chip {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  backdrop-filter: blur(10px);
  color: var(--hero-chip-color);
  transition: color 0.12s linear;
}

.hero__cards {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}

.hero-card {
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.34s ease,
    color 0.34s ease;
}

.hero-card:hover,
.hero-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
  outline: none;
}

.hero-card:focus-visible {
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18),
    0 0 0 2px rgba(255, 255, 255, 0.55);
}

.hero-card__title {
  margin: 0;
  font-size: clamp(1.65rem, 5vw, 2rem);
  line-height: 1.02;
}

.hero-card__text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
}

.page-section,
.subpage-section {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 48px 18px 80px;
  transition: color 0.34s ease;
}

.section-head {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-head__eyebrow,
.subhero__eyebrow,
.timeline-card__time,
.insight-card__eyebrow,
.journey-step__eyebrow,
.note-card__eyebrow,
.page-links__eyebrow {
  color: var(--accent-soft);
}

.section-head__title {
  font-size: clamp(2.4rem, 6.6vw, 4.6rem);
  line-height: 0.95;
  transition: color 0.34s ease;
}

.section-head__lead {
  margin: 16px 0 0;
  color: rgba(246, 239, 231, 0.76);
  line-height: 1.7;
  transition: color 0.34s ease;
}

.portal-grid,
.timeline-grid,
.insight-grid,
.journey-grid,
.page-links {
  display: grid;
  gap: 14px;
}

.portal-grid--single,
.timeline-grid--single,
.insight-grid--single {
  grid-template-columns: 1fr;
}

.portal-card,
.timeline-card,
.insight-card,
.journey-step,
.cta-card,
.page-link-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(14px);
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    background 0.34s ease,
    color 0.34s ease,
    border-color 0.34s ease;
}

.portal-card__title,
.timeline-card h2,
.insight-card__title,
.journey-step__title,
.page-link-card__title {
  margin: 0;
  font-size: 1.45rem;
  transition: color 0.34s ease;
}

.portal-card__text,
.timeline-card p,
.insight-card__text,
.journey-step__text,
.page-link-card__text,
.cta-card__text,
.subhero__lead {
  color: rgba(246, 239, 231, 0.78);
  line-height: 1.65;
  transition: color 0.34s ease;
}

/* Subpage body is transparent — the shared site-backdrop is the only
   source of background, light and depth across every page. */
.subpage-body {
  position: relative;
  background: transparent;
}

.subpage-shell {
  position: relative;
  z-index: 1;
}

.subpage {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 26px 18px 80px;
}

.subhero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 0 18px;
  min-width: 0;
}

.subhero > *,
.subhero__panel {
  min-width: 0;
}

/* Top bar of every subpage: the morning/evening toggle sits up and to the
   right, above the caption/title (matches the home hero placement). */
.subhero__bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.subhero__panel {
  max-width: 840px;
}

.subhero__title {
  font-size: clamp(2.7rem, 7vw, 5rem);
  line-height: 0.94;
  transition: color 0.34s ease;
}

.subhero__lead {
  margin: 16px 0 0;
}

.subhero__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scene-toggle {
  width: fit-content;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: background 0.34s ease, border-color 0.34s ease, box-shadow 0.34s ease;
}

.scene-toggle__option {
  min-width: 90px;
  color: rgba(246, 239, 231, 0.94);
  transition:
    background 0.28s ease,
    color 0.28s ease,
    opacity 0.28s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease,
    letter-spacing 0.28s ease,
    border-color 0.28s ease;
}

.scene-toggle__option--active {
  background: rgba(255, 248, 239, 0.18);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.subhero__hint {
  max-width: 540px;
  color: rgba(246, 239, 231, 0.64);
  line-height: 1.6;
  font-size: 0.94rem;
  transition: color 0.34s ease;
}

.timeline-card__time,
.insight-card__eyebrow,
.journey-step__eyebrow,
.note-card__eyebrow,
.page-links__eyebrow {
  display: inline-block;
}

.timeline-card p,
.insight-card__text,
.journey-step__text,
.page-link-card__text {
  margin: 12px 0 0;
}

.journey-step {
  min-height: 100%;
}

.insight-card--accent,
.cta-card {
  background:
    radial-gradient(circle at top left, rgba(255, 205, 151, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.cta-card {
  padding: 28px;
}

.cta-card__title {
  font-size: clamp(2rem, 6vw, 3.8rem);
  line-height: 0.95;
}

.subpage-cta {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0 18px 80px;
}

.page-links__eyebrow {
  margin-bottom: 10px;
}

.page-link-card {
  border-radius: 28px;
  padding: 24px;
}

.page-link-card__meta {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.page-link-card__title {
  font-size: 1.55rem;
}

.note-strip {
  display: grid;
  gap: 14px;
}

.note-card {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  transition: background 0.34s ease, border-color 0.34s ease, color 0.34s ease;
}

.note-card__text {
  margin: 0;
  color: rgba(246, 239, 231, 0.76);
  line-height: 1.65;
  transition: color 0.34s ease;
}

body[data-scene="morning"] {
  --page-fg: #2d241c;
  --surface-border: rgba(87, 65, 43, 0.14);
  background: transparent;
  color: #2d241c;
}

body[data-scene="morning"] .site-header {
  background: linear-gradient(180deg, rgba(252, 245, 236, 0.88), rgba(252, 245, 236, 0.56));
  border-bottom-color: rgba(87, 65, 43, 0.10);
  box-shadow: 0 10px 28px rgba(146, 112, 75, 0.06);
}

body[data-scene="morning"] .site-header__brand,
body[data-scene="morning"] .site-header__navlink,
body[data-scene="morning"] .site-header__back {
  color: #5f4328;
}

body[data-scene="morning"] .site-header__brand,
body[data-scene="morning"] .site-header__navlink,
body[data-scene="morning"] .interactive-button {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(87, 65, 43, 0.10);
}

body[data-scene="morning"] .section-head__eyebrow,
body[data-scene="morning"] .subhero__eyebrow,
body[data-scene="morning"] .timeline-card__time,
body[data-scene="morning"] .insight-card__eyebrow,
body[data-scene="morning"] .journey-step__eyebrow,
body[data-scene="morning"] .note-card__eyebrow,
body[data-scene="morning"] .page-links__eyebrow,
body[data-scene="morning"] .portal-card__eyebrow,
body[data-scene="morning"] .page-link-card__meta {
  color: #9a6d44;
}

body[data-scene="morning"] .section-head__title,
body[data-scene="morning"] .subhero__title,
body[data-scene="morning"] .portal-card__title,
body[data-scene="morning"] .timeline-card h2,
body[data-scene="morning"] .insight-card__title,
body[data-scene="morning"] .journey-step__title,
body[data-scene="morning"] .page-link-card__title,
body[data-scene="morning"] .cta-card__title {
  color: #2d241c;
}

body[data-scene="morning"] .section-head__lead,
body[data-scene="morning"] .subhero__lead,
body[data-scene="morning"] .portal-card__text,
body[data-scene="morning"] .timeline-card p,
body[data-scene="morning"] .insight-card__text,
body[data-scene="morning"] .journey-step__text,
body[data-scene="morning"] .page-link-card__text,
body[data-scene="morning"] .cta-card__text,
body[data-scene="morning"] .note-card__text,
body[data-scene="morning"] .subhero__hint {
  color: rgba(67, 51, 36, 0.84);
}

/* Morning blocks are translucent glass so the dawn diagonal (and the navy
   lower-right corner) reads THROUGH them instead of being covered by opaque
   plates. Frosted blur keeps dark text readable even over the navy corner. */
body[data-scene="morning"] .portal-card,
body[data-scene="morning"] .timeline-card,
body[data-scene="morning"] .insight-card,
body[data-scene="morning"] .journey-step,
body[data-scene="morning"] .page-link-card,
body[data-scene="morning"] .note-card {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.62), rgba(255, 250, 242, 0.46));
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 44px rgba(28, 40, 70, 0.16);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

body[data-scene="morning"] .cta-card,
body[data-scene="morning"] .insight-card--accent {
  background:
    radial-gradient(circle at top left, rgba(255, 215, 168, 0.30), transparent 34%),
    linear-gradient(180deg, rgba(255, 252, 246, 0.66), rgba(255, 247, 236, 0.48));
  border-color: rgba(255, 255, 255, 0.46);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

body[data-scene="morning"] .scene-toggle {
  background: rgba(255, 255, 255, 0.46);
  border-color: rgba(87, 65, 43, 0.10);
}

body[data-scene="morning"] .scene-toggle__option {
  color: #6b4d31;
}

body[data-scene="morning"] .scene-toggle__option--active {
  background: rgba(255, 250, 244, 0.92);
  color: #2f241a;
  box-shadow: 0 12px 28px rgba(137, 105, 66, 0.12);
}

.hero--morning {
  --hero-title-color: #2d241c;
  --hero-description-color: rgba(67, 51, 36, 0.84);
  --hero-accent-color: #7f6242;
  --hero-chip-color: #5a4736;
  background: transparent;
}

.hero--morning .hero__brand,
.hero--morning .hero__mode-toggle,
.hero--morning .hero__chip {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero--morning .hero__brand,
.hero--morning .hero__eyebrow,
.hero--morning .hero__mode-option {
  color: var(--hero-accent-color);
}

.hero--morning .hero__mode-option:not(.hero__mode-option--active) {
  color: rgba(82, 61, 40, 0.96);
  background: rgba(87, 65, 43, 0.18);
  border: 1px solid rgba(87, 65, 43, 0.18);
}

.hero--morning .hero__mode-option--active {
  background: rgba(255, 248, 239, 0.96);
  color: #2f241a;
  box-shadow: 0 12px 28px rgba(137, 105, 66, 0.16);
  transform: translateY(-1px);
}

.hero--morning .hero-card--glass {
  background: rgba(255, 248, 239, 0.95);
  color: var(--text-deep);
}

.hero--morning .hero-card--deep {
  background: linear-gradient(180deg, rgba(53, 65, 94, 0.78), rgba(33, 43, 68, 0.92));
  color: #fff4e5;
}

.hero--evening {
  --hero-title-color: #fff0de;
  --hero-description-color: rgba(255, 241, 223, 0.82);
  --hero-accent-color: #ffdcb2;
  --hero-chip-color: #fff2e0;
  background: transparent;
}

.hero--evening .hero__brand,
.hero--evening .hero__mode-toggle,
.hero--evening .hero__chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero--evening .hero__brand,
.hero--evening .hero__eyebrow,
.hero--evening .hero__mode-option {
  color: var(--hero-accent-color);
}

.hero--evening .hero__mode-option--active {
  background: rgba(255, 233, 205, 0.16);
  color: #fff3e4;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.hero--evening .hero__mode-option:not(.hero__mode-option--active) {
  color: rgba(44, 34, 24, 0.92);
  background: rgba(255, 236, 210, 0.88);
  border: 1px solid rgba(255, 236, 210, 0.22);
}

.hero__mode-option,
.hero__mode-option--active,
.hero__mode-option:hover,
.hero__mode-option:focus-visible,
.scene-toggle__option,
.scene-toggle__option--active,
.scene-toggle__option:hover,
.scene-toggle__option:focus-visible {
  cursor: pointer;
}

.hero--evening .hero-card--glass {
  background: linear-gradient(180deg, rgba(44, 57, 84, 0.76), rgba(27, 37, 60, 0.92));
  color: #fff3e5;
}

.hero--evening .hero-card--deep {
  background: rgba(255, 248, 239, 0.96);
  color: #1e2535;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.hero--evening .hero-card--deep .hero-card__label {
  color: #9a6d44;
}

.hero--evening .hero-card--deep .hero-card__text {
  color: rgba(52, 39, 28, 0.82);
}

@keyframes ribbonOne {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-8deg) scale(1);
    opacity: 0.48;
  }

  25% {
    transform: translate3d(22px, -12px, 0) rotate(-6deg) scale(1.04);
    opacity: 0.60;
  }

  50% {
    transform: translate3d(8px, 16px, 0) rotate(-10deg) scale(1.10);
    opacity: 0.72;
  }

  75% {
    transform: translate3d(-10px, -6px, 0) rotate(-7deg) scale(1.03);
    opacity: 0.54;
  }
}

@keyframes ribbonTwo {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(8deg) scale(1);
    opacity: 0.28;
  }

  25% {
    transform: translate3d(-16px, 12px, 0) rotate(6deg) scale(1.06);
    opacity: 0.36;
  }

  50% {
    transform: translate3d(12px, -8px, 0) rotate(12deg) scale(1.10);
    opacity: 0.48;
  }

  75% {
    transform: translate3d(-4px, 5px, 0) rotate(8deg) scale(1.04);
    opacity: 0.32;
  }
}

@keyframes ribbonThree {
  0%,
  100% {
    transform: translateY(0) scaleY(1);
    opacity: 0.84;
  }

  50% {
    transform: translateY(-10px) scaleY(1.08);
    opacity: 1;
  }
}

@keyframes slowGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translate3d(16px, -8px, 0) scale(1.06);
    opacity: 1;
  }
}

@media (min-width: 860px) {
  .hero {
    padding: 24px;
  }

  .hero__content {
    min-height: calc(100svh - 48px);
  }

  .portal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-grid,
  .insight-grid,
  .page-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .journey-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------------------------------------------------------------------------
   Reveal on scroll — soft, staggered rise. Lives above the shared backdrop.
--------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  filter: blur(6px);
  transition:
    opacity 0.85s cubic-bezier(.2, 1, .28, 1),
    transform 0.85s cubic-bezier(.2, 1, .28, 1),
    filter 0.85s ease;
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* Staggered children inside a revealed grid */
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 0.7s cubic-bezier(.2, 1, .28, 1),
    transform 0.7s cubic-bezier(.2, 1, .28, 1);
}

[data-reveal-stagger].is-revealed > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

[data-reveal-stagger].is-revealed > *:nth-child(1) { transition-delay: 0.02s; }
[data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: 0.08s; }
[data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: 0.14s; }
[data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: 0.20s; }
[data-reveal-stagger].is-revealed > *:nth-child(5) { transition-delay: 0.26s; }
[data-reveal-stagger].is-revealed > *:nth-child(6) { transition-delay: 0.32s; }

/* ---------------------------------------------------------------------------
   Pointer parallax / tilt on portal & link cards (fine pointer only via JS).
--------------------------------------------------------------------------- */
[data-tilt] {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --shine-x: 50%;
  --shine-y: 0%;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(0);
  transition: transform 0.4s cubic-bezier(.2, 1, .28, 1), box-shadow 0.4s ease;
}

[data-tilt]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--shine-x) var(--shine-y),
    rgba(255, 255, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

[data-tilt]:hover {
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-6px);
  box-shadow: 0 26px 54px rgba(20, 14, 8, 0.16);
}

[data-tilt]:hover::after {
  opacity: 1;
}

body[data-scene="evening"] [data-tilt]:hover {
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.34);
}

/* ---------------------------------------------------------------------------
   Respect reduced motion: kill ambient drift, parallax & reveal transforms.
--------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .site-backdrop__ambient {
    animation: none !important;
  }

  .page-enter,
  .page-enter .page-shell,
  .page-enter .subpage-shell {
    animation: none !important;
  }

  [data-reveal],
  [data-reveal].is-revealed,
  [data-reveal-stagger] > *,
  [data-reveal-stagger].is-revealed > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  [data-tilt],
  [data-tilt]:hover {
    transform: none !important;
  }
}
