/* frontend/css/tokens.css — BlankUp cinematic editorial design tokens
   Reference language: warm paper / ink / champagne gold, serif display +
   sans body + mono technical labels. Fonts are self-hosted (vietnamese +
   latin subsets) so pages work offline-first and satisfy font-src 'self'.
   Loaded BEFORE page stylesheets; pages map their own vars onto these. */

/* ---------- Be Vietnam Pro (identity sans — vietnamese + latin) ---------- */

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-400-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-500-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-600-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-700-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-800-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/BeVietnamPro-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Playfair Display (display serif) ---------- */
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/PlayfairDisplay-500-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/PlayfairDisplay-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/PlayfairDisplay-600-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Playfair Display'; font-style: normal; font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/PlayfairDisplay-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display'; font-style: italic; font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/PlayfairDisplay-500i-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Playfair Display'; font-style: italic; font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/PlayfairDisplay-500i-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Shared tokens (light editorial default) ---------- */
:root {
  --bk-paper: #f5f2eb;
  --bk-paper-2: #fffdf8;
  --bk-paper-3: #ece4d3;
  --bk-ink: #0f0c09;
  --bk-ink-2: #1d1b18;
  --bk-gold: #c19856;
  --bk-gold-deep: #a37c3a;
  --bk-gold-text: #7d5f2c; /* Darker gold for text on light backgrounds - meets WCAG AA 4.5:1 */
  --bk-gold-soft: rgba(193, 152, 86, 0.14);
  --bk-champagne: #ead9c0;
  --bk-body: #3f3830;
  --bk-muted: #6d6358;
  --bk-faint: #8e7657;
  --bk-line: rgba(15, 12, 9, 0.14);
  --bk-line-soft: rgba(15, 12, 9, 0.08);
  --bk-card: #fffdf8;
  --bk-shadow: 0 1px 0 rgba(15, 12, 9, 0.04), 0 16px 40px rgba(15, 12, 9, 0.1);
  --bk-shadow-lg: 0 2px 0 rgba(15, 12, 9, 0.04), 0 28px 70px rgba(15, 12, 9, 0.16);
  --bk-success: #4a5a3f;
  --bk-error: #a3341f;
  --bk-warning: #a3711f;
  --bk-info: #4f6a8a;

  --bk-font-display: 'Playfair Display', 'Noto Serif', Georgia, serif;
  --bk-font-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bk-font-mono: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; /* 'mono' role = BVP + tabular-nums (DM Mono lacked VN glyphs) */

  /* ---------- Type scale (rem, 1rem = 16px) ----------
     floor: caption 0.8125rem; body ≥ 1rem; inputs ≥ 1rem (iOS zoom);
     Vietnamese headings LH ≥ 1.2 (stacked diacritics need air). */
  --fs-overline: 0.75rem;   /* 12px — badges/kickers, +0.14em, uppercase */
  --fs-caption: 0.8125rem;  /* 13px — meta, labels floor */
  --fs-body-sm: 0.9375rem;  /* 15px — nav links, compact UI */
  --fs-body: 1rem;          /* 16px — body, inputs, buttons */
  --fs-body-lg: 1.125rem;   /* 18px — lead paragraphs */
  --fs-h3: 1.1875rem;       /* 19px — card/panel titles */
  --fs-h2: 1.5rem;          /* 24px — section titles */
  --fs-h1: 2.25rem;         /* 36px — page titles */
  --fs-display: clamp(2.75rem, 7vw, 5.5rem); /* hero */

  /* Tabular numerals for prices/stats/orders */
  --font-tabular: "Be Vietnam Pro", system-ui, sans-serif;

  --bk-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --bk-ease-spring: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-index scale (systemic layers only) */
  --bk-z-grain: 2000;
  --bk-z-cursor: 2100;
  --bk-z-progress: 1900;
  --bk-z-nav: 1000;
  --bk-z-modal: 1500;
  --bk-z-toast: 2200;
}

/* Dark editorial variant — toggled via <html data-theme="dark"> */
[data-theme="dark"] {
  --bk-paper: #14110d;
  --bk-paper-2: #1d1b18;
  --bk-paper-3: #26221c;
  --bk-ink: #f5f2eb;
  --bk-ink-2: #ece4d3;
  --bk-gold: #d5b178;
  --bk-gold-deep: #c19856;
  --bk-gold-text: #d5b178; /* In dark mode, gold-text is the bright gold */
  --bk-gold-soft: rgba(213, 177, 120, 0.16);
  --bk-champagne: #3a3227;
  --bk-body: #cfc6b4;
  --bk-muted: #a89c85;
  --bk-faint: #8e7657;
  --bk-line: rgba(245, 242, 235, 0.14);
  --bk-line-soft: rgba(245, 242, 235, 0.08);
  --bk-card: #1d1b18;
  --bk-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.4);
  --bk-shadow-lg: 0 2px 0 rgba(0, 0, 0, 0.4), 0 28px 70px rgba(0, 0, 0, 0.5);
}

