:root {
  --bg-dark: #050608;
  --bg-light: #fdfaf5;
  --bg-soft: #f6f0e8;
  --accent: #d8b26e;
  --accent-soft: rgba(216, 178, 110, 0.35);
  --text-primary: #1f1f1f;
  --text-muted: #6f6f72;
  --max-width: min(1100px, 90vw);
  --headline-dark: rgba(255, 255, 255, 0.92);
  --headline-light-ink: #111111;
  --headline-light-beige: #c9a66b;
  --chaos-interval: 500;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--bg-light);
  scroll-behavior: smooth;
  line-height: 1.6;
}

blockquote {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--accent-soft);
  font-family: "Playfair Display", "Inter", serif;
  font-size: clamp(1.05rem, 2.7vw, 1.4rem);
  letter-spacing: 0.04em;
  color: var(--text-primary);
  opacity: 0.82;
}

hr {
  border: none;
  border-top: 1px solid rgba(111, 111, 114, 0.2);
  margin: clamp(1.8rem, 4vw, 2.6rem) 0;
}

main {
  width: 100%;
  overflow-x: hidden;
}

section.panel {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(2rem, 6vw, 4.5rem) 0;
}

/* --- Section 1: Intro chaos to clarity --- */
#intro {
  background: var(--bg-dark);
  color: #fff;
  overflow: hidden;
  transition: background 2.4s ease;
}

.chaos-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
  z-index: 0;
  filter: brightness(0.32) contrast(1.05) saturate(0.9);
}

.chaos-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.chaos-bg.is-visible {
  opacity: 1;
}

#intro .thoughts {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.88;
  transition: opacity 1.2s ease;
}

#intro .thoughts span {
  position: absolute;
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(0.65rem, 1.3vw, 1.05rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: drift 10s linear infinite;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 40%, 0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 0.7;
  }
  50% {
    transform: translate3d(0, -20%, 0) scale(1.05);
    opacity: 0.9;
  }
  85% {
    opacity: 0;
  }
  100% {
    transform: translate3d(0, -80%, 0) scale(1.1);
    opacity: 0;
  }
}

#intro .intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at 50% 50%, #fefefe 0%, #f5f1ea 35%,
      rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity 2.5s ease 0.3s;
}

#intro .intro-message {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 clamp(1.5rem, 6vw, 4rem);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.hero-headline {
  color: var(--headline-dark);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
  transition: color 500ms ease, text-shadow 500ms ease;
}

body.light-phase .hero-headline {
  color: var(--headline-light-beige);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  /* alternative variant if needed:
  color: var(--headline-light-ink);
  */
}

#intro .mantra {
  margin: 0;
  font-family: "Playfair Display", "Inter", serif;
  font-size: clamp(2.6rem, 8vw, 6rem);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  line-height: 1.3;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
  animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
  }
  50% {
    text-shadow: 0 0 32px rgba(255, 255, 255, 0.8);
  }
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  opacity: 0.8;
}

.scroll-cue::after {
  content: "";
  width: 1px;
  height: 2.8rem;
  background: linear-gradient(to bottom, currentColor,
      rgba(255, 255, 255, 0));
  animation: breathe 3.5s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: translateY(-8px);
    opacity: 0.4;
  }
  50% {
    transform: translateY(8px);
    opacity: 1;
  }
}

.scroll-indicator,
.scroll-indicator .scroll-text {
  color: var(--headline-dark);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
  transition: color 500ms ease, opacity 300ms ease, text-shadow 500ms ease;
}

.scroll-indicator .scroll-text {
  display: inline-block;
}

.scroll-indicator .scroll-icon {
  stroke: rgba(255, 255, 255, 0.92);
  fill: none;
  transition: stroke 500ms ease, fill 500ms ease, opacity 300ms ease;
}

body.light-phase .scroll-indicator,
body.light-phase .scroll-indicator .scroll-text {
  color: var(--headline-light-beige);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  /* alternative ink variant:
  color: var(--headline-light-ink);
  */
}

body.light-phase .scroll-indicator .scroll-icon {
  stroke: var(--headline-light-beige);
  /* alternative ink variant:
  stroke: var(--headline-light-ink);
  */
}

body.light-phase .scroll-indicator::after {
  background: linear-gradient(to bottom, currentColor,
      rgba(255, 255, 255, 0));
}

.scroll-indicator:hover {
  opacity: 0.85;
}

#intro.reveal {
  background: var(--bg-light);
}

#intro.reveal .thoughts {
  opacity: 0;
}

