/* ==================================================================
   Andrew Hillam — Ashtanga Yoga
   Palette "Olive Noir": Oyster Cream / Olive Smoke / Forest Noir
   ================================================================== */

:root {
  --cream: #d8ccc0;        /* Oyster Cream — background */
  --cream-soft: #e1d7cc;   /* lifted cream for panels */
  --noir: #1d1f1c;         /* Forest Noir — text */
  --olive: #4b4a3d;        /* Olive Smoke — accent */
  --olive-soft: #6b695a;
  --turmeric: #c98a2e;     /* highlight on cream: buttons, lines */
  --turmeric-ink: #93600f; /* highlight text on cream (italic heading words) */
  --clay: #d89c8f;         /* Lotus clay: highlight on olive */
  --white: #fbf8f4;        /* warm white: text on olive */

  --line: rgba(29, 31, 28, 0.42);
  --line-soft: rgba(29, 31, 28, 0.18);
  --hair: 0.5px;           /* ultra slim — 1 device px on retina */

  --serif: "Red Hat Display", "Helvetica Neue", Arial, sans-serif;  /* headings: name kept from the serif days */
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --deva: "Noto Serif Devanagari", var(--serif);

  --pad: clamp(20px, 4.2vw, 64px);
  --max: 1480px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--noir);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.1em; }
::selection { background: var(--olive); color: var(--cream); }

/* ---------- type ---------- */
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  line-height: 1.5;
}
.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.015em;
  margin: 0;
}
.display em { font-style: italic; font-weight: 300; }
.h1 { font-size: clamp(3.4rem, 9.2vw, 9.6rem); }
.h2 { font-size: clamp(2.6rem, 5.6vw, 5.6rem); }
.h3 { font-size: clamp(1.8rem, 2.8vw, 2.7rem); line-height: 1.02; }
.lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.9vw, 1.9rem);
  line-height: 1.3;
  max-width: 34ch;
}
.prose { max-width: 60ch; }
.prose p:last-child { margin-bottom: 0; }
.muted { color: var(--olive); }

.link {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: var(--hair) solid var(--noir);
  transition: gap 0.3s ease, color 0.3s ease;
}
.link::after { content: "→"; font-family: var(--sans); letter-spacing: 0; }
.link:hover { gap: 1.2em; color: var(--olive); }
.link.ext::after { content: "↗"; }

.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 2.5em;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 18px 22px;
  border: var(--hair) solid var(--noir);
  background: transparent;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn::after { content: "↗"; font-family: var(--sans); letter-spacing: 0; font-size: 14px; }
.btn:hover { background: var(--noir); color: var(--cream); }
.btn--solid { background: var(--noir); color: var(--cream); }
.btn--solid:hover { background: var(--olive); border-color: var(--olive); }

/* editorial placeholder — text that still needs Andrew's input */
.todo {
  background: none; color: inherit;
  border-bottom: 1px dashed var(--olive);
  opacity: 0.75;
}

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section { position: relative; padding: clamp(72px, 10vw, 160px) 0; }
.section + .section { border-top: var(--hair) solid var(--line); }
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
}
.rule { border: 0; border-top: var(--hair) solid var(--line); margin: 0; }

/* section heading row: index number + label, hairline above */
.sec-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 14px; margin-bottom: clamp(40px, 6vw, 88px);
  border-top: var(--hair) solid var(--noir);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--hair) solid var(--line);
}
.site-header .wrap {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: 0.01em;
}
.brand small {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--olive); margin-left: 14px; vertical-align: 3px;
}
.nav { display: flex; gap: clamp(18px, 2.6vw, 40px); }
.nav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  position: relative; padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  border-bottom: var(--hair) solid var(--noir); transition: right 0.35s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav-toggle {
  display: none; background: none; border: 0; padding: 8px 0; color: inherit; cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}

/* ---------- halftone layer ---------- */
.ht {
  position: absolute; pointer-events: none;
  color: var(--olive);
  opacity: 0; transition: opacity 1.4s ease;
}
.ht.is-ready { opacity: 1; }
.ht canvas { position: absolute; inset: 0; }
.ht.is-fallback img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: right bottom;
  mix-blend-mode: multiply; opacity: 0.35; filter: contrast(1.4);
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column;
}
.hero .wrap { position: relative; z-index: 2; width: 100%; flex: 1; display: flex; flex-direction: column; }
.hero-text { padding-top: clamp(48px, 9vh, 120px); }
.hero-text .label { margin-bottom: 28px; display: block; }
.hero-sub { margin-top: clamp(24px, 3vw, 40px); max-width: 30ch; }
.hero-foot {
  margin-top: auto;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: var(--hair) solid var(--line);
  padding: 14px 0 22px;
}
.hero-foot > * + * { padding-left: 14px; }
.hero .ht { inset: auto 0 60px auto; width: 72%; height: calc(94% - 60px); }

/* corner crosshairs — small technical marks */
.marks::before, .marks::after {
  content: "+"; position: absolute; z-index: 3;
  font-family: var(--sans); font-weight: 200; font-size: 18px; line-height: 1; color: var(--olive);
}
.marks::before { top: 18px; left: calc(var(--pad) - 5px); }
.marks::after { top: 18px; right: calc(var(--pad) - 5px); }

