/* ---------------------------------------------------------
   CSP (Colombo School of Philosophy) — base styles
   Design system: warm editorial — ivory/cream/charcoal with
   deep forest green, muted olive, and subtle bronze accents.
   Literata + Work Sans (Noto Serif/Sans Sinhala for si).
   --------------------------------------------------------- */

:root {
  --color-ink: #2a2823;
  --color-parchment: #f4efe1;
  --color-surface: #ece4d3;
  --color-accent: #33493b;
  --color-accent-dark: #22322a;
  --color-accent-contrast: #f4efe1;
  --color-accent-secondary: #6e6b45;
  --color-bronze: #9c7a4e;
  --color-muted: #6b665c;
  --color-border: #ddd3bc;

  --font-serif: "Literata", "Noto Serif Sinhala", Georgia, "Times New Roman", serif;
  --font-sans: "Work Sans", "Noto Sans Sinhala", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 72rem;
  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-parchment);
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
  max-width: 42rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  padding-left: 1.25rem;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Icons ---------- */
.icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-parchment);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  color: var(--color-ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  height: 3.4rem;
  width: auto;
  display: block;
  margin-bottom: 0.2rem;
}

.brand-caption {
  font-size: 0.7rem;
  color: var(--color-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover {
  text-decoration: none;
  color: var(--color-accent);
}

.main-nav a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-bronze);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--color-ink);
}

.locale-switcher {
  display: flex;
  gap: 0.35rem;
  font-size: 0.75rem;
}

.locale-switcher a {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-muted);
  font-weight: 600;
}

.locale-switcher a:hover {
  text-decoration: none;
  border-color: var(--color-accent);
}

.locale-switcher a.active {
  color: var(--color-accent-contrast);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-sans);
}

.button:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--color-accent);
}

.button.secondary:hover {
  background: var(--color-surface);
}

/* ---------- Editorial hero (photo-paired) ---------- */
.hero-editorial {
  padding: 3.5rem 0 3rem;
}

.hero-editorial .container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-editorial h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  max-width: 18ch;
}

.hero-editorial .lead {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 38ch;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-accent);
  font-size: 1.1rem;
  max-width: 34ch;
  margin: 1rem 0 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
}

/* Bilingual colophon: the school's name set once per script */
.colophon {
  list-style: none;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.colophon li {
  font-family: var(--font-serif);
  color: var(--color-muted);
  font-size: 1rem;
}

/* ---------- Editorial photography ---------- */
.hero-photo {
  border: 1px solid var(--color-border);
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(0.3) sepia(0.12) contrast(1.05);
}

/* ---------- Sections ---------- */
.section {
  padding: 3rem 0;
}

.section-heading {
  max-width: 42rem;
  margin: 0 0 2rem;
}

.section-heading p {
  color: var(--color-muted);
}

.mission-statement {
  max-width: 44rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.mission-statement h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.mission-statement p {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-ink);
  text-align: justify;
}

/* ---------- Essay section (asymmetric heading + flowing body) ---------- */
.essay-grid {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 3rem;
  align-items: start;
}

.essay-heading h1,
.essay-heading h2 {
  position: sticky;
  top: 2rem;
  max-width: 13rem;
}

.essay-body {
  max-width: 42rem;
}

.essay-body p {
  text-align: justify;
}

.essay-pull-quote {
  margin-top: 2rem;
  max-width: none;
}

.essay-divider {
  width: 2rem;
  height: 0;
  margin: 2.5rem 0;
  border: none;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 48rem) {
  .essay-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .essay-heading h1,
  .essay-heading h2 {
    position: static;
    max-width: none;
  }
}

/* ---------- Principle list (calm, hairline-divided) ---------- */
.principle-list {
  display: flex;
  flex-direction: column;
}

.principle-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.principle-item:first-child {
  border-top: 1px solid var(--color-border);
}

.principle-item h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

.principle-item p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Video embed ---------- */
.video-embed {
  position: relative;
  width: 100%;
  max-width: 48rem;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border: 1px solid var(--color-border);
  background: var(--color-ink);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 3rem;
}

.video-card h3 {
  max-width: 48rem;
  margin: 0 auto 1rem;
  text-align: center;
}

/* ---------- Highlights ---------- */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 2rem;
}

.highlight-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.highlight-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0.3rem 1rem rgba(51, 73, 59, 0.1);
}

