/* ════════════════════════════════════════════════════════════════
   himalaya-tirtha.org · shared design system
   v2 · Sepia & Navy · Fraunces + Inter (+ Noto fallback)
   ════════════════════════════════════════════════════════════════ */

/* ─── Tokens ──────────────────────────────────────────────────── */
:root {
  /* surfaces */
  --sepia-100: #F6F2EA;
  --sepia-200: #EFEAE0;
  --sepia-300: #E8E1D4;
  --sepia-400: #BEB6A4;

  /* ink */
  --ink-500: #888888;
  --ink-700: #4A4A4A;
  --ink-900: #1A1A1A;

  /* navy & blue */
  --navy-900: #0F1F3C;
  --navy-800: #1A2D5C;
  --navy-700: #243A6E;
  --blue-500: #4A89DC;
  --blue-400: #7BABE6;

  /* reserved */
  --gold-500: #A88B4C;
  --terra-500: #A0522D;

  /* semantic */
  --success: #3D6B47;
  --warning: #B8862F;
  --error:   #9E3030;

  /* type families with Noto fallback for IAST + Polish */
  --font-serif: "Fraunces", "Noto Serif", "EB Garamond", Georgia, serif;
  --font-sans:  "Inter", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* widths */
  --w-prose: 680px;
  --w-wide:  920px;
  --w-page:  1240px;
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
/* overscroll-behavior-y: blokuje rubber-band (bounce) na końcach dokumentu.
   Bez tego wyciągnięcie strony poza hero / footer odsłania tło canvas
   (jasna sepia z body) — brzydki jasny pas nad ciemnym hero i pod granatową stopką. */
html { scroll-behavior: smooth; overscroll-behavior-y: none; }
body {
  margin: 0;
  background: var(--sepia-100);
  color: var(--ink-900);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variation-settings: "opsz" 14;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--navy-800); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-900); }
::selection { background: var(--navy-800); color: var(--sepia-100); }
/* Highlight dopasowań wyszukiwania — ciepły, miodowy, subtelny (saffron @ low alpha). */
mark { background: rgba(168,139,76,.22); color: inherit; padding: 0 .12em; border-radius: 2px; }

/* ─── Layout primitives ─────────────────────────────────────── */
.container {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

.prose { max-width: var(--w-prose); margin-left: auto; margin-right: auto; }
.wide  { max-width: var(--w-wide);  margin-left: auto; margin-right: auto; }

/* small caps utility */
.smallcaps {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.rule { border: 0; height: 1px; background: var(--sepia-400); margin: 0; }
.rule-thin { border: 0; height: 1px; background: var(--sepia-300); margin: 0; }

/* ─── Type display tuning ───────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 96;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.005em;
}
h1 { font-size: 56px; font-weight: 500; line-height: 1.08; }
h2 { font-size: 40px; font-weight: 500; line-height: 1.12; }
h3 { font-size: 28px; font-weight: 500; line-height: 1.2; }
h4 { font-size: 22px; font-weight: 600; line-height: 1.25; }
h5 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.t-display { font-size: 80px; font-weight: 500; line-height: 1.02; letter-spacing: -0.015em; font-variation-settings: "opsz" 144; }

@media (max-width: 820px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
  h3 { font-size: 24px; }
  .t-display { font-size: 50px; }
}

p { margin: 0 0 1em; text-wrap: pretty; }

.lead {
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink-700);
  font-variation-settings: "opsz" 24;
}

.meta {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-500);
  letter-spacing: 0.02em;
}

/* drop cap for opening paragraph */
.dropcap::first-letter {
  font-family: var(--font-serif);
  font-variation-settings: "opsz" 144;
  font-size: 84px;
  font-weight: 500;
  float: left;
  line-height: 0.85;
  margin: 8px 12px -2px 0;
  color: var(--navy-800);
}

/* eyebrow above titles */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.eyebrow .num {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-500);
}
.eyebrow .line {
  flex: 0 0 56px;
  height: 1px;
  background: var(--blue-500);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 16px 28px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 200ms ease;
  line-height: 1;
  text-decoration: none;
}
.btn--primary {
  background: var(--navy-800);
  color: var(--sepia-100);
}
.btn--primary:hover { background: var(--navy-700); color: var(--sepia-100); }
.btn--primary:active { background: var(--navy-900); }

.btn--secondary {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--navy-800);
}
.btn--secondary:hover { background: var(--navy-800); color: var(--sepia-100); }

