
/* SaunaHeritage — handcrafted landing styles */

/* =========================
   Design Tokens
   ========================= */
:root {
  --bg-parchment: #F6F1E6;
  --ink-brown: #5B3E2E;
  --earth-red: #B35C3D;
  --fire-orange: #E0752C;
  --whisk-green: #3E7B4A;
  --stone-gray: #4C4C4C;

  --maxw: 1120px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 36px;
  --space-6: 56px;
  --space-7: 84px;

  --radius-1: 8px;
  --radius-2: 16px;

  --shadow-1: 0 8px 26px rgba(76, 76, 76, 0.16);
  --shadow-2: 0 14px 40px rgba(76, 76, 76, 0.22);
}

/* =========================
   Base / Typography / Parchment
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink-brown);
  background: var(--bg-parchment);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Uneven parchment tone using layered subtle gradients */
  background-image:
    radial-gradient(90vmax 60vmax at 50% 30%, rgba(224,117,44,0.08), rgba(0,0,0,0) 60%),
    radial-gradient(70vmax 50vmax at 10% 10%, rgba(91,62,46,0.06), rgba(0,0,0,0) 55%),
    radial-gradient(60vmax 60vmax at 90% 20%, rgba(62,123,74,0.06), rgba(0,0,0,0) 50%);
  background-attachment: fixed, fixed, fixed;
}

/* Soft paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: multiply;
  /* very light grain using repeating-conic as a fallback to images */
  background-image: repeating-conic-gradient(
    rgba(0,0,0,0.015) 0deg 6deg,
    rgba(0,0,0,0) 6deg 12deg
  );
  filter: blur(0.4px);
  z-index: 0;
}

.noscript {
  background: #fff4;
  backdrop-filter: blur(2px);
  color: var(--stone-gray);
  padding: 8px 12px;
  text-align: center;
  font-size: 0.9rem;
}

/* Utility */
.container {
  width: min(100% - 2rem, var(--maxw));
  margin-inline: auto;
}

.centered { text-align: center; }

.hide { display: none !important; }

/* Headings */
h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin: 0 0 var(--space-3) 0;
  color: var(--ink-brown);
}

p { margin: 0 0 var(--space-3) 0; }

.subhead {
  font-variant-caps: small-caps;
  font-style: italic;
  letter-spacing: 0.06em;
  color: color-mix(in oklab, var(--ink-brown), black 20%);
  margin: 4px 0 var(--space-2);
  display: block;
}

/* Larger H2 section titles (just under H1 size) */
.section-title {
  font-size: clamp(26px, 4.8vw, 40px);
}

.section {
  position: relative;
  padding: clamp(48px, 8vw, 120px) 0;
  z-index: 1;
}

/* =========================
   Steam Overlay
   ========================= */
.steam-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.10;
  mix-blend-mode: screen;
}
.steam-svg {
  width: 100%;
  height: 100%;
  transform: translateY(0);
  animation: floatUp 20s linear infinite;
}
@keyframes floatUp {
  from { transform: translateY(0); }
  to { transform: translateY(-6%); }
}
body.ritual-open .steam-overlay { opacity: 0.14; }

/* =========================
   Hero / Invitation
   ========================= */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  z-index: 2;
  overflow: hidden;
}

/* warmth from center */
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 80%;
  background: radial-gradient(50% 40% at 50% 55%, rgba(224,117,44,0.15), rgba(255,255,255,0));
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  padding-top: clamp(8px, 2.5vw, 36px);
  padding-bottom: clamp(10px, 3vh, 28px);
  text-align: center;
  position: relative;
  z-index: 2;
}

