/* ══════════════════════════════════════════════════════════════════════
   Patra single story pages (patra-*.html)
   Ivory paper, Playfair headings, Inter body — same palette and type as
   the rest of the site. Desktop: article + sidebar. Phone: one column,
   with "In this story" right after the lead photo.
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #FBF6EC;
  --paper: #F6EEDD;
  --surface: #FFFDF8;
  --ink: #2E2A26;
  --muted: #5E5A52;
  --red: #8E2A1B;
  --red-bright: #C0392B;
  --gold: #A8710B;
  --brass: #C9A96A;
  --rule: rgba(169, 133, 74, 0.32);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(201, 169, 106, 0.12), rgba(201, 169, 106, 0) 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; }

/* Same fixed chrome positions as the other pages */
#site-logo {
  position: fixed;
  top: 3vh;
  right: 4.5vw;
  z-index: 55;
  height: 75px;
  width: auto;
  display: block;
}
@media (max-width: 900px) {
  #site-logo { top: 10px; height: 45px; }
}

/* ── Layout ─────────────────────────────────────────────────────────── */
.blog {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(96px, 12vh, 128px) clamp(16px, 4vw, 48px) clamp(48px, 6vw, 80px);
}
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 26vw, 320px);
  grid-template-areas:
    "head  mast"
    "hero  side"
    "body  side"
    "more  more"
    "end   end";
  column-gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.blog-head { grid-area: head; }
.blog-mast { grid-area: mast; }
.blog-hero { grid-area: hero; }
.blog-body { grid-area: body; }
.blog-side { grid-area: side; }
.blog-more { grid-area: more; }
.blog-end  { grid-area: end; }

/* ── Header ─────────────────────────────────────────────────────────── */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs span[aria-hidden] { opacity: 0.6; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(201, 169, 106, 0.25);
  color: #7A5A1C;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.blog-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--red);
  text-wrap: balance;
}
.blog-dek {
  margin: 0 0 18px;
  max-width: 36em;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.45;
  color: #3E3A33;
}
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.blog-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 3px;
}
.blog-meta .sep { opacity: 0.5; }

/* Top-right: a line on Kashi over the sepia skyline */
.blog-mast {
  position: relative;
  align-self: end;
  padding-bottom: 24px;
}
.blog-mast-hi {
  margin: 0 0 8px;
  font-family: var(--font-deva-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.55;
  color: #3E3A33;
}
.blog-mast-en {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.8125rem;
  color: var(--red);
}

/* ── Lead photo and in-text figures ─────────────────────────────────── */
.blog-hero,
.blog-figure { margin: 0 0 clamp(28px, 3vw, 40px); }
.blog-hero img,
.blog-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 14px 34px -18px rgba(46, 42, 38, 0.45);
}
.blog-hero img { aspect-ratio: 16 / 9.5; object-fit: cover; }
figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ── Article text ───────────────────────────────────────────────────── */
.blog-body section { scroll-margin-top: 96px; }
.blog-body h2 {
  margin: clamp(32px, 3.5vw, 44px) 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--red);
}
.blog-body section:first-child h2 { margin-top: 0; }
.blog-body p,
.blog-body li {
  font-size: var(--fs-body);
  line-height: 1.75;
  color: #3A362F;
}
.blog-body p { margin: 0 0 1.1em; }
.blog-body ul,
.blog-body ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.blog-body li { margin-bottom: 0.55em; }
.blog-body li::marker { color: var(--gold); }
.blog-body strong { color: var(--ink); }
.blog-body blockquote {
  margin: 1.4em 0;
  padding: 18px 22px;
  border-left: 3px solid var(--brass);
  background: var(--paper);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #3E3A33;
}

/* Drop cap on the opening paragraph */
.blog-body .lede::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font-family: var(--font-display);
  font-size: 4.6em;
  font-weight: 600;
  line-height: 0.8;
  color: var(--red);
}

/* Ornamented pull quote between sections */
.blog-pull {
  margin: clamp(28px, 3vw, 40px) 0;
  padding: 0 clamp(0px, 4vw, 48px);
  text-align: center;
}
.blog-pull blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.blog-pull p {
  margin: 0 !important;
  font-family: var(--font-display) !important;
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem) !important;
  line-height: 1.5 !important;
  color: var(--red) !important;
}
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px auto;
  color: var(--gold);
  font-size: 0.8rem;
}
.ornament::before,
.ornament::after {
  content: '';
  width: clamp(48px, 10vw, 96px);
  height: 1px;
  background: linear-gradient(90deg, rgba(168, 113, 11, 0), rgba(168, 113, 11, 0.7));
}
.ornament::after { transform: scaleX(-1); }

