/* ============== BRITTI SANS (local) ============== */
@font-face {
  font-family: 'Britti Sans';
  src: url('fuentes/BrittiSansTrial-Light-BF6757bfd494951.otf') format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Britti Sans';
  src: url('fuentes/BrittiSansTrial-LightItalic-BF6757bfd48c7c7.otf') format('opentype');
  font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Britti Sans';
  src: url('fuentes/BrittiSansTrial-Regular-BF6757bfd47ffbf.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Britti Sans';
  src: url('fuentes/BrittiSansTrial-RegularItalic-BF6757bfd44e013.otf') format('opentype');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Britti Sans';
  src: url('fuentes/BrittiSansTrial-Semibold-BF6757bfd443a8a.otf') format('opentype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Britti Sans';
  src: url('fuentes/BrittiSansTrial-SemiboldItalic-BF6757bfd411c3a.otf') format('opentype');
  font-weight: 600; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Britti Sans';
  src: url('fuentes/BrittiSansTrial-Bold-BF6757bfd4a96ed.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Britti Sans';
  src: url('fuentes/BrittiSansTrial-BoldItalic-BF6757bfd4a2285.otf') format('opentype');
  font-weight: 700; font-style: italic; font-display: swap;
}

/* ============== BALDERA DESIGN SYSTEM ============== */
:root {
  --brand: #ED0F44;
  --brand-deep: #C20A36;
  --brand-coral: #FF4D7C;
  --brand-warm: #FF7A4D;
  --ink: #1a1024;
  --ink-2: #3a2540;
  --ink-3: #6b5e72;
  --ink-4: #a097a8;
  --paper: #f7f1f7;
  --paper-2: #efe6ef;
  --paper-3: #e7dae7;
  --line: #ddd0dd;
  --line-2: #2A2521;
  --sun: #FFC85C;
  --palm: #1F6B4F;
  --sea: #1B4D8C;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Britti Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02','cv03','cv04','cv11','ss01';
}
::selection { background: var(--brand); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ============== TYPE SYSTEM (one scale, used everywhere) ==============
   Display = 72   H1 = 56   H2 = 40   H3 = 28   H4 = 20
   Lead = 18  Body = 16  Small = 14  Caption = 13  Mini = 11
   Weights: 400 body · 500 ui · 600 emphasis · 700 display
   Tracking: tighter as size grows. Line-height: tighter as size grows.
   Single family: Britti Sans (regular + italic). */

h1, h2, h3, h4, h5, h6, p { margin: 0; }

.eyebrow      { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); line-height: 1.2; }
.eyebrow-ink  { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); line-height: 1.2; }
.mini         { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.2; }

.display      { font-size: clamp(56px, 7.2vw, 104px); font-weight: 700; letter-spacing: -0.04em;  line-height: 1.0;  color: var(--ink); }
.h1, h1       { font-size: clamp(44px, 5.4vw, 72px);  font-weight: 700; letter-spacing: -0.03em;  line-height: 1.05; color: var(--ink); }
.h2, h2       { font-size: clamp(32px, 3.6vw, 48px);  font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;  color: var(--ink); }
.h3, h3       { font-size: clamp(22px, 2vw, 28px);    font-weight: 600; letter-spacing: -0.015em; line-height: 1.2;  color: var(--ink); }
.h4, h4       { font-size: 20px; font-weight: 600; letter-spacing: -0.01em;  line-height: 1.25; color: var(--ink); }

.lead         { font-size: 18px; font-weight: 400; line-height: 1.55; color: var(--ink-2); letter-spacing: -0.005em; }
.body, p      { font-size: 16px; font-weight: 400; line-height: 1.6;  color: var(--ink-2); }
.small        { font-size: 14px; font-weight: 400; line-height: 1.55; color: var(--ink-2); }
.caption      { font-size: 13px; font-weight: 400; line-height: 1.5;  color: var(--ink-3); }

.italic-display { font-family: 'Britti Sans', sans-serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.num            { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* Layout */
.container { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.container-tight { max-width: 1040px; margin: 0 auto; padding: 0 32px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; cursor: pointer; border: none; transition: transform 200ms, background 200ms, color 200ms; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--brand); transform: translateY(-1px); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--brand); transition: gap 200ms; cursor: pointer; }
.link:hover { gap: 10px; }
.link-ink { color: var(--ink); }

/* Tag */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--paper-2); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.tag-brand { background: var(--brand); color: #fff; }
.tag-outline { background: transparent; border: 1px solid var(--line); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms cubic-bezier(.2,.7,.2,1), transform 800ms cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Careers prose (job detail blocks) — compact */
.careers-prose { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); min-height: 0 !important; }
.careers-prose > *:first-child { margin-top: 0 !important; }
.careers-prose > *:last-child  { margin-bottom: 0 !important; }
.careers-prose p { margin: 0 0 8px; min-height: 0 !important; }
.careers-prose p:empty { display: none !important; }
.careers-prose ul, .careers-prose ol { padding-left: 18px; margin: 0; }
.careers-prose li { margin-bottom: 3px; }
.careers-prose li:last-child { margin-bottom: 0; }
.careers-prose strong { color: var(--ink); font-weight: 600; }
.careers-prose br { display: none !important; } /* kill stray line-break-only spacing */
.careers-prose h2, .careers-prose h3, .careers-prose h4 { margin: 12px 0 6px; }

/* Defensive: kill any phantom height inside job detail article */
.bal-job-block { display: block; }
.bal-job-block + .bal-job-block { margin-top: 18px; }
.bal-job-block h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; letter-spacing: -0.014em; line-height: 1.25; }

/* Job detail hero — extra clearance for fixed navbar on mobile */
@media (max-width: 720px) {
  .bal-job-hero { padding-top: 124px !important; padding-bottom: 48px !important; }
  .bal-job-hero h1 { font-size: clamp(26px, 7vw, 34px) !important; line-height: 1.1 !important; }
  .bal-job-hero .container { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 480px) {
  .bal-job-hero { padding-top: 116px !important; padding-bottom: 40px !important; }
}

/* Initial splash screen — shown until React mounts */
#bal-splash {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(180deg, #fbf8f4 0%, #f4ecdf 100%);
  display: grid; place-items: center;
  transition: opacity 320ms ease, visibility 320ms ease;
}
#bal-splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
#bal-splash::before {
  content: ""; width: 56px; height: 56px;
  border: 3px solid rgba(237,15,68,0.18);
  border-top-color: #ED0F44;
  border-radius: 50%;
  animation: balSpin 0.8s linear infinite;
}
@keyframes balSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #bal-splash::before { animation: none; border-top-color: rgba(237,15,68,0.4); }
}