.logo-lockup {
  display: grid;
  place-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.logo-img {
  width: clamp(90px, 20vw, 220px);
  height: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}
.logo-img.small { width: clamp(44px, 8vw, 72px); }
.logo-img.tiny { width: clamp(44px, 8vw, 60px); height: auto; vertical-align: middle; opacity: 0.9; }

/* Hero-specific adjustments: make the logo present but not overpowering */
.arrival .logo-img {
  /* Slightly smaller so entire hero fits on first screen */
  width: min(68vw, 48vh, 980px) !important;
  max-height: 48vh !important;
  height: auto;
}

.site-title {
  font-weight: 600;
  letter-spacing: 0.2px;
  font-size: clamp(28px, 5vw, 46px);
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.hero-subline {
  font-size: clamp(16px, 2.2vw, 20px);
  max-width: 46ch;
  margin: 0 auto var(--space-4);
  color: color-mix(in oklab, var(--ink-brown), black 12%);
}

/* CTA */
.cta {
  appearance: none;
  border: 1.5px solid var(--earth-red);
  background: color-mix(in oklab, var(--fire-orange), white 18%);
  color: var(--bg-parchment);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 0 rgba(179,92,61,0.8), 0 10px 20px rgba(76,76,76,0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  cursor: pointer;
}

/* Hero CTA simplified and anchored to the bottom */
.arrival .cta.fire {
  font-size: clamp(15px, 1.6vw, 19px);
  padding: 0;
  border-width: 0;
  background: transparent;
  box-shadow: none;
  color: var(--earth-red);
}
.arrival .cta.fire:hover {
  box-shadow: none;
}
.arrival .cta-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-3);
  padding: 6px 0;
  min-width: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--earth-red);
  letter-spacing: 0.32px;
  text-shadow: none;
  box-shadow: none;
  font-weight: 600;
}
.arrival .cta-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: color-mix(in oklab, var(--earth-red), white 28%);
  transform: scaleX(0.78);
  transform-origin: center;
  transition: transform 160ms ease, background 160ms ease;
}
.arrival .cta-hero:hover {
  transform: translateY(-2px);
}
.arrival .cta-hero:hover::after {
  transform: scaleX(1);
  background: color-mix(in oklab, var(--earth-red), white 10%);
}
.arrival .cta-hero:active {
  transform: none;
}
.arrival .cta-hero:focus-visible {
  outline: none;
}
.arrival .cta-hero:focus-visible::after {
  transform: scaleX(1);
  background: color-mix(in oklab, var(--earth-red), white 0%);
}
.cta:hover {
  transform: translateY(-1px);
  background: var(--fire-orange);
  box-shadow: 0 3px 0 rgba(179,92,61,0.9), var(--shadow-1);
}
.cta:active { transform: translateY(0); }
.cta:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--fire-orange), white 30%);
  outline-offset: 2px;
}
.cta-secondary {
  background: transparent;
  color: var(--ink-brown);
  border-color: color-mix(in oklab, var(--earth-red), var(--ink-brown) 40%);
  box-shadow: none;
}
.cta-secondary:hover {
  background: rgba(224,117,44,0.10);
  box-shadow: none;
}

/* Motif */
.motif {
  position: absolute;
  right: 6%;
  bottom: 8%;
  width: min(220px, 26vw);
  opacity: 0.8;
  will-change: transform;
  transform: translateZ(0);
}

/* =========================
   Dividers
   ========================= */
.divider svg { display: block; width: 100%; height: auto; }
.divider.thin { opacity: 0.8; }

/* =========================
   Meaning Section
   ========================= */
.meaning .section-title {
  font-size: clamp(26px, 4.8vw, 40px);
  margin-bottom: var(--space-3);
}
.meaning p {
  max-width: 62ch;
  margin-inline: auto;
  font-size: clamp(16px, 2vw, 18px);
}
.meaning-illustration {
  margin-top: var(--space-4);
  display: grid;
  place-items: center;
  opacity: 0.85;
  will-change: transform;
}

/* =========================
   Discovery Section
   ========================= */
.discovery .section-title {
  text-align: center;
  font-size: clamp(26px, 4.8vw, 40px);
  margin-bottom: var(--space-4);
}

.elements {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-3);
}