.btn--ghost {
  background: transparent;
  color: var(--navy-800);
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--navy-800);
  border-radius: 0;
  letter-spacing: 0.06em;
}
.btn--ghost:hover { color: var(--blue-500); border-color: var(--blue-500); }

.btn--lg { padding: 20px 36px; font-size: 15px; }
.btn--sm { padding: 12px 20px; font-size: 13px; }

.btn .arrow {
  display: inline-block;
  transition: transform 220ms ease;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1;
}
.btn:hover .arrow { transform: translateX(4px); }

/* ─── Site header ────────────────────────────────────────────── */
.site-header {
  /* Translucent sepia + backdrop blur — frosted-glass effect.
     position: fixed so the header can grow downward (fat menu)
     without pushing page content. Body padding-top compensates. */
  background: rgba(246,242,234,.95);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  border-bottom: 1px solid var(--sepia-300);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: box-shadow 200ms ease, background 260ms ease, border-color 260ms ease;
}
/* Smart hide-on-scroll — header position is driven directly by JS in
   menu.js (inline transform on .site-header). NO CSS transition on
   transform: position is glued to the scroll gesture, moving 1:1 with
   scroll delta. See updateHeader() in menu.js. */
body { padding-top: 100px; }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 22px 32px;
}
.site-header.is-scrolled { box-shadow: 0 6px 22px -18px rgba(26,45,92,.12); }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink-900);
  flex-shrink: 0;
}
/* ─── Brand mark (HTS lotus SVG) ───────────────────────────── */
.brand__mark {
  width: 52px; height: 52px;
  background: transparent;
  border-radius: 0;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px);
}
.brand__mark::before,
.brand__mark::after { content: none; }
.brand__mark img,
.brand__mark svg {
  width: 100%;
  height: 100%;
  display: block;
  /* default = positive (for light surfaces like sepia) */
  content: url("../img/hts-logo-positive.svg");
}
/* Negative variant — used on dark surfaces (hero overlay, footer) */
.site-header:not(.is-past-hero) .brand__mark img,
.site-footer__brand .brand__mark img {
  content: url("../img/hts-logo-negative.svg");
}
/* On non-home pages (no .is-past-hero state, header is always solid light)
   we want positive. The selector above would catch them too — exclude. */
.site-header.is-solid .brand__mark img {
  content: url("../img/hts-logo-positive.svg");
}
.brand__name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  display: block;
  color: var(--navy-900);
  font-variation-settings: "opsz" 36;
}
.brand__sub {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: 3px;
  margin-left: 2px; /* optical kerning compensation — H has a heavier left edge than L */
  white-space: nowrap;
  display: block;
}
@media (max-width: 540px) {
  .brand__sub { display: block; font-size: 9px; letter-spacing: 0.12em; }
  .brand__name { font-size: 19px; }
  .brand { margin-left: -13px; }
}

/* legacy .nav kept for templates not yet revisited — hidden by default in new sites */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: nowrap;
}
@media (max-width: 980px) { .nav { gap: 20px; } }
@media (max-width: 820px) { .nav { display: none; } }
.nav a {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-900);
  text-decoration: none;
  font-weight: 400;
  position: relative;
  padding: 4px 0;
  transition: color 160ms ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--navy-800); }
.nav a.is-active { color: var(--navy-800); font-weight: 500; }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--navy-800);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 44px; height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink-900);
  display: flex; align-items: center; justify-content: center;
  transition: color 160ms ease, background 160ms ease;
  padding: 0;
  border-radius: 2px;
}
.icon-btn:hover { color: var(--navy-800); background: var(--sepia-200); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }

