/* ============================================
   Brahmanbaria District Portal — Design System
   Visual Refresh 2026
   ============================================ */

:root {
  /* Heritage palette — earthy cream, forest green, gold, terracotta */
  --bg:        #F4EDD6;
  --bg-elev:   #FAF5E2;
  --paper:     #FFFDEE;
  --ink:       #181C18;
  --ink-2:     #464640;
  --ink-3:     #77756A;
  --rule:      rgba(24, 28, 24, 0.09);
  --rule-strong: rgba(24, 28, 24, 0.20);

  --primary:       #25653C;
  --primary-deep:  #164629;
  --primary-soft:  #DDE9D4;
  --primary-glow:  rgba(37, 101, 60, 0.14);

  --river:         #265778;
  --river-soft:    #D5E6F0;
  --river-glow:    rgba(38, 87, 120, 0.14);

  --gold:          #C3924A;
  --gold-deep:     #836119;
  --gold-soft:     #EDDDB0;
  --gold-glow:     rgba(195, 146, 74, 0.18);

  --terracotta:      #B03833;
  --terracotta-soft: #ECD0CA;

  --emergency:       #C42D26;
  --emergency-deep:  #881E19;

  /* ── Fonts ── */
  --f-display: "Cormorant Garamond", Georgia, serif;
  --f-heading: "Outfit", "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-sans:    "Bricolage Grotesque", "Outfit", ui-sans-serif, system-ui, sans-serif;
  --f-body:    "DM Sans", "Outfit", ui-sans-serif, system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, monospace;
  --f-bn:      "Hind Siliguri", "Noto Serif Bengali", sans-serif;

  /* ── Radii ── */
  --r-xs:   4px;
  --r-sm:   6px;
  --r:      10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  38px;
  --r-pill: 9999px;

  /* ── Shadows — warm-tinted ── */
  --shadow-xs:      0 1px 2px rgba(26,18,6,.06);
  --shadow-sm:      0 1px 4px rgba(26,18,6,.08), 0 1px 2px rgba(26,18,6,.05);
  --shadow:         0 4px 16px -4px rgba(26,18,6,.16), 0 2px 6px -2px rgba(26,18,6,.09);
  --shadow-md:      0 8px 24px -8px rgba(26,18,6,.20), 0 3px 8px -3px rgba(26,18,6,.11);
  --shadow-lg:      0 20px 48px -12px rgba(26,18,6,.26), 0 8px 20px -8px rgba(26,18,6,.13);
  --shadow-xl:      0 40px 80px -20px rgba(26,18,6,.30), 0 16px 40px -12px rgba(26,18,6,.16);
  --shadow-diffuse: 0 20px 40px -15px rgba(26,18,6,.05), 0 1px 4px rgba(26,18,6,.04);

  /* ── Glow ── */
  --glow-primary: 0 0 0 3px var(--primary-glow);
  --glow-gold:    0 0 0 3px var(--gold-glow);

  /* ── Easing ── */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:    140ms;
  --dur-base:    210ms;
  --dur-slow:    360ms;
  --dur-slower:  540ms;

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

  --container: 1240px;
  --header-h:  68px;
}

/* ── Palette variants ── */
[data-palette="river"] {
  --bg:          #ECF2F6;
  --bg-elev:     #F6FAFB;
  --paper:       #FFFFFF;
  --primary:     #1E5878;
  --primary-deep:#0E3850;
  --primary-soft:#D3E3EE;
  --gold:        #DFA04A;
  --gold-soft:   #F2E2C2;
  --terracotta:  #9A4840;
}
[data-palette="sunset"] {
  --bg:          #F7EDE0;
  --bg-elev:     #FCF5EA;
  --paper:       #FFFCF5;
  --primary:     #B45628;
  --primary-deep:#7C3A14;
  --primary-soft:#F0DBC5;
  --gold:        #D69940;
  --terracotta:  #BE3829;
}