.element-card {
  position: relative;
  grid-column: span 6;
  background: rgba(255,255,255,0.4);
  border: 1px solid rgba(91,62,46,0.25);
  border-radius: var(--radius-2);
  padding: clamp(16px, 3vw, 26px);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  min-height: 160px;
}
/* asymmetry */
.element-card:nth-child(1) { grid-column: 1 / span 5; }
.element-card:nth-child(2) { grid-column: 6 / span 7; }
.element-card:nth-child(3) { grid-column: 1 / span 7; }
.element-card:nth-child(4) { grid-column: 8 / span 5; }

.element-card h3 {
  margin: 0 0 6px 0;
  font-weight: 600;
  font-size: 1.25rem;
}

.element-card p {
  margin: 0;
  color: color-mix(in oklab, var(--ink-brown), black 8%);
}

/* watercolor blob */
.blob {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60%;
  height: 80%;
  background:
    radial-gradient(60% 50% at 40% 40%, rgba(224,117,44,0.25), rgba(224,117,44,0) 70%),
    radial-gradient(40% 30% at 70% 50%, rgba(62,123,74,0.18), rgba(62,123,74,0) 60%);
  filter: blur(12px) saturate(110%);
  opacity: 0.65;
  transform: rotate(2deg);
  pointer-events: none;
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px) rotate(0.3deg);
  transition: opacity 800ms ease, transform 800ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================
   Action
   ========================= */
.action .action-line {
  font-size: clamp(18px, 2.3vw, 22px);
  margin-bottom: var(--space-3);
}

/* =========================
   Footer
   ========================= */
.footer {
  padding: 28px 0;
  color: color-mix(in oklab, var(--stone-gray), black 10%);
  border-top: 1px solid rgba(76,76,76,0.18);
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(76,76,76,0.04) 100%);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-text {
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* =========================
   Modal (Ritual)
   ========================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
}
.modal[aria-hidden="false"] { display: block; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(76, 76, 76, 0.35);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 5vh 1rem;
}

.modal-content {
  position: relative;
  width: min(720px, 92vw);
  background: var(--bg-parchment);
  border: 1.5px solid color-mix(in oklab, var(--earth-red), var(--ink-brown) 30%);
  box-shadow: var(--shadow-2);
  border-radius: 18px;
  padding: clamp(16px, 4vw, 28px);
  overflow: hidden;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 500ms cubic-bezier(.2,.8,.2,1), opacity 500ms ease;
  clip-path: inset(50% round 18px);
}

.modal[aria-hidden="false"] .modal-content {
  opacity: 1;
  transform: none;
  animation: wipe-in 700ms ease-out forwards;
}

@keyframes wipe-in {
  from { clip-path: inset(50% round 18px); }
  to { clip-path: inset(0% round 18px); }
}

.modal-title {
  font-size: clamp(22px, 3.6vw, 28px);
  margin-bottom: 2px;
}
.modal-intro {
  margin-bottom: var(--space-3);
  color: color-mix(in oklab, var(--ink-brown), black 10%);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 38px;
  height: 38px;
  font-size: 26px;
  line-height: 26px;
  border-radius: 999px;
  border: 1.5px solid rgba(91,62,46,0.35);
  background: rgba(255,255,255,0.6);
  color: var(--stone-gray);
  cursor: pointer;
}
.modal-close:hover {
  background: rgba(255,255,255,0.9);
}

/* Form */
.field {
  margin-bottom: 14px;
}
.field.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}
label {
  display: inline-block;
  font-weight: 600;
  margin-bottom: 6px;
}
.req { color: var(--earth-red); margin-left: 4px; }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink-brown);
  background: rgba(255,255,255,0.65);
  border: 1.5px solid rgba(91,62,46,0.35);
  border-radius: 12px;
  padding: 10px 12px;
  transition: box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}
textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--fire-orange), var(--earth-red) 40%);
  box-shadow: 0 0 0 3px rgba(224,117,44,0.18);
  background: rgba(255,255,255,0.9);
}

.error {
  min-height: 18px;
  font-size: 0.9rem;
  color: var(--earth-red);
  margin-top: 4px;
}

.form-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-note {
  font-size: 0.95rem;
  color: color-mix(in oklab, var(--ink-brown), black 15%);
}