/* ---------- Shared cinematic utilities ---------- */

/* Film grain — fixed, pointer-events-free, GPU-cheap (painted once) */
.bk-grain::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--bk-z-grain);
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
[data-theme="dark"] .bk-grain::after {
  opacity: 0.07;
  mix-blend-mode: screen;
}

/* ---------- Typography utilities (site-wide) ----------
   .u-tabular — prices, stats, order ids: aligned digits
   .u-prose   — long-form paragraphs: 65ch measure, balanced headings */
.u-tabular {
  font-family: var(--font-tabular);
  font-variant-numeric: tabular-nums;
}

.u-prose {
  max-width: 65ch;
}

.u-prose h1,
.u-prose h2,
.u-prose h3 {
  text-wrap: balance;
}

/* Vietnamese needs air: never LH 1.0 on headings with stacked marks.
   Applied globally — display sizes opt out explicitly below. */
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* Trailing gold ring — follows the pointer, never hides the native cursor */
.bk-cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--bk-z-cursor);
  width: 14px;
  height: 14px;
  border: 1px solid var(--bk-gold);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.35s ease, transform 0.35s var(--bk-ease-out),
    background-color 0.35s ease;
}
.bk-cursor-ring.is-on { opacity: 0.85; }
.bk-cursor-ring.is-hot {
  width: 52px;
  height: 52px;
  background: rgba(193, 152, 86, 0.12);
}
@media (hover: none), (pointer: coarse) {
  .bk-cursor-ring { display: none; }
}

/* Scroll reveal — clip + rise, GPU only */
.rv {
  opacity: 0;
  transform: translateY(34px);
  clip-path: inset(8% 0);
  transition: opacity 0.9s var(--bk-ease-out), transform 1s var(--bk-ease-out),
    clip-path 1s var(--bk-ease-out);
}
.rv.in-view {
  opacity: 1;
  transform: none;
  clip-path: inset(0);
}

/* Editorial eyebrow label (use sparingly — max 1 per 3 sections) */
.bk-eyebrow {
  font-family: var(--bk-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bk-gold-deep);
}
[data-theme="dark"] .bk-eyebrow { color: var(--bk-gold); }

/* Italic serif accent inside headlines */
.bk-accent-i {
  font-style: italic;
  font-weight: 500;
  color: var(--bk-gold-deep);
}
[data-theme="dark"] .bk-accent-i { color: var(--bk-gold); }

/* Magnetic pull — JS sets transform, CSS owns the easing */
.magnetic {
  will-change: transform;
  transition: transform 0.5s var(--bk-ease-out), background-color 0.35s ease,
    color 0.35s ease, border-color 0.35s ease, box-shadow 0.4s ease;
}
.magnetic:active { transform: scale(0.98); }

/* Skip link */
.bk-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--bk-z-toast);
  background: var(--bk-ink);
  color: var(--bk-paper);
  padding: 10px 18px;
  font-family: var(--bk-font-mono);
  font-size: 0.75rem;
}
.bk-skip-link:focus { left: 0; }

/* Shared focus + selection */
.bk-focus-scope :focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--bk-gold);
  outline-offset: 2px;
}
::selection {
  background: var(--bk-gold);
  color: #fffdf8;
}

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
  .bk-cursor-ring { display: none !important; }
  .magnetic { transition: none !important; }
  html { scroll-behavior: auto !important; }
}

/* ============================================================
   HARDEN — Production-ready utilities (text overflow, i18n, edge cases)
   ============================================================ */

