/**
 * Bangladesh Bank Notes Viewer - Public Styles ("Dark Museum")
 *
 * File: assets/css/custom-style.css
 * Description: Dark exhibit-style theme: spotlit 3D stage, glass panels,
 *              gold accents, tilt cards and engraved guilloché background.
 */

/* ===================================
   Tokens
   =================================== */
:root {
  /* Surfaces */
  --ink: #030a07;
  --ink-2: #06130e;
  --ink-3: #0a1d16;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(10, 29, 22, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #e9efe9;
  --text-soft: #c3cfc7;
  --muted: #8a9d93;

  /* Accents */
  --gold: #d9b56c;
  --gold-2: #f3dca3;
  --gold-dim: rgba(217, 181, 108, 0.18);
  --green: #1fae7a;
  --bd-green: #006a4e;
  --bd-red: #f42a41;

  /* Shape & motion */
  --radius-lg: 28px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.6);

  --font-sans: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces Variable", "Fraunces", Georgia, "Times New Roman", serif;

  --nav-h: 68px;

  /* Cursor spotlight position (updated by JS) */
  --mx: 50vw;
  --my: 30vh;
}

/* ===================================
   Surface tokens (base values; the Quiet theme in quiet.css overrides them)
   =================================== */
:root {
  --bg: #030a07;
  --page-bg:
    radial-gradient(1200px 700px at 50% -10%, rgba(31, 174, 122, 0.12), transparent 60%),
    radial-gradient(900px 600px at 100% 40%, rgba(217, 181, 108, 0.06), transparent 60%),
    linear-gradient(180deg, #06130e 0%, #030a07 55%);
  --on-accent: #030a07;
  --heading-grad: linear-gradient(100deg, #f3dca3 0%, #d9b56c 45%, #b8893a 100%);
  --guilloche-a: rgba(217, 181, 108, 0.9);
  --guilloche-b: rgba(31, 174, 122, 0.9);
  --guilloche-opacity: 0.07;
  --spotlight: rgba(243, 220, 163, 0.07);
  --nav-bg: rgba(3, 10, 7, 0.55);
  --nav-bg-scrolled: rgba(3, 10, 7, 0.82);
  --brand-mark-bg: linear-gradient(145deg, #006a4e, #003b2b);
  --brand-mark-glow: rgba(31, 174, 122, 0.6);
  --hero-bg: radial-gradient(900px 420px at 50% 0%, rgba(217, 181, 108, 0.07), transparent 70%);
  --stage-bg: radial-gradient(ellipse 70% 60% at 50% 40%, #0f2a20 0%, #07150f 55%, #030a07 100%);
  --stage-light: rgba(243, 220, 163, 0.16);
  --stage-floor: rgba(0, 0, 0, 0.75);
  --glass: rgba(3, 10, 7, 0.45);
  --btn-hover-bg: rgba(255, 255, 255, 0.08);
  --toolbar-bg: rgba(6, 19, 14, 0.78);
  --accent-shadow: rgba(217, 181, 108, 0.6);
  --accent-ring: rgba(217, 181, 108, 0.12);
  --field-bg: rgba(255, 255, 255, 0.04);
  --field-bg-focus: rgba(255, 255, 255, 0.06);
  --card-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  --card-shadow: rgba(0, 0, 0, 0.8);
  --card-glare: rgba(255, 255, 255, 0.16);
  --card-image-bg: radial-gradient(ellipse at 50% 35%, rgba(243, 220, 163, 0.09), transparent 70%);
  --img-shadow: rgba(0, 0, 0, 0.55);
  --footer-bg: rgba(0, 0, 0, 0.25);
  --loading-bg: #06130e;
  --option-bg: #0a1d16;
}

/* ===================================
   Base
   =================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background:
var(--page-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold-2);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

::selection {
  background: var(--gold);
  color: var(--on-accent);
}

kbd {
  display: inline-block;
  padding: 0 6px;
  margin: 0 1px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  font: 600 0.7rem/1.5 var(--font-sans);
  color: var(--text-soft);
  background: var(--field-bg);
}

.container {
  max-width: 1240px;
  padding-left: 20px;
  padding-right: 20px;
}

/* ===================================
   Ambient background
   =================================== */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Fine engraved rings, like banknote guilloché */
.ambient-guilloche {
  position: absolute;
  inset: -20%;
  opacity: var(--guilloche-opacity);
  background:
    repeating-radial-gradient(circle at 20% 30%, transparent 0 22px, var(--guilloche-a) 22px 23px),
    repeating-radial-gradient(circle at 80% 70%, transparent 0 26px, var(--guilloche-b) 26px 27px);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 0%, transparent 70%);
  animation: guilloche-drift 60s linear infinite alternate;
}

@keyframes guilloche-drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to   { transform: translate3d(-4%, 3%, 0) rotate(6deg); }
}

.ambient-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--mx) var(--my), var(--spotlight), transparent 70%);
  transition: background 0.1s linear;
}