/* page hero (inner pages) */
.page-hero { min-height: min(88svh, 900px); }
.page-hero .hero-text { padding-top: clamp(64px, 14vh, 180px); }

/* ---------- facts strip ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 28px 24px 32px 0; }
.fact + .fact { border-left: var(--hair) solid var(--line); padding-left: 24px; }
.fact .num { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 4.4vw, 4.4rem); line-height: 1; margin: 14px 0 10px; }
.fact p { font-size: 15px; margin: 0; max-width: 24ch; }

/* ---------- split blocks ---------- */
.split-label { grid-column: 1 / span 3; }
.split-body { grid-column: 5 / span 7; position: relative; z-index: 2; }
.split-body .lede { margin-bottom: 1.4em; }

/* section with a halftone in its background */
.has-ht { overflow: hidden; }
.has-ht .ht { z-index: 0; }
.has-ht .wrap { position: relative; z-index: 1; }

/* ---------- retreat feature ---------- */
.retreat-card {
  border-top: var(--hair) solid var(--noir);
  border-bottom: var(--hair) solid var(--noir);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px);
  padding: clamp(32px, 4vw, 56px) 0;
}
.retreat-card .when { grid-column: 1 / span 6; }
.retreat-card .what { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 28px; }
.date-big {
  font-family: var(--serif); font-weight: 300; line-height: 0.92;
  font-size: clamp(3rem, 7vw, 7.2rem); letter-spacing: -0.02em; margin: 18px 0 0;
}
.date-big span { display: block; }
.date-big .sep { font-size: 0.45em; color: var(--olive); margin: 0.15em 0 0.1em; letter-spacing: 0; }

.details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: var(--hair) solid var(--line); margin-top: clamp(40px, 5vw, 72px); }
.details > div { padding: 16px 20px 0 0; }
.details > div + div { border-left: var(--hair) solid var(--line); padding-left: 20px; }
.details dt { margin-bottom: 8px; }
.details dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.25; }

/* ---------- dark band ---------- */
.band { background: var(--olive); color: var(--cream); }
.band .label { color: color-mix(in srgb, var(--cream) 70%, transparent); }
.band .sec-head { border-top-color: color-mix(in srgb, var(--cream) 55%, transparent); }
.band .btn { border-color: var(--cream); }
.band .btn:hover { background: var(--cream); color: var(--noir); }
.band .ht { color: color-mix(in srgb, var(--cream) 22%, transparent); }
.band .link { border-color: var(--cream); }
.band .link:hover { color: var(--cream); opacity: 0.7; }
.section.band + .section { border-top: 0; }

/* ---------- timeline / lineage ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-top: var(--hair) solid var(--line); }
.timeline li {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px);
  padding: 26px 0 30px; border-bottom: var(--hair) solid var(--line);
}
.timeline .t-year { grid-column: 1 / span 3; font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 3.2vw, 3.2rem); line-height: 1; }
.timeline .t-title { grid-column: 4 / span 4; font-family: var(--serif); font-size: clamp(1.4rem, 1.8vw, 1.8rem); line-height: 1.15; }
.timeline .t-text { grid-column: 8 / span 5; margin: 0; }
.timeline .t-title .label { display: block; margin-top: 8px; }

/* ---------- study grid ---------- */
.studies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: var(--hair) solid var(--noir); }
.study { padding: 22px 24px 40px 0; }
.study + .study { border-left: var(--hair) solid var(--line); padding-left: 24px; }
.study h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.1; margin: 18px 0 14px; }
.study p { font-size: 15px; margin: 0; }

/* ---------- sanskrit verse ---------- */
.verse { text-align: center; max-width: 980px; margin: 0 auto; position: relative; z-index: 2; }
.verse .deva { font-family: var(--deva); font-weight: 300; font-size: clamp(2rem, 4.6vw, 4.4rem); line-height: 1.35; margin: 34px 0 18px; }
.verse .iast { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 1.8vw, 1.7rem); margin: 0 0 10px; }
.verse .trans { color: var(--olive); margin: 0 auto; max-width: 44ch; }
.band .verse .trans { color: color-mix(in srgb, var(--cream) 75%, transparent); }

/* ---------- teachers list ---------- */
.people { list-style: none; margin: 0; padding: 0; border-top: var(--hair) solid var(--noir); }
.people li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 20px 0; border-bottom: var(--hair) solid var(--line);
}
.people .name { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2.3rem); line-height: 1.1; }