/* ── Sidebar cards ──────────────────────────────────────────────────── */
/* The aside spans the photo and the text; its contents stay in view
   (below the nav pill) while the story scrolls. */
.blog-side { align-self: stretch; }
.blog-side-inner {
  position: sticky;
  top: calc(max(3vh, env(safe-area-inset-top)) + 72px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(100vh - max(3vh, env(safe-area-inset-top)) - 96px);
  overflow-y: auto;
  scrollbar-width: none;
}
.blog-side-inner::-webkit-scrollbar { display: none; }
.side-card {
  padding: 20px 20px 22px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.side-label {
  margin: 0 0 14px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.side-label span { color: var(--red-bright); }

/* In this story — a dotted timeline */
.blog-toc ol {
  position: relative;
  margin: 0;
  padding: 0 0 0 26px;
  list-style: none;
}
.blog-toc ol::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: rgba(201, 169, 106, 0.55);
}
.blog-toc li { position: relative; }
.blog-toc li::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #D9C49A;
  transition: transform 0.2s ease, background 0.2s ease;
}
.blog-toc li.is-active::before { background: var(--red-bright); transform: scale(1.35); }
.blog-toc a {
  display: flex;
  align-items: center;
  min-height: 36px;
  font-size: 0.9375rem;
  color: #3E3A33;
  text-decoration: none;
}
.blog-toc li.is-active a { color: var(--red); font-weight: 600; }
.blog-toc a:hover { color: var(--red); }

.side-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #3E3A33;
}
.side-quote p::before {
  content: '“';
  display: block;
  margin-bottom: 2px;
  font-size: 2.6rem;
  line-height: 0.9;
  color: var(--red);
}

.side-related img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 12px;
  background: var(--surface);
}
.side-related img.is-drawing { object-fit: contain; padding: 10px; }
.side-related h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}
.side-related p:not(.side-label) { margin: 0 0 12px; font-size: 0.875rem; line-height: 1.55; color: var(--muted); }
.side-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
}

.side-more ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.side-more a {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.side-more img {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
}
.side-more strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.25;
}
.side-more small { font-size: 0.75rem; color: var(--muted); }
.side-more a:hover strong { color: var(--red); }

/* ── Keep reading: more from Patra + the quote, below the text ─────── */
.blog-more {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: clamp(32px, 4vw, 56px);
  align-items: start;
}
/* More from Patra on the left, the quote on the right */
.blog-more .side-more { order: -1; }
.blog-more .side-more ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.blog-more .side-more a {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 10px;
}
.blog-more .side-more img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

/* ── End of story ───────────────────────────────────────────────────── */
.blog-end {
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--brass);
  border-radius: 999px;
  color: var(--red);
  font-size: var(--fs-button);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.blog-back:hover { background: var(--surface); }

/* ── Footer (shared layout lives in nav.css) ────────────────────────── */
#site-footer {
  padding: 48px 6vw;
  background: #EFE3CB;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.footer-copy { font-size: 0.8125rem; }
.foot-crafted {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}
.footer-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--red); }

/* ── Tablet & phone: one column ─────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
  }
  .blog-layout > *,
  .blog-side > * { grid-area: auto; }
  .blog-mast { display: none; }
  .blog-side,
  .blog-side-inner { display: contents; }
  .blog-head { order: 1; }
  .blog-hero { order: 2; }
  .blog-toc  { order: 3; margin-bottom: 32px; }
  .blog-body { order: 4; }
  .side-related { order: 5; margin-top: 8px; }
  .blog-more  { order: 6; margin-top: 18px; grid-template-columns: minmax(0, 1fr); }
  .blog-more .side-more { order: 0; }
  .blog-end   { order: 8; }
  .blog-toc a { font-size: 1.05rem; min-height: 44px; }
}
@media (max-width: 600px) {
  .blog { padding-top: 84px; }
  .blog-more .side-more ul { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .blog-more .side-more a { grid-template-columns: 96px 1fr; align-items: center; }
  .blog-hero img { aspect-ratio: 4 / 3; }
  .blog-body .lede::first-letter { font-size: 4em; }
}

/* In the sticky sidebar, a shorter photo keeps the related object in view
   beneath the contents list. */
@media (min-width: 901px) {
  .blog-side .side-related img { aspect-ratio: 2 / 1; }
}