/* Honey-pot field (keep focusable off the visual flow) */
.hp {
  position: absolute !important;
  left: -999em !important;
  width: 1px; height: 1px;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* =========================
   Accessibility / Motion
   ========================= */
:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--whisk-green), white 35%);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .steam-svg { animation: none !important; }
  .reveal { transition: none !important; }
}

/* =========================
   Responsive Tweaks
   ========================= */
@media (max-width: 920px) {
  .elements { gap: var(--space-3); }
  .element-card:nth-child(1),
  .element-card:nth-child(2),
  .element-card:nth-child(3),
  .element-card:nth-child(4) { grid-column: span 12; }
  .motif { right: 2%; bottom: 6%; width: min(200px, 40vw); }
}

/* =========================
   Scenes Narrative
   ========================= */

/* Mist dissolve overlay */
#mist {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1000ms ease;
  z-index: 50;
}
#mist.show { opacity: 1; }

/* Generic scene wrapper */
.scene {
  position: relative;
  padding: clamp(56px, 8vw, 120px) 0;
  z-index: 1;
}

/* Poetic vs Professional skins */
.scene-poetic {
  background: #f6f1e6;
  /* gentle watercolor edge */
  background-image:
    radial-gradient(120% 70% at 50% 0%, rgba(224,117,44,0.08), rgba(0,0,0,0) 65%),
    radial-gradient(120% 70% at 50% 100%, rgba(62,123,74,0.06), rgba(0,0,0,0) 65%);
  background-attachment: scroll;
}

.scene-pro {
  background: #fffdf8;
  position: relative;
}
.scene-pro::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: #d4c4b1;
  opacity: 0.8;
}

/* Thin steam transition strips between scenes */
.steam-transition {
  height: 46px;
  opacity: 0.5;
  background:
    radial-gradient(120% 60% at 50% 120%, rgba(224,117,44,0.10), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,0.0), rgba(91,62,46,0.05), rgba(255,255,255,0.0));
  pointer-events: none;
}

/* Brush divider utility */
.divider-brush {
  height: 18px;
  background:
    linear-gradient(90deg, rgba(179,92,61,0) 0%, rgba(179,92,61,0.4) 12%, rgba(179,92,61,0) 24%,
                           rgba(179,92,61,0.35) 38%, rgba(179,92,61,0) 50%,
                           rgba(179,92,61,0.35) 62%, rgba(179,92,61,0) 74%, rgba(179,92,61,0.4) 88%, rgba(179,92,61,0) 100%);
}

/* Gate class disables scrolling until CTA is pressed */
html.gate-active,
body.gate-active {
  overflow: hidden;
  height: 100vh;
}
body.gate-active {
  position: fixed;
  inset: 0;
  width: 100%;
}

/* Scene 1 — Arrival */
.arrival {
  min-height: 100svh;
  display: grid;
  place-items: start center;
  text-align: center;
  overflow: hidden;
  position: relative;
  padding-top: clamp(8px, 3.5vh, 40px);
}
.arrival-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  /* reserve less space so hero compacts on shorter viewports */
  padding-bottom: clamp(12px, 3vh, 28px);
}
.arrival .subtitle {
  margin-top: 0;
  font-weight: 500;
  color: color-mix(in oklab, var(--ink-brown), black 12%);
}
.arrival .tagline {
  margin-bottom: 4px;
  color: color-mix(in oklab, var(--ink-brown), black 10%);
}
.arrival .dual-line {
  margin-top: 2px;
  margin-bottom: 8px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: color-mix(in oklab, var(--ink-brown), black 12%);
  opacity: 0.95;
}

/* Subtle scroll hint after hero */
.fade-scroll {
  margin-top: 10px;
  text-align: center;
  color: color-mix(in oklab, var(--ink-brown), black 20%);
  opacity: 0.6;
  animation: scrollFade 2.6s ease-in-out infinite;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}
@keyframes scrollFade {
  0%, 100% { opacity: 0.15; transform: translateY(0); }
  50% { opacity: 0.55; transform: translateY(2px); }
}

