/* ==========================================================================
   The Tabla Era — site layer
   Page sections, layout and motion. Depends on the tokens and components in
   styles.css, which must be linked first.
   ========================================================================== */

/* Crops, named for the photo each one frames. */
.crop-portrait  { --pos: 50% 28%; }
.crop-guru-a    { --pos: 50% 20%; }
.crop-guru-b    { --pos: 48% 30%; }
.crop-guru-d    { --pos: 42% 22%; }
.crop-madhav    { --pos: 50% 16%; }

/* ==========================================================================
   Page furniture
   ========================================================================== */

.shell {
  max-width: var(--shell-w);
  margin: 0 auto;
  /* Bottom runs a touch longer than top — optically even, not mathematically. */
  padding: var(--section-y) var(--space-6) calc(var(--section-y) * 1.12);
}

.band { position: relative; }
.band + .band { border-top: 1px solid var(--color-divider); }
.band > .shell { position: relative; z-index: var(--z-raised); }

/* Ambient warmth so a band is never a flat fill. */
.band--lit { overflow: hidden; }
.band--lit::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 48% at var(--lit-x, 74%) var(--lit-y, 26%),
      color-mix(in srgb, var(--brand-gold) 20%, transparent), transparent 68%);
}
.band--lit-center { --lit-x: 50%; --lit-y: 38%; }

/* Light green band, alternating with the yellow ground. */
.band--green { background: var(--color-bg-green); --color-divider: var(--color-divider-green); }

/* Deep green band with gold and cream type. */
.band--deep { background: var(--color-accent-800); color: var(--color-bg); }
.band + .band--deep, .band--deep + .band, .band--green + .band, .band + .band--green { border-top-color: transparent; }
.band--deep .eyebrow,
.band--deep .quote-attrib { color: var(--brand-gold); }
.band--deep .section-title { color: var(--color-bg); }
.band--deep .perform-lede,
.band--deep .perform-body { color: color-mix(in srgb, var(--color-bg) 80%, transparent); }
.band--deep .perform-list { border-top-color: var(--brand-gold); }
.band--deep .perform-row { border-bottom-color: color-mix(in srgb, var(--color-bg) 18%, transparent); }
.band--deep .perform-row:hover { background: color-mix(in srgb, var(--brand-gold) 10%, transparent); }
.band--deep .btn-secondary { color: var(--color-bg); border-color: var(--brand-gold); }
.band--deep .btn-secondary:hover { color: var(--color-accent-900); background: var(--brand-gold); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.72em;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-green);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  flex: none;
  background: var(--brand-gold);
}

.section-title {
  font-weight: 500;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.014em;
  margin: 0;
  text-wrap: balance;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(32px, 6vw, 88px);
}
.split--top { align-items: start; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--color-accent-800) 96%, transparent);
  backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 2px solid var(--brand-gold);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-header[data-stuck="true"] {
  box-shadow: var(--shadow-warm-sm);
  border-bottom-color: var(--brand-gold);
}

.site-nav {
  max-width: var(--shell-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-3) var(--space-6);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--brand-gold);
  margin-right: auto;
}
.brand img {
  width: 36px; height: 36px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform var(--dur-slow) var(--ease-spring);
}
.brand:hover img { transform: rotate(-4deg) scale(1.05); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.005em;
  /* The cap-height of the serif sits low beside the badge. */
  transform: translateY(1px);
}

.nav-links { display: flex; gap: var(--space-6); flex-wrap: wrap; align-items: center; }

.nav-link {
  position: relative;
  color: color-mix(in srgb, var(--color-bg) 88%, transparent);
  text-decoration: none;
  font-size: 14px;
  padding-block: 2px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--brand-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav-link:hover { color: var(--brand-gold); }
.nav-link:hover::after { transform: scaleX(1); }
/* Scroll-spy: the section currently in view. */
.nav-link[aria-current="true"] { color: var(--brand-gold); }
/* Gold call to action on the green bar. */
.site-header .btn-primary { color: var(--color-accent-900); background: var(--brand-gold); border-color: var(--brand-gold); }
.site-header .btn-primary:hover { color: var(--color-accent-900); background: var(--color-bg); border-color: var(--color-bg); }
.nav-link[aria-current="true"]::after { transform: scaleX(1); }

.btn-sm { font-size: 14px; padding: 8px 16px; white-space: nowrap; }
.btn-md { font-size: 15px; padding: 10px 20px; white-space: nowrap; }
.btn-lg { font-size: 16px; padding: 13px 24px; white-space: nowrap; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  --section-y: clamp(56px, 8vw, 112px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero-copy { display: flex; flex-direction: column; gap: var(--space-6); }

.pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--color-accent-700);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--color-accent) 45%, transparent);
  border-radius: 999px;
  padding: 7px 15px;
  background: color-mix(in srgb, var(--color-surface) 55%, transparent);
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.pill:hover {
  background: var(--color-accent-100);
  border-color: var(--color-accent);
  color: var(--color-accent-700);
}
.pill:active { transform: translateY(1px); }