/* ---------- past retreats ---------- */
.past { display: grid; gap: clamp(56px, 7vw, 110px); }
.past-item { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); border-top: var(--hair) solid var(--noir); padding-top: 16px; }
.past-meta { grid-column: 1 / span 4; }
.past-meta h3 { margin: 18px 0 14px; }
.past-meta p { font-size: 15px; max-width: 34ch; }
.gallery { grid-column: 5 / span 8; display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(90px, 9vw, 150px); gap: 8px; }
.gallery a { position: relative; overflow: hidden; background: var(--cream-soft); }
.gallery a:nth-child(1) { grid-column: span 4; grid-row: span 3; }
.gallery a:nth-child(2) { grid-column: span 2; grid-row: span 2; }
.gallery a:nth-child(3) { grid-column: span 2; grid-row: span 1; }
.gallery a:nth-child(n+4) { grid-column: span 2; grid-row: span 2; }
.gallery img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05) sepia(0.18); mix-blend-mode: multiply;
  transition: filter 0.6s ease, transform 1.2s ease;
}
.gallery a:hover img { filter: none; transform: scale(1.03); }
.gallery a::after {
  content: "+"; position: absolute; top: 8px; right: 10px; color: var(--cream);
  font-weight: 200; font-size: 18px; opacity: 0; transition: opacity 0.3s;
}
.gallery a:hover::after { opacity: 1; }

/* ---------- lightbox ---------- */
.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none;
  background: var(--noir); color: var(--cream);
}
.lightbox::backdrop { background: var(--noir); }
.lightbox figure { margin: 0; height: calc(100% - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px var(--pad) 0; }
.lightbox img { max-height: calc(100% - 40px); object-fit: contain; }
.lightbox figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 14px; opacity: 0.7; }
.lightbox-bar {
  height: 64px; display: flex; justify-content: space-between; align-items: center; padding: 0 var(--pad);
  border-top: var(--hair) solid rgba(216, 204, 192, 0.3);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.lightbox button {
  background: none; border: 0; color: inherit; cursor: pointer; margin-left: 24px;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
}
.lightbox button:hover { opacity: 0.6; }

/* ---------- schedule table ---------- */
.schedule { width: 100%; border-collapse: collapse; }
.schedule th, .schedule td { text-align: left; padding: 18px 0; border-bottom: var(--hair) solid var(--line); vertical-align: baseline; }
.schedule tr:first-child th, .schedule tr:first-child td { border-top: var(--hair) solid var(--noir); }
.schedule th { width: 32%; font-weight: 400; }
.schedule td { font-family: var(--serif); font-size: 1.4rem; line-height: 1.25; }

/* ---------- footer ---------- */
.site-footer { border-top: var(--hair) solid var(--noir); padding: clamp(48px, 6vw, 88px) 0 28px; }
.footer-top { align-items: start; }
.footer-name { grid-column: 1 / span 6; font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 4.6vw, 4.6rem); line-height: 0.95; margin: 0; }
.footer-col { grid-column: span 3; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-col .label { margin-bottom: 6px; }
.footer-col a:hover { color: var(--olive); }
.footer-base {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: clamp(48px, 7vw, 110px); padding-top: 14px; border-top: var(--hair) solid var(--line);
}

/* ---------- reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
  .rise-2 { animation-delay: 0.12s; }
  .rise-3 { animation-delay: 0.24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .split-label { grid-column: 1 / -1; margin-bottom: 28px; }
  .split-body { grid-column: 1 / -1; }
  .retreat-card .when, .retreat-card .what { grid-column: 1 / -1; }
  .retreat-card .what { margin-top: 36px; }
  .past-meta, .gallery { grid-column: 1 / -1; }
  .past-meta { margin-bottom: 24px; }
  .studies { grid-template-columns: repeat(2, 1fr); }
  .study:nth-child(3) { border-left: 0; padding-left: 0; }
  .study:nth-child(n+3) { border-top: var(--hair) solid var(--line); }
  .timeline .t-year { grid-column: 1 / -1; margin-bottom: 10px; }
  .timeline .t-title { grid-column: 1 / span 5; }
  .timeline .t-text { grid-column: 6 / -1; }
  .footer-name { grid-column: 1 / -1; margin-bottom: 40px; }
  .footer-col { grid-column: span 6; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px var(--pad) 24px;
    background: var(--cream); border-bottom: var(--hair) solid var(--line);
    display: none;
  }
  .site-header.is-open .nav { display: flex; }
  .nav a { padding: 16px 0; border-bottom: var(--hair) solid var(--line-soft); font-size: 12px; }
  .nav a::after { display: none; }
  .brand small { display: none; }
}

@media (max-width: 720px) {
  /* phone hero: text, then the halftone in its own space, then the foot row */
  .hero .ht { inset: auto 0 112px auto !important; width: 100% !important; height: min(42svh, 360px) !important; }
  .hero-text { margin-bottom: calc(min(42svh, 360px) + 32px); }
  .page-hero { min-height: calc(100svh - var(--header-h)); }
  /* secondary halftones drop below their section text on phones */
  .has-ht { display: flex; flex-direction: column-reverse; }
  .has-ht .ht {
    position: relative !important; inset: auto !important;
    width: 82% !important; height: 340px !important; margin: 40px auto 0 !important;
  }
  .hero-foot { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .hero-foot > :nth-child(3) { padding-left: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: var(--hair) solid var(--line); }
  .details { grid-template-columns: 1fr 1fr; }
  .details > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .details > div { padding-bottom: 18px; }
  .studies { grid-template-columns: 1fr; }
  .study + .study { border-left: 0; padding-left: 0; border-top: var(--hair) solid var(--line); }
  .timeline .t-title, .timeline .t-text { grid-column: 1 / -1; }
  .timeline .t-text { margin-top: 10px; }
  .people li { flex-direction: column; gap: 4px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; }
  .gallery a:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .gallery a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .footer-col { grid-column: 1 / -1; margin-bottom: 28px; }
  .schedule th { width: 40%; }
}

/* ---------- additions: quotes, duo images, page CTA ---------- */
.quote {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(2.2rem, 4.4vw, 4.2rem); line-height: 1.04; letter-spacing: -0.01em;
  margin: 0 0 22px; max-width: 18ch;
}
.duo { display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; align-items: start; }
.duo a { display: block; overflow: hidden; background: var(--cream-soft); }
.duo a:first-child { aspect-ratio: 4 / 3; }
.duo a:last-child { aspect-ratio: 3 / 4; }
.duo figcaption { margin-top: 10px; }
.tone {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05) sepia(0.18); mix-blend-mode: multiply;
  transition: filter 0.6s ease, transform 1.2s ease;
}
a:hover > .tone { filter: none; transform: scale(1.03); }
.cta-row { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; margin-top: 2.2em; }
.note { font-size: 13px; color: var(--olive); margin-top: 18px; }
@media (max-width: 720px) {
  .duo { grid-template-columns: 1fr; }
}