/* ---------- Highlights carousel (home page) ---------- */
.carousel {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
}

.carousel-track {
  --visible: 3;
  display: flex;
  gap: 2rem;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: pan-y;
  cursor: grab;
}

.carousel-track:active {
  cursor: grabbing;
}

.carousel-track .highlight-card {
  flex: 0 0 calc((100% - (var(--visible) - 1) * 2rem) / var(--visible));
  user-select: none;
}

@media (max-width: 64rem) {
  .carousel-track {
    --visible: 2;
  }
}

@media (max-width: 40rem) {
  .carousel-track {
    --visible: 1;
  }
}

.carousel-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-parchment);
  color: var(--color-ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.carousel-arrow:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 40rem) {
  .carousel-arrow {
    display: none;
  }
}

.highlight-card--latest {
  border-color: var(--color-accent);
  box-shadow: 0 0.35rem 1.25rem rgba(51, 73, 59, 0.15);
}

.highlight-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 1;
  padding: 0.25rem 0.7rem;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.highlight-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.highlight-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.3) sepia(0.12) contrast(1.05);
}

.highlight-image--video iframe,
.detail-photo--video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.detail-photo--video {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.highlight-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.highlight-card--latest .highlight-body h3 {
  font-size: 1.2rem;
}

.highlight-date {
  color: var(--color-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.highlight-body h3 {
  margin: 0;
}

.highlight-body p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.highlight-body .read-more {
  margin-top: 0.4rem;
}

.highlights-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ---------- Quote band ---------- */
.quote-band {
  padding: 1rem 0 0.5rem;
}

.pull-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  line-height: 1.4;
  color: var(--color-ink);
  margin: 0 0 1rem;
  border-left: 2px solid var(--color-bronze);
  padding: 0 0 0 1.25rem;
  max-width: 32ch;
}

.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---------- Interior page banner (photo-backed) ---------- */
.manuscript-band {
  position: relative;
  background: var(--color-ink);
  color: var(--color-parchment);
  padding: 4rem 0;
  overflow: hidden;
}

.banner-photo {
  position: absolute;
  inset: 0;
}

.banner-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.45) sepia(0.1) contrast(1.1) brightness(0.5);
}

.manuscript-band .container {
  position: relative;
  z-index: 1;
}

.manuscript-band h1 {
  color: var(--color-parchment);
  max-width: 16ch;
  margin-bottom: 1rem;
}

.manuscript-band .lead {
  color: rgba(244, 239, 225, 0.8);
  max-width: 40ch;
}

/* ---------- Filter pills (chips) ---------- */
.filter-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 1.75rem 0;
}

.filter-pill {
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
}

.filter-pill:hover {
  border-color: var(--color-accent);
}

.filter-pill.active {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border-color: var(--color-accent);
}

/* ---------- Entry list (calm, hairline-divided rows) ---------- */
.entry-list {
  display: flex;
  flex-direction: column;
}

.entry-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.entry-row.person {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.entry-list .entry-row:first-child {
  border-top: 1px solid var(--color-border);
}

.entry-row--linked {
  position: relative;
  cursor: pointer;
}

.entry-row--linked:hover {
  background: var(--color-surface);
}

.read-more {
  font-size: 0.9rem;
}

.read-more::after {
  content: "";
  position: absolute;
  inset: 0;
}

.entry-row h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

.entry-row p {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0;
}

.entry-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: right;
  white-space: nowrap;
}