.support-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--sepia-100);
  background: var(--navy-800);
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 2px;
  transition: background 160ms ease;
}
.support-link:hover { background: var(--navy-700); color: var(--sepia-100); }

/* ════════════════════════════════════════════════════════════════
   FAT MENU — in-place header expansion (v3)
   The .site-header element itself grows downward; the expansion
   inherits the header's background + adaptive ink via CSS variables.
   Default below: LIGHT mode. Pages with a dark hero (home) override
   --fm-* and the chrome styles inline to flip to dark when over hero.
   ════════════════════════════════════════════════════════════════ */

.site-header {
  /* Adaptive ink — fat menu reads these. Default = light mode. */
  --fm-ink:        var(--ink-900);
  --fm-ink-muted:  var(--ink-700);
  --fm-ink-dim:    var(--ink-500);
  --fm-rule:       var(--sepia-300);
  --fm-rule-soft:  var(--sepia-200);
  --fm-hover:      rgba(26,45,92,.06);
  --fm-eyebrow:    var(--blue-500);
}
.site-header.is-fat-open { border-bottom-color: var(--fm-rule); }

/* ── Hamburger / X morph ───────────────────────────────────── */
.ham {
  width: 20px; height: 14px;
  position: relative; display: inline-block;
}
.ham__line {
  position: absolute; left: 0; right: 0;
  height: 1.7px;
  background: currentColor;
  border-radius: 1px;
  transition:
    top 220ms cubic-bezier(.4,0,.2,1),
    transform 240ms cubic-bezier(.4,0,.2,1);
}
.ham__line:nth-child(1) { top: 3px; }
.ham__line:nth-child(2) { top: 11px; }
[data-fat-toggle][aria-expanded="true"] .ham__line:nth-child(1) {
  top: 6px; transform: rotate(45deg);
}
[data-fat-toggle][aria-expanded="true"] .ham__line:nth-child(2) {
  top: 6px; transform: rotate(-45deg);
}

/* Hide the search-icon button while menu is open */
.site-header.is-fat-open .icon-btn[data-fat-search="true"] {
  opacity: 0;
  pointer-events: none;
  transform: scale(.85);
  transition: opacity 160ms ease, transform 200ms ease;
}

/* ── Expansion container ────────────────────────────────────── */
.fat-expansion {
  /* In-flow inside the header so the SINGLE backdrop-filter on
     .site-header covers bar + expansion as one continuous frosted
     panel. (Two stacked backdrop-filter elements would clip each
     other's backdrop, killing the blur on the inner one.)
     The header is position:fixed so growing this doesn't push
     page content. */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 380ms cubic-bezier(.2,.7,.2,1),
    opacity 220ms ease;
}
.site-header.is-fat-open .fat-expansion {
  max-height: 80vh;
  opacity: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fat-expansion__rule {
  height: 1px;
  background: var(--fm-rule);
  margin: 0 32px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 420ms cubic-bezier(.2,.7,.2,1) 60ms;
}
.site-header.is-fat-open .fat-expansion__rule { transform: scaleX(1); }
@media (max-width: 720px) { .fat-expansion__rule { margin: 0 20px; } }

.fat-expansion__inner {
  max-width: var(--w-page);
  margin: 0 auto;
  padding: 28px 32px 40px;
  transform: translateY(-6px);
  opacity: 0;
  transition:
    transform 320ms cubic-bezier(.2,.7,.2,1) 80ms,
    opacity 260ms ease 80ms;
}
.site-header.is-fat-open .fat-expansion__inner {
  transform: translateY(0);
  opacity: 1;
}
@media (max-width: 720px) {
  .fat-expansion__inner { padding: 20px 20px 32px; }
}

/* ── Search bar (full width) ───────────────────────────────── */
.fat-search { position: relative; margin: 0 0 32px; }
.fat-search__input {
  width: 100%;
  height: 56px;
  background: transparent;
  border: 1px solid var(--fm-rule);
  border-radius: 2px;
  padding: 0 56px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--fm-ink);
  letter-spacing: 0.005em;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
  font-variation-settings: "opsz" 24;
}
.fat-search__input::placeholder { color: var(--fm-ink-dim); font-style: italic; }
.fat-search__input:focus { border-color: var(--blue-500); }
/* Hide native search controls (the “dziwny X”) — we provide our own. */
.fat-search__input::-webkit-search-cancel-button,
.fat-search__input::-webkit-search-decoration,
.fat-search__input::-webkit-search-results-button,
.fat-search__input::-webkit-search-results-decoration { -webkit-appearance: none; appearance: none; display: none; }