/* Ensure logo+CTA spacing on hero */
.logo-lockup { gap: clamp(8px, 2.2vh, 16px); }
/* Compact heading spacing so enlarged logo still fits */
.arrival .site-title { margin-bottom: var(--space-1); line-height: 1.05; }
/* Reduce space between logo and title specifically on Arrival */
.arrival .logo-lockup { margin-bottom: var(--space-1); }

/* Short-screen safeguards: keep logo + CTA above the fold */
@media (max-height: 840px) {
  .arrival .logo-img {
    width: min(56vw, 44vh, 900px);
    max-height: 44vh;
  }
}
@media (max-height: 720px) {
  .arrival .logo-img {
    width: min(52vw, 38vh, 780px);
    max-height: 38vh;
  }
  .site-title { font-size: clamp(24px, 4.6vw, 40px); }
  .logo-lockup { gap: 8px; }
  .arrival .cta-hero { margin-top: 4px; }
}
@media (max-height: 640px) {
  .arrival .dual-line { display: none; }
}

/* Scene 2 — Story */
.story .story-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 3vw, 28px);
  align-items: center;
}
@media (min-width: 840px) {
  .story .story-wrap {
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(20px, 4vw, 40px);
  }
}
.story .stagger {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.story .stagger.in {
  opacity: 1;
  transform: none;
}
.story-illustration {
  opacity: 0.9;
  will-change: transform;
}

/* Story photo (real image via <picture>/<img>) */
.story-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  min-height: 260px;
  border-radius: 18px;
  box-shadow: var(--shadow-1);
  border: 1.5px solid rgba(91,62,46,0.22);
  position: relative;
  overflow: hidden;
}
.story-photo picture,
.story-photo img {
  display: block;
  width: 100%;
  height: 100%;
}
.story-photo-img { object-fit: cover; }
.story-photo::after {
  /* subtle paper/steam glaze (no placeholder text) */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0) 40%, rgba(255,255,255,0.06)),
    radial-gradient(120% 80% at 50% 8%, rgba(255,255,255,0.06), rgba(255,255,255,0) 60%);
  pointer-events: none;
  mix-blend-mode: multiply;
}
@media (prefers-reduced-motion: reduce) {
  .story-photo { will-change: auto !important; }
}

/* Scene 3 — Elements */
.scene.elements { display: block; } /* override legacy .elements grid on section */
.scene.elements .elements-grid > .element-card { grid-column: auto; } /* neutralize nth-child grid placement */

.elements .elements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
}
@media (min-width: 680px) {
  .elements .elements-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .elements .elements-grid { grid-template-columns: repeat(4, 1fr); }
}
.element-card.reveal { opacity: 0; filter: blur(6px) saturate(100%); }
.element-card.reveal.is-visible { opacity: 1; filter: none; transition: opacity 800ms ease, filter 800ms ease; }

/* Steam Lintel divider */
.steam-lintel {
  height: 36px;
  opacity: 0.35;
  background:
    radial-gradient(120% 60% at 50% 120%, rgba(224,117,44,0.12), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,0.0), rgba(91,62,46,0.06), rgba(255,255,255,0.0));
}

/* Scene 3b — Pillars */
.pillars .pillars-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.pillar-card {
  background: rgba(255,255,255,0.55);
  border: 1.5px solid rgba(91,62,46,0.25);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
  padding: clamp(16px, 3vw, 24px);
}
.pillar-card h3 { margin: 0 0 6px 0; font-weight: 600; }