.entry-meta .meta-row {
  display: flex;
  gap: 0.9rem;
  justify-content: flex-end;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.meta-icon {
  width: 0.9rem;
  height: 0.9rem;
  stroke: var(--color-muted);
}

@media (max-width: 40rem) {
  .entry-row {
    grid-template-columns: 1fr;
  }

  .entry-row.person {
    grid-template-columns: auto 1fr;
  }

  .entry-meta {
    text-align: left;
  }

  .entry-meta .meta-row {
    justify-content: flex-start;
  }
}

/* ---------- Course entry thumbnail ---------- */
.entry-summary-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.entry-thumb {
  width: 6rem;
  height: 7.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  object-fit: cover;
  filter: grayscale(0.3) sepia(0.12) contrast(1.05);
  flex-shrink: 0;
}

/* ---------- Book grid ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.book-cover {
  background: var(--color-surface);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.book-card h3 {
  font-size: 1rem;
  margin: 0 0 0.15rem;
}

.book-subtitle {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin: 0 0 0.35rem;
}

.book-card .meta {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin: 0 0 0.35rem;
}

.book-price {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-accent);
  margin: 0;
}

/* ---------- Cart ---------- */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.qty-btn {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-parchment);
  color: var(--color-ink);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.qty-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.qty-value {
  min-width: 1.25rem;
  text-align: center;
  font-weight: 600;
}

.cart-panel {
  max-width: 60rem;
  padding: 1.75rem;
  margin-bottom: 2rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.cart-panel h2 {
  margin-top: 0;
}

.cart-empty {
  color: var(--color-muted);
  margin: 0;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
}

.cart-item:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}

.cart-item-title {
  font-weight: 600;
}

.cart-item-qty,
.cart-item-subtotal {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}

.cart-item-remove:hover {
  text-decoration: underline;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--color-border);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
}

.cart-address {
  margin-top: 1.5rem;
}

.cart-address label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.cart-address textarea {
  width: 100%;
  max-width: 30rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-parchment);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  resize: vertical;
}

.cart-checkout-btn {
  display: inline-block;
  margin-top: 1.5rem;
  border: none;
  cursor: pointer;
}

@media (max-width: 30rem) {
  .cart-item {
    grid-template-columns: 1fr auto;
    grid-template-areas: "title remove" "qty subtotal";
    row-gap: 0.25rem;
  }

  .cart-item-title { grid-area: title; }
  .cart-item-remove { grid-area: remove; }
  .cart-item-qty { grid-area: qty; }
  .cart-item-subtotal { grid-area: subtotal; text-align: right; }
}

