/* ==========================================================================
   RS2BL — Ravi Sondhi Spirit of Bangalore Lecture
   A quiet, editorial system: paper, ink, one accent (laterite red).
   ========================================================================== */

:root {
  --paper: #f3eee4;
  --paper-2: #ebe4d6;
  --ink: #1b1a17;
  --ink-2: #3a3731;
  --muted: #6f685c;
  --rule: #d6ccbb;
  --accent: #8a2e1c;          /* laterite — the red earth of the Deccan */
  --accent-ink: #f3eee4;

  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1360px;
  --measure: 36rem;

  --ease: cubic-bezier(.2, .7, .1, 1);

  /* One grid for the whole site. Inside any .wrap:
     [label 25%] [content … split in half] — shared edges everywhere. */
  --c1: calc((100% - var(--gutter)) / 4);
  --c2: calc((100% - var(--c1) - 2 * var(--gutter)) / 2);
  --c3: calc((var(--c2) - var(--gutter)) / 2);
  --grid-3: var(--c1) 1fr 1fr;
  --grid-4: var(--c1) var(--c3) var(--c3) 1fr;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(19px, 1.25vw, 21px);
  line-height: 1.55;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.01em; line-height: 1.02; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* Small uppercase labels -------------------------------------------------- */
.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--ink { color: var(--ink); }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* Links with a drawn underline -------------------------------------------- */
.link {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .5s var(--ease);
  padding-bottom: 1px;
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand__mark {
  font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .02em;
}
.brand__mark span { color: var(--accent); }
.brand__name { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .brand__name { display: none; } }

.nav { display: flex; gap: clamp(16px, 2.4vw, 36px); align-items: center; }
.nav a { font-family: var(--sans); font-size: 13px; letter-spacing: .02em; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.nav .btn { margin-left: 4px; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: .02em;
  padding: 11px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper) !important;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--ink) !important; }
.btn--ghost:hover { background: var(--ink); color: var(--paper) !important; border-color: var(--ink); }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Hero -------------------------------------------------------------------- */
.hero { padding: clamp(56px, 10vw, 140px) 0 clamp(48px, 7vw, 96px); }
.hero__eyebrow { display: flex; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 4vw, 56px); }
.hero__title {
  font-size: clamp(42px, 8.4vw, 140px);
  line-height: .88;
  letter-spacing: -0.035em;
  font-weight: 300;
}
.hero__title em { font-style: italic; font-weight: 300; }

.hero__foot {
  margin-top: clamp(36px, 5vw, 72px);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: end;
}
.hero__lede { font-size: clamp(22px, 2vw, 30px); line-height: 1.3; max-width: 30ch; font-weight: 400; }
.hero__meta { justify-self: end; text-align: right; }
@media (max-width: 760px) {
  .hero__foot { grid-template-columns: 1fr; }
  .hero__meta { justify-self: start; text-align: left; }
}

/* Reveal on scroll -------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.hero__title .line { display: block; overflow: hidden; padding: 0 .12em .2em 0; margin-bottom: -.2em; }
.hero__title .line > span { display: inline-block; }
.js .hero__title .line > span { transform: translateY(130%); transition: transform 1.2s var(--ease); }
.is-loaded .hero__title .line > span { transform: none; }
.is-loaded .hero__title .line:nth-child(2) > span { transition-delay: .08s; }
.is-loaded .hero__title .line:nth-child(3) > span { transition-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero__title .line > span { opacity: 1; transform: none; transition: none; }
}

/* Feature image ----------------------------------------------------------- */
.plate { position: relative; overflow: hidden; background: var(--paper-2); }
.plate img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.02); }
.plate--wide { aspect-ratio: 16 / 7; }
.caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; }

