/* ============================================================
   Rideekanda Forest Monastery — design system
   Calm, meditative, warm-paper aesthetic with bronze accent.
   ============================================================ */

/* ---- Theme tokens ---------------------------------------- */
:root {
  /* paper (default) */
  --bg:        #f4efe6;
  --bg-2:      #ece3d4;
  --ink:       #2b2620;
  --ink-soft:  #5d5446;
  --muted:     #8d8170;
  --line:      rgba(43, 38, 32, 0.14);
  --accent:    #a3763c;
  --accent-soft: #c79a5c;
  --dark-bg:   #221d17;
  --dark-bg-2: #2c261e;
  --dark-ink:  #ece3d4;
  --dark-muted: #b6a890;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body:    "Spectral", Georgia, serif;

  --maxw: 1180px;
  --prose: 62ch;
  --reveal-y: 26px;
  --reveal-dur: 1100ms;
}

:root[data-theme="sage"] {
  --bg:        #eef0ea;
  --bg-2:      #e2e6db;
  --ink:       #232a23;
  --ink-soft:  #4a5547;
  --muted:     #7e8978;
  --line:      rgba(35, 42, 35, 0.14);
  --accent:    #5d7150;
  --accent-soft: #88a079;
  --dark-bg:   #232b22;
  --dark-bg-2: #2c352a;
  --dark-ink:  #e7ecdf;
  --dark-muted: #a7b49c;
}

:root[data-theme="terracotta"] {
  --bg:        #fbf5ec;
  --bg-2:      #f3e7d6;
  --ink:       #3a2418;
  --ink-soft:  #6f4d39;
  --muted:     #a07f68;
  --line:      rgba(58, 36, 24, 0.14);
  --accent:    #a8502a;
  --accent-soft: #d28a55;
  --dark-bg:   #2a1812;
  --dark-bg-2: #38221a;
  --dark-ink:  #f3e7d6;
  --dark-muted: #c6a288;
}

:root[data-theme="night"] {
  --bg:        #1a1611;
  --bg-2:      #221d16;
  --ink:       #ece2d2;
  --ink-soft:  #c3b6a0;
  --muted:     #8f8470;
  --line:      rgba(236, 226, 210, 0.14);
  --accent:    #c9a86a;
  --accent-soft: #ddc594;
  --dark-bg:   #110e0a;
  --dark-bg-2: #19140e;
  --dark-ink:  #ece2d2;
  --dark-muted: #9c9079;
}

/* ---- Reset / base ---------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 600ms ease, color 600ms ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  margin: 0;
  letter-spacing: 0.005em;
}

p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(24px, 6vw, 88px);
}

/* eyebrow label */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  margin: 0 0 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.section-title {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  letter-spacing: -0.01em;
}