/* ---------- home: chanting + retreat boxes under the hero ---------- */
.tiles { padding: clamp(28px, 3vw, 48px) 0 clamp(72px, 9vw, 140px); }
.tiles + .section { border-top: 0; }
.tiles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 24px); }
.tile {
  position: relative; display: flex; flex-direction: column;
  min-height: clamp(340px, 30vw, 440px);
  padding: clamp(18px, 1.8vw, 26px) clamp(20px, 2.4vw, 36px) clamp(20px, 2vw, 28px);
  border: var(--hair) solid var(--noir);
  transition: background 0.45s ease, color 0.45s ease;
}
.tile-top, .tile-foot { display: flex; justify-content: space-between; gap: 16px; }
.tile-top { padding-bottom: 14px; border-bottom: var(--hair) solid var(--line); }
.tile-title { font-size: clamp(2.4rem, 4vw, 4.2rem); margin: auto 0 18px; padding-top: 48px; }
.tile-text { max-width: 38ch; font-size: 15px; margin: 0 0 28px; }
.tile-foot { padding-top: 14px; border-top: var(--hair) solid var(--line); }
.tile-cta::after { content: " →"; font-family: var(--sans); letter-spacing: 0; display: inline-block; transition: transform 0.35s ease; }
.tile .label { transition: color 0.45s ease; }
.tile:hover { background: var(--olive); color: var(--cream); }
.tile:hover .label { color: color-mix(in srgb, var(--cream) 75%, transparent); }
.tile:hover .tile-top, .tile:hover .tile-foot { border-color: color-mix(in srgb, var(--cream) 35%, transparent); }
.tile:hover .tile-cta::after { transform: translateX(6px); }
@media (max-width: 720px) {
  .tiles-grid { grid-template-columns: 1fr; }
  .tile { min-height: 300px; }
}
.h1--home { font-size: clamp(3.2rem, 7.4vw, 8.2rem); }
.tile-cta { white-space: nowrap; }

/* ==================================================================
   Hero layouts (v2): large images
   .hero--stack  title block, then a full-bleed halftone, then the foot row
   .hero--split  title on the left, a tall halftone over the right 60%
   ================================================================== */
.hero--stack { min-height: 0; }
.hero--stack .wrap { flex: none; }
.hero--stack .hero-text {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px); align-items: end;
  padding-top: clamp(40px, 8vh, 110px); padding-bottom: clamp(28px, 3.4vw, 56px);
}
.hero--stack .hero-text > .label { grid-column: 1 / -1; }
.hero--stack .hero-text h1 { grid-column: 1 / span 8; }
.hero--stack .hero-text .hero-sub { grid-column: 9 / span 4; margin: 0 0 0.5em; }
.hero--stack .ht {
  position: relative; inset: auto; width: 100%;
  height: clamp(460px, 84vh, 1000px);
}
.hero--stack .hero-foot { margin-top: 0; }

.hero--split { min-height: max(calc(100svh - var(--header-h)), 860px); }
.hero--split .ht { inset: auto 0 60px auto; width: 62%; height: calc(100% - 72px); }
.hero--split .hero-text { max-width: 40%; }

/* ==================================================================
   Olive accents (v2)
   ================================================================== */
.band .ht { color: color-mix(in srgb, var(--cream) 30%, transparent); }
.band .tone { mix-blend-mode: normal; }
.band .quote { color: var(--cream); }
.band .retreat-card { border-color: color-mix(in srgb, var(--cream) 55%, transparent); }
.band .details, .band .details > div + div { border-color: color-mix(in srgb, var(--cream) 30%, transparent); }
.band .btn--solid { background: var(--cream); color: var(--noir); border-color: var(--cream); }
.band .btn--solid:hover { background: transparent; color: var(--cream); }
.band .fact + .fact { border-color: color-mix(in srgb, var(--cream) 30%, transparent); }
.band .muted { color: color-mix(in srgb, var(--cream) 70%, transparent); }
.band a:not(.btn):not(.link) { border-color: currentColor; }