[data-dark="true"] {
  --bg:          #141618;
  --bg-elev:     #1B1E22;
  --paper:       #1E2126;
  --ink:         #EAE4D4;
  --ink-2:       #BAB5A5;
  --ink-3:       #888472;
  --rule:        rgba(234, 228, 212, 0.11);
  --rule-strong: rgba(234, 228, 212, 0.22);
  --primary-soft:  rgba(37, 101, 60, 0.17);
  --river-soft:    rgba(38, 87, 120, 0.22);
  --gold-soft:     rgba(195, 146, 74, 0.17);
  --gold-deep:     #D2A652;
  --gold-glow:     rgba(210, 166, 82, 0.20);
  --terracotta-soft: rgba(176, 56, 51, 0.22);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.20), 0 1px 2px rgba(0,0,0,.14);
  --shadow:      0 4px 16px -4px rgba(0,0,0,.38), 0 2px 6px -2px rgba(0,0,0,.22);
  --shadow-md:   0 8px 24px -8px rgba(0,0,0,.44), 0 3px 8px -3px rgba(0,0,0,.26);
  --shadow-lg:   0 20px 48px -12px rgba(0,0,0,.52), 0 8px 20px -8px rgba(0,0,0,.34);
  --shadow-xl:   0 40px 80px -20px rgba(0,0,0,.60), 0 16px 40px -12px rgba(0,0,0,.40);
  --shadow-diffuse: 0 20px 40px -15px rgba(0,0,0,.30);
}

/* ── Reset / base ── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}
body { min-height: 100vh; }

/* Offset anchor targets below sticky header */
[id] { scroll-margin-top: calc(var(--header-h) + var(--space-5)); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--rule-strong);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ── Typography — display scale ── */
.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.04;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "swsh" 1;
}
.display-light {
  font-family: var(--f-display);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-style: italic;
}
.display-xl {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(56px, 7.5vw, 108px);
  letter-spacing: -0.042em;
  line-height: 0.93;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "swsh" 1;
}
.display-lg {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 76px);
  letter-spacing: -0.032em;
  line-height: 0.97;
}
.display-md {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 48px);
  letter-spacing: -0.025em;
  line-height: 1.06;
}
.display-sm {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(20px, 2.5vw, 28px);
  letter-spacing: -0.018em;
  line-height: 1.15;
}
.display-italic { font-style: italic; }