/* Custom Clear button — shows only when input has value */
.fat-search__clear {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid var(--fm-rule);
  color: var(--fm-ink-muted);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
  pointer-events: auto;
}
.fat-search__clear:hover {
  color: var(--fm-ink);
  border-color: var(--fm-ink);
  background: var(--fm-hover);
}
.fat-search__clear[hidden] { display: none; }

.fat-search__icon,
.fat-search__submit {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fm-ink-muted);
  pointer-events: none;
}
.fat-search__icon { left: 18px; width: 22px; height: 22px; }
.fat-search__icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.7; }
.fat-search__submit {
  right: 6px;
  width: 44px; height: 44px;
  background: transparent;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  pointer-events: auto;
  color: var(--fm-ink-muted);
  transition: color 160ms ease, background 160ms ease;
}
.fat-search__submit:hover { color: var(--fm-ink); background: var(--fm-hover); }
.fat-search__submit svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }

/* ── Three columns ─────────────────────────────────────────── */
.fat-cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.9fr;
  gap: 56px;
}
@media (max-width: 980px) {
  .fat-cols { grid-template-columns: 1fr 1fr; gap: 40px; }
  .fat-cols .fat-col:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .fat-cols { grid-template-columns: 1fr; gap: 36px; }
  .fat-cols .fat-col:nth-child(3) { grid-column: auto; }
}

.fat-col__head {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fm-eyebrow);
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--fm-rule);
  display: flex;
  align-items: center;
  gap: 10px;
}
.fat-col__head::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--fm-eyebrow);
  border-radius: 50%;
  flex-shrink: 0;
}

/* COL 1 — Teachings (cards with thumbnails) */
.fat-teach { display: flex; flex-direction: column; gap: 4px; }
.fat-teach__row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  margin: 0 -14px;
  text-decoration: none;
  color: var(--fm-ink);
  border-radius: 2px;
  transition: background 200ms ease, transform 200ms ease;
}
.fat-teach__row:hover { background: var(--fm-hover); transform: translateX(2px); }
.fat-teach__thumb {
  width: 72px; height: 72px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--sepia-200);
  position: relative;
}
.fat-teach__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fat-teach__title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 4px;
  line-height: 1.2;
  color: var(--fm-ink);
  letter-spacing: -0.003em;
  font-variation-settings: "opsz" 24;
}
.fat-teach__desc {
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--fm-ink-muted);
  margin: 0;
  text-wrap: pretty;
}
.fat-teach__arrow {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--fm-ink-dim);
  transition: transform 220ms ease, color 200ms ease;
  align-self: center;
}
.fat-teach__row:hover .fat-teach__arrow { transform: translateX(4px); color: var(--fm-ink); }

/* COL 2 — Divisions (icon + name + sanskrit) */
.fat-divs { display: flex; flex-direction: column; gap: 2px; }
.fat-divs__row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  margin: 0 -14px;
  text-decoration: none;
  color: var(--fm-ink);
  border-radius: 2px;
  transition: background 200ms ease;
}
.fat-divs__row:hover { background: var(--fm-hover); }
.fat-divs__icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fat-divs__icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fat-divs__name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1px;
  color: var(--fm-ink);
  letter-spacing: -0.002em;
}
.fat-divs__sanskrit {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12.5px;
  color: var(--fm-ink-dim);
  margin: 0;
  letter-spacing: 0.01em;
}
.fat-divs__arrow {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--fm-ink-dim);
  transition: transform 220ms ease, color 200ms ease;
  align-self: center;
}
.fat-divs__row:hover .fat-divs__arrow { color: var(--fm-ink); transform: translateX(3px); }