/* Text overflow & wrapping */
.bk-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bk-line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bk-line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bk-wrap {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Flex/Grid overflow prevention */
.bk-flex-item {
  min-width: 0;
  overflow: hidden;
}

.bk-grid-item {
  min-width: 0;
  min-height: 0;
}

/* Responsive text sizing - minimum 16px for body to prevent iOS zoom */
.bk-body-text {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
}

/* RTL support - logical properties */
[dir="rtl"] .bk-rtl-flip { transform: scaleX(-1); }
[dir="rtl"] .bk-rtl-margin-start { margin-inline-start: 16px; margin-inline-end: 0; }
[dir="rtl"] .bk-rtl-padding { padding-inline: 16px; }
[dir="rtl"] .bk-rtl-border-end { border-inline-end: 1px solid var(--bk-line); }

/* Focus visible enhancement for accessibility */
:focus-visible {
  outline: 2px solid var(--bk-gold);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (forced-colors: active) {
  .bk-card { border: 1px solid CanvasText; }
  .bk-btn-primary { border: 2px solid CanvasText; }
  .bk-focus-scope :focus-visible,
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  summary:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }
}

/* Screen reader only */
.bk-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Empty state */
.bk-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  color: var(--bk-muted, #6d6358);
  overflow-wrap: anywhere;
  min-width: 0;
}

.bk-empty-state svg { margin-bottom: 16px; opacity: 0.6; }
.bk-empty-state-title { font-size: 1.1rem; margin-bottom: 8px; color: var(--bk-ink, #0f0c09); overflow-wrap: anywhere; }
.bk-empty-state-desc { font-size: 0.9rem; max-width: 280px; overflow-wrap: anywhere; }

/* Loading skeleton */
.bk-skeleton {
  background: linear-gradient(90deg, var(--bk-card, #fffdf8) 25%, var(--bk-line-soft, rgba(15,12,9,0.08)) 50%, var(--bk-card, #fffdf8) 75%);
  background-size: 200% 100%;
  animation: bk-shimmer 1.4s linear infinite;
  border-radius: 3px;
}

@keyframes bk-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bk-skeleton { animation: none !important; background: var(--bk-line-soft, rgba(15,12,9,0.08)); }
}

/* Error state */
.bk-error-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bk-error, #a3341f);
  font-size: 0.8rem;
  font-family: var(--bk-font-mono);
  margin-top: 4px;
  overflow-wrap: anywhere;
  min-width: 0;
}

.bk-error-inline svg { flex-shrink: 0; }

/* Form field error state */
.bk-field-error input,
.bk-field-error textarea,
.bk-field-error select {
  border-color: var(--bk-error, #a3341f) !important;
}

.bk-field-error input:focus,
.bk-field-error textarea:focus,
.bk-field-error select:focus {
  box-shadow: 0 0 0 3px rgba(163, 52, 31, 0.15);
}

/* Button loading state */
.bk-btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.bk-btn-loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: bk-spin 0.7s linear infinite;
}

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

/* Button disabled state */
.bk-btn:disabled,
.bk-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Image fallback for broken images */
.bk-img-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bk-paper-3, #ece4d3);
  color: var(--bk-muted, #6d6358);
}

/* Skip link enhancement */
.bk-skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: var(--bk-z-toast);
  box-shadow: var(--bk-shadow-lg);
}

/* Container queries for responsive components (future-proof) */
@container (min-width: 400px) {
  .bk-responsive-grid { grid-template-columns: repeat(2, 1fr); }
}

@container (min-width: 700px) {
  .bk-responsive-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Print styles */
@media print {
  .bk-no-print { display: none !important; }
  .bk-print-only { display: block !important; }
  .bk-card { box-shadow: none; border: 1px solid #ccc; }
  a { text-decoration: none; color: inherit; }
}

/* Cross-document page transition (same-origin only; visual layer —
   query params, auth state, session, redirects untouched).
   Activated per-page via <meta name="view-transition" content="same-origin">. */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.32s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
::view-transition-old(root) {
  animation-name: bk-page-out;
}
::view-transition-new(root) {
  animation-name: bk-page-in;
}
@keyframes bk-page-out {
  to { opacity: 0; transform: translateY(-10px); }
}
@keyframes bk-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* Hydration placeholders: an <img> with empty/missing src renders a broken
   box pre-JS. Hide until a real URL is assigned (selector stops matching). */
img[src=""],
img:not([src]) {
  display: none;
}

/* Pointer spotlight for curated cards (vars set by motion.js delegation) */
.gallery-card,
.pricing-card,
.stat-card {
  position: relative;
}
.gallery-card::after,
.pricing-card::after,
.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
  background: radial-gradient(
    320px circle at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(193, 152, 86, 0.14),
    transparent 65%
  );
}
.gallery-card:hover::after,
.pricing-card:hover::after,
.stat-card:hover::after {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .gallery-card::after,
  .pricing-card::after,
  .stat-card::after { display: none; }
}

/* Split-char headline choreography (JS adds .in-view on entry) */
[data-split] .bk-word {
  display: inline-block;
  white-space: nowrap;
}
[data-split] .bk-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  animation: bkCharIn 0.7s var(--bk-ease-out) forwards;
  animation-delay: calc(var(--i) * 0.028s);
  animation-play-state: paused;
  will-change: transform, opacity;
}
[data-split].in-view .bk-char { animation-play-state: running; }
@keyframes bkCharIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Browser surfaces — carry the atelier into native chrome (visual-only) */
input, textarea, [contenteditable] { caret-color: var(--bk-gold-deep, #a37c3a); }
a, .bk-underline { text-underline-offset: 3px; }
.price-value, .stat-value, .hero-mockup-price, .bk-tabular { font-variant-numeric: tabular-nums; }
* { scrollbar-width: thin; scrollbar-color: rgba(15, 12, 9, 0.28) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(15, 12, 9, 0.22); border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