/* ── Typography — heading scale (Outfit) ── */
.heading-xl {
  font-family: var(--f-heading);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 54px);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.heading-lg {
  font-family: var(--f-heading);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.14;
}
.heading-md {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: clamp(18px, 2.5vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.sans { font-family: var(--f-sans); }
.bn   { font-family: var(--f-bn); }

.eyebrow {
  font-family: var(--f-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.eyebrow-sm {
  font-family: var(--f-sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.eyebrow-center {
  justify-content: center;
}
.eyebrow-center::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

p {
  line-height: 1.72;
  max-width: 68ch;
}

@media (max-width: 639px) {
  p { max-width: 100%; }
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section    { padding: var(--space-9) 0; }
.section-sm { padding: var(--space-7) 0; }
.section-lg { padding: var(--space-10) 0; }

@media (max-width: 639px) {
  .section    { padding: var(--space-7) 0; }
  .section-sm { padding: var(--space-5) 0; }
  .section-lg { padding: var(--space-8) 0; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 11px 22px;
  border: 1.5px solid var(--rule-strong);
  background: transparent;
  border-radius: var(--r-pill);
  font-family: var(--f-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  transition:
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-spring);
  white-space: nowrap;
}
.btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.btn:active { transform: scale(0.97) !important; box-shadow: none !important; }

.btn-primary {
  background: var(--primary);
  color: #FFFDEE;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-deep);
  border-color: var(--primary-deep);
  color: #FFFDEE;
  box-shadow: 0 4px 16px -4px var(--primary-glow);
}

.btn-soft {
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-color: transparent;
}
.btn-soft:hover {
  background: var(--primary);
  color: #FFFDEE;
  border-color: var(--primary);
}

.btn-ghost { border-color: transparent; padding: 8px 12px; }
.btn-ghost:hover {
  background: var(--rule);
  color: var(--ink);
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

.btn-emergency {
  background: var(--emergency);
  color: white;
  border-color: var(--emergency);
}
.btn-emergency:hover {
  background: var(--emergency-deep);
  border-color: var(--emergency-deep);
  color: white;
  box-shadow: 0 4px 16px -4px rgba(196,45,38,.35);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--r-pill);
  aspect-ratio: 1;
  justify-content: center;
}

/* ── Pills / tags ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  transition:
    background var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-spring);
}
.pill:hover  { transform: translateY(-1px); }
.pill:active { transform: scale(0.94) !important; }
.pill-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* ── Card ── */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition:
    transform 0.32s var(--ease-spring),
    box-shadow 0.26s ease,
    border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: var(--shadow-md);
  border-color: rgba(195, 146, 74, 0.28);
}
.card-gold {
  border-color: rgba(195, 146, 74, 0.38);
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    linear-gradient(135deg, var(--gold), transparent 55%, var(--gold-soft)) border-box;
  border: 1.5px solid transparent;
}
.card-flat {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-lined {
  background: transparent;
  border: none;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  padding: var(--space-5) 0;
}
.card-bento {
  background: var(--paper);
  border: 1px solid color-mix(in oklab, var(--rule-strong) 50%, transparent);
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-diffuse);
  padding: var(--space-7);
}

/* ── Glassmorphism panel ── */
.glass-panel {
  background: color-mix(in oklab, var(--paper) 76%, transparent);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    var(--shadow-md);
  border-radius: var(--r-xl);
}
.glass-panel-sm {
  background: color-mix(in oklab, var(--paper) 80%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.20), var(--shadow);
  border-radius: var(--r-lg);
}

/* ── Bento grid helpers ── */
.bento-grid { display: grid; gap: var(--space-5); }
.bento-2-1 { grid-template-columns: 2fr 1fr; }
.bento-1-2 { grid-template-columns: 1fr 2fr; }
.bento-3   { grid-template-columns: 1.5fr 1fr 1fr; }
.bento-asym { grid-template-columns: 3fr 2fr; }
@media (max-width: 768px) {
  .bento-2-1, .bento-1-2, .bento-3, .bento-asym {
    grid-template-columns: 1fr;
  }
}

/* ── Decorative motifs ── */
.motif-paisley {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
}

/* ── Image placeholder swatches ── */
.imgblock {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--primary-soft);
  display: flex;
  align-items: flex-end;
  padding: var(--space-3);
  transition: filter var(--dur-slow) var(--ease-out);
}
.imgblock:hover { filter: brightness(1.07) saturate(1.12); }
.imgblock-label {
  position: relative;
  z-index: 2;
  color: rgba(255,255,255,0.95);
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.imgblock::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.16) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(0,0,0,0.20) 0%, transparent 50%);
  z-index: 1;
}

/* gradient variants */
.g-paddy  { background: linear-gradient(135deg, #4A8B5A 0%, #1B4E30 100%); }
.g-river  { background: linear-gradient(160deg, #79B0CB 0%, #2D5F7C 60%, #1A3D52 100%); }
.g-temple { background: linear-gradient(165deg, #D6864A 0%, #8E3A1F 80%); }
.g-mosque { background: linear-gradient(150deg, #6E8C7A 0%, #2F4D3D 90%); }
.g-bazaar { background: linear-gradient(150deg, #E5B043 0%, #B97A1F 70%, #6A4310 100%); }
.g-port   { background: linear-gradient(180deg, #5C6A78 0%, #2A323B 90%); }
.g-music  { background: linear-gradient(150deg, #6B4E8A 0%, #2C1F4A 90%); }
.g-bridge { background: linear-gradient(135deg, #8AA0B0 0%, #3B4D5C 90%); }
.g-field  { background: linear-gradient(160deg, #C3CD6F 0%, #5E7A2B 80%); }
.g-night  { background: linear-gradient(180deg, #2A4669 0%, #0E1A2A 100%); }

/* image-slot tweak */
image-slot {
  background: var(--primary-soft);
  border-color: var(--rule-strong) !important;
}

/* ── Underline link ── */
.ulink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-sans);
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: left bottom;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size var(--dur-slow) var(--ease-out), gap var(--dur-base) var(--ease-out);
}
.ulink:hover { background-size: 100% 1px; gap: 10px; }

/* ── Star rating ── */
.stars { display: inline-flex; gap: 2px; color: var(--gold-deep); }
.stars svg { width: 14px; height: 14px; }

/* ── Section header ── */
.sect-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: var(--space-6);
  gap: var(--space-5);
  flex-wrap: wrap;
}
.sect-head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.sect-head p {
  margin: 10px 0 0;
  color: var(--ink-2);
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.7;
}
.sect-head .eyebrow { margin-bottom: var(--space-2); }

/* ── Grids ── */
.grid   { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-4); }
}

/* ── Selection ── */
::selection { background: var(--gold-soft); color: var(--ink); }

/* ── Grain texture ── */
.has-grain { position: relative; }
.has-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.44;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .25 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-dark="true"] .has-grain::after { opacity: 0.22; }

/* ── Breadcrumb ── */
.plc-crumb {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-4);
}
.plc-crumb a { cursor: pointer; }
.plc-crumb a:hover { color: var(--ink); }

.plc-more { display: flex; justify-content: center; margin-top: var(--space-6); }

/* ── Global smooth behaviour ── */
html { scroll-behavior: smooth; }
*, *::before, *::after {
  transition-timing-function: var(--ease-out);
}

a       { transition: color var(--dur-base) ease, opacity var(--dur-base) ease; }
button  {
  transition:
    background var(--dur-base) ease,
    color var(--dur-base) ease,
    border-color var(--dur-base) ease,
    transform var(--dur-fast) var(--ease-spring),
    box-shadow var(--dur-base) ease,
    opacity var(--dur-base) ease;
}
button:active,
.btn:active,
[role="button"]:active { transform: scale(0.96) !important; }

input, select, textarea {
  transition:
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease,
    background var(--dur-base) ease;
}

/* ── Page transitions — cinematic ──
   No `both`/`forwards` fill-mode: Chromium keeps the computed `transform`
   as an identity matrix (not literal `none`) for as long as an animation's
   fill-mode holds its end state, even when the end keyframe is
   `transform: none`. Any non-`none` transform on an ancestor opens a new
   containing block for `position: fixed` descendants, which was silently
   hijacking every fixed-position modal overlay on the page (they rendered
   pinned to this element's box instead of the viewport once the user had
   scrolled). Default fill-mode (none) releases the transform back to the
   stylesheet's un-animated value once the animation ends, closing that
   trap; `animation-delay` is 0 here so there is no pre-start frame that
   would have needed `backwards` fill. */
.page-enter {
  animation: pageIn var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1);
}
.page-exit {
  animation: pageOut 0.20s var(--ease-in) both;
  pointer-events: none;
}
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.982);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
@keyframes pageOut {
  from { opacity: 1; transform: none; filter: none; }
  to   { opacity: 0; transform: translateY(-14px) scale(0.982); filter: blur(5px); }
}

/* ── Card spring hover ── */
.card,
.upz-biz,
.upz-place-card,
.upz-famous-card,
.upz-transport-card,
.upz-other-card,
.trn-leg-card,
.svc-full-card,
.trn-dest-card,
.trn-alt,
.trn-result {
  transition:
    transform 0.32s var(--ease-spring),
    box-shadow 0.26s ease,
    border-color 0.22s ease !important;
}

/* ── Reveal animations ── */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition:
    opacity var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1),
    transform var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-in { opacity: 1; transform: translateY(0) scale(1); }

.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition:
    opacity var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1),
    transform var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.is-in { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition:
    opacity var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1),
    transform var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.is-in { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.93);
  transition:
    opacity 0.60s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.60s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.is-in { opacity: 1; transform: scale(1); }

.reveal-fade {
  opacity: 0;
  transition: opacity 0.55s ease;
}
.reveal-fade.is-in { opacity: 1; }

.reveal-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1),
    transform var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.is-in { opacity: 1; transform: translateY(0); }

.reveal-down {
  opacity: 0;
  transform: translateY(-20px);
  transition:
    opacity var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1),
    transform var(--dur-slower) cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-down.is-in { opacity: 1; transform: translateY(0); }

/* ── Shimmer / skeleton ── */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-elev) 25%,
    var(--rule) 37%,
    var(--bg-elev) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.7s ease-in-out infinite;
}
.skeleton       { border-radius: var(--r-sm); }
.skeleton-text  { height: 1em; border-radius: 4px; margin-bottom: 0.5em; }
.skeleton-img   { aspect-ratio: 4/3; }
.skeleton-circle{ aspect-ratio: 1; border-radius: 50%; }

/* ── Float animation ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes float-sm {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}
.animate-float      { animation: float 4s ease-in-out infinite; }
.animate-float-slow { animation: float 6s ease-in-out infinite; }
.animate-float-sm   { animation: float-sm 3s ease-in-out infinite; }

/* ── Kinetic marquee ── */
.marquee-track {
  overflow: hidden;
  display: flex;
  white-space: nowrap;
  cursor: default;
}
.marquee-inner {
  display: flex;
  gap: var(--space-7);
  animation: marquee 22s linear infinite;
  will-change: transform;
}
.marquee-track:hover .marquee-inner { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Ornament divider ── */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  color: var(--gold);
  font-size: 13px;
  margin: var(--space-7) 0;
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-soft), transparent);
}
.ornament-divider > svg { flex-shrink: 0; }

.rule-divider {
  border: none;
  height: 1px;
  background: var(--rule);
  margin: var(--space-6) 0;
}

/* ── Stagger helpers ── */
.stagger > *:nth-child(1) { transition-delay:   0ms; }
.stagger > *:nth-child(2) { transition-delay:  45ms; }
.stagger > *:nth-child(3) { transition-delay:  90ms; }
.stagger > *:nth-child(4) { transition-delay: 135ms; }
.stagger > *:nth-child(5) { transition-delay: 180ms; }
.stagger > *:nth-child(6) { transition-delay: 225ms; }
.stagger > *:nth-child(7) { transition-delay: 270ms; }
.stagger > *:nth-child(8) { transition-delay: 315ms; }
.stagger > *:nth-child(9) { transition-delay: 360ms; }

/* ── Scroll snap carousels ── */
.hscroll-track {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.hscroll-track > * { scroll-snap-align: start; }

/* ── Pulse animations ── */
@keyframes pulse-d {
  0%   { box-shadow: 0 0 0 0 rgba(107, 214, 138, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(107, 214, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(107, 214, 138, 0); }
}

/* ── Pill hover (global) ── */
.pill {
  transition:
    background var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-spring);
}

/* ── On-dark utilities ── */
.on-dark .eyebrow { color: var(--gold); }
.on-dark .eyebrow::before { background: var(--gold); opacity: 0.7; }

/* ── Prose utility ── */
.prose {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink-2);
  max-width: 64ch;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose em     { font-style: italic; color: var(--ink); }

/* ── Focus ring ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}
.card:focus-visible         { outline-offset: 4px; border-radius: var(--r-lg); }
.pill:focus-visible         { outline-offset: 3px; border-radius: var(--r-pill); }
.btn:focus-visible          { outline-offset: 3px; border-radius: var(--r-pill); }
.hdr-nav-link:focus-visible { outline-offset: 3px; border-radius: var(--r-pill); }
.hdr-drop-upz:focus-visible { outline-offset: 2px; border-radius: var(--r-sm); }

/* ── Pill active state ── */
.pill:active { transform: scale(0.94) !important; }

/* ── Disabled states ── */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.46;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Display text balance ── */
h1, h2, h3, .display, .display-xl, .display-lg, .display-md, .display-sm,
.heading-xl, .heading-lg, .heading-md {
  text-wrap: balance;
}
p { text-wrap: pretty; }

/* ── Bengali script sizes ── */
.bn-lg { font-family: var(--f-bn); font-size: 1.15em; line-height: 1.5; }
.bn-sm { font-family: var(--f-bn); font-size: 0.88em; line-height: 1.6; }

/* ── Gradient spot-border card ── */
.card-spot {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  transition:
    transform 0.32s var(--ease-spring),
    box-shadow 0.26s ease;
}
.card-spot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from 180deg at 50% 50%,
    transparent 0deg,
    var(--gold-soft) 60deg,
    transparent 120deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.30s ease;
  pointer-events: none;
}
.card-spot:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-spot:hover::before { opacity: 1; }

/* ── Auto OS dark mode ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-dark="false"]) {
    --bg:          #141618;
    --bg-elev:     #1B1E22;
    --paper:       #1E2126;
    --ink:         #EAE4D4;
    --ink-2:       #BAB5A5;
    --ink-3:       #888472;
    --rule:        rgba(234, 228, 212, 0.11);
    --rule-strong: rgba(234, 228, 212, 0.22);
    --primary-soft:    rgba(37, 101, 60, 0.17);
    --river-soft:      rgba(38, 87, 120, 0.22);
    --gold-soft:       rgba(195, 146, 74, 0.17);
    --gold-deep:       #D2A652;
    --gold-glow:       rgba(210, 166, 82, 0.20);
    --terracotta-soft: rgba(176, 56, 51, 0.22);
    --shadow-xs:   0 1px 2px rgba(0,0,0,.18);
    --shadow-sm:   0 1px 3px rgba(0,0,0,.22), 0 1px 2px rgba(0,0,0,.14);
    --shadow:      0 4px 16px -4px rgba(0,0,0,.40), 0 2px 6px -2px rgba(0,0,0,.24);
    --shadow-md:   0 8px 24px -8px rgba(0,0,0,.46), 0 3px 8px -3px rgba(0,0,0,.28);
    --shadow-lg:   0 20px 48px -12px rgba(0,0,0,.54), 0 8px 20px -8px rgba(0,0,0,.36);
    --shadow-xl:   0 40px 80px -20px rgba(0,0,0,.62), 0 16px 40px -12px rgba(0,0,0,.42);
    --shadow-diffuse: 0 20px 40px -15px rgba(0,0,0,.32);
  }
  :root:not([data-dark="false"]) ::selection {
    background: var(--primary);
    color: #FFFDEE;
  }
  :root:not([data-dark="false"]) .has-grain::after { opacity: 0.22; }
  :root:not([data-dark="false"]) .trn-tips {
    background: #111316 !important;
    color: #EAE4D4 !important;
  }
  :root:not([data-dark="false"]) .trn-tips li {
    color: rgba(234, 228, 212, 0.82) !important;
  }
  :root:not([data-dark="false"]) .trn-mode button.is-active {
    background: #2A3140 !important;
    color: #EAE4D4 !important;
  }
  :root:not([data-dark="false"]) .trn-swap:hover {
    background: #2A3140 !important;
    color: #EAE4D4 !important;
  }
}

/* ── Dark mode selection ── */
[data-dark="true"] ::selection {
  background: var(--primary);
  color: #FFFDEE;
}

/* ── Dark mode: keep "inverted ink" sections always dark ──
   These sections use background:var(--ink). In light mode --ink is dark, fine.
   In dark mode --ink flips to cream (#EAE4D4), making hardcoded cream text invisible.
   Override to a fixed dark so cream text remains visible. ── */
[data-dark="true"] .ticker,
[data-dark="true"] .food-strip,
[data-dark="true"] .prc-stats-row,
[data-dark="true"] .evt-sponsor-banner {
  background: #111316 !important;
  color: #EAE4D4 !important;
}
[data-dark="true"] .gov-bottom-strip,
[data-dark="true"] .svc-help-banner {
  background: #111316 !important;
}
[data-dark="true"] .trn-tips {
  background: #111316 !important;
  color: #EAE4D4 !important;
}
[data-dark="true"] .trn-tips li {
  color: rgba(234, 228, 212, 0.82) !important;
}
[data-dark="true"] .trn-mode button.is-active {
  background: #2A3140 !important;
  color: #EAE4D4 !important;
}
[data-dark="true"] .trn-swap:hover {
  background: #2A3140 !important;
  color: #EAE4D4 !important;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-fade,
  .reveal-up, .reveal-down,
  .reveal.is-in, .reveal-left.is-in, .reveal-right.is-in,
  .reveal-scale.is-in, .reveal-fade.is-in,
  .reveal-up.is-in, .reveal-down.is-in {
    opacity: 1;
    transform: none;
  }
  .page-enter, .page-exit { animation: none !important; }
}

/* ── Bangla mode: apply Hind Siliguri globally ── */
[lang="bn"], .bangla-text, .bn-text { font-family: 'Hind Siliguri', sans-serif; }
body.lang-bn, body.lang-bn * { font-family: 'Hind Siliguri', sans-serif; }