.hero-title {
  font-weight: 500;
  font-size: clamp(54px, 8vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}
.accent { color: var(--color-accent-700); font-style: italic; }

.hero-byline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.hero-creds {
  margin: -8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--color-neutral-700);
}
.hero-lede {
  font-size: 18px;
  line-height: 1.7;
  max-width: 42ch;
  margin: 0;
  color: var(--color-neutral-800);
  text-wrap: pretty;
}

.cta-row { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-2); }

.hero-figure {
  position: relative;
  justify-self: center;
  width: min(100%, 450px);
}
/* An offset gold frame behind the plate — depth without a drop shadow. */
.hero-figure::before {
  content: "";
  position: absolute;
  inset: 20px -20px -20px 20px;
  border: 1px solid color-mix(in srgb, var(--brand-gold) 75%, transparent);
  z-index: var(--z-base);
}
.hero-figure img { position: relative; z-index: var(--z-raised); }
.hero-figure .plate { box-shadow: var(--shadow-warm-lg); }
/* Name plate over the photo, on a dark fade so it reads over the drums. */
.hero-tag {
  position: absolute;
  inset: auto 6px 6px 6px; /* inside the plate's 6px border */
  z-index: var(--z-raised);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 56px 22px 18px;
  background: linear-gradient(to top, rgb(0 0 0 / 0.88), rgb(0 0 0 / 0.7) 55%, transparent);
  color: #fff;
}
.hero-tag-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  color: var(--brand-gold);
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.6);
}
.hero-tag-role {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgb(255 255 255 / 0.9);
}

@media (min-width: 1040px) {
  /* Nudge the portrait off the baseline so the two columns aren't mirrored. */
  .hero-figure { justify-self: end; transform: translateY(20px); }
}

/* ==========================================================================
   About
   ========================================================================== */

.prose {
  font-size: 16.5px;
  line-height: 1.78;
  color: var(--color-neutral-800);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 62ch;
}
.prose p { margin: 0; text-wrap: pretty; }
/* Opening line gets a little editorial weight. */
.prose > p:first-child { font-size: 18px; color: var(--color-text); }

.about-head { max-width: 760px; }
.about-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin-top: clamp(28px, 4vw, 48px);
}
@media (max-width: 899px) { .about-body { grid-template-columns: 1fr; } }

.about-figure { margin: 0; position: relative; }
/* Offset gold frame, matching the hero. */
.about-figure::before {
  content: "";
  position: absolute;
  inset: -16px 16px 40px -16px;
  border: 1px solid color-mix(in srgb, var(--brand-gold) 60%, transparent);
}
/* Shown whole: natural 3:2, no crop. */
.about-photo { position: relative; display: block; width: 100%; height: auto; }
.about-figure figcaption {
  margin-top: var(--space-3);
  font-size: 13px;
  line-height: 1.5;
  font-style: italic;
  color: var(--color-neutral-700);
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(40px, 5vw, 64px) 0 0;
  border-top: 1px solid color-mix(in srgb, var(--brand-gold) 50%, transparent);
}
.about-facts div { padding: var(--space-4) var(--space-4) 0 0; }
.about-facts div + div { padding-left: clamp(18px, 3vw, 40px); border-left: 1px solid var(--color-divider); }
.about-facts dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  color: var(--color-accent);
}
.about-facts dd { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--color-neutral-700); }
@media (max-width: 479px) {
  .about-facts { grid-template-columns: 1fr; }
  .about-facts div, .about-facts div + div { padding: var(--space-3) 0; border-left: 0; border-bottom: 1px solid var(--color-divider); }
}

/* ==========================================================================
   Lessons — an ordered progression, not three identical cards
   ========================================================================== */

.lessons-title { margin-bottom: clamp(40px, 6vw, 64px); max-width: 20ch; }

.lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(28px, 4vw, 56px);
}

.lesson {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  transition: border-color var(--dur-slow) var(--ease);
}
.lesson:hover { border-top-color: var(--color-accent); }

.lesson-num {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--color-accent-500);
  margin-bottom: var(--space-2);
}

.lesson-level {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}
.lesson-title {
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.008em;
  margin: 0;
}
.lesson-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.72;
  color: var(--color-neutral-700);
  text-wrap: pretty;
}

.lesson-meta {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: var(--space-4);
  border-top: 1px solid color-mix(in srgb, var(--brand-gold) 50%, transparent);
  font-size: 14px;
  color: var(--color-neutral-700);
}

/* ==========================================================================
   Performances
   ========================================================================== */

.perform-title { margin-bottom: var(--space-3); }
.perform-lede {
  margin: 0 0 var(--space-6);
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.72;
  color: var(--color-neutral-700);
  text-wrap: pretty;
}

.perform-list { border-top: 1px solid var(--brand-green); }

.perform-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-divider);
  transition: background-color var(--dur) var(--ease);
}
.perform-row:hover { background: color-mix(in srgb, var(--brand-gold) 8%, transparent); }

.perform-title-cell {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.006em;
}
.perform-body {
  font-size: 15px;
  line-height: 1.68;
  color: var(--color-neutral-700);
  text-wrap: pretty;
}