/* ---- Reveal animation ------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition: opacity var(--reveal-dur) cubic-bezier(.2,.65,.25,1),
              transform var(--reveal-dur) cubic-bezier(.2,.65,.25,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
:root.motion-off .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Top nav --------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(24px, 6vw, 64px);
  transition: background 500ms ease, padding 400ms ease, border-color 500ms ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand .lotus { height: 30px; width: auto; flex: none; }
.brand-text { line-height: 1; }
.brand-text .name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  letter-spacing: 0.02em;
}
.brand-text .sub {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}
.nav-links { display: flex; gap: 2.4rem; align-items: center; }
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 250ms ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 320ms ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ---- Hero ------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg image-slot { width: 100%; height: 100%; }
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 90% at 50% 18%, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 55%, var(--bg) 100%),
    linear-gradient(to bottom, color-mix(in srgb, var(--bg) 22%, transparent) 0%, color-mix(in srgb, var(--bg) 45%, transparent) 45%, color-mix(in srgb, var(--bg) 85%, transparent) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 900px; }
.hero .lotus-mark {
  height: 58px; width: auto;
  margin: 0 auto 2.2rem;
  opacity: 0.95;
}
:root[data-theme="night"] .hero .lotus-mark { filter: brightness(0) invert(1); }   /* white lotus in dark theme */
.hero h1 {
  font-size: clamp(3.4rem, 9vw, 7.5rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 0.96;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero .tagline {
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2rem;
}
.hero .place {
  margin-top: 1.6rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-style: italic;
}
.scroll-cue {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue .line {
  width: 1px; height: 46px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: cueDrop 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cueDrop {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50%      { transform: scaleY(1); opacity: 1; }
}

/* ---- Generic section ------------------------------------- */
/* ---- Section watermark ----------------------------------- */
.section { padding: clamp(80px, 11vw, 168px) 0; position: relative; overflow: hidden; }
.section .container { position: relative; z-index: 1; }
.wm {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  width: clamp(340px, 40vw, 600px);
  height: auto;
  opacity: 0.07;
}
.section.dark .wm { opacity: 0.09; }
.wm-corner { right: -7%; bottom: -8%; transform: rotate(-2deg); }
.wm-center { left: 50%; top: 52%; transform: translate(-50%, -50%); opacity: 0.06; }
.section.dark {
  background: var(--dark-bg);
  color: var(--dark-ink);
}
.section.dark .eyebrow { color: var(--accent-soft); }
.section.dark .eyebrow::before { background: var(--accent-soft); }
.section.dark .muted { color: var(--dark-muted); }

.lead {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  line-height: 1.32;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.002em;
}
.section.dark .lead { color: var(--dark-ink); }

.prose { max-width: var(--prose); }
.prose p { color: var(--ink-soft); }
.section.dark .prose p { color: var(--dark-muted); }

/* About layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 84px);
}
.about-head { max-width: 760px; }
.about-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(34px, 5vw, 72px);
}
.about-cols .prose { max-width: none; }
@media (max-width: 820px) {
  .about-cols { grid-template-columns: 1fr; gap: 1.5em; }
}

/* Pull quote */
.pullquote {
  border-left: 2px solid var(--accent);
  padding: 0.4em 0 0.4em 1.6rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-style: italic;
  line-height: 1.28;
  color: var(--ink);
}
.section.dark .pullquote { color: var(--dark-ink); }
.pullquote .by {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- Team ------------------------------------------------ */
.chief {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}
.chief.reverse { grid-template-columns: 1.15fr 0.85fr; margin-top: clamp(56px, 8vw, 110px); padding-top: clamp(48px, 7vw, 90px); border-top: 1px solid rgba(236,226,210,0.16); }
.chief.reverse .frame-tag { left: auto; right: -14px; }
/* Mobile/tablet: stack into a single vertical column — portrait above text
   for both teachers. The second teacher's markup is text-then-portrait, so
   its portrait is reordered to the top to keep the image-above-text rhythm. */
@media (max-width: 880px) {
  .chief, .chief.reverse { grid-template-columns: 1fr; gap: clamp(20px, 5vw, 36px); align-items: start; }
  .chief.reverse .chief-portrait { order: -1; }
}
.chief .cred {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: -0.9rem 0 1.5rem;
}
.chief image-slot {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 380px;
}
/* In the two-up mobile layout the portrait column is narrow, so let the
   slot height follow the 3/4 ratio (no large min-height that would tower
   over the text). */
@media (max-width: 880px) {
  .chief image-slot { min-height: 0; }
}
/* Phone tuning: smaller name and tighter labels. The body prose keeps the
   page's standard reading size (no shrink) now that each teacher is a single
   full-width column, so it matches the rest of the page. */
@media (max-width: 600px) {
  .person-name { font-size: clamp(1.3rem, 6vw, 1.7rem); margin-bottom: 1rem; }
  .chief .role { font-size: 0.6rem; letter-spacing: 0.16em; margin-bottom: 0.7rem; }
  .chief .cred { font-size: 0.58rem; letter-spacing: 0.12em; margin: -0.5rem 0 1rem; }
  .chief-portrait .frame-tag { font-size: 0.5rem; letter-spacing: 0.16em; padding: 6px 9px; left: -8px; }
  .chief.reverse .frame-tag { right: -8px; left: auto; }
}
.chief-portrait {
  position: relative;
}
.chief-portrait .frame-tag {
  position: absolute;
  left: -14px; bottom: 26px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 9px 16px;
}
.role {
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.section.dark .role { color: var(--accent-soft); }
.person-name {
  font-size: clamp(2rem, 3.6vw, 3rem);
  margin-bottom: 1.6rem;
}

.instructors {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(56px, 8vw, 110px);
  border-top: 1px solid var(--line);
  padding-top: clamp(44px, 6vw, 80px);
}
.section.dark .instructors { border-top-color: rgba(236,226,210,0.16); }
@media (max-width: 720px) { .instructors { grid-template-columns: 1fr; } }
.instructor { display: flex; gap: 22px; }
.instructor image-slot { width: 96px; height: 96px; flex: none; }
.instructor .meta .nm {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}
.instructor .meta .cred {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.instructor .meta p { font-size: 0.96rem; color: var(--ink-soft); }
.section.dark .instructor .meta p { color: var(--dark-muted); }

/* ---- Visiting -------------------------------------------- */
.visit-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(34px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(50px, 7vw, 96px);
}
@media (max-width: 820px) { .visit-head { grid-template-columns: 1fr; gap: 1.4em; } }

.objectives {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.section.dark .objectives { border-top-color: rgba(236,226,210,0.16); }
@media (max-width: 760px) { .objectives { grid-template-columns: 1fr; } }
.objective {
  padding: clamp(30px, 4vw, 48px) clamp(26px, 3vw, 44px) clamp(30px, 4vw, 48px) 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: start;
}
.section.dark .objective { border-bottom-color: rgba(236,226,210,0.16); }
.objective:nth-child(odd) { padding-right: clamp(34px, 4vw, 60px); }
.objective:nth-child(even) { padding-left: clamp(26px, 3vw, 44px); border-left: 1px solid var(--line); }
.section.dark .objective:nth-child(even) { border-left-color: rgba(236,226,210,0.16); }
@media (max-width: 760px) {
  .objective:nth-child(even) { padding-left: 0; border-left: none; }
}
.objective .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  opacity: 0.85;
}
.objective h3 {
  font-size: 1.4rem;
  margin-bottom: 0.55rem;
}
.objective p { font-size: 0.97rem; color: var(--ink-soft); }
.section.dark .objective p { color: var(--dark-muted); }

/* ---- Dana band ------------------------------------------- */
.dana {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 820px) { .dana { grid-template-columns: 1fr; } }
.dana image-slot { width: 100%; aspect-ratio: 4 / 3; }
.dana h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 1.4rem; }

/* ---- Contact / footer ------------------------------------ */
.invite {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}
.invite h2 {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 300;
  margin-bottom: 1.4rem;
}
.invite h2 em { font-style: italic; color: var(--accent-soft); }
.btn-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 2.6rem; }
.btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 34px;
  border: 1px solid currentColor;
  transition: background 300ms ease, color 300ms ease, transform 300ms ease;
  cursor: pointer;
  background: transparent;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); transform: translateY(-2px); }
.btn.ghost { color: var(--dark-ink); }
.btn.ghost:hover { background: var(--dark-ink); color: var(--dark-bg); transform: translateY(-2px); }

.footer {
  background: var(--dark-bg-2);
  color: var(--dark-ink);
  padding: clamp(60px, 8vw, 96px) 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(34px, 5vw, 70px);
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(236,226,210,0.14);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 2em; } }
.footer h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 1.1rem;
  font-weight: 500;
}
.footer .fblurb { color: var(--dark-muted); max-width: 36ch; font-size: 0.98rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.footer ul a { color: var(--dark-muted); font-size: 0.95rem; transition: color 250ms ease; }
.footer ul a:hover { color: var(--dark-ink); }
.footer .brand-text .sub { color: var(--dark-muted); }
.footer .brand .lotus { color: var(--accent-soft); }
.footer-base {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--dark-muted);
  letter-spacing: 0.04em;
}

/* ---- Tweaks root mount ----------------------------------- */
#tweaks-root:empty { display: none; }

/* ---- Inline biography link ------------------------------- */
.bio-link {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}
.section.dark .bio-link { color: var(--accent-soft); }
.bio-link:hover { opacity: 0.65; }
