/* Bolte Patthar
   Layout: photo-led pages; each story pairs the telling with a stone plaque of facts and a visit note, photos below. */
:root {
  --ground: #EEEBE7;      /* weathered sandstone-grey */
  --slab: #F8F6F3;        /* polished marble */
  --ink: #241D1B;
  --muted: #6D625C;
  --rule: #D5CCC4;
  --sandstone: #9E3524;   /* Red Fort sandstone */
  --sandstone-soft: #EAD9D3;
  --on-photo: #FFFFFF;
  --scrim: rgba(20, 12, 10, 0.62);
  --f-display: "Rozha One", "Tiro Devanagari Hindi", Georgia, serif;
  --f-body: "Literata", Georgia, "Times New Roman", serif;
  --f-label: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --measure: 64ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #161210; --slab: #211B18; --ink: #EFE7E1; --muted: #A99C94; --rule: #3B312C;
    --sandstone: #E57A63; --sandstone-soft: #3A2520; --scrim: rgba(8, 5, 4, 0.7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #161210; --slab: #211B18; --ink: #EFE7E1; --muted: #A99C94; --rule: #3B312C;
  --sandstone: #E57A63; --sandstone-soft: #3A2520; --scrim: rgba(8, 5, 4, 0.7); color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.7;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--slab); }
img { max-width: 100%; }
.wrap {
  max-width: 72rem; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: var(--sandstone); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--sandstone); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; font-weight: 400; }
.label {
  font-family: var(--f-label); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.tbc { background: var(--sandstone-soft); color: var(--ink); padding: 0 4px; font-family: var(--f-label); font-size: 0.85em; }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--slab); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; padding-block: 10px; }
.brand { font-family: var(--f-display); font-size: 1.4rem; color: var(--ink); text-decoration: none; line-height: 1.2; }
.brand span { color: var(--sandstone); }
.site-nav { display: flex; gap: 2px 18px; flex-wrap: wrap; }
.site-nav a { font-family: var(--f-label); font-size: 0.92rem; color: var(--ink); text-decoration: none; padding-block: 3px; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--sandstone); }

/* Hero (home) */
.hero { position: relative; background: #1b1311 center 40% / cover no-repeat; color: var(--on-photo); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--scrim) 0%, var(--scrim) 50%, rgba(0,0,0,0.12) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(56px, 10vw, 120px); }
.hero .label { color: var(--on-photo); opacity: 0.85; }
.hero h1 { font-family: var(--f-display); font-size: clamp(3.4rem, 11vw, 7.5rem); line-height: 1.05; margin: 8px 0 4px; }
.hero .en { font-family: var(--f-display); font-size: clamp(1.5rem, 3.6vw, 2.3rem); margin: 0 0 18px; line-height: 1.25; }
.hero .lede { max-width: 36rem; font-size: 1.1rem; margin: 0 0 28px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-block; font-family: var(--f-label); font-size: 0.98rem; text-decoration: none; padding: 9px 16px; border-radius: 2px; border: 1px solid var(--sandstone); }
.btn.primary { background: var(--sandstone); color: var(--slab); }
.btn.ghost { color: var(--on-photo); border-color: rgba(255,255,255,0.65); }
.btn.ghost:hover { background: rgba(255,255,255,0.14); }
.btn.primary:hover { filter: brightness(1.08); }

.block { padding-block: clamp(44px, 6vw, 80px); }
.block + .block { border-top: 1px solid var(--rule); }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px 56px; }
.intro h2, .block-title { font-family: var(--f-display); font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0; }
.intro p { margin: 0 0 1em; max-width: var(--measure); }
.block-title { margin-bottom: 24px; }