/* facts row as an olive strip */
.facts-band { padding: clamp(28px, 3vw, 44px) 0 clamp(36px, 4vw, 60px); }

/* home: the chanting box is solid olive */
.tile--accent { background: var(--olive); color: var(--cream); border-color: var(--olive); }
.tile--accent .label { color: color-mix(in srgb, var(--cream) 72%, transparent); }
.tile--accent .tile-top, .tile--accent .tile-foot { border-color: color-mix(in srgb, var(--cream) 32%, transparent); }
.tile--accent:hover { background: var(--noir); border-color: var(--noir); }

/* footer: olive on every page */
.site-footer { background: var(--olive); color: var(--cream); border-top: 0; }
.site-footer .label { color: color-mix(in srgb, var(--cream) 70%, transparent); }
.site-footer .muted { color: color-mix(in srgb, var(--cream) 70%, transparent); }
.site-footer .footer-col a:hover { color: var(--cream); opacity: 0.65; }
.site-footer .footer-base { border-top-color: color-mix(in srgb, var(--cream) 30%, transparent); }
.band + .site-footer { border-top: var(--hair) solid color-mix(in srgb, var(--cream) 30%, transparent); }

@media (max-width: 1024px) {
  .hero--stack .hero-text h1, .hero--stack .hero-text .hero-sub { grid-column: 1 / -1; }
  .hero--stack .hero-text .hero-sub { margin-top: 24px; }
  .hero--split .hero-text { max-width: none; }
}
@media (max-width: 720px) {
  .hero--stack .ht { inset: auto !important; width: 100% !important; height: 62svh !important; }
  .hero--stack .hero-text { margin-bottom: 0; }
  .hero--split .ht { height: min(58svh, 520px) !important; }
  .hero--split .hero-text { margin-bottom: calc(min(58svh, 520px) + 32px); }
}

/* ==================================================================
   v3: no small mono labels. Links, buttons and nav in readable text.
   ================================================================== */
.nav a, .nav-toggle, .link, .btn {
  font-family: var(--sans); font-size: 15px; font-weight: 400;
  letter-spacing: 0.01em; text-transform: none;
}
.btn { padding: 15px 22px; }
.btn::after, .link::after { font-size: 15px; }
@media (max-width: 860px) { .nav a { font-size: 17px; } }

.hero--stack .hero-text { padding-top: clamp(48px, 9vh, 120px); }
.hero--split .ht { inset: auto 0 0 auto; height: calc(100% - 24px); }
.hero--split .hero-text { padding-bottom: 48px; }

.tile-cta {
  display: block; padding-top: 16px; font-size: 15px;
  border-top: var(--hair) solid var(--line);
}
.tile--accent .tile-cta { border-color: color-mix(in srgb, var(--cream) 32%, transparent); }
.tile:hover .tile-cta { border-color: color-mix(in srgb, var(--cream) 35%, transparent); }

.people .role { color: var(--olive); font-size: 16px; }
.cite { color: color-mix(in srgb, var(--cream) 75%, transparent); margin: 0; font-size: 16px; }
.past-meta .meta { color: var(--olive); margin: 0; font-size: 16px; }
.schedule th { color: var(--olive); font-size: 16px; font-weight: 400; }
.timeline .t-title { align-self: baseline; }
.fact .num { margin-top: 0; }
.study h3 { margin-top: 0; }
.verse .deva { margin-top: 0; }
.retreat-card .date-big { margin-top: 0; }

.footer-base { margin-bottom: 0; font-size: 13px; color: color-mix(in srgb, var(--cream) 65%, transparent); }
.footer-col { gap: 12px; }

@media (max-width: 720px) {
  .hero--split .ht { inset: auto 0 0 auto !important; }
  .hero--split .hero-text { margin-bottom: calc(min(58svh, 520px) + 8px); padding-bottom: 0; }
  .tile-title { padding-top: 24px; }
}
.col-quote { grid-column: 1 / span 5; }
.col-media { grid-column: 7 / span 6; }
@media (max-width: 1024px) { .col-quote, .col-media { grid-column: 1 / -1; } }
.split-body--narrow { grid-column: 5 / span 5; }
@media (max-width: 1024px) { .split-body--narrow { grid-column: 1 / -1; } }
.band .date-big .sep { color: color-mix(in srgb, var(--cream) 60%, transparent); }

/* v4: italic words in headings set larger. Cormorant's italic is optically
   smaller than its roman, so a bump makes the pairing feel even and gives
   each heading one expressive word. line-height:0 stops the larger glyphs
   from pushing lines apart. Headings only: not body text, quotes or verses. */
.display em, .footer-name em {
  font-size: 1.16em;
  line-height: 0;
  letter-spacing: -0.02em;
}