/* ===================================
   Navigation
   =================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-nav.scrolled {
  border-bottom-color: var(--line);
  background: var(--nav-bg-scrolled);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  min-width: 0;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-mark-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 18px -6px var(--brand-mark-glow);
}

.brand-mark img {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link-pill {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-link-pill:hover {
  color: var(--text);
  background: var(--panel);
}

.nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  border: 1px solid var(--line);
}

.nav-icon:hover {
  color: var(--gold-2);
  border-color: var(--gold-dim);
  background: var(--panel);
}

/* ===================================
   Hero
   =================================== */
/* Intro / about block - sits below the collection so the viewer leads */
.hero {
  position: relative;
  padding: 88px 0 96px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--hero-bg);
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-title {
  margin: 0 auto 18px;
  max-width: 900px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-title em {
  font-style: italic;
  background: var(--heading-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  margin: 0 auto 34px;
  max-width: 620px;
  font-size: 1.08rem;
  color: var(--text-soft);
}

.hero-stats {
  display: inline-flex;
  gap: 0;
  padding: 8px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 28px;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ===================================
   3D Stage
   =================================== */
.stage-section {
  padding: 28px 0 64px;
}

.stage {
  position: relative;
  height: clamp(400px, 64vh, 660px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    var(--stage-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.5s ease;
  isolation: isolate;
}

/* Overhead spotlight cone */
.stage-glow {
  position: absolute;
  left: 50%;
  top: -30%;
  width: 90%;
  height: 120%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 55% at 50% 30%, var(--stage-light), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: glow-breathe 7s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* Soft pool of light / shadow under the note */
.stage-floor {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: 56%;
  height: 60px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--stage-floor), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

#viewer-3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: grab;
  touch-action: pan-y;
}

#viewer-3d:active {
  cursor: grabbing;
}

#viewer-3d canvas {
  display: block;
}

/* Prev / next */
.stage-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 1.2rem;
  background: var(--glass);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.stage-nav:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-accent);
}

.stage-prev { left: 20px; }
.stage-next { right: 20px; }
.stage-prev:hover { transform: translateX(-3px); }
.stage-next:hover { transform: translateX(3px); }

/* Museum placard */
.placard {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 3;
  max-width: min(380px, calc(100% - 48px));
  padding: 16px 20px 16px 22px;
  border-radius: var(--radius);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.placard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(var(--gold-2), var(--gold));
}

.placard-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.placard-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 4px 0 2px;
  color: var(--text);
}

.placard-meta {
  font-size: 0.88rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.placard-meta .dot {
  color: var(--muted);
  margin: 0 4px;
}

/* Controls */
.viewer-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.btn-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--text-soft);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-control .icon {
  font-size: 1.05rem;
}

.btn-control:hover {
  background: var(--btn-hover-bg);
  color: var(--text);
}

.btn-control:active {
  transform: scale(0.94);
}

.btn-control[aria-pressed="true"] {
  background: var(--gold);
  color: var(--on-accent);
}

.stage-hint {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-soft);
  background: var(--glass);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out);
}

.stage-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
}

/* Loader */
.viewer-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--loading-bg);
  color: var(--muted);
  transition: opacity 0.6s ease, visibility 0.6s;
}

.viewer-loading.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fullscreen */
.stage:fullscreen {
  height: 100vh;
  border-radius: 0;
  border: 0;
}

.stage:-webkit-full-screen {
  height: 100vh;
  border-radius: 0;
}

/* ===================================
   Gallery
   =================================== */
.gallery-section {
  padding: 24px 0 96px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.015em;
  color: var(--text);
}

.results-pill {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.results-pill strong {
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

/* Sticky toolbar */
.toolbar {
  position: sticky;
  top: calc(var(--nav-h) + 8px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  margin-bottom: 26px;
  border-radius: 20px;
  background: var(--toolbar-bg);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow);
}

.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s var(--ease-out);
}

.chip:not([data-filter="*"])::before {
  content: "৳";
  margin-right: 2px;
  opacity: 0.6;
}

.chip:hover {
  border-color: var(--gold-dim);
  color: var(--text);
  transform: translateY(-1px);
}

.chip.active {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-color: transparent;
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 6px 18px -6px var(--accent-shadow);
}

.toolbar-row {
  display: flex;
  gap: 10px;
}

.search-field,
.select-field {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  height: 44px;
  border-radius: 12px;
  background: var(--field-bg);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-field {
  flex: 1 1 auto;
}

.select-field {
  flex: 0 0 220px;
}

.search-field:focus-within,
.select-field:focus-within {
  border-color: var(--gold);
  background: var(--field-bg-focus);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.search-field .icon,
.select-field .icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}

.search-field input,
.select-field select {
  width: 100%;
  height: 100%;
  padding: 0 14px 0 40px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
}

.search-field input::placeholder {
  color: var(--muted);
}

.select-field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%238a9d93' d='M1.6 5.2 8 11.6l6.4-6.4-1.2-1.2L8 9.2 2.8 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.select-field select option {
  background: var(--option-bg);
  color: var(--text);
}

/* Grid (Isotope fitRows; % widths fill the row evenly) */
.gallery-grid {
  margin: 0 -9px;
  min-height: 200px;
}

.banknote-card {
  width: 20%;
  padding: 9px;
  cursor: pointer;
  perspective: 900px;
}

.card-inner {
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 50%;
  position: relative;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--line);
  overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out), border-color 0.3s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.banknote-card:hover .card-inner {
  border-color: var(--gold-dim);
  box-shadow: 0 22px 50px -18px var(--card-shadow), 0 0 0 1px var(--gold-dim);
  transition: transform 0.12s linear, border-color 0.3s ease, box-shadow 0.4s ease;
}

.banknote-card.is-current .card-inner {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 18px 40px -16px var(--accent-shadow);
}

/* Moving glare that follows the cursor */
.card-glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--gx) var(--gy), var(--card-glare), transparent 60%);
  transition: opacity 0.3s ease;
}