/* Marquee */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { display: flex; gap: 48px; white-space: nowrap; animation: marquee 38s linear infinite; }
.marquee-track { overflow: hidden; }

/* Asymmetric grid helpers */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-12 { grid-template-columns: repeat(6, 1fr); }
  .container, .container-tight { padding: 0 20px; }
}

/* Image slot tuning */
image-slot {
  border-radius: 18px;
  background: linear-gradient(135deg, var(--paper-2), var(--paper-3));
}

/* Card */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: 28px; transition: transform 250ms, border-color 250ms, box-shadow 250ms;
}
.card:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 18px 40px -20px rgba(20,17,15,0.18); }

/* Skip-to-content link (a11y) — only visible when focused via keyboard */
.bal-skip-link {
  position: fixed; top: 8px; left: 8px;
  transform: translateY(-200%);
  z-index: 1000;
  padding: 12px 20px;
  background: var(--brand); color: #fff;
  border-radius: 12px;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px -8px rgba(237,15,68,0.6);
  transition: transform 200ms ease;
}
.bal-skip-link:focus,
.bal-skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

main:focus { outline: none; }   /* tabIndex=-1 main shouldn't show ring when programmatically focused */

/* Global focus-visible — consistent ring across the site */
*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
  outline-offset: 3px;
}

/* Sections */
section { padding: 120px 0; }

/* First section of every page = hero. Needs to clear the fixed navbar (top:14 + h:60 = 74px bottom) */
main > section:first-of-type,
body > section:first-of-type {
  padding-top: max(120px, 7rem) !important; /* ≥112px on desktop */
}