/* v5: the same larger italic in every title, including the small ones */
.fact .num em, .timeline .t-title em, .people .name em, .study h3 em, .date-big em {
  font-style: italic; font-weight: inherit;
  font-size: 1.16em; line-height: 0; letter-spacing: -0.02em;
}

/* v6: home title. "Ashtanga Yoga with" small, the name very large */
.h1--home { font-size: clamp(3.6rem, 12.4vw, 11.6rem); line-height: 0.86; }
.h1--home .h1-pre {
  display: block; margin-bottom: 0.25em;
  font-size: clamp(1.5rem, 2.3vw, 2.4rem); line-height: 1.2; letter-spacing: 0;
}
.h1--home em { display: block; font-size: 1em; line-height: inherit; letter-spacing: -0.025em; }
.hero--stack .hero-text .h1--home { grid-column: 1 / span 9; }
.hero--stack .hero-text .h1--home ~ .hero-sub { grid-column: 10 / span 3; }
@media (max-width: 1024px) {
  .hero--stack .hero-text .h1--home, .hero--stack .hero-text .h1--home ~ .hero-sub { grid-column: 1 / -1; }
}
@media (max-width: 1024px) { .h1--home { font-size: clamp(3.6rem, 15.5vw, 10rem); } }

/* v7: italic size as one variable: 1.16x on phones/tablets, much larger on desktop.
   line-height 0.9 (not 0) so an italic phrase that wraps can't overlap itself. */
:root { --italic-scale: 1.16; }
@media (min-width: 1025px) { :root { --italic-scale: 1.4; } }
.display em, .footer-name em, .fact .num em, .timeline .t-title em,
.people .name em, .study h3 em, .date-big em {
  font-size: calc(var(--italic-scale) * 1em);
  line-height: 0.9;
}
/* the home name is already all italic and sized on its own */
.h1--home em { font-size: 1em; line-height: inherit; }
/* split heroes: slightly smaller h1 so the enlarged italic word fits beside the image */
@media (min-width: 1025px) {
  .hero--split .h1 { font-size: clamp(3.4rem, 7.8vw, 8.2rem); }
  .hero--split .hero-text { max-width: 42%; }
}

/* particle canvas (js/particles.js): fixed over the page, under the header */
.particles { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* tablets too: section images go below their text instead of behind it */
@media (max-width: 1024px) {
  .has-ht { display: flex; flex-direction: column-reverse; }
  .has-ht .ht {
    position: relative !important; inset: auto !important;
    width: 82% !important; height: 400px !important; margin: 40px auto 0 !important;
  }
}
@media (max-width: 720px) { .has-ht .ht { height: 340px !important; } }

/* ==================================================================
   v8: minimal site. Three pages, no images for now.
   ================================================================== */
/* text-only hero */
.hero--text { min-height: 0; }
.hero--text .wrap { flex: none; }
.hero--text .hero-text {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px); align-items: end;
  padding-top: clamp(72px, 16vh, 200px); padding-bottom: clamp(40px, 5vw, 80px);
  margin-bottom: 0;
}
.hero--text .hero-text h1 { grid-column: 1 / span 8; }
.hero--text .hero-text .hero-sub { grid-column: 9 / span 4; margin: 0 0 0.5em; }
.hero--text .hero-text .cta-row { grid-column: 9 / span 4; margin-top: 1.6em; }
.hero--text .hero-text .h1--home { grid-column: 1 / span 9; }
.hero--text .hero-text .h1--home ~ .hero-sub { grid-column: 10 / span 3; }
@media (max-width: 1024px) {
  .hero--text .hero-text > * { grid-column: 1 / -1 !important; }
  .hero--text .hero-text .hero-sub { margin-top: 24px; }
}
@media (max-width: 720px) {
  .hero--text .hero-text { padding-top: clamp(56px, 12vh, 96px); margin-bottom: 0; }
}

/* two links only: always inline, no menu button */
.nav-toggle { display: none !important; }
@media (max-width: 860px) {
  .nav {
    position: static; display: flex; flex-direction: row; gap: 22px;
    padding: 0; background: none; border: 0;
  }
  .nav a { padding: 6px 0; border: 0; font-size: 15px; }
  .nav a::after { display: block; }
}
@media (max-width: 480px) { .nav-long { display: none; } .nav { gap: 18px; } }

/* ==================================================================
   v9: highlights. Turmeric on cream, Lotus clay on olive, warm white
   for the rest of the text on olive. Italic heading words carry the
   highlight first; body text never does.
   ================================================================== */
/* ---------- on cream ---------- */
/* italic word in headings (not the home name) */
main > .section:not(.band) .display em,
.hero--text .display:not(.h1--home) em,
.tile:not(.tile--accent) .tile-title em { color: var(--turmeric-ink); }

/* home: the small line above the name */
.h1--home .h1-pre { color: var(--turmeric-ink); }

/* a short accent hairline above each section heading */
.split-label h2::before {
  content: ""; display: block; width: 44px; height: 0;
  border-top: 1.5px solid var(--turmeric); margin-bottom: 22px;
}

/* buttons: the call to action is the accent */
.btn, .btn--solid { background: var(--turmeric); border-color: var(--turmeric); color: var(--noir); }
.btn:hover, .btn--solid:hover { background: var(--noir); border-color: var(--noir); color: var(--cream); }