/* COL 3 — More */
.fat-more { display: flex; flex-direction: column; }
.fat-more__block {
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--fm-rule-soft);
}
.fat-more__block:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}
.fat-more__block + .fat-more__block { padding-top: 22px; }

.fat-more__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin: 0 -14px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--fm-ink);
  text-decoration: none;
  border-radius: 2px;
  transition: background 200ms ease, transform 200ms ease;
  letter-spacing: -0.002em;
}
.fat-more__link:hover { background: var(--fm-hover); transform: translateX(2px); }
.fat-more__link .arrow {
  font-family: var(--font-serif);
  color: var(--fm-ink-dim);
  transition: transform 220ms ease, color 200ms ease;
  font-size: 17px;
}
.fat-more__link:hover .arrow { color: var(--fm-ink); transform: translateX(3px); }

.fat-more__begin { padding: 4px 0 0; }
.fat-more__begin h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fm-ink-muted);
  margin: 0 0 12px;
  font-variation-settings: normal;
}
.fat-more__begin p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fm-ink-muted);
  margin: 0 0 14px;
  text-wrap: pretty;
}
.fat-more__cta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.fat-more__cta {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fm-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--fm-ink);
  transition: color 160ms ease, border-color 160ms ease;
}
.fat-more__cta:hover { color: var(--blue-500); border-color: var(--blue-500); }
.fat-more__cta .arrow { font-family: var(--font-serif); font-size: 14px; letter-spacing: 0; }

.fat-more__daksina {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fm-ink);
  font-family: var(--font-serif);
  font-size: 15px;
  padding: 8px 14px;
  margin: 0 -14px;
  border-radius: 2px;
  transition: background 200ms ease;
}
.fat-more__daksina:hover { background: var(--fm-hover); }
.fat-more__daksina .om {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--gold-500);
  line-height: 1;
}


/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-900);
  color: var(--sepia-100);
  padding: 80px 0 32px;
  margin-top: 64px;
}
/* Marka zabiera wolną przestrzeń (1fr), a trzy kolumny linków mają szerokość
   swojej treści — dzięki temu trzymają się razem po prawej, zamiast rozjeżdżać
   się po całej stopce. */
.site-footer__top {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  column-gap: 56px;
  row-gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(242,235,217,.15);
}
@media (max-width: 1100px) {
  .site-footer__top { column-gap: 40px; }
}
@media (max-width: 900px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 540px) {
  .site-footer__top { grid-template-columns: 1fr; }
  .site-footer { padding: 56px 0 24px; }
}
.site-footer h5 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242,235,217,.6);
  margin: 0 0 18px;
  font-weight: 500;
}
.site-footer p, .site-footer li {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.55;
  color: rgba(242,235,217,.85);
  font-variation-settings: "opsz" 16;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a {
  color: rgba(242,235,217,.85);
  text-decoration: none;
  transition: color 160ms ease;
}
.site-footer a:hover { color: var(--blue-400); }
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
/* Footer brand: SVG renders directly, no plate background needed.
   Brand name color is inverted for dark surface. */
.site-footer__brand .brand__name { color: var(--sepia-100); }
.site-footer__about { font-style: italic; color: rgba(242,235,217,.75); max-width: 320px; }
.site-footer__bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer__bottom span {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(242,235,217,.5);
}
.site-footer__om {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--gold-500);
}

/* ─── Breadcrumbs ──────────────────────────────────────────── */
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-500);
  margin: 32px 0 24px;
}
.crumbs a { color: var(--ink-700); text-decoration: none; }
.crumbs a:hover { color: var(--navy-800); }
.crumbs .sep { color: var(--ink-500); }
.crumbs .now { color: var(--ink-900); }