#intro.reveal .intro-overlay {
  opacity: 1;
}

#intro.reveal .intro-message {
  opacity: 1;
  transform: translateY(0);
}

/* --- Section 2: Transition gallery --- */
#transition {
  background: var(--bg-soft);
  color: var(--text-primary);
}

#transition .transition-inner {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  width: var(--max-width);
  align-items: center;
}

#transition .gallery {
  position: relative;
  width: 100%;
  min-height: clamp(20rem, 55vh, 30rem);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(15, 10, 5, 0.25);
  isolation: isolate;
}

#transition .gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to top right,
      rgba(5, 6, 8, 0.65),
      rgba(5, 6, 8, 0)
    ),
    radial-gradient(circle at 80% 15%, rgba(255, 230, 200, 0.5),
      rgba(255, 230, 200, 0) 45%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.gallery-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
  transform: scale(1.05);
  filter: saturate(1.05) contrast(0.96);
}

.gallery-image.active {
  opacity: 1;
  transform: scale(1);
}

#transition .transition-copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 520px;
}

#transition h2 {
  font-family: "Playfair Display", "Inter", serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#transition p {
  margin: 0;
  color: var(--text-muted);
}

/* --- Section 3: Main homepage --- */
#home {
  background: var(--bg-light);
  padding-top: clamp(4rem, 8vw, 6rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.floating-nav {
  position: sticky;
  top: clamp(1rem, 4vw, 2.5rem);
  z-index: 5;
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 40px rgba(15, 10, 5, 0.1);
  backdrop-filter: blur(16px);
}

.floating-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.floating-nav a:hover {
  color: var(--accent);
}

.home-inner {
  width: var(--max-width);
  display: grid;
  gap: clamp(3rem, 6vw, 4.5rem);
  margin-top: clamp(2rem, 6vw, 4rem);
}

.content-block {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  padding: clamp(2rem, 5vw, 3.2rem);
  box-shadow: 0 28px 70px rgba(15, 10, 5, 0.12);
  position: relative;
  overflow: hidden;
}

.content-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76),
      rgba(255, 255, 255, 0));
  pointer-events: none;
}

.content-block header {
  margin-bottom: 1.5rem;
}

.content-block h3 {
  margin: 0;
  font-family: "Playfair Display", "Inter", serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.content-block p {
  color: var(--text-muted);
}

.content-block h4 {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--accent);
}

.content-block ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  list-style: disc;
}

.content-block li {
  margin-bottom: 0.6rem;
}

.ethos-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.8rem);
}

.ethos-grid p {
  margin: 0;
}

.sessions-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2rem);
}

@media (min-width: 760px) {
  .sessions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.session-card {
  background: rgba(250, 245, 237, 0.85);
  border-radius: 22px;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border: 1px solid rgba(216, 178, 110, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.session-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(14, 10, 5, 0.16);
}

.session-card h3 {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.session-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.story-wrapper {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
  align-items: center;
}

@media (min-width: 880px) {
  #transition .transition-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  }

  .story-wrapper {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  }
}

.story-image {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: clamp(16rem, 40vh, 22rem);
  background:
    linear-gradient(135deg, rgba(216, 178, 110, 0.45), rgba(245, 232, 218, 0.2)),
    url("./images/fulls/09.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 70px rgba(15, 10, 5, 0.18);
}

.story-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 6, 8, 0.55), rgba(5, 6, 8, 0));
}

.story-copy {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.story-copy h4 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.story-copy p {
  margin: 0;
  color: var(--text-muted);
}

footer {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 4.5rem);
  background: rgba(5, 6, 8, 0.9);
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}

footer .cta {
  max-width: 420px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

footer h4 {
  margin: 0;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 500;
}

footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

footer blockquote {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.22);
}

.cta-button {
  display: inline-block;
  margin: 0 auto;
  padding: 0.85rem 2.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg-dark);
  text-decoration: none;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 16px 40px rgba(216, 178, 110, 0.3);
}

.cta-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(216, 178, 110, 0.4);
}

/* --- Scroll reveal animations --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(45px);
  transition: opacity 1s ease, transform 1.2s ease;
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* --- Accessibility: reduce motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #intro .mantra,
  .scroll-cue::after,
  .scroll-indicator,
  .scroll-indicator .scroll-text,
  .scroll-indicator .scroll-icon,
  .chaos-bg {
    animation: none !important;
    transition: none !important;
  }

  :root {
    --chaos-interval: 2000;
  }
}