/* boxes: arrow in the accent, hover fills with it */
.tile .tile-cta::after { color: var(--turmeric-ink); }
.tile:not(.tile--accent):hover { background: var(--turmeric); border-color: var(--turmeric); color: var(--noir); }
.tile:hover .tile-title em, .tile:hover .tile-cta::after { color: inherit; }

/* nav: current page and hover underline */
.nav a::after { border-bottom: 1.5px solid var(--turmeric); }

/* text links (Times & details) */
.link { border-bottom-color: var(--turmeric); }
.link::after { color: var(--turmeric-ink); }

::selection { background: var(--turmeric); color: var(--noir); }

/* ---------- on olive: bands, the olive box, the footer ---------- */
.band, .tile--accent, .site-footer { color: var(--white); }
.band .display em, .band .date-big em,
.tile--accent .tile-title em,
.site-footer .footer-name em { color: var(--clay); }
.band .split-label h2::before { border-color: var(--clay); }
.band .btn, .band .btn--solid { background: var(--clay); border-color: var(--clay); color: var(--noir); }
.band .btn:hover, .band .btn--solid:hover { background: var(--white); border-color: var(--white); color: var(--noir); }
.tile--accent .tile-cta::after { color: var(--clay); }
.tile--accent:hover { background: var(--clay); border-color: var(--clay); color: var(--noir); }
.band ::selection, .site-footer ::selection { background: var(--clay); color: var(--noir); }

.band .muted, .site-footer .muted { color: color-mix(in srgb, var(--white) 70%, transparent); }
.footer-base { color: color-mix(in srgb, var(--white) 65%, transparent); }

/* ==================================================================
   v10: headings in Red Hat Display. No italics anywhere: highlighted
   words stay upright and stand out by colour and a stronger weight.
   ================================================================== */
.display { letter-spacing: -0.02em; }
.display em, .footer-name em, .fact .num em, .timeline .t-title em,
.people .name em, .study h3 em, .date-big em, .tile-title em {
  font-style: normal; font-weight: 500; font-size: 1em; line-height: inherit; letter-spacing: inherit;
}
.lede { font-weight: 300; }
.brand { font-weight: 400; letter-spacing: 0; }
.verse .iast, .quote { font-style: normal; }
.schedule td { font-size: 1.2rem; }

/* the name stays light; sized for this wider face */
.h1--home { font-size: clamp(3.4rem, 10.4vw, 10rem); }
.h1--home em { font-weight: 300; }
@media (max-width: 1024px) { .h1--home { font-size: clamp(2.8rem, 13.5vw, 8rem); } }

/* ==================================================================
   v11: the coloured words in titles go back to Cormorant Garamond
   italic, set much larger than the Red Hat Display around them.
   Cormorant's italic is small for its size, so it needs a big bump.
   ================================================================== */
:root { --italic: "Cormorant Garamond", "Cormorant", Garamond, serif; --it-scale: 1.32; }
@media (min-width: 1025px) { :root { --it-scale: 1.6; } }
.display em, .date-big em, .tile-title em {
  font-family: var(--italic); font-style: italic; font-weight: 500;
  font-size: calc(var(--it-scale) * 1em); line-height: 0.8; letter-spacing: -0.01em;
}
/* the home name is not a coloured word: stays Red Hat Display, light */
.h1--home em {
  font-family: var(--serif); font-style: normal; font-weight: 300;
  font-size: 1em; line-height: inherit; letter-spacing: -0.02em;
}
/* "Ashtanga Yoga with": dark, like the name */
.h1--home .h1-pre { color: inherit; }

/* footer without the large name: two link columns from the left */
.footer-top .footer-col { grid-column: span 4; }
@media (max-width: 720px) { .footer-top .footer-col { grid-column: 1 / -1; } }

/* v12: intro sublines (.lede) 2px larger, a bit more prominent */
.lede { font-size: calc(clamp(1.35rem, 1.9vw, 1.9rem) + 2px); }

/* v13: arrows drawn as thin lines (SVG masks), not text characters.
   iPhones show ↗ and → as colour emoji; a mask takes the text colour
   and looks the same everywhere. */
:root {
  --arrow-ne: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12 12 4M5.5 4H12v6.5'/%3E%3C/svg%3E");
  --arrow-e: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h12M9.5 3.5 14 8l-4.5 4.5'/%3E%3C/svg%3E");
}
.btn::after, .link::after, .link.ext::after, .tile-cta::after, .out::after {
  content: ""; display: inline-block; flex: none;
  width: 0.9em; height: 0.9em; vertical-align: -0.08em;
  background-color: currentColor;
  -webkit-mask: var(--arrow-e) center / contain no-repeat;
  mask: var(--arrow-e) center / contain no-repeat;
}
.btn::after, .link.ext::after, .out::after {
  -webkit-mask-image: var(--arrow-ne); mask-image: var(--arrow-ne);
}
.btn::after { width: 1em; height: 1em; }
.tile-cta::after { margin-left: 0.45em; transition: transform 0.35s ease; }
.out::after { width: 0.75em; height: 0.75em; margin-left: 0.35em; vertical-align: -0.02em; }