/* ─── Badges / pills ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--sepia-200);
  border: 1px solid var(--sepia-300);
  border-radius: 1px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-700);
  font-weight: 500;
}
.badge .pip {
  width: 5px; height: 5px;
  background: var(--blue-500);
  border-radius: 50%;
}
.badge--navy {
  background: var(--navy-800);
  color: var(--sepia-100);
  border-color: var(--navy-800);
}
.badge--navy .pip { background: var(--blue-400); }

/* ─── Image placeholders (Pearl / Studio / Glyph) ─────────── */
.placeholder {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.placeholder::after {
  content: attr(data-label);
  position: absolute;
  top: 12px; left: 12px;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--sepia-100);
  background: rgba(15,31,60,.55);
  padding: 5px 8px;
  border-radius: 1px;
  z-index: 5;
}

.ph-pearl {
  background:
    radial-gradient(80% 60% at 30% 30%, #F8EFD7 0%, #EFE2C2 40%, #D8C99F 75%, #B8A77E 100%),
    var(--sepia-200);
}
.ph-pearl::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(36% 28% at 72% 64%, rgba(74,137,220,.32) 0%, transparent 70%),
    radial-gradient(24% 18% at 22% 80%, rgba(168,139,76,.4) 0%, transparent 70%),
    radial-gradient(50% 40% at 50% 0%, rgba(255,250,235,.5) 0%, transparent 70%);
}

.ph-studio {
  background: radial-gradient(70% 60% at 50% 45%, #243A6E 0%, #1A2D5C 45%, #0F1F3C 85%);
}
.ph-studio::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(8% 8% at 50% 45%, rgba(232,200,128,.95) 0%, rgba(168,139,76,.4) 30%, transparent 70%),
    radial-gradient(60% 50% at 50% 45%, rgba(123,171,230,.18) 0%, transparent 70%);
}
.ph-studio::after { background: rgba(242,235,217,.18); color: var(--sepia-100); }

.ph-glyph {
  background: linear-gradient(180deg, #EBE3CC 0%, #D5C7A6 100%);
}
.ph-glyph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 0, transparent 35%, rgba(26,45,92,.6) 35%, rgba(26,45,92,.6) 35.6%, transparent 35.6%),
    radial-gradient(circle at 50% 50%, transparent 0, transparent 26%, rgba(26,45,92,.4) 26%, rgba(26,45,92,.4) 26.6%, transparent 26.6%),
    radial-gradient(circle at 50% 50%, transparent 0, transparent 17%, rgba(26,45,92,.85) 17%, rgba(26,45,92,.85) 17.6%, transparent 17.6%),
    radial-gradient(8% 8% at 50% 50%, rgba(168,139,76,.9) 0%, rgba(168,139,76,.4) 50%, transparent 100%);
}

.frame { position: relative; overflow: hidden; }
.frame--21x9 { aspect-ratio: 21/9; }
.frame--16x9 { aspect-ratio: 16/9; }
.frame--4x3  { aspect-ratio: 4/3; }
.frame--3x4  { aspect-ratio: 3/4; }
.frame--1x1  { aspect-ratio: 1/1; }

