/* ============================================================
   Vedic Eco-Village — The Sattva Edition
   Editions-style layout: fixed chapter sidebar + flowing content
   ============================================================ */

:root {
  --dark: #10240f;          /* deep forest */
  --dark-2: #1c3a1a;
  --light: #f7f3ea;         /* warm parchment */
  --light-2: #efe8d8;
  --accent: #d4a24e;        /* turmeric gold */
  --accent-2: #8a5a1e;
  --grey: #6b6f62;
  --grey-light: #d8d4c6;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --sidebar-w: 20vw;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html.lenis { height: auto; scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--light);
  line-height: 1.6;
  overflow-x: clip;
}

img, video { display: block; width: 100%; height: 100%; object-fit: cover; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; }

a { color: inherit; }

/* ============ FIXED SIDEBAR ============ */

.side-nav {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--sidebar-w);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--light);
  transition: color 0.4s ease;
}
body[data-nav-state="light"] .side-nav { color: var(--dark); }

.side-nav__frame {
  position: relative;
  width: min(300px, calc(var(--sidebar-w) - 32px));
  aspect-ratio: 340 / 464;
  min-height: 400px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.davinci-lines {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.davinci-lines__border {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.5;
  animation: draw-border 2.4s var(--ease-out) 0.6s forwards;
}
@keyframes draw-border {
  to { stroke-dashoffset: 0; }
}

.side-nav__title {
  pointer-events: auto;
  text-decoration: none;
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.side-nav__om { font-size: 1.6rem; margin-bottom: 0.5rem; color: var(--accent); }
.side-nav__title-word { font-size: 1.05rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.side-nav__title-word--big { font-size: clamp(1.4rem, 1.8vw, 2rem); font-weight: 700; text-transform: none; letter-spacing: 0; }

.side-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.side-nav__list a {
  pointer-events: auto;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  opacity: 0.55;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
}
.side-nav__list a .num {
  font-size: 0.6rem;
  font-family: var(--font-display);
  opacity: 0.7;
}
.side-nav__list a:hover { opacity: 1; }
.side-nav__list a.active {
  opacity: 1;
  transform: translateX(6px);
  color: var(--accent);
}

.side-nav__legal { font-size: 0.6rem; opacity: 0.55; line-height: 1.9; }
.side-nav__legal a { pointer-events: auto; text-decoration: none; }
.side-nav__legal a:hover { text-decoration: underline; }

/* ============ MOBILE BAR / MENU ============ */

.mobile-bar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 14px 20px;
  align-items: center;
  justify-content: space-between;
  color: var(--light);
  mix-blend-mode: difference;
}
.mobile-bar__logo { font-family: var(--font-display); font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.menu-toggle {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; padding: 6px;
}
.menu-toggle span { width: 26px; height: 2px; background: currentColor; transition: transform 0.3s var(--ease-out); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: var(--dark);
  display: flex; align-items: center; padding: 0 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 1.2rem; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  text-decoration: none;
  color: var(--light);
}
.mobile-menu a:hover { color: var(--accent); }

/* ============ CONTENT COLUMN ============ */

.content {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
}

/* ============ HERO ============ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
}
.hero__media {
  position: absolute;
  inset: -8% 0;
  z-index: 0;
  will-change: transform;
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,36,15,0.25) 0%, rgba(16,36,15,0.05) 40%, rgba(16,36,15,0.82) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding: 8vh 6vw;
  max-width: 1100px;
}
.hero__kicker {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
}
.hero__title {
  font-size: clamp(3rem, 8.5vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__line { display: block; overflow: hidden; }
.hero__line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: line-up 1.1s var(--ease-out) forwards;
}
.hero__line:nth-child(2) > span { animation-delay: 0.12s; }
.hero__line:nth-child(3) > span { animation-delay: 0.24s; }
.hero__line--accent > span { color: var(--accent); font-style: italic; }
@keyframes line-up { to { transform: translateY(0); } }

.hero__sub {
  margin-top: 1.8rem;
  max-width: 34rem;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  opacity: 0.9;
}
.hero__actions { display: flex; gap: 14px; margin-top: 2.2rem; flex-wrap: wrap; }

.split-reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: fade-up 1s var(--ease-out) 0.5s forwards;
}
@keyframes fade-up { to { opacity: 1; transform: none; } }

.hero__scroll-cue {
  position: absolute;
  right: 4vw; bottom: 6vh;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase;
  opacity: 0.75;
}
.hero__scroll-line {
  width: 1px; height: 64px;
  background: linear-gradient(var(--light), transparent);
  overflow: hidden;
  position: relative;
}
.hero__scroll-line::after {
  content: "";
  position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scroll-drip 2s ease-in-out infinite;
}
@keyframes scroll-drip {
  0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; }
}

/* ============ CHAPTERS ============ */

.chapter__intro {
  min-height: 90svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14vh 6vw 8vh;
  background: var(--dark);
}

.chapter__headline {
  font-size: clamp(3.4rem, 9vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--light);
  overflow: hidden;
}
.chapter__headline > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
}
.chapter__headline.in-view > span { transform: translateY(0); }

.chapter__narrative {
  max-width: 46rem;
  margin-top: 3rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.45;
}

/* drop caps like the original narrative blocks */
.drop-cap::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.1em;
  float: left;
  line-height: 0.82;
  padding-right: 0.12em;
  color: var(--accent);
}

.chapter__video {
  margin-top: 6vh;
  aspect-ratio: 16 / 9;
  max-height: 70svh;
  width: 100%;
  border-radius: 14px;
  overflow: clip;
  position: relative;
}

.video-placeholder .play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1px solid rgba(247,243,234,0.6);
  background: rgba(16,36,15,0.45);
  color: var(--light);
  cursor: pointer;
  display: grid; place-items: center;
  backdrop-filter: blur(6px);
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.video-placeholder .play-btn:hover { transform: scale(1.08); background: rgba(16,36,15,0.7); }
.video-placeholder .play-btn svg { width: 30px; height: 30px; }

/* media reveal — clip + scale like animate-show-media */
.media-reveal {
  clip-path: inset(12% 8% 12% 8% round 14px);
  transform: scale(0.96);
  opacity: 0.4;
  transition:
    clip-path 1.1s var(--ease-out),
    transform 1.1s var(--ease-out),
    opacity 0.8s ease;
  will-change: clip-path, transform;
}
.media-reveal.in-view {
  clip-path: inset(0 0 0 0 round 14px);
  transform: scale(1);
  opacity: 1;
}

/* ============ FEATURE GROUPS (light theme) ============ */

.feature-group {
  background: var(--light);
  color: var(--dark);
  padding: 10vh 6vw;
}
.feature-group__title {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 400;
  max-width: 40rem;
  margin: 6vh 0 7vh;
}
.feature-group__title.drop-cap::first-letter { color: var(--accent-2); }

.feature-grid { display: flex; flex-direction: column; gap: 11vh; }

.feature {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 5vw;
  align-items: center;
}
.feature--flip .feature__text { order: 2; }
.feature--flip .feature__media { order: 1; }

.feature__text h4 { font-size: clamp(1.3rem, 2vw, 1.8rem); margin-bottom: 0.9rem; }
.feature__text p { color: #3d4437; margin-bottom: 1.4rem; max-width: 26rem; }

.feature__media {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: clip;
}

/* ============ PILL CTA (arrow push-out-pop-in) ============ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 18px;
  border: 1px solid var(--grey-light);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 500 0.85rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.pill:hover { background: var(--dark); color: var(--light); border-color: var(--dark); }

.pill--light { border-color: rgba(247,243,234,0.4); color: var(--light); }
.pill--light:hover { background: var(--light); color: var(--dark); border-color: var(--light); }

.pill--solid { background: var(--accent); border-color: var(--accent); color: var(--dark); }
.pill--solid:hover { background: var(--light); border-color: var(--light); color: var(--dark); }

.pill__arrow {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: currentColor;
  position: relative;
  overflow: hidden;
  flex: none;
}
.pill__arrow::before,
.pill__arrow::after {
  content: "→";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--light);
  mix-blend-mode: difference;
  transition: transform 0.35s var(--ease-out);
}
.pill__arrow::after { transform: translateX(-140%); }
.pill:hover .pill__arrow::before { transform: translateX(140%); }
.pill:hover .pill__arrow::after { transform: translateX(0); }

/* ============ XXL FEATURED CARDS ============ */

.xxl-card {
  position: relative;
  background: var(--dark-2);
  color: var(--light);
  padding: 12vh 6vw;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 5vw;
  align-items: center;
  overflow: clip;
}
.xxl-card--warm { background: #2e2312; }
.xxl-card__media {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: clip;
  will-change: transform;
}
.xxl-card__body h3 { font-size: clamp(1.8rem, 3.4vw, 3rem); margin-bottom: 1.2rem; }
.xxl-card__body p { opacity: 0.85; margin-bottom: 1.8rem; max-width: 30rem; }

/* ============ PARALLAX CLOUD CARDS ============ */

.cloud-cards {
  background: var(--light);
  color: var(--dark);
  padding: 16vh 6vw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4vw;
  align-items: start;
}
.cloud-card {
  background: #fff;
  border: 1px solid var(--grey-light);
  border-radius: 16px;
  overflow: clip;
  will-change: transform;
  box-shadow: 0 24px 60px -30px rgba(16,36,15,0.35);
}
.cloud-card:nth-child(2) { margin-top: 10vh; }
.cloud-card:nth-child(3) { margin-top: 4vh; }
.cloud-card img { aspect-ratio: 4 / 3; }
.cloud-card h4 { padding: 20px 20px 8px; font-size: 1.2rem; }
.cloud-card p { padding: 0 20px 24px; color: #3d4437; font-size: 0.92rem; }

/* ============ HORIZONTAL SCROLL STRIP ============ */

.hscroll { background: var(--dark); color: var(--light); }
.hscroll__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: clip;
  padding: 0 0 0 6vw;
}
.hscroll__title {
  font-size: clamp(2rem, 4vw, 3.6rem);
  margin-bottom: 6vh;
}
.hscroll__track {
  display: flex;
  gap: 24px;
  will-change: transform;
  width: max-content;
  padding-right: 6vw;
}
.rhythm-card {
  width: min(340px, 78vw);
  flex: none;
  background: var(--dark-2);
  border: 1px solid rgba(247,243,234,0.12);
  border-radius: 18px;
  padding: 28px;
}
.rhythm-card__emoji { font-size: 2.2rem; display: block; }
.rhythm-card__count {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin: 12px 0 6px;
  font-variant-numeric: tabular-nums;
}
.rhythm-card h4 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.rhythm-card p { font-size: 0.9rem; opacity: 0.8; }

/* ============ VOLUNTEER STEPS ============ */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3vw;
}
.step {
  background: #fff;
  border: 1px solid var(--grey-light);
  border-radius: 16px;
  padding: 32px 28px;
}
.step__num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent-2);
  display: block;
  margin-bottom: 0.8rem;
}
.step h4 { font-size: 1.3rem; margin-bottom: 0.7rem; }
.step p { color: #3d4437; font-size: 0.95rem; }

.volunteer-cta { margin-top: 9vh; text-align: center; }
.volunteer-cta__line {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 1.6rem;
}

/* ============ CONNECT / FOOTER ============ */

.chapter--connect .chapter__intro { min-height: 78svh; }

.visit-form {
  display: flex;
  gap: 12px;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.visit-form input {
  flex: 1 1 260px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(247,243,234,0.35);
  background: rgba(247,243,234,0.06);
  color: var(--light);
  font: 400 0.95rem var(--font-body);
  outline: none;
  transition: border-color 0.25s;
}
.visit-form input:focus { border-color: var(--accent); }
.visit-form input::placeholder { color: rgba(247,243,234,0.45); }
.visit-note { font-size: 0.75rem; opacity: 0.55; margin-top: 1.1rem; max-width: 34rem; }

.footer {
  padding: 6vh 6vw 5vh;
  border-top: 1px solid rgba(247,243,234,0.14);
  font-size: 0.85rem;
  opacity: 0.8;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ============ REDUCED MOTION ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .media-reveal { clip-path: none; opacity: 1; transform: none; }
  .chapter__headline > span, .hero__line > span { transform: none; }
  .split-reveal { opacity: 1; transform: none; }
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1024px) {
  :root { --sidebar-w: 0px; }
  .side-nav { display: none; }
  .mobile-bar { display: flex; }
  .content { margin-left: 0; width: 100%; }
  .feature, .feature--flip { grid-template-columns: 1fr; gap: 22px; }
  .feature--flip .feature__text { order: 1; }
  .feature--flip .feature__media { order: 2; }
  .xxl-card { grid-template-columns: 1fr; }
  .cloud-cards { grid-template-columns: 1fr; }
  .cloud-card:nth-child(2), .cloud-card:nth-child(3) { margin-top: 0; }
  .steps { grid-template-columns: 1fr; }
  .hero__scroll-cue { display: none; }
}