/* v14: home hero image, a static halftone (tools/hero.sh). Full width;
   its floor fades into the page, so there is no bottom edge. */
/* v15: the image fills the hero (90% of the screen height) from the top; the
   title sits over its lower part, where the picture fades into the cream. */
.hero--home {
  position: relative; min-height: 90vh; min-height: 90svh;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero--home .hero-img { position: absolute; inset: 0; z-index: 0; }
.hero--home .hero-img img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 12%;
}
.hero--home::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top,
    var(--cream) 0%,
    color-mix(in srgb, var(--cream) 88%, transparent) 16%,
    color-mix(in srgb, var(--cream) 40%, transparent) 32%,
    transparent 50%);
}
.hero--home .wrap { position: relative; z-index: 2; }
.hero--home .hero-text { padding-top: 0; padding-bottom: clamp(36px, 7vh, 88px); }
@media (max-width: 720px) {
  .hero--home .hero-img img { object-position: 50% 8%; }
  .hero--home .hero-text { padding-bottom: 40px; }
}

/* v16: section images on the left. A cut-out halftone (tools/sections.sh),
   centred against the text; the section title sits on its faded bottom. */
.has-figure .grid { align-items: center; }
.split-figure { grid-column: 1 / span 5; position: relative; }
.split-figure--wide { grid-column: 1 / span 6; }
.split-figure img { display: block; width: 100%; height: auto; }
.figure-title { position: absolute; left: 0; bottom: 4%; margin: 0; }
.split-body--figure { grid-column: 7 / span 6; }
@media (max-width: 1024px) {
  .split-figure, .split-figure--wide { grid-column: 1 / -1; margin-bottom: 32px; }
  .split-body--figure, .split-figure--wide + .split-body--figure { grid-column: 1 / -1; }
  .split-figure { max-width: 620px; }
  .split-figure--wide { max-width: 760px; }
}
.figure-title::before {
  content: ""; display: block; width: 44px; height: 0;
  border-top: 1.5px solid var(--turmeric); margin-bottom: 20px;
}
.band .figure-title::before { border-color: var(--clay); }
.split-figure--wide .figure-title { bottom: 0; }
/* phones: the photo with Sharathji is small, so its title goes just below it */
@media (max-width: 720px) {
  .split-figure--wide .figure-title { position: static; margin-top: 8px; }
}

/* v17: retreat gallery lightbox in the site fonts (the mono font is no longer loaded) */
.lightbox figcaption, .lightbox-bar, .lightbox button {
  font-family: var(--sans); font-size: 14px; letter-spacing: 0.01em; text-transform: none;
}

/* retreats hero: a landscape photo, so phones get a shorter hero than the portrait home hero */
@media (max-width: 720px) {
  .hero--retreats { display: block; min-height: 0; }
  .hero--retreats .hero-img { position: relative; inset: auto; }
  .hero--retreats .hero-img img { height: auto; object-fit: initial; }
  .hero--retreats::after { display: none; }
  .hero--retreats .hero-text { padding-top: 8px; padding-bottom: 40px; }
}

/* v18: external link in the header (Daily Practice -> Mysore Tattva), with a small drawn arrow
   that moves up and to the right on hover. The arrow is a mask, so it takes the text colour. */
.arr {
  display: inline-block; width: 0.72em; height: 0.72em; margin-left: 0.3em; vertical-align: 0.04em;
  background-color: currentColor; color: inherit;
  -webkit-mask: var(--arrow-ne) center / contain no-repeat; mask: var(--arrow-ne) center / contain no-repeat;
  transition: transform 0.3s ease;
}
.nav-ext:hover .arr { transform: translate(2px, -2px); }
.nav-ext .arr { color: var(--turmeric-ink); }
@media (max-width: 480px) { .nav { gap: 14px; } .nav a { font-size: 14px; } }
.nav a { white-space: nowrap; }
.brand { white-space: nowrap; }
@media (max-width: 480px) {
  .brand { font-size: 18px; }
  .nav { gap: 12px; }
  .nav a { font-size: 14px; }
  .nav .arr { margin-left: 0.2em; }
}
@media (max-width: 360px) { .brand { font-size: 16px; } .nav { gap: 9px; } .nav a { font-size: 13px; } }
@media (max-width: 340px) { .brand { font-size: 14.5px; } .nav { gap: 8px; } .nav a { font-size: 12px; } .site-header .wrap { gap: 8px; } }

/* v19: footer credit line: copyright left, "Website by" right; stacked on phones */
.footer-base { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 24px; }
.footer-base a { color: inherit; border-bottom: var(--hair) solid color-mix(in srgb, var(--white) 45%, transparent); transition: color 0.2s ease, border-color 0.2s ease; }
.footer-base a:hover { color: var(--clay); border-color: var(--clay); }
.footer-base .out::after { width: 0.7em; height: 0.7em; margin-left: 0.3em; transition: transform 0.3s ease; }
.footer-base a:hover.out::after { transform: translate(2px, -2px); }