@media (max-width: 720px) {
  section { padding: 80px 0; }
  main > section:first-of-type,
  body > section:first-of-type {
    padding-top: 124px !important;
  }
}
@media (max-width: 480px) {
  main > section:first-of-type,
  body > section:first-of-type {
    padding-top: 116px !important;
  }
}

/* Inline texture utilities */
.tex-grain {
  position: relative;
}
.tex-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(20,17,15,0.06) 1px, transparent 1px);
  background-size: 4px 4px; mix-blend-mode: multiply; opacity: 0.5;
}

/* Gradient placeholders */
.bg-warm { background: linear-gradient(135deg, #FF7A4D 0%, #ED0F44 50%, #C20A36 100%); }
.bg-paper { background: var(--paper); }
.bg-paper-2 { background: var(--paper-2); }
.bg-paper-3 { background: var(--paper-3); }
.bg-ink { background: var(--ink); color: var(--paper); }

/* Bento ticker number */
.big-number { font-size: clamp(64px, 14vw, 220px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.85; }

/* Underline link */
.u-hover { background-image: linear-gradient(currentColor, currentColor); background-position: 0 100%; background-size: 0 1px; background-repeat: no-repeat; transition: background-size 250ms; }
.u-hover:hover { background-size: 100% 1px; }

/* Footer */
.footer-link { font-size: 13px; color: var(--ink-3); }
.footer-link:hover { color: var(--ink); }


/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE PASS — mobile-first, app-like compact, web aesthetic kept
   ════════════════════════════════════════════════════════════════════ */

/* Prevent horizontal overflow without breaking iOS scroll.
   - `overflow-x: clip` doesn't create a scrolling context (unlike `hidden`)
   - body keeps natural vertical scroll
   - html/body must not get `overflow: hidden` or iOS Safari freezes touch */
html { overflow-x: clip; }
body { overflow-x: clip; min-height: 100vh; }

/* iOS: prevent zoom on input focus + safe areas */
@media (max-width: 720px) {
  input, textarea, select { font-size: 16px !important; }
  body { padding-bottom: env(safe-area-inset-bottom, 0); }
}

/* Smooth scroll past sticky nav */
html { scroll-padding-top: 88px; }
@media (max-width: 720px) { html { scroll-padding-top: 72px; } }

/* ═══ TABLET ≤ 1024 ═══ */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ═══ MOBILE ≤ 720 ═══ */
@media (max-width: 720px) {
  /* Container — much tighter */
  .container, .container-tight { padding: 0 16px; }

  /* Sections — compact app-like */
  section { padding: 48px 0 !important; }

  /* Type system — lower clamp floor */
  .display { font-size: clamp(34px, 9vw, 56px) !important; letter-spacing: -0.035em !important; line-height: 1.05 !important; }
  .h1, h1  { font-size: clamp(28px, 7vw, 40px) !important; line-height: 1.1 !important; }
  .h2, h2  { font-size: clamp(22px, 5.5vw, 30px) !important; line-height: 1.15 !important; }
  .h3, h3  { font-size: clamp(18px, 4vw, 22px) !important; }
  .h4, h4  { font-size: 17px !important; }
  .lead    { font-size: 15.5px !important; line-height: 1.55 !important; }
  .body, p { font-size: 15px !important; }
  .big-number { font-size: clamp(56px, 22vw, 120px) !important; }

  /* All grids stack — JSX inline overridden via !important */
  .grid-2, .grid-3, .grid-4,
  .grid > .grid-2, .grid > .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .grid { gap: 14px !important; }

  /* Override JSX inline 2-col grids on critical pages */
  [style*="1.5fr 1fr"],
  [style*="1.4fr 1fr"],
  [style*="1.15fr 0.85fr"],
  [style*="1fr 1fr"],
  [style*="2fr 1fr"],
  [style*="1.6fr 1fr 1fr 1fr"],
  [style*="repeat(4, 1fr)"],
  [style*="repeat(3, 1fr)"],
  [style*="repeat(5, 1fr)"],
  [style*="repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Override "1fr auto" only when it's a 2-col header/cta layout — preserve buttons */
  [style*="grid-template-columns: 1fr auto"] {
    grid-template-columns: 1fr !important;
  }

  /* Big gaps too wide on mobile */
  [style*="gap: 80px"],
  [style*="gap: 64px"],
  [style*="gap: 56px"],
  [style*="gap: 48px"],
  [style*="gap: 40px"],
  [style*="gap: 36px"],
  [style*="gap: 32px"] {
    gap: 20px !important;
  }

  /* Cards compact */
  .card {
    padding: 20px !important;
    border-radius: 18px !important;
  }

  /* Cards inside JSX with explicit padding override */
  [class*="card"][style*="padding: 36"],
  [class*="card"][style*="padding: 40"],
  [class*="card"][style*="padding: 48"],
  [class*="card"][style*="padding: \"36"],
  [class*="card"][style*="padding: \"40"],
  [class*="card"][style*="padding: \"48"] {
    padding: 22px !important;
  }

  /* Buttons — touch target 44px minimum (only on .btn, NOT on every <a>) */
  .btn,
  .btn-primary,
  .btn-brand,
  .btn-ghost,
  .btn-adm {
    padding: 12px 20px !important;
    font-size: 14.5px !important;
    min-height: 44px !important;
  }

  /* Sticky elements don't work well on mobile (scroll trapping) */
  [style*="position: sticky"][style*="top: 100"],
  [style*="position: sticky"][style*="top: 90"],
  [style*="position: sticky"][style*="top: 80"] {
    position: static !important;
  }

  /* Plan card heights — let content size naturally */
  [style*="minHeight: 480"],
  [style*="minHeight: 520"],
  [style*="minHeight: 600"],
  [style*="min-height: 480"],
  [style*="min-height: 520"],
  [style*="min-height: 600"] {
    min-height: auto !important;
  }

  /* PDP gallery aspect — keep portrait friendly */
  .post-content { font-size: 16.5px !important; line-height: 1.7 !important; }
  .post-content h2 { margin: 1.6em 0 0.5em !important; }
  .post-content img { border-radius: 12px !important; margin: 1.2em 0 !important; }

  /* Marquee tighter */
  .marquee { gap: 24px !important; }

  /* Reveal animations less aggressive (faster) */
  .reveal { transform: translateY(16px); transition-duration: 500ms; }

  /* Footer columns */
  [style*="gridTemplateColumns: \"1.4fr 1fr 1fr 1fr 1fr\""],
  [style*="grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Hero/section padding overrides for inline JSX */
  section[style*="padding: \"80px 0"],
  section[style*="padding: \"100px 0"],
  section[style*="padding: \"120px 0"],
  section[style*="padding: 80px 0"],
  section[style*="padding: 100px 0"],
  section[style*="padding: 120px 0"] {
    padding: 48px 0 !important;
  }

  /* PDP sticky image becomes inline */
  [style*="position: sticky"] {
    position: static !important;
  }
}

/* ═══ SMALL MOBILE ≤ 480 ═══ */
@media (max-width: 480px) {
  .container, .container-tight { padding: 0 14px; }
  section { padding: 36px 0 !important; }

  .display { font-size: clamp(28px, 9vw, 40px) !important; }
  .h1, h1  { font-size: clamp(24px, 7.5vw, 32px) !important; }
  .h2, h2  { font-size: clamp(20px, 6vw, 26px) !important; }

  .card { padding: 18px !important; border-radius: 16px !important; }
  .btn  { padding: 11px 18px !important; font-size: 14px !important; }

  /* Tighter footer */
  [style*="grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
}

/* ═══ TINY ≤ 380 ═══ */
@media (max-width: 380px) {
  .container, .container-tight { padding: 0 12px; }
  .card { padding: 16px !important; }
}

/* ════════════════════════════════════════════════════════
   Mobile overflow safety net (≤ 720px)
   Catches long URLs / emails / tokens that would otherwise
   force horizontal scroll, and tames flex items that didn't
   set min-width: 0 themselves.
   ════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  /* Wrap long unbreakable strings (URLs, slugs, emails) instead of
     overflowing the container. `anywhere` is the right value — `break-word`
     leaves trailing whitespace artifacts. */
  body, p, li, td, dd, dt, h1, h2, h3, h4, h5, h6,
  .lead, .body, .caption, .mini {
    overflow-wrap: anywhere;
    word-break: normal;
  }
  /* But preserve number alignment (prices, stats) — don't break digits */
  [style*="tabular-nums"], .h4, .big-number {
    overflow-wrap: normal;
    word-break: keep-all;
  }
  /* Anything explicitly fixed in pixels wider than the viewport should
     cap at 100% so it never causes scroll */
  img, video, iframe, svg, canvas, table, pre {
    max-width: 100%;
  }
  /* Tables: scroll the table itself, not the page */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Inputs / textareas — don't burst out of cards.
     Exclude checkbox/radio: those have fixed natural sizes; if they
     inherit max-width: 100% they expand to fill flex containers and
     end up as giant 100px squares. */
  input:not([type="checkbox"]):not([type="radio"]),
  select, textarea {
    max-width: 100%;
    box-sizing: border-box;
  }
  /* Checkbox/radio: explicit small natural size so nothing else can
     stretch them. The label next to them is the actual touch target. */
  input[type="checkbox"], input[type="radio"] {
    width: 18px; height: 18px;
    flex-shrink: 0;
    /* don't override inline margin/spacing — JSX often sets a small top margin */
  }
}

/* ═══ Compact navbar on mobile (already handled by Navbar JSX media query, reinforce) ═══ */
@media (max-width: 720px) {
  /* Navbar pill that JSX renders */
  nav[style*="position: fixed"][style*="top: 16"] {
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
  }
  nav[style*="position: fixed"] > div {
    height: 56px !important;
    padding: 0 6px 0 16px !important;
  }
}

/* ═══ WhatsApp FAB compact on mobile ═══ */
@media (max-width: 720px) {
  /* Smaller size, closer to corner */
  div[style*="position: fixed"][style*="right: 22"][style*="bottom: 22"] {
    right: 14px !important;
    bottom: 14px !important;
  }
  div[style*="position: fixed"][style*="z-index: 999"] button[aria-label*="WhatsApp"] {
    width: 54px !important;
    height: 54px !important;
  }
  /* Chat panel responsive width */
  div[style*="width: 320"][style*="maxWidth"] {
    width: calc(100vw - 32px) !important;
    max-width: 360px !important;
  }
}

/* ═══ Lead form modal: full-screen-ish on small phones ═══ */
@media (max-width: 480px) {
  div[role="dialog"][aria-label*="Formulario de solicitud"] {
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
  }
}

/* ═══ Tables that overflow → horizontal scroll wrap ═══ */
@media (max-width: 720px) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table::-webkit-scrollbar { height: 4px; }
  table::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
}

/* ═══ Forms — full-width + breathing on mobile ═══ */
@media (max-width: 720px) {
  input, textarea, select {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ═══ Image-heavy hero/sections — keep aspect on small ═══ */
@media (max-width: 720px) {
  [style*="aspectRatio: \"16/10\""],
  [style*="aspect-ratio: 16/10"] {
    aspect-ratio: 4/3 !important;
  }
  [style*="aspectRatio: \"5 / 4\""] {
    aspect-ratio: 1/1 !important;
  }
}

/* App-feel: subtle anti-pull-to-refresh chain — but ONLY x axis,
   not y (y would break page scroll on some Android/iOS combos) */
@media (max-width: 720px) {
  body { overscroll-behavior-x: contain; }
}

/* ════════════════════════════════════════════════════════
   Reduced motion — respect the user's OS-level preference.
   Disable non-essential animations and decorative parallax;
   keep functional transitions (opacity, color) very fast.
   ════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .reveal { transform: none !important; opacity: 1 !important; }
}

/* Form fields: visible, generous tap target, accessible focus */
input, select, textarea {
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-color: var(--brand);
}

/* Honor tap-target minimums on mobile — scoped to actual CTA classes only.
   Earlier this rule applied to every <button>, which stretched decorative
   buttons like slider dots (7×7) into 7×44 vertical bars. Now it only
   touches explicit btn-* classes. */
@media (max-width: 720px) {
  .btn, .btn-primary, .btn-brand, .btn-ghost, .btn-adm {
    min-height: 44px;
  }
}

/* Print: simple, ink-friendly */
@media print {
  nav, footer, .bal-skip-link, [aria-hidden="true"] { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  a::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}