/* Scene 4 — Collaboration Hub */
.hub .hub-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: clamp(16px, 4vw, 32px);
  align-items: start;
}
@media (max-width: 900px) {
  .hub .hub-grid { grid-template-columns: 1fr; }
}
.hub .hub-cards {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.hub-card {
  background: rgba(255,255,255,0.6);
  border: 1.5px solid rgba(91,62,46,0.25);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
  padding: clamp(14px, 3vw, 22px);
}

/* Scene 5 — Mastery band */
.mastery {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 12vw, 160px) 0;
}
.mastery-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    var(--mastery-bg, url("/assets/mastery.jpg")),
    radial-gradient(50% 40% at 30% 20%, rgba(224,117,44,0.22), rgba(0,0,0,0) 60%),
    radial-gradient(60% 40% at 80% 30%, rgba(62,123,74,0.16), rgba(0,0,0,0) 60%),
    radial-gradient(60% 50% at 50% 80%, rgba(91,62,46,0.16), rgba(0,0,0,0) 60%);
  background-size: cover, 100% 100%, 100% 100%, 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  will-change: transform;
}
.mastery-overlay {
  position: relative;
  background: rgba(255,255,255,0.55);
  border: 1.5px solid rgba(91,62,46,0.25);
  border-radius: 18px;
  box-shadow: var(--shadow-1);
  padding: clamp(18px, 4vw, 28px);
  max-width: 860px;
}
.peer-journeys { margin-top: var(--space-3); }

/* Mastery scene (no box-in-box) */
.mastery-content {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.mastery .section-title { margin-bottom: var(--space-2); }
.mastery .subhead { margin-top: var(--space-1); }

/* Journeys photo cards in a clean grid (no horizontal scroll) */
.journeys-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  margin-top: var(--space-3);
}
@media (min-width: 760px) {
  .journeys-grid { grid-template-columns: repeat(3, 1fr); }
}
.journey-card {
  text-align: left;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.journey-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: var(--shadow-1);
}
.journey-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.journey-card h4 { margin: 6px 0 4px; font-weight: 600; }
.journey-card p  { margin: 0; color: color-mix(in oklab, var(--ink-brown), black 12%); }

/* Testimonials: use grid, no horizontal scroll */
.testimonials .scroller-x {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: unset;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
}
.testimonials .t-card {
  margin: 0;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(91,62,46,0.25);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  padding: 14px;
}

/* Generic reveal fallback for new cards (already handled in JS) */
.pillar-card.reveal,
.hub-card.reveal { opacity: 0; transform: translateY(8px); }
.pillar-card.reveal.is-visible,
.hub-card.reveal.is-visible { opacity: 1; transform: none; transition: opacity 800ms ease, transform 800ms ease; }

/* Unified reveal-up utility */
.reveal-up { opacity: 0; transform: translateY(10px); }
.reveal-up.is-visible { opacity: 1; transform: none; transition: opacity 400ms ease-out, transform 400ms ease-out; }

/* Hover lift and glow */
.element-card:hover,
.pillar-card:hover,
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }

.element-card:hover { outline: 1px solid color-mix(in oklab, var(--whisk-green), white 40%); }
.pillar-card:hover { outline: 1px solid #d4c4b1; }

/* Hub icons */
.hub-card .icon { margin-right: 6px; }

/* Pillars surface/borders */
.pillars { background: #fffdf8; }
.pillar-card { background: #fffaf2; border-color: #d4c4b1; }

/* Hub left panel brush */
.panel-brush {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(179,75,43,0.28);
  border-radius: 14px;
  padding: clamp(12px, 3vw, 18px);
  position: relative;
}
.panel-brush::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(179,75,43,0) 0%, rgba(179,75,43,0.5) 40%, rgba(179,75,43,0) 100%);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

/* Mastery title fade */
.title-fade { opacity: 0; }
.title-fade.is-visible { opacity: 1; transition: opacity 1000ms ease; }

/* Horizontal journeys reel */
.scroller-x {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 80%;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
@media (min-width: 900px) {
  .scroller-x { grid-auto-columns: 33%; }
}
.journey-card {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(91,62,46,0.25);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  padding: 14px;
  scroll-snap-align: start;
}

/* Scene 4 — Gathering */
.gathering {
  padding: clamp(64px, 10vw, 140px) 0;
  overflow: hidden;
}
.gathering-bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background:
    radial-gradient(60% 40% at 30% 20%, rgba(224,117,44,0.25), rgba(0,0,0,0) 60%),
    radial-gradient(50% 30% at 80% 30%, rgba(62,123,74,0.22), rgba(0,0,0,0) 60%),
    radial-gradient(60% 50% at 50% 80%, rgba(91,62,46,0.18), rgba(0,0,0,0) 60%);
  pointer-events: none;
}

/* Gathering photos (three-up, responsive) */
.g-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: clamp(14px, 3vw, 24px) auto 0;
  max-width: 1100px;
}
@media (max-width: 820px) {
  .g-photos { grid-template-columns: 1fr; }
}
.g-photo {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.g-photo img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.silhouette {
  position: absolute;
  bottom: 6%;
  width: min(24vw, 220px);
  aspect-ratio: 1 / 2;
  border-radius: 50% 50% 18% 18%/ 40% 40% 12% 12%;
  background: radial-gradient(50% 60% at 50% 30%, var(--fire-orange), rgba(224,117,44,0.35) 60%, rgba(0,0,0,0) 61%);
  opacity: 0.18;
  filter: blur(0.4px);
  transform-origin: bottom center;
  animation: breathe 8s ease-in-out infinite;
}
.silhouette.left { left: 6%; transform: scaleX(-1); }
.silhouette.right { right: 6%; animation-delay: 2s; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Scene 5 — Invitation */
.invitation .invite-card {
  margin: 0 auto;
  max-width: 820px;
  background: transparent;   /* remove box */
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: clamp(10px, 3vw, 16px);
  text-align: center;
}

/* CTA large panel aligned with design */
.cta-panel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.2vw, 18px) clamp(24px, 3.5vw, 36px);
  border: 2px solid var(--earth-red);
  border-radius: 16px;
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--fire-orange), white 60%),
      color-mix(in oklab, var(--fire-orange), white 50%));
  color: var(--ink-brown);
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(76,76,76,0.18), 0 2px 0 rgba(179,92,61,0.6);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.cta-panel:hover {
  background: color-mix(in oklab, var(--fire-orange), white 40%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.cta-panel:active { transform: translateY(0); }
.cta-panel:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--fire-orange), white 25%);
  outline-offset: 2px;
}

/* Scene 7 — Footer helpers */
.footer-scene .footer-left,
.footer-scene .footer-right a {
  color: color-mix(in oklab, var(--stone-gray), black 10%);
}
.footer-right .sep { margin: 0 6px; color: rgba(76,76,76,0.6); }

/* Scene 6 — Overlay form */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}
.overlay[aria-hidden="false"] { display: block; }
.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(76,76,76,0.35);
  backdrop-filter: blur(2px);
}
.overlay-panel {
  position: relative;
  margin: 6vh auto;
  width: min(860px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: var(--bg-parchment);
  border: 1.5px solid color-mix(in oklab, var(--earth-red), var(--ink-brown) 30%);
  border-radius: 18px;
  box-shadow: var(--shadow-2);
  padding: clamp(16px, 4vw, 28px);
  clip-path: inset(50% round 18px);
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 500ms cubic-bezier(.2,.8,.2,1), opacity 500ms ease, clip-path 500ms ease;
}
.overlay[aria-hidden="false"] .overlay-panel {
  opacity: 1;
  transform: none;
  clip-path: inset(0% round 18px);
}
.overlay-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 38px;
  height: 38px;
  font-size: 26px;
  line-height: 26px;
  border-radius: 999px;
  border: 1.5px solid rgba(91,62,46,0.35);
  background: rgba(255,255,255,0.6);
  color: var(--stone-gray);
  cursor: pointer;
}
.overlay-close:hover { background: rgba(255,255,255,0.9); }

.overlay-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.overlay-head .overlay-back {
  background: transparent;
  border: 1px solid rgba(91,62,46,0.3);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ink-brown);
  cursor: pointer;
}

.form-tip { color: color-mix(in oklab, var(--ink-brown), black 20%); margin-bottom: 10px; }
.policy-line { font-size: 0.95rem; color: color-mix(in oklab, var(--ink-brown), black 15%); }

/* Conditional presenter block */
[data-presenter-group] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 140ms ease, transform 140ms ease;
}
[data-presenter-group].on { opacity: 1; transform: none; }

/* Prevent background scroll when overlay is open */
body.overlay-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .silhouette { animation: none !important; }
}