/* ---------- Purchase panel ---------- */
.purchase-panel {
  max-width: 60rem;
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.purchase-panel h2 {
  margin-top: 0;
}

.purchase-steps {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.purchase-steps li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.purchase-steps h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.purchase-steps p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

@media (max-width: 48rem) {
  .purchase-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ---------- Journey timeline ---------- */
.timeline-intro {
  max-width: 36rem;
}

.genesis-story {
  max-width: 42rem;
  margin: 2rem 0 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.genesis-story h3 {
  margin-bottom: 1rem;
}

.genesis-story p {
  color: var(--color-muted);
}

.timeline {
  position: relative;
  margin-top: 1rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--color-border);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item .timeline-media {
  grid-row: 1;
  grid-column: 1;
  display: flex;
}

.timeline-item .timeline-content {
  grid-row: 1;
  grid-column: 2;
}

.timeline-item.timeline-item--reverse .timeline-media {
  grid-column: 2;
  justify-content: flex-end;
}

.timeline-item.timeline-item--reverse .timeline-content {
  grid-column: 1;
  text-align: right;
}

.timeline-item--text-only {
  grid-template-columns: 1fr;
}

.timeline-item--text-only .timeline-content {
  grid-column: 1;
  max-width: 26rem;
  margin: 0 auto;
  text-align: center;
}

.timeline-item--closing {
  grid-template-columns: 1fr;
  padding-top: 3.5rem;
}

.timeline-item--closing .timeline-content {
  grid-column: 1;
  max-width: 30rem;
  margin: 0 auto;
  text-align: center;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 2.5rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--color-bronze);
  transform: translate(-50%, -50%);
}

.timeline-year {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  margin: 0 0 0.5rem;
}

.timeline-content p {
  color: var(--color-muted);
  margin: 0 0 0.5rem;
}

.timeline-location {
  font-size: 0.85rem;
  font-style: italic;
}

.timeline-more summary {
  cursor: pointer;
  list-style: none;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.timeline-more summary::-webkit-details-marker {
  display: none;
}

.timeline-more summary::after {
  content: " \25be";
}

.timeline-more[open] summary::after {
  content: " \25b4";
}

.timeline-more p {
  margin-top: 1em;
}

.timeline-item--closing h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
}

.timeline-continues {
  color: var(--color-accent);
  font-weight: 600;
}

.timeline-image-btn {
  position: relative;
  display: block;
  width: 100%;
  max-width: 24rem;
  padding: 0;
  border: 1px solid var(--color-border);
  background: none;
  cursor: pointer;
  overflow: hidden;
}

.timeline-image-btn img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(0.3) sepia(0.12) contrast(1.05);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-image-btn:hover img,
.timeline-image-btn:focus-visible img {
  transform: scale(1.04);
}

.timeline-hover-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.15rem;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(42, 40, 35, 0.8), transparent 65%);
  color: var(--color-parchment);
  opacity: 0;
  text-align: left;
  transition: opacity 0.6s ease;
}

.timeline-image-btn:hover .timeline-hover-caption,
.timeline-image-btn:focus-visible .timeline-hover-caption {
  opacity: 1;
}

.timeline-hover-year {
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.timeline-hover-title {
  font-size: 0.85rem;
}

@media (max-width: 48rem) {
  .timeline::before {
    left: 0.6rem;
  }

  .timeline-item,
  .timeline-item.timeline-item--reverse,
  .timeline-item--text-only,
  .timeline-item--closing {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-left: 2rem;
  }

  .timeline-item .timeline-media,
  .timeline-item.timeline-item--reverse .timeline-media {
    grid-column: 1;
    justify-content: flex-start;
  }

  .timeline-item .timeline-content,
  .timeline-item.timeline-item--reverse .timeline-content,
  .timeline-item--text-only .timeline-content,
  .timeline-item--closing .timeline-content {
    grid-column: 1;
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .timeline-marker {
    left: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-item {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .timeline-image-btn img {
    transition: none;
  }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 40, 35, 0.92);
}

.lightbox-figure {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 40rem);
  max-height: 90vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid rgba(244, 239, 225, 0.2);
}

.lightbox-figure figcaption {
  margin-top: 1rem;
  text-align: center;
  color: var(--color-parchment);
}

.lightbox-year {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.3rem;
}

.lightbox-title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.lightbox-description {
  color: rgba(244, 239, 225, 0.75);
  max-width: 34rem;
  margin: 0 auto;
  font-size: 0.9rem;
  white-space: pre-line;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  background: none;
  border: none;
  color: var(--color-parchment);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: 1px solid rgba(244, 239, 225, 0.3);
  color: var(--color-parchment);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

@media (max-width: 40rem) {
  .lightbox-nav {
    width: 2.25rem;
    height: 2.25rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}

/* ---------- Team avatar ---------- */
.avatar-placeholder {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-photo {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  object-fit: cover;
  filter: grayscale(0.3) sepia(0.12) contrast(1.05);
  flex-shrink: 0;
}

.badge-fallback {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
}

/* ---------- Content detail pages ---------- */
.content-detail {
  max-width: 42rem;
}

.detail-photo {
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  max-width: 34rem;
}

.detail-photo img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(0.3) sepia(0.12) contrast(1.05);
}

.content-detail .meta {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.content-detail p {
  margin-bottom: 1.25em;
}

#course-detail p {
  text-align: justify;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-parchment);
  padding: 3rem 0 2.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(244, 239, 225, 0.2);
}

.footer-logo {
  height: 1.9rem;
  width: auto;
  display: block;
  margin-bottom: 0.75rem;
}

.footer-colophon {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-colophon li {
  font-family: var(--font-serif);
  color: rgba(244, 239, 225, 0.7);
  font-size: 0.95rem;
}

.footer-legal {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: rgba(244, 239, 225, 0.45);
  text-align: center;
  max-width: none;
  margin: 1rem 0 0;
}

/* ---------- Floating WhatsApp button ---------- */
.floating-whatsapp {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  display: flex;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(42, 40, 35, 0.35);
  transition: transform 0.2s ease;
}

.floating-whatsapp:hover {
  transform: scale(1.08);
}

.floating-whatsapp svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 40rem) {
  .floating-whatsapp {
    right: 1rem;
    bottom: 1rem;
    width: 2.9rem;
    height: 2.9rem;
  }
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-social a:hover {
  transform: scale(1.1);
  opacity: 0.85;
}

.footer-social svg {
  width: 1.4rem;
  height: 1.4rem;
}

.contact-social a {
  color: var(--color-accent);
}

.contact-social a:hover {
  color: var(--color-accent-dark);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--color-parchment);
  opacity: 0.85;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(244, 239, 225, 0.6);
}

/* ---------- Responsive nav ---------- */
@media (max-width: 42rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding-bottom: 1rem;
  }

  .main-nav.open {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .hero-editorial .container {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    order: -1;
  }
}