/* ─── PMH card (Pearl) ─────────────────────────────────────── */
.pmh-card {
  background: var(--sepia-100);
  border: 1px solid var(--sepia-300);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 200ms ease, box-shadow 220ms ease, border-color 200ms ease;
  border-radius: 2px;
  overflow: hidden;
}
.pmh-card:hover {
  transform: translateY(-3px);
  border-color: var(--navy-800);
  box-shadow: 0 16px 36px -22px rgba(26,45,92,.35);
}
.pmh-card__image { aspect-ratio: 4/3; }
.pmh-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.pmh-card__inner {
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pmh-card__badge {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pmh-card__badge .pip {
  width: 5px; height: 5px;
  background: var(--blue-500);
  border-radius: 50%;
}
.pmh-card__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
  color: var(--ink-900);
  text-wrap: pretty;
}
.pmh-card:hover .pmh-card__title { color: var(--navy-800); }
.pmh-card__teaser {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-700);
  margin: 0 0 20px;
  text-wrap: pretty;
}
.pmh-card__meta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--sepia-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-500);
}
.pmh-card__meta .read-link {
  color: var(--navy-800);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pmh-card__meta .read-link .arrow {
  transition: transform 220ms ease;
  font-family: var(--font-serif);
  font-size: 16px;
}
.pmh-card:hover .pmh-card__meta .read-link .arrow { transform: translateX(4px); }

/* ─── Hridaya card (Studio) ────────────────────────────────── */
.hridaya-card {
  background: var(--sepia-100);
  border: 1px solid var(--sepia-300);
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 240px;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 220ms ease;
  border-radius: 2px;
  overflow: hidden;
}
.hridaya-card:hover {
  transform: translateY(-3px);
  border-color: var(--navy-800);
  box-shadow: 0 16px 36px -22px rgba(26,45,92,.35);
}
.hridaya-card__image { position: relative; overflow: hidden; background: var(--navy-900); }
.hridaya-card__image > img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hridaya-card__image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,31,60,0) 35%, rgba(15,31,60,.42) 100%);
  z-index: 2;
  pointer-events: none;
}
.hridaya-card__image-tag {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242,235,217,.85);
  z-index: 3;
}
.hridaya-card__numeral {
  position: absolute;
  bottom: 16px;
  left: 20px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 56px;
  line-height: 0.9;
  color: var(--sepia-100);
  letter-spacing: -0.02em;
  z-index: 3;
  text-shadow: 0 2px 12px rgba(15,31,60,.6);
  font-variation-settings: "opsz" 96;
}
.hridaya-card__numeral-meta {
  position: absolute;
  bottom: 22px;
  right: 20px;
  z-index: 3;
  text-align: right;
  color: rgba(242,235,217,.9);
}
.hridaya-card__numeral-meta .label {
  display: block;
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(242,235,217,.6);
  margin-bottom: 2px;
}
.hridaya-card__numeral-meta .value {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
}
.hridaya-card__body {
  padding: 26px 30px 22px;
  display: flex;
  flex-direction: column;
}
.hridaya-card__series {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-500);
  font-weight: 500;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hridaya-card__series .pip {
  width: 5px; height: 5px;
  background: var(--blue-500);
  border-radius: 50%;
}
.hridaya-card__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.18;
  margin: 0 0 6px;
  letter-spacing: -0.006em;
  color: var(--ink-900);
  text-wrap: pretty;
}
.hridaya-card:hover .hridaya-card__title { color: var(--navy-800); }
.hridaya-card__sanskrit {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-500);
  margin: 0 0 14px;
}
.hridaya-card__teaser {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-700);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.hridaya-card__meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--sepia-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-500);
}
.hridaya-card__meta .read-link {
  color: var(--navy-800);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hridaya-card__meta .read-link .arrow {
  transition: transform 220ms ease;
  font-family: var(--font-serif);
  font-size: 16px;
}
.hridaya-card:hover .hridaya-card__meta .read-link .arrow { transform: translateX(4px); }
.hridaya-card__meta .divider {
  width: 1px; height: 12px; background: var(--sepia-400);
}
.hridaya-card__meta .audio-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy-800);
  font-weight: 500;
}
.hridaya-card__meta .audio-flag svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }
@media (max-width: 700px) {
  .hridaya-card { grid-template-columns: 1fr; }
  .hridaya-card__image { aspect-ratio: 16/9; }
  .hridaya-card__numeral { font-size: 44px; }
}

/* ─── Audio player bar ─────────────────────────────────────── */
.audio-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  background: var(--sepia-200);
  border: 1px solid var(--sepia-300);
  border-radius: 2px;
  margin: 32px 0;
}
.audio-bar__play {
  width: 44px; height: 44px;
  background: var(--navy-800);
  color: var(--sepia-100);
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 160ms ease;
}
.audio-bar__play:hover { background: var(--navy-700); }
.audio-bar__play svg { width: 14px; height: 14px; fill: currentColor; }
.audio-bar__title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-900);
  margin: 0;
}
.audio-bar__progress {
  flex: 1;
  height: 3px;
  background: var(--sepia-300);
  border-radius: 2px;
  position: relative;
}
.audio-bar__progress-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 18%;
  background: var(--navy-800);
  border-radius: 2px;
}
.audio-bar__duration {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-700);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .audio-bar { flex-wrap: wrap; gap: 12px; }
  .audio-bar__progress { order: 5; flex-basis: 100%; }
}