/* The two columns get too tight to read once the band is narrow. */
@media (max-width: 560px) {
  .perform-row { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* ==========================================================================
   Gurus
   ========================================================================== */

.gurus-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.gurus-title { max-width: 18ch; }
.gurus-note {
  margin: 0;
  max-width: 38ch;
  font-size: 15px;
  line-height: 1.72;
  color: var(--color-neutral-700);
  text-wrap: pretty;
}

/* Flex rather than grid: the roster grows as Suman supplies gurus, and an
   auto-fit grid strands the remainder of an awkward count on a left-aligned
   row of its own. Wrapping flex items centre instead, at any count. */
.guru-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(20px, 3vw, 32px);
}

.guru {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1 1 190px;
  max-width: 272px;
}
.guru:hover .plate {
  transform: translateY(-5px);
  box-shadow: var(--shadow-warm-lg);
  filter: sepia(0.1) saturate(0.95) contrast(1.03);
}
.guru figcaption { display: flex; flex-direction: column; gap: 2px; }
.guru-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  color: var(--color-text);
  /* Reserve two lines so the gharana below starts on the same baseline across
     the row, whether or not a name wraps. */
  min-height: 2.4em;
}
/* neutral-600 is the design's value, but at 13px it lands at 3.95:1 on this
   ground — one step darker clears WCAG AA without changing the register. */
.guru-gharana { font-size: 13px; color: var(--color-neutral-700); }

/* ==========================================================================
   Quote
   ========================================================================== */

.quote-shell {
  --section-y: clamp(80px, 11vw, 136px);
  --shell-w: 900px;
  text-align: center;
}
.quote-rule {
  width: 56px; height: 1px;
  background: var(--brand-gold);
  margin: 0 auto var(--space-6);
}
.quote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.22;
  letter-spacing: -0.008em;
  text-wrap: balance;
}
.quote-attrib {
  display: block;
  margin-top: var(--space-6);
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-neutral-700);
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  gap: clamp(36px, 6vw, 80px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.contact-copy { display: flex; flex-direction: column; gap: var(--space-4); }
.contact-lede {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--color-neutral-800);
  max-width: 38ch;
}
.contact-links { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.contact-ig {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--color-accent-700);
  text-underline-offset: 5px;
}
.contact-email { font-size: 16px; color: var(--color-neutral-800); text-underline-offset: 5px; }
.contact-email:hover { color: var(--color-accent-700); }

.contact-form { display: flex; flex-direction: column; gap: var(--space-4); }
.form-fields { display: flex; flex-direction: column; gap: var(--space-4); }
.input--lg { min-height: 46px; }
.btn-submit { font-size: 16px; padding: 13px 28px; align-self: flex-start; }

.field-error {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--color-danger);
}
.field-error:empty { display: none; }

.form-sent {
  padding: var(--space-6);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
  box-shadow: var(--shadow-warm-md);
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.25;
}
.form-sent p {
  margin: var(--space-3) 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-neutral-700);
}
.form-note { margin: 0; font-size: 13px; color: var(--color-neutral-700); }

[hidden] { display: none !important; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 3px solid var(--brand-gold);
  background: var(--color-accent-900);
}
.footer-inner {
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) calc(var(--space-6) * 1.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: 13px;
  color: color-mix(in srgb, var(--color-bg) 78%, transparent);
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--brand-gold);
}
.footer-links { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
}
.footer-link svg { width: 16px; height: 16px; flex: none; }
.footer-link:hover { color: var(--brand-gold); }
.footer-legal { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { color: var(--brand-gold); text-decoration: underline; }

/* ==========================================================================
   Not-found page
   ========================================================================== */

.notfound {
  --section-y: clamp(80px, 14vh, 160px);
  --shell-w: 680px;
  text-align: center;
}
.notfound-code {
  font-family: var(--font-display);
  font-size: clamp(76px, 15vw, 140px);
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent-500);
  margin: 0 0 var(--space-3);
}
.notfound-body {
  margin: var(--space-4) auto var(--space-6);
  max-width: 44ch;
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--color-neutral-800);
}
.notfound .cta-row { justify-content: center; }

/* ==========================================================================
   Legal / reading page
   ========================================================================== */

.reading { --shell-w: 760px; }
.reading h2 {
  font-size: 26px;
  font-weight: 600;
  margin: var(--space-8) 0 var(--space-3);
}
.reading p, .reading li {
  font-size: 16px;
  line-height: 1.78;
  color: var(--color-neutral-800);
  text-wrap: pretty;
}
.reading ul { padding-left: 1.1em; display: flex; flex-direction: column; gap: var(--space-2); }
.reading-meta {
  font-size: 13px;
  color: var(--color-neutral-700);
  margin-top: var(--space-2);
}

/* ==========================================================================
   Scroll-reveal — only armed once JS confirms it can undo it
   ========================================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .guru:hover .plate,
  .brand:hover img,
  .btn:active,
  .pill:active { transform: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
