/* India Reborn — v2 chrome stylesheet
   Pairs with /site/v2-chrome.js. Provides the visual treatment for the shared
   top nav, footer, and disclaimer banner injected into every page.
   Depends on /site/shell.css for design tokens. */

/* ─── reset for chrome elements (defensive — pages have their own CSS) ─── */
.v2-chrome *, .v2-chrome *::before, .v2-chrome *::after { box-sizing: border-box; }

/* ─── NAV (light by default, .nav-v2--dark for hero contexts) ─── */
.nav-v2 {
  position: relative; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 14px 28px;
  background: var(--paper, #f5f0e8);
  border-bottom: 1px solid var(--line, rgba(26,20,16,0.10));
  font-family: var(--sans, 'Inter', sans-serif);
  color: var(--ink, #1a1410);
}
.nav-v2.nav-v2--sticky {
  position: sticky; top: 0;
  background: rgba(245,240,232,0.94);
  backdrop-filter: blur(8px);
}
.nav-v2.nav-v2--dark {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.95);
}
.nav-v2-l { display: flex; align-items: center; gap: 18px; min-width: 0; }
.nav-v2 .brand {
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-weight: 700; font-size: 18px;
  letter-spacing: -0.02em;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.nav-v2 .brand em { color: var(--accent, #d4541e); font-style: normal; font-weight: 700; }
.nav-v2 .brand-sub {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted, #8a7560);
  border-left: 1px solid var(--line, rgba(26,20,16,0.10));
  padding-left: 14px;
  white-space: nowrap;
}
.nav-v2.nav-v2--dark .brand-sub {
  color: rgba(255,255,255,0.40);
  border-left-color: rgba(255,255,255,0.12);
}
.nav-v2-links { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-v2-link {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--ink-muted, #8a7560);
  text-decoration: none; transition: color .15s;
}
.nav-v2-link:hover { color: var(--ink, #1a1410); }
.nav-v2-link.is-active { color: var(--accent, #d4541e); }
.nav-v2.nav-v2--dark .nav-v2-link { color: rgba(255,255,255,0.55); }
.nav-v2.nav-v2--dark .nav-v2-link:hover { color: rgba(255,255,255,0.95); }
.nav-v2.nav-v2--dark .nav-v2-link.is-active { color: var(--accent, #d4541e); }
.nav-v2-r { display: flex; align-items: center; gap: 12px; }

/* ─── language dropdown (light + dark variants) ─── */
.lang-select-v2,
.lang-select-light {
  appearance: none; -webkit-appearance: none;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  padding: 6px 26px 6px 10px;
  border-radius: 2px; cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.lang-select-light {
  background-color: var(--paper-card, #fbf8f1);
  border: 1px solid var(--line, rgba(26,20,16,0.10));
  color: var(--ink-soft, #3d2f24);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none' stroke='%238a7560' stroke-width='1.5'><path d='M2 4l3 3 3-3'/></svg>");
}
.lang-select-light:hover { color: var(--ink, #1a1410); border-color: var(--ink-soft, #3d2f24); }
.lang-select-light:focus { outline: none; border-color: var(--accent, #d4541e); }
.lang-select-v2 {
  background-color: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.78);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='1.5'><path d='M2 4l3 3 3-3'/></svg>");
}
.lang-select-v2:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.lang-select-v2:focus { outline: none; border-color: var(--accent, #d4541e); }
.lang-select-v2 option, .lang-select-light option { background: #1a1410; color: #f5f0e8; }
.lang-select-light option { background: #fbf8f1; color: #1a1410; }

/* Indic scripts have matras above the headline that get clipped by the
   tight Latin padding. Just enough breathing room — same overall size. */
:lang(hi) .lang-select-v2, :lang(mr) .lang-select-v2,
:lang(ta) .lang-select-v2, :lang(te) .lang-select-v2,
:lang(kn) .lang-select-v2, :lang(ml) .lang-select-v2,
:lang(bn) .lang-select-v2, :lang(gu) .lang-select-v2,
:lang(pa) .lang-select-v2, :lang(od) .lang-select-v2,
:lang(hi) .lang-select-light, :lang(mr) .lang-select-light,
:lang(ta) .lang-select-light, :lang(te) .lang-select-light,
:lang(kn) .lang-select-light, :lang(ml) .lang-select-light,
:lang(bn) .lang-select-light, :lang(gu) .lang-select-light,
:lang(pa) .lang-select-light, :lang(od) .lang-select-light {
  font-family: var(--serif);
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
}

@media (max-width: 780px) {
  .nav-v2 { padding: 12px 18px; gap: 12px; flex-wrap: wrap; }
  .nav-v2-links { gap: 14px; }
  .nav-v2 .brand-sub { display: none; }
}

/* ─── FOOTER ─── */
.foot-v2 {
  background: var(--ink, #1a1410); color: rgba(245,240,232,0.55);
  padding: 56px 28px 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: var(--sans, 'Inter', sans-serif);
  margin-top: 80px;
}
.foot-v2-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 2fr; gap: 56px;
  align-items: start;
}
.foot-v2 .pf-brand {
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-weight: 700; color: #fff;
  font-size: 22px; letter-spacing: -0.02em;
}
.foot-v2 .pf-brand em { color: var(--accent, #d4541e); font-style: normal; }
.foot-v2 .pf-blurb {
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-size: 14px; line-height: 1.6;
  color: rgba(245,240,232,0.55); margin-top: 12px;
  max-width: 36ch;
}
.foot-v2 .pf-meta {
  margin-top: 16px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(245,240,232,0.30);
}
.foot-v2 .pf-meta strong { color: var(--accent, #d4541e); font-weight: 500; }
.foot-v2-cols {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11px; letter-spacing: 0.10em;
  text-transform: uppercase;
}
.foot-v2-cols h5 {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 10px; letter-spacing: 0.16em;
  color: rgba(245,240,232,0.35);
  margin: 0 0 14px; font-weight: 500;
}
.foot-v2-cols a {
  display: block; color: rgba(245,240,232,0.65);
  padding: 4px 0; text-decoration: none;
  transition: color .15s;
}
.foot-v2-cols a:hover { color: var(--accent, #d4541e); }

/* Paper-PDF download with a hover-revealed Preview ↗ option.
   Layout: the wrapper is a flex row so both anchors sit on the same line.
   Each anchor is white-space:nowrap so the labels never wrap mid-text inside
   the narrow footer column — and the wrapper has display:flex (not block)
   so each anchor stops behaving like the surrounding block-level footer
   links. The Preview link fades/slides in on hover or focus-within. */
.foot-v2-cols .ftr-tex {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.foot-v2-cols .ftr-tex > a {
  white-space: nowrap;
  display: inline;
  margin: 0;
}
.foot-v2-cols .ftr-tex-preview {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(245,240,232,0.30);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s ease, transform .18s ease, color .15s;
  pointer-events: none;
}
.foot-v2-cols .ftr-tex-preview::after { content: '\2009\2197'; }
.foot-v2-cols .ftr-tex:hover .ftr-tex-preview,
.foot-v2-cols .ftr-tex:focus-within .ftr-tex-preview {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.foot-v2-cols .ftr-tex-preview:hover { color: var(--accent, #d4541e); }
@media (hover: none) {
  .foot-v2-cols .ftr-tex-preview { opacity: 0.55; transform: none; pointer-events: auto; }
}
.foot-v2-bottom {
  max-width: 1240px; margin: 36px auto 0;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(245,240,232,0.30);
}
@media (max-width: 760px) {
  .foot-v2-inner { grid-template-columns: 1fr; gap: 32px; }
  .foot-v2-cols { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; }
}

/* ─── DISCLAIMER BANNER ─── */
.disc-v2 {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--ink, #1a1410); color: rgba(245,240,232,0.92);
  border-top: 2px solid var(--accent, #d4541e);
  padding: 14px 24px;
  z-index: 70;
  transform: translateY(0);
  transition: transform .25s ease-out;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
  font-family: var(--sans, 'Inter', sans-serif);
}
.disc-v2.disc-gone { transform: translateY(110%); }
.disc-v2 .disc-v2-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap;
}
.disc-v2 .disc-v2-tag {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent, #d4541e);
  padding: 4px 10px;
  border: 1px solid rgba(212,84,30,0.4);
  border-radius: 2px; flex-shrink: 0;
}
.disc-v2 .disc-v2-text {
  flex: 1; min-width: 240px;
  font-size: 13px; line-height: 1.55;
  color: rgba(245,240,232,0.78); margin: 0;
}
.disc-v2 .disc-v2-text strong { color: #fff; font-weight: 500; }
.disc-v2 .disc-v2-actions { display: flex; gap: 8px; flex-shrink: 0; }
/* Applies to BOTH the banner buttons (.disc-v2 .disc-v2-btn) and the modal
   action buttons (.disc-v2-modal-actions .disc-v2-btn) — the modal is not a
   descendant of .disc-v2, so the selector must not be ancestor-scoped.
   Buttons stay in Inter on every language: var(--mono) gets redirected to
   Tiro/Noto Serif for Indic locales, which renders the Latin button labels
   in a serif and looks broken. */
.disc-v2-btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.01em;
  padding: 10px 18px; border-radius: 2px;
  cursor: pointer; transition: all .15s;
  border: 1px solid transparent; background: transparent;
  white-space: nowrap; line-height: 1.2;
}
.disc-v2-btn-primary { background: var(--accent, #d4541e); color: #fff; border-color: var(--accent, #d4541e); }
.disc-v2-btn-primary:hover { background: var(--accent-deep, #b8431a); border-color: var(--accent-deep, #b8431a); }
.disc-v2-btn-ghost {
  background: transparent; color: rgba(245,240,232,0.7);
  border-color: rgba(245,240,232,0.2);
}
.disc-v2-btn-ghost:hover { color: #fff; border-color: rgba(245,240,232,0.5); }
@media (max-width: 720px) {
  .disc-v2 .disc-v2-tag { display: none; }
  .disc-v2 { padding: 12px 16px; }
  .disc-v2 .disc-v2-text { font-size: 12px; }
  .disc-v2 .disc-v2-btn { font-size: 12px; padding: 9px 14px; }
}

/* ─── DISCLAIMER MODAL ─── */
.disc-v2-modal-scrim {
  position: fixed; inset: 0;
  background: rgba(26,20,16,0.55);
  display: none; place-items: center;
  z-index: 100; padding: 24px;
}
.disc-v2-modal-scrim.open { display: grid; }
.disc-v2-modal {
  background: var(--paper, #f5f0e8); color: var(--ink, #1a1410);
  max-width: 680px; width: 100%; max-height: 86vh; overflow-y: auto;
  border: 1px solid var(--line, rgba(26,20,16,0.10));
  padding: 36px 40px; border-radius: 2px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.30);
  font-family: var(--sans, 'Inter', sans-serif);
}
.disc-v2-modal-eyebrow {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent, #d4541e); margin-bottom: 14px;
}
.disc-v2-modal h2 {
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-size: clamp(24px, 3vw, 32px); font-weight: 600;
  line-height: 1.15; letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.disc-v2-modal p {
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-size: 16px; line-height: 1.65;
  color: var(--ink-soft, #3d2f24); margin-bottom: 14px;
}
.disc-v2-modal p strong { color: var(--ink, #1a1410); font-weight: 600; }
.disc-v2-modal .disc-v2-sig {
  margin-top: 22px;
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-style: italic; color: var(--ink-muted, #8a7560);
  font-size: 14px;
}
.disc-v2-modal-actions {
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--line, rgba(26,20,16,0.10));
  display: flex; gap: 10px; flex-wrap: wrap;
}
.disc-v2-modal-actions .disc-v2-btn-secondary {
  background: transparent; color: var(--ink-soft, #3d2f24);
  border-color: var(--line, rgba(26,20,16,0.10));
}
.disc-v2-modal-actions .disc-v2-btn-secondary:hover {
  color: var(--ink, #1a1410); border-color: var(--ink-soft, #3d2f24);
}
