@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* CJK-aware font stacks: Latin faces first, then platform-native Simplified Chinese
   system fonts (macOS/iOS: PingFang SC, Windows: Microsoft YaHei, Android: Noto/Heiti),
   before falling back to generic sans-serif. Ensures zh-CN text never falls back to
   a missing-glyph tofu box and renders with each OS's native CJK typeface. */
:root {
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue',
    'Microsoft YaHei', '微软雅黑', 'Noto Sans SC', 'Heiti SC', 'WenQuanYi Micro Hei', sans-serif;
  --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue',
    'Microsoft YaHei', '微软雅黑', 'Noto Sans SC', 'Heiti SC', 'WenQuanYi Micro Hei', sans-serif;
}

:root {
  --navy: #36466D;
  --navy-dark: #212C45;
  --teal: #0F7590;
  --teal-dark: #0A5A70;
  --green: #49AC92;
  --ink: #0E1626;
  --paper: #F7F8FA;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
}
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
}
/* Chinese headings: Poppins has no CJK glyphs, so zh copy silently falls through
   to the system CJK fonts above. Bold Latin-only display weights (800/900) can look
   uneven mixed with CJK; slightly reduce heading boldness for zh to keep a
   consistent visual weight across scripts. */
html[lang^='zh'] h1, html[lang^='zh'] h2, html[lang^='zh'] h3, html[lang^='zh'] h4, html[lang^='zh'] .font-display {
  font-weight: 700;
  letter-spacing: 0;
}

::selection { background: var(--teal); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 0.5rem 1rem;
}
.skip-link:focus { left: 0; }

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

/* NOTE: white-space is intentionally NOT nowrap here. A prior version forced
   nowrap on all three button classes, which caused real horizontal-scroll
   overflow on 360-430px viewports whenever a translated label (ES/EN/ZH) ran
   longer than the button's available width. Buttons now wrap their label
   across up to 2 lines instead of forcing the page wider than the viewport;
   this keeps the fix resilient to future copy changes in any language. */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--teal); color: #fff; font-weight: 700; font-size: 0.875rem;
  padding: 0.85rem 1.75rem; border-radius: 0.5rem; transition: all 0.2s ease;
  white-space: normal; text-align: center; max-width: 100%;
}
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: transparent; color: #fff; font-weight: 700; font-size: 0.875rem;
  padding: 0.8rem 1.7rem; border-radius: 0.5rem; border: 1.5px solid rgba(255,255,255,0.4);
  transition: all 0.2s ease; white-space: normal; text-align: center; max-width: 100%;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.btn-outline-dark {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: transparent; color: var(--navy); font-weight: 700; font-size: 0.875rem;
  padding: 0.8rem 1.7rem; border-radius: 0.5rem; border: 1.5px solid var(--navy);
  transition: all 0.2s ease; white-space: normal; text-align: center; max-width: 100%;
}
.btn-outline-dark:hover { background: var(--navy); color: #fff; }

.card-hover { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -12px rgba(15,117,144,0.25); }

.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.3rem 0.7rem; border-radius: 999px;
}