/* Sections ---------------------------------------------------------------- */
.section { padding: clamp(72px, 10vw, 150px) 0; }
.section--tight { padding: clamp(48px, 6vw, 90px) 0; }
.section__head {
  display: grid; grid-template-columns: 1fr 3fr; gap: var(--gutter); align-items: baseline;
  margin-bottom: clamp(36px, 5vw, 72px);
}
.section__num { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.section__title { font-size: clamp(40px, 5.6vw, 88px); line-height: .98; letter-spacing: -0.025em; font-weight: 300; }
.section__title em { font-style: italic; }
@media (max-width: 760px) { .section__head { grid-template-columns: 1fr; gap: 14px; } }

.cols { display: grid; grid-template-columns: 1fr 3fr; gap: var(--gutter); align-items: baseline; }
.cols__body { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.cols__body p { max-width: var(--measure); }
@media (max-width: 960px) { .cols__body { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

.dropcap::first-letter {
  float: left; font-size: 4.6em; line-height: .82; padding: .06em .08em 0 0; font-weight: 400; color: var(--accent);
}
.big-p { font-size: clamp(24px, 2.3vw, 34px); line-height: 1.28; font-weight: 400; max-width: 34ch; }

/* Upcoming lecture card --------------------------------------------------- */
.upcoming {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  display: grid; grid-template-columns: var(--grid-3); gap: var(--gutter);
  padding: clamp(28px, 4vw, 48px) 0;
  align-items: start;
}
.upcoming__year { font-size: clamp(64px, 9vw, 140px); line-height: .8; font-weight: 300; letter-spacing: -0.04em; }
.upcoming__title { font-size: clamp(30px, 3.4vw, 52px); line-height: 1.04; font-weight: 400; margin-bottom: 18px; }
.upcoming__facts { display: grid; gap: 14px; }
.upcoming__facts div { display: grid; gap: 2px; }
.upcoming__facts dd { margin: 0; font-size: 19px; }
.upcoming__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 2px; }
@media (max-width: 960px) { .upcoming { grid-template-columns: 1fr; gap: 24px; } }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Archive index ----------------------------------------------------------- */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.index li { border-bottom: 1px solid var(--rule); }
.index a {
  display: grid;
  grid-template-columns: var(--grid-3);
  gap: var(--gutter); align-items: center;
  padding: 18px 0;
  transition: color .3s, padding .5s var(--ease);
}
.index__lead { display: flex; align-items: center; gap: 24px; }
.index__thumb { width: 64px; height: 80px; object-fit: cover; filter: grayscale(1) contrast(.9) brightness(1.04); opacity: .85; transition: opacity .4s var(--ease), filter .4s var(--ease); }
.index a:hover .index__thumb { opacity: 1; filter: grayscale(1) contrast(1.05); }
.index__year { font-family: var(--sans); font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.index__speaker { font-size: clamp(26px, 2.8vw, 44px); line-height: 1.02; font-weight: 400; }
.index__title { font-size: clamp(18px, 1.5vw, 22px); font-style: italic; color: var(--ink-2); }
.index__dur { font-family: var(--sans); font-size: 12px; color: var(--muted); text-align: right; }
.index__meta { display: flex; align-items: center; gap: 24px; }
.index__meta .index__title { flex: 1; }
.index__arrow { flex: none; transition: transform .5s var(--ease), color .3s; }
.index a:hover { color: var(--accent); }
.index a:hover .index__speaker { transform: translateX(10px); }
.index__speaker { transition: transform .5s var(--ease); }
.index a:hover .index__arrow { transform: translateX(4px); }
.index a:hover .index__title { color: var(--accent); }
@media (max-width: 760px) {
  .index a { grid-template-columns: 56px 1fr; column-gap: 18px; row-gap: 4px; }
  .index__lead { grid-row: 1 / 3; flex-direction: column; align-items: flex-start; gap: 8px; }
  .index__thumb { width: 56px; height: 70px; }
  .index__meta .index__arrow { display: none; }
  .index__dur { display: none; }
}

/* Quote ------------------------------------------------------------------- */
.quote { text-align: center; padding: clamp(72px, 12vw, 180px) 0; }
.quote blockquote { margin: 0 auto; max-width: 22ch; font-size: clamp(34px, 4.6vw, 72px); line-height: 1.06; font-weight: 300; font-style: italic; letter-spacing: -0.015em; }
.quote figcaption { margin-top: 28px; }
.quote .mark { display: block; font-size: 96px; line-height: .4; color: var(--accent); font-style: normal; margin-bottom: 24px; }

/* Portrait block (Ravi Sondhi) -------------------------------------------- */
.memorial { display: grid; grid-template-columns: 1fr 3fr; gap: var(--gutter); align-items: baseline; }
.memorial__body { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gutter); }
.memorial__body .big-p { grid-column: 1 / -1; max-width: 26ch; margin-bottom: clamp(28px, 3vw, 48px); }
.memorial__body .memorial__close { grid-column: 1 / -1; }
.memorial__body p { max-width: var(--measure); }
@media (max-width: 960px) { .memorial__body { grid-template-columns: 1fr; } }
.memorial__plate { aspect-ratio: 4 / 5; }
.memorial__sign { font-style: italic; font-size: clamp(26px, 2.4vw, 36px); margin-top: 28px; }
@media (max-width: 760px) { .memorial { grid-template-columns: 1fr; gap: 14px; } }

/* Lecture page ------------------------------------------------------------ */
.lecture-hero { padding: clamp(48px, 7vw, 110px) 0 clamp(36px, 5vw, 64px); }
.lecture-hero__top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 4vw, 56px); }
.lecture-hero__speaker { font-size: clamp(52px, 9vw, 150px); line-height: .9; letter-spacing: -0.035em; font-weight: 300; }
.lecture-hero__title { margin-top: 22px; font-size: clamp(24px, 2.8vw, 42px); font-style: italic; font-weight: 400; color: var(--ink-2); max-width: 28ch; line-height: 1.15; }

.facts { display: grid; grid-template-columns: var(--grid-4); gap: var(--gutter); padding: 22px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.facts dt { margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 19px; line-height: 1.3; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; row-gap: 20px; } }

.video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; cursor: pointer; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .5s, transform 1.2s var(--ease); }
.video:hover img { opacity: .65; transform: scale(1.015); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--paper);
  font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  background: none; border: 0; cursor: pointer; width: 100%;
}
.video__play span {
  display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--paper) 70%, transparent);
  transition: background .4s var(--ease), border-color .4s, transform .6s var(--ease);
}
.video:hover .video__play span { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }

.themes { counter-reset: theme; list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.themes li { counter-increment: theme; display: grid; grid-template-columns: var(--grid-3); gap: var(--gutter); align-items: baseline; padding: clamp(22px, 2.6vw, 36px) 0; border-bottom: 1px solid var(--rule); }
.themes li::before { content: counter(theme, decimal-leading-zero); font-family: var(--sans); font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.themes h3 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; }
.themes p { margin: 0; max-width: var(--measure); color: var(--ink-2); }
@media (max-width: 760px) { .themes li { grid-template-columns: 40px 1fr; row-gap: 10px; } .themes li p { grid-column: 2; } }

.pullquotes { display: grid; grid-template-columns: var(--grid-3); gap: var(--gutter); }
@media (max-width: 960px) { .pullquotes { grid-template-columns: 1fr; } }
.pullquotes blockquote { margin: 0; padding-top: 20px; border-top: 1px solid var(--ink); font-size: clamp(22px, 1.9vw, 28px); line-height: 1.25; font-style: italic; }

.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.pager a { padding: clamp(28px, 4vw, 56px) 0; display: grid; gap: 10px; transition: color .3s; }
.pager a:hover { color: var(--accent); }
.pager a + a, .pager span + a { text-align: right; border-left: 1px solid var(--rule); padding-left: var(--gutter); }
.pager__name { font-size: clamp(28px, 3.2vw, 48px); line-height: 1; font-weight: 300; }

/* Register ---------------------------------------------------------------- */
.form { display: grid; gap: 32px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px var(--gutter); }
@media (max-width: 760px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 22px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink-2);
  padding: 8px 0 10px; border-radius: 0; outline: none; width: 100%;
  transition: border-color .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }
.field--check { display: flex; gap: 12px; align-items: flex-start; font-size: 18px; color: var(--ink-2); }
.field--check input { width: 18px; height: 18px; margin-top: 5px; accent-color: var(--accent); }
.form__note { font-size: 17px; color: var(--muted); }
.form__status { font-family: var(--sans); font-size: 14px; min-height: 1.4em; }
.form__status.is-ok { color: #2f5d34; }
.form__status.is-err { color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: var(--paper); padding: clamp(64px, 9vw, 130px) 0 32px; margin-top: 0; }
.site-footer .label { color: color-mix(in srgb, var(--paper) 55%, transparent); }
.footer__big { font-size: clamp(56px, 12vw, 200px); line-height: .85; font-weight: 300; letter-spacing: -0.04em; }
.footer__big em { color: color-mix(in srgb, var(--paper) 45%, transparent); }
.footer__grid { display: grid; grid-template-columns: var(--grid-4); gap: var(--gutter); margin-top: clamp(48px, 7vw, 100px); padding-top: 28px; border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); }
.footer__grid a { display: block; font-size: 19px; margin-top: 6px; }
.footer__grid a:hover { color: color-mix(in srgb, var(--paper) 65%, transparent); }
.footer__legal { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__legal { flex-direction: column; } }

/* Utility ----------------------------------------------------------------- */
.mt-s { margin-top: 18px; } .mt-m { margin-top: 36px; } .mt-l { margin-top: 72px; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lead { font-size: clamp(20px, 1.5vw, 23px); line-height: 1.55; margin: 0; columns: 2 20rem; column-gap: var(--gutter); }
.lead.dropcap::first-letter { font-size: 3.6em; }
@media (max-width: 760px) { .plate--wide { aspect-ratio: 4 / 3; } }


/* Optical alignment of display type to the grid edge */
.hero__title, .lecture-hero__speaker, .section__title, .upcoming__year, .footer__big, .index__speaker, .pager__name { margin-left: -0.045em; }
.index a:hover .index__speaker { transform: translateX(10px); }

/* Tablet refinements */
.nav a, .btn { white-space: nowrap; }
@media (max-width: 1100px) {
  .brand__name { display: none; }
  .index__dur { display: none; }
}
@media (max-width: 960px) and (min-width: 761px) {
  .upcoming { grid-template-columns: var(--c1) 1fr; }
  .upcoming__cta { grid-column: 2; }
}
.nowrap { white-space: nowrap; }
@media (max-width: 760px) { .hero__eyebrow span:last-child, .lecture-hero__top span:last-child:not(:first-child) { display: none; } }