/* ─── Daksina block ────────────────────────────────────────── */
.daksina {
  background: var(--sepia-200);
  border: 1px solid var(--sepia-300);
  padding: 40px 36px;
  margin: 56px 0;
  border-radius: 2px;
  text-align: center;
}
.daksina__om {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--gold-500);
  margin-bottom: 8px;
}
.daksina h3 {
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--navy-900);
}
.daksina p {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-700);
  margin: 0 0 24px;
  font-size: 17px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
.daksina__amounts {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.daksina__amount {
  background: transparent;
  border: 1px solid var(--navy-800);
  color: var(--navy-800);
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
  transition: background 160ms ease, color 160ms ease;
}
.daksina__amount:hover, .daksina__amount.is-active {
  background: var(--navy-800);
  color: var(--sepia-100);
}

/* ─── Section ornaments ────────────────────────────────────── */
.section-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 64px 0;
  font-family: var(--font-serif);
  color: var(--gold-500);
}
.section-ornament .line {
  width: 80px; height: 1px;
  background: var(--gold-500);
}
.section-ornament .om {
  font-size: 22px;
}

/* end-of-lesson divider */
.end-divider {
  text-align: center;
  margin: 64px 0 48px;
  position: relative;
}
.end-divider::before,
.end-divider::after {
  content: "";
  display: inline-block;
  width: 120px;
  height: 1px;
  background: var(--gold-500);
  vertical-align: middle;
  margin: 0 16px;
}
.end-divider .om {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--gold-500);
  vertical-align: middle;
}

/* ─── Recommendation block (3-card row at end of lesson) ─── */
.recommend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 48px 0 80px;
}
@media (max-width: 820px) { .recommend { grid-template-columns: 1fr; } }

/* ─── Reading progress (top of viewport) ───────────────────── */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--blue-500);
  width: 32%;
  z-index: 100;
  transition: width 200ms ease;
}

/* ─── Pull quote (in Hridaya body) ────────────────────────── */
.pullquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1.4;
  color: var(--navy-800);
  margin: 56px auto;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--gold-500);
  max-width: 580px;
  text-wrap: pretty;
  font-variation-settings: "opsz" 36;
}
.pullquote cite {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  font-style: normal;
  font-family: var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
}

/* Sanskrit terms — inline highlight + hover */
.sanskrit {
  color: var(--navy-800);
  font-weight: 500;
  font-style: italic;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--gold-500);
  text-underline-offset: 4px;
  cursor: help;
}

/* ─── Hero block (Today's Pearl, etc.) ─────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0 96px;
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 56px 0; }
}
.hero__image {
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.hero__badge {
  margin-bottom: 20px;
}
.hero__title {
  font-size: 72px;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  font-weight: 500;
  font-variation-settings: "opsz" 144;
}
@media (max-width: 960px) { .hero__title { font-size: 48px; } }
@media (max-width: 540px) { .hero__title { font-size: 38px; } }
.hero__teaser {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink-700);
  margin: 0 0 32px;
  font-variation-settings: "opsz" 24;
}
.hero__meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-500);
}

/* ─── Page intro ────────────────────────────────────────────── */
.page-intro {
  padding: 80px 0 48px;
  max-width: 760px;
}
.page-intro h1 {
  margin: 12px 0 24px;
  font-size: 72px;
  font-variation-settings: "opsz" 144;
}
@media (max-width: 720px) { .page-intro h1 { font-size: 44px; } .page-intro { padding: 48px 0 32px; } }

/* ─── Template badge (small floating overlay on every page) ─── */
.tpl-badge {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--navy-800);
  color: var(--sepia-100);
  padding: 12px 18px;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  z-index: 80;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 28px -10px rgba(15,31,60,.5);
  transition: background 160ms ease;
}
.tpl-badge:hover { background: var(--navy-700); color: var(--sepia-100); }
.tpl-badge .tpl-badge__count {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--blue-400);
  font-size: 13px;
}
.tpl-badge .arrow {
  font-family: var(--font-serif);
  font-size: 15px;
}