/* Section cards (home) */
.sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.sec-card { display: grid; grid-template-rows: auto 1fr; background: var(--slab); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.sec-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.sec-card .txt { padding: 16px 18px 20px; display: grid; gap: 6px; align-content: start; }
.sec-card .hi { font-family: var(--f-display); font-size: 1.15rem; color: var(--sandstone); line-height: 1.3; }
.sec-card h3 { font-family: var(--f-display); font-size: 1.5rem; line-height: 1.2; margin: 0; }
.sec-card p { margin: 0; font-size: 0.98rem; }
.sec-card:hover { border-color: var(--sandstone); }

/* Story cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 28px 20px; }
.card { color: var(--ink); text-decoration: none; display: grid; gap: 8px; align-content: start; }
.card .ph { aspect-ratio: 4 / 3; overflow: hidden; background: var(--slab); border: 1px solid var(--rule); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.card:hover .ph img { transform: scale(1.04); }
.card h3 { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.2; margin: 0; }
.card:hover h3 { color: var(--sandstone); }
.card p { margin: 0; font-size: 0.95rem; color: var(--muted); font-style: italic; }
@media (prefers-reduced-motion: reduce) { .card .ph img, .gallery img { transition: none; } }

/* Numeral panel stands in for a photo */
.numeral { display: grid; place-items: center; height: 100%; width: 100%; background: var(--sandstone-soft); color: var(--sandstone); font-family: var(--f-display); font-size: clamp(2rem, 6vw, 3rem); line-height: 1; text-align: center; padding: 12px; }
.lead .numeral { aspect-ratio: 21 / 8; font-size: clamp(3rem, 12vw, 7rem); }

/* Section page head */
.sec-head { padding-block: clamp(40px, 6vw, 72px) 28px; }
.sec-head .hi { display: block; font-family: var(--f-display); font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.15; color: var(--sandstone); }
.sec-head h1 { font-family: var(--f-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 4px 0 16px; line-height: 1.2; }
.sec-head p { max-width: var(--measure); margin: 0; }
.banner { margin: 0 0 40px; }
.banner img { display: block; width: 100%; max-height: 380px; object-fit: cover; }
.banner figcaption { margin-top: 6px; }
.credit { text-transform: none; letter-spacing: 0.02em; }
.credit a { color: inherit; }
figcaption .credit::before { content: "·"; margin: 0 8px; }
.credits-list { list-style: none; padding: 0; margin: 0 0 1em; max-width: var(--measure); }
.credits-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.credits-list .label { display: block; }

/* Story page */
.crumbs { padding-block: 22px 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--sandstone); }
.story-head { padding-block: 10px 24px; max-width: 52rem; }
.story-head h1 { font-family: var(--f-display); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 10px; }
.story-head .hook { font-style: italic; font-size: 1.2rem; color: var(--muted); margin: 0; }
.lead { margin: 0 0 36px; }
.lead img { display: block; width: 100%; max-height: 560px; object-fit: cover; }
.lead figcaption { margin-top: 6px; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 28px 56px; align-items: start; }
.story-body { min-width: 0; }
.story-body p { max-width: var(--measure); margin: 0 0 1em; }
.story-body > p:first-child::first-letter { font-family: var(--f-display); color: var(--sandstone); font-size: 3.3em; float: left; line-height: 0.9; padding: 6px 8px 0 0; }
.aside { display: grid; gap: 16px; min-width: 0; }
.plaque { background: var(--slab); border: 1px solid var(--rule); padding: 14px 16px 16px; margin: 0; display: grid; gap: 10px; }
.plaque h2 { margin: 0; }
.plaque div { display: grid; gap: 1px; }
.plaque dt { font-family: var(--f-label); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.plaque dd { margin: 0; font-family: var(--f-display); font-size: 1.15rem; line-height: 1.3; color: var(--sandstone); font-variant-numeric: tabular-nums; }
.visit { border-top: 3px solid var(--sandstone); padding-top: 12px; }
.visit h2 { margin: 0 0 4px; }
.visit p { margin: 0; font-size: 0.98rem; }
.byline { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
.byline .who { font-family: var(--f-display); font-size: 1.1rem; }
.share { font-family: var(--f-label); font-size: 0.95rem; color: var(--sandstone); border: 1px solid var(--sandstone); padding: 6px 14px; text-decoration: none; border-radius: 2px; }
.share:hover { background: var(--sandstone); color: var(--slab); }

.table-box { overflow-x: auto; max-width: var(--measure); margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.97rem; }
th, td { text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
thead th { font-family: var(--f-label); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
tbody th { font-weight: 400; }
td.diff { color: var(--sandstone); font-weight: 600; }

.gallery-wrap { margin-top: 44px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.gallery button { all: unset; cursor: zoom-in; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--rule); }
.gallery button:focus-visible { outline: 2px solid var(--sandstone); outline-offset: 2px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.gallery button:hover img { transform: scale(1.04); }

.next { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px 40px; padding-block: 32px; border-top: 1px solid var(--rule); }
.next .card { max-width: 24rem; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .cards.three { grid-template-columns: minmax(0, 1fr); } }

/* About */
.placeholder { border: 1px dashed var(--muted); padding: 14px 16px; color: var(--muted); font-family: var(--f-label); font-size: 0.95rem; max-width: var(--measure); }
.about-grid { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 24px 56px; align-items: start; }
.portrait { aspect-ratio: 4 / 5; display: grid; place-items: center; text-align: center; padding: 12px; }
.quote { font-family: var(--f-display); font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.35; max-width: 40rem; margin: 0 0 14px; }

footer { background: var(--slab); border-top: 1px solid var(--rule); margin-top: 24px; }
footer .wrap { padding-block: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

/* Lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
dialog.lightbox::backdrop { background: rgba(10, 6, 5, 0.93); }
.lb-inner { height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lb-inner img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; display: block; min-height: 0; }
.lb-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: #F3ECE7; font-family: var(--f-label); }
.lb-bar .cap { flex: 1 1 12rem; min-width: 0; }
.lb-bar .cap a { color: inherit; }
.lb-bar button { flex: none; font: inherit; color: #F3ECE7; background: transparent; border: 1px solid rgba(255,255,255,0.4); padding: 6px 12px; cursor: pointer; border-radius: 2px; }
.lb-bar button:hover { background: rgba(255,255,255,0.12); }

@media (max-width: 820px) {
  .sections { grid-template-columns: minmax(0, 1fr); }
  .sec-card { grid-template-columns: 9rem minmax(0, 1fr); grid-template-rows: auto; }
  .sec-card img { height: 100%; aspect-ratio: auto; }
  .intro, .story-grid, .next, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 12rem; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