.banknote-card:hover .card-glare {
  opacity: 1;
}

.card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  padding: 16px 14px;
  background: var(--card-image-bg);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px var(--img-shadow));
  transform: translateZ(30px);
  transition: transform 0.5s var(--ease-out);
}

.banknote-card:hover .card-image img {
  transform: translateZ(30px) scale(1.06);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding-bottom: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.banknote-card:hover .card-overlay,
.banknote-card:focus-visible .card-overlay {
  opacity: 1;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--gold-2);
  transform: translateY(6px);
  transition: transform 0.35s var(--ease-out);
}

.banknote-card:hover .view-btn {
  transform: translateY(0);
}

.card-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px 13px;
  border-top: 1px solid var(--line);
}

.card-denomination {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold-2);
  line-height: 1;
}

/* Taka sign: the display serif has no ৳ glyph, so use a font that does */
.tk {
  font-family: "Nirmala UI", "Noto Sans Bengali", "Vrinda", var(--font-sans);
  font-weight: 500;
  font-size: 0.85em;
  margin-right: 1px;
  opacity: 0.85;
}

.card-year {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-badge {
  display: none;
}

.loading-message,
.no-results-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 16px;
  color: var(--muted);
  text-align: center;
  width: 100%;
}

.no-results-message .icon {
  font-size: 2.6rem;
  color: var(--gold);
}

.no-results-message h4 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0;
}

.empty-filter {
  display: none;
  padding: 56px 16px;
  text-align: center;
  color: var(--muted);
}

.empty-filter.show {
  display: block;
}

.empty-filter .icon {
  display: block;
  font-size: 2.4rem;
  color: var(--gold);
  margin-bottom: 8px;
}

/* ===================================
   Footer
   =================================== */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 28px;
  background: var(--footer-bg);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-heading {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-text {
  margin: 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

/* ===================================
   Reveal (JS adds .is-in; without JS everything stays visible)
   =================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1199px) {
  .banknote-card { width: 25%; }
}

@media (max-width: 991px) {
  .banknote-card { width: 33.333%; }
  .nav-link-pill { display: none; }
}

@media (max-width: 767px) {
  :root { --nav-h: 60px; }

  .hero { padding: 56px 0 64px; }
  .stage-section { padding: 16px 0 44px; }
  .hero-lede { font-size: 1rem; }

  .stat { padding: 8px 14px; }
  .stat-num { font-size: 1.5rem; }
  .stat-label { font-size: 0.64rem; }

  .stage {
    height: 440px;
    border-radius: 20px;
  }

  .stage-nav {
    width: 40px;
    height: 40px;
    margin-top: -40px;
  }

  .stage-prev { left: 10px; }
  .stage-next { right: 10px; }

  .placard {
    left: 12px;
    right: 12px;
    top: 12px;
    bottom: auto;
    max-width: none;
    padding: 12px 16px 12px 18px;
  }

  .placard-title { font-size: 1.1rem; }

  .viewer-controls {
    left: 50%;
    right: auto;
    bottom: 14px;
    transform: translateX(-50%);
  }

  .btn-control {
    padding: 0 12px;
  }

  .btn-control span { display: none; }

  .stage-hint { display: none; }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar { position: relative; top: auto; padding: 10px; border-radius: 16px; }

  .toolbar-row { flex-direction: column; }

  .select-field { flex-basis: auto; }

  .banknote-card { width: 50%; padding: 6px; }
  .gallery-grid { margin: 0 -6px; }

  .card-info { padding: 8px 10px 10px; }
  .card-denomination { font-size: 1.1rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 420px) {
  .brand-sub { display: none; }
  .brand-title { font-size: 0.98rem; }
}

/* Touch devices: no hover tilt, keep the overlay hidden */
@media (hover: none) {
  .card-overlay { display: none; }
}

/* ===================================
   Reduced motion
   =================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Inline SVG icons (sprite in index.php) - sized by font-size like the old icon font */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
  vertical-align: -0.125em;
}
.empty-filter .icon { margin: 0 auto 8px; }

/* ---------------------------------------------------------------
   Minimal base (replaces the parts of Bootstrap the public page used)
   --------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.5rem; font-weight: 500; line-height: 1.2; }
p { margin-top: 0; margin-bottom: 1rem; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; }
label { display: inline-block; }
svg { overflow: hidden; }
.container { width: 100%; margin-left: auto; margin-right: auto; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
