/* =============================================================================
   Belize Inclusive Learning Hub — base styles + accessibility layer
   ========================================================================== */

:root {
  --bilh-bg: #fdfaf3;
  --bilh-ink: #162626;
  --bilh-muted: #243a3a;
  --bilh-accent: #0fb38d;
  --bilh-accent-strong: #0e7a6c;
  --bilh-warn: #f25c2b;
  --bilh-radius: 1rem;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #0e7a6c;
  color: white;
  padding: 12px 18px;
  border-radius: 0 0 14px 0;
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus { left: 0; outline: none; }

/* ---------- focus ring ---------- */
:focus-visible {
  outline: 3px solid rgba(15, 179, 141, 0.55);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Alpine cloak ---------- */
[x-cloak] { display: none !important; }

/* ---------- Lesson prose ---------- */
.prose-bilh {
  font-size: 1.075rem;
  line-height: 1.78;
  color: #1d2c2c;
}
.prose-bilh > * + * { margin-top: 1.2em; }
.prose-bilh h2, .prose-bilh h3, .prose-bilh h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  color: #122323;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-top: 1.6em;
  margin-bottom: 0.3em;
}
.prose-bilh h2 { font-size: 1.65rem; }
.prose-bilh h3 { font-size: 1.35rem; }
.prose-bilh h4 { font-size: 1.15rem; }
.prose-bilh strong { color: #0e2727; font-weight: 600; }
.prose-bilh a { color: #0e7a6c; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose-bilh ul, .prose-bilh ol { padding-left: 1.4rem; }
.prose-bilh ul { list-style: disc; }
.prose-bilh ol { list-style: decimal; }
.prose-bilh li { padding-left: 0.25rem; margin-top: 0.5em; }
.prose-bilh li::marker { color: #0fb38d; }
.prose-bilh blockquote {
  border-left: 4px solid #2bcca7;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(180deg, #ecfdf9 0%, #fdfaf3 100%);
  border-radius: 0 14px 14px 0;
  color: #133;
  font-style: italic;
}
.prose-bilh .note {
  background: #fff4f0;
  border: 1px solid #ffe2d6;
  color: #7b2a14;
  padding: 0.85rem 1rem;
  border-radius: 14px;
}
.prose-bilh hr { border: 0; height: 1px; background: rgba(0,0,0,0.08); margin: 2.5rem 0; }
.prose-bilh img { border-radius: 18px; max-width: 100%; height: auto; }

/* ---------- Accessibility modes ---------- */
/*
 * Larger text — meaningful scaling (1.2x). A second tier is available
 * via .lg-text-xl for users who need closer to WCAG AAA 200%.
 */
html.lg-text { font-size: 19.2px; }              /* +20% */
html.lg-text body { line-height: 1.7; }
html.lg-text-xl { font-size: 24px; }             /* +50% */
html.lg-text-xl body { line-height: 1.75; }

/*
 * High contrast — preserves brand identity at AAA contrast.
 * Brand teal pushes toward near-black; gradients flatten to solid sea-700.
 */
html.hc body { color: #050505; background: #ffffff !important; }
html.hc .text-ink-800\/85,
html.hc .text-ink-800\/80,
html.hc .text-ink-800\/75,
html.hc .text-ink-800\/72,
html.hc .text-ink-800\/70,
html.hc .text-ink-800\/65,
html.hc .text-ink-800\/60,
html.hc .text-ink-800\/55,
html.hc .text-ink-800\/45,
html.hc .text-ink-800\/40,
html.hc .text-white\/85,
html.hc .text-white\/80,
html.hc .text-white\/75,
html.hc .text-white\/70 { color: #050505 !important; }
/* on dark surfaces, lift the soft white tones to full white */
html.hc .bg-ink-900 .text-white\/85,
html.hc .bg-ink-900 .text-white\/80,
html.hc .bg-ink-900 .text-white\/75,
html.hc .bg-ink-900 .text-white\/70 { color: #ffffff !important; }
html.hc .border-sand-200, html.hc .border-sand-100, html.hc .border-sea-100, html.hc .border-sea-200 { border-color: #050505 !important; }
html.hc a:not(.h-btn) { color: #0c3f3a !important; text-decoration: underline !important; text-underline-offset: 3px; }
html.hc .bg-sand-50, html.hc .bg-sand-100 { background: #ffffff !important; }
html.hc .h-gradient, html.hc .h-gradient-warm {
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  background: none !important;
  -webkit-text-fill-color: #0c3f3a !important;
  color: #0c3f3a !important;
}
/* gradient surfaces flatten to a single accent that meets AAA */
html.hc .bg-gradient-to-br, html.hc .bg-gradient-to-r, html.hc .bg-gradient-to-b, html.hc .bg-gradient-to-tr, html.hc .bg-gradient-to-bl {
  background-image: none !important;
}
html.hc .h-btn--primary { background: #0c3f3a !important; color: #ffffff !important; box-shadow: none !important; }
html.hc .h-btn--ghost  { background: #ffffff !important; border-color: #050505 !important; color: #050505 !important; }
/* kill ambient orbs and grain that reduce readability */
html.hc .h-orb { display: none !important; }

/*
 * Easier-read mode (formerly "dyslexia-friendly"). Atkinson Hyperlegible
 * is designed by the Braille Institute for low-vision readability, and
 * helps many readers including those with dyslexia.
 */
html.dys, html.dys body, html.dys input, html.dys textarea, html.dys button, html.dys select {
  font-family: 'Atkinson Hyperlegible', 'Inter', system-ui, sans-serif !important;
  letter-spacing: 0.005em;
  word-spacing: 0.04em;
}
html.dys .h-display, html.dys .h-display-md, html.dys .h-display-sm,
html.dys h1, html.dys h2, html.dys h3, html.dys h4 {
  font-family: 'Atkinson Hyperlegible', 'Fraunces', Georgia, serif !important;
  letter-spacing: 0;
}

html.rm *, html.rm *::before, html.rm *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Respect OS-level reduced-motion as well */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Micro-animations ---------- */
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.animate-float-soft { animation: float-soft 4s ease-in-out infinite; }

/* ---------- Tap target sanity ---------- */
button, .btn, a.btn { min-height: 40px; }

/* ---------- TTS reader ---------- */
.tts-block { transition: background-color 200ms ease; border-radius: 6px; padding: 0 2px; }
.tts-block.tts-active {
  background-color: #fef3c7;
  box-shadow: 0 0 0 4px #fef3c7;
}
html.hc .tts-block.tts-active {
  background-color: #fde68a;
  box-shadow: 0 0 0 4px #fde68a;
  outline: 2px solid #050505;
}

/* Tiny floating playback bar shown while TTS is active */
.tts-bar {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  z-index: 60;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 9999px;
  background: rgba(13, 26, 26, 0.92);
  color: #fdfaf3;
  box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.4);
  font-size: 0.85rem;
}
.tts-bar button {
  background: rgba(255,255,255,0.08);
  color: inherit;
  border: 1px solid rgba(255,255,255,0.15);
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 160ms;
}
.tts-bar button:hover { background: rgba(255,255,255,0.16); }
.tts-bar .tts-progress {
  display: inline-block; min-width: 4rem; text-align: center;
  font-variant-numeric: tabular-nums;
  color: rgba(253, 250, 243, 0.75);
}

/* Read-aloud icon-only button used in lessons */
.btn-icon {
  width: 2.5rem; height: 2.5rem;
  display: inline-grid; place-items: center;
  border-radius: 9999px;
  background: #ecfdf9;
  color: #0c5d56;
  border: 1px solid #cffaf0;
  transition: background 180ms, transform 180ms, box-shadow 180ms;
}
.btn-icon:hover { background: #cffaf0; transform: translateY(-1px); }
.btn-icon[aria-pressed="true"] { background: #0e7a6c; color: #ffffff; border-color: #0c5d56; }

/* ---------- Reduced-blur for low-end devices ---------- */
@media (max-width: 768px) {
  .h-orb { filter: blur(40px); opacity: 0.45; }
}
@media (pointer: coarse) and (hover: none) {
  /* devices without hover — likely lower-end mobile */
  .h-orb { animation: none !important; }
}

/* ---------- Safe-area aware floating elements ---------- */
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }

/* =============================================================================
   DARK MODE — designed, not inverted.
   Brand identity preserved. Surfaces are deep teal-ink, accents are warm.
   Activated by `.dark` on <html>.
   ========================================================================== */
html.dark { color-scheme: dark; }
html.dark body {
  background: #0a1c1c;
  color: #e9f1ef;
}

/* Page surfaces */
html.dark .bg-white          { background-color: #112a28 !important; }
html.dark .bg-sand-50        { background-color: #0a1c1c !important; }
html.dark .bg-sand-100       { background-color: #0d2422 !important; }
html.dark .bg-white\/40,
html.dark .bg-white\/60,
html.dark .bg-white\/70,
html.dark .bg-white\/80,
html.dark .bg-white\/90,
html.dark .bg-white\/95      { background-color: rgba(13, 36, 34, 0.85) !important; backdrop-filter: blur(20px) saturate(140%); }
html.dark .bg-sand-50\/60,
html.dark .bg-sand-50\/40    { background-color: rgba(13, 36, 34, 0.5) !important; }
html.dark .bg-sea-50         { background-color: rgba(15, 179, 141, 0.10) !important; }
html.dark .bg-sea-50\/60     { background-color: rgba(15, 179, 141, 0.08) !important; }
html.dark .bg-sea-100        { background-color: rgba(15, 179, 141, 0.18) !important; }
html.dark .bg-sun-50         { background-color: rgba(251, 191, 36, 0.10) !important; }
html.dark .bg-sun-100        { background-color: rgba(251, 191, 36, 0.18) !important; }
html.dark .bg-coral-50       { background-color: rgba(242, 92, 43, 0.10) !important; }
html.dark .bg-coral-100      { background-color: rgba(242, 92, 43, 0.18) !important; }

/* Borders */
html.dark .border-sand-100   { border-color: rgba(255, 255, 255, 0.06) !important; }
html.dark .border-sand-200   { border-color: rgba(255, 255, 255, 0.10) !important; }
html.dark .border-sea-100    { border-color: rgba(15, 179, 141, 0.25) !important; }
html.dark .border-sea-200    { border-color: rgba(15, 179, 141, 0.30) !important; }
html.dark .border-sea-300    { border-color: rgba(15, 179, 141, 0.40) !important; }
html.dark .border-coral-200  { border-color: rgba(242, 92, 43, 0.30) !important; }
html.dark .divide-sand-100 > * + * { border-color: rgba(255,255,255,0.06) !important; }
html.dark .divide-sand-200 > * + * { border-color: rgba(255,255,255,0.10) !important; }

/* Text */
html.dark .text-ink-900      { color: #ffffff !important; }
html.dark .text-ink-800      { color: #e9f1ef !important; }
html.dark .text-ink-800\/85  { color: rgba(233, 241, 239, 0.85) !important; }
html.dark .text-ink-800\/80  { color: rgba(233, 241, 239, 0.80) !important; }
html.dark .text-ink-800\/75  { color: rgba(233, 241, 239, 0.78) !important; }
html.dark .text-ink-800\/72  { color: rgba(233, 241, 239, 0.78) !important; }
html.dark .text-ink-800\/70  { color: rgba(233, 241, 239, 0.72) !important; }
html.dark .text-ink-800\/65  { color: rgba(233, 241, 239, 0.66) !important; }
html.dark .text-ink-800\/60  { color: rgba(233, 241, 239, 0.60) !important; }
html.dark .text-ink-800\/55  { color: rgba(233, 241, 239, 0.55) !important; }
html.dark .text-ink-800\/45  { color: rgba(233, 241, 239, 0.46) !important; }
html.dark .text-ink-800\/40  { color: rgba(233, 241, 239, 0.42) !important; }
html.dark .text-ink-800\/30  { color: rgba(233, 241, 239, 0.32) !important; }

html.dark .text-sea-700      { color: #67e3c5 !important; }
html.dark .text-sea-800      { color: #2bcca7 !important; }
html.dark .text-sea-300      { color: #9ef2dd !important; }
html.dark .text-coral-600    { color: #ff9b75 !important; }
html.dark .text-coral-700    { color: #ff9b75 !important; }
html.dark .text-coral-300    { color: #ffc3aa !important; }
html.dark .text-sun-200      { color: #fde68a !important; }
html.dark .text-sun-300      { color: #fcd34d !important; }
html.dark .text-sun-700      { color: #fbbf24 !important; }

/* Inputs */
html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html.dark textarea,
html.dark select {
  background-color: #0b2422 !important;
  color: #e9f1ef !important;
  border-color: rgba(255,255,255,0.12) !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder { color: rgba(233,241,239,0.45); }
html.dark input:focus, html.dark textarea:focus, html.dark select:focus {
  border-color: #2bcca7 !important;
  box-shadow: 0 0 0 4px rgba(43, 204, 167, 0.18) !important;
}

/* Homepage tokens */
html.dark .h-eyebrow   { color: #67e3c5; }
html.dark .h-numeral   { color: rgba(43, 204, 167, 0.25); }
html.dark .h-chip      {
  background: rgba(17, 42, 40, 0.7);
  border-color: rgba(15, 179, 141, 0.28);
  color: #67e3c5;
}
html.dark .h-glass {
  background: rgba(17, 42, 40, 0.65);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.5);
}
html.dark .h-btn--ghost {
  background: rgba(17, 42, 40, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e9f1ef;
}
html.dark .h-btn--ghost:hover { background: rgba(17, 42, 40, 0.95); }
html.dark .h-btn--primary {
  box-shadow: 0 18px 36px -14px rgba(43, 204, 167, 0.40), inset 0 1px 0 rgba(255,255,255,0.15);
}
html.dark .h-a11y-chip {
  background: #112a28;
  border-color: rgba(255, 255, 255, 0.10);
  color: #e9f1ef;
}
html.dark .h-tile::before {
  /* Re-tone the per-tile gradients so they don't look chalky on dark */
  filter: brightness(0.5) saturate(0.9);
}
html.dark .h-tile::after  { opacity: 0.35; }
html.dark .h-divider      { color: #0a1c1c; }

/* Lesson prose */
html.dark .prose-bilh                { color: #d6e6e3; }
html.dark .prose-bilh h2,
html.dark .prose-bilh h3,
html.dark .prose-bilh h4             { color: #ffffff; }
html.dark .prose-bilh strong         { color: #ffffff; }
html.dark .prose-bilh a              { color: #67e3c5; }
html.dark .prose-bilh li::marker     { color: #2bcca7; }
html.dark .prose-bilh blockquote {
  border-left-color: #2bcca7;
  background: linear-gradient(180deg, rgba(15,179,141,0.12) 0%, transparent 100%);
  color: #d6e6e3;
}
html.dark .prose-bilh .note {
  background: rgba(242, 92, 43, 0.10);
  border: 1px solid rgba(242, 92, 43, 0.28);
  color: #ffc3aa;
}
html.dark .prose-bilh hr { background: rgba(255,255,255,0.08); }

/* Misc shadows + dividers in dark */
html.dark .shadow-soft { box-shadow: 0 10px 30px -12px rgba(0,0,0,0.6); }
html.dark .shadow-glow { box-shadow: 0 14px 38px -10px rgba(43, 204, 167, 0.35); }

/* TTS active highlight in dark — keep amber but tone for contrast */
html.dark .tts-block.tts-active {
  background-color: rgba(251, 191, 36, 0.18);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.18);
}

/* Image fallback colors */
html.dark .bilh-figure-frame { color: #2bcca7; }

/* High-contrast still wins over dark when both classes are present */
html.hc { background: #ffffff !important; color: #050505 !important; }
html.hc.dark body { background: #ffffff !important; color: #050505 !important; }

/* =============================================================================
   Homepage 1.1.3 — quiet shell + dignified hero figure
   - Grounded copy lives in src/views/public/home.ejs.
   - No gradient text, no big editorial numerals, no cartoon SVG.
   - When HERO_IMAGE_URL is unset, the placeholder below renders. When set,
     the real photograph slots into the same 4:5 frame with no layout shift.
   ========================================================================== */
.bilh-shell {
  max-width: 64rem;            /* tighter than .h-shell — feels editorial */
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (min-width: 768px) {
  .bilh-shell { padding-left: 2rem; padding-right: 2rem; }
}

.bilh-hero-figure { display: block; }
.bilh-hero-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 1rem;
  background: #ecdcbf;        /* sand-200 — the placeholder's underlying tone */
  border: 1px solid rgba(13, 80, 70, 0.10);
}
.bilh-hero-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bilh-hero-placeholder {
  position: absolute;
  inset: 0;
  /* Subtle diagonal woven texture over a sand gradient — calm, not cartoon.
     No emoji, no clip-art, no illustration. Replaces cleanly with a photo. */
  background:
    repeating-linear-gradient(
      135deg,
      rgba(13, 80, 70, 0.05) 0 1px,
      transparent 1px 14px
    ),
    linear-gradient(180deg, #ecdcbf 0%, #dec295 100%);
}
html.dark .bilh-hero-frame {
  background: #0d2422;
  border-color: rgba(255, 255, 255, 0.08);
}
html.dark .bilh-hero-placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(103, 227, 197, 0.06) 0 1px,
      transparent 1px 14px
    ),
    linear-gradient(180deg, #0e3b39 0%, #0a1c1c 100%);
}

/* =============================================================================
   Image partial styles + Belize weave divider
   ========================================================================== */
.bilh-figure { display: block; }
.bilh-figure-frame {
  position: relative;
  display: block;
  background: #f6efe1;
  border-radius: 1.25rem;
  overflow: hidden;
  color: #0e7a6c; /* drives the SVG fallback */
}
html.dark .bilh-figure-frame { background: #0d2422; }
.bilh-figure-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}
.bilh-figure-fallback {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.bilh-figure-frame.is-broken .bilh-figure-fallback {
  /* If the image errors, the fallback becomes the canvas */
  z-index: 2;
}
.bilh-figure-cap {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: rgba(36, 58, 58, 0.65);
  line-height: 1.5;
}
.bilh-figure-credit { display: inline; }
.bilh-figure-credit::before { content: ' · '; opacity: 0.5; }
html.dark .bilh-figure-cap { color: rgba(233, 241, 239, 0.55); }

/* Belize-inspired weave pattern — subtle, used on dividers and badge frames */
.weave-bg {
  background-image:
    repeating-linear-gradient(45deg,
      rgba(15, 179, 141, 0.06) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(-45deg,
      rgba(242, 92, 43, 0.04) 0 1px, transparent 1px 12px);
}
html.dark .weave-bg {
  background-image:
    repeating-linear-gradient(45deg,
      rgba(103, 227, 197, 0.06) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(-45deg,
      rgba(251, 191, 36, 0.05) 0 1px, transparent 1px 12px);
}

/* =============================================================================
   Polished badge frame (wraps the emoji glyph)
   ========================================================================== */
.badge-frame {
  position: relative;
  width: 4.5rem; height: 4.5rem;
  display: grid; place-items: center;
  flex: 0 0 auto;
  border-radius: 9999px;
  background:
    radial-gradient(circle at 30% 30%, #ffffff 0%, #f6efe1 60%, #ecdcbf 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 6px 22px -10px rgba(13,80,70,0.3);
  font-size: 1.75rem;
}
.badge-frame::before {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 9999px;
  border: 1px solid rgba(15, 179, 141, 0.25);
  pointer-events: none;
}
.badge-frame::after {
  content: '';
  position: absolute; inset: 3px;
  border-radius: 9999px;
  border: 1px dashed rgba(15, 179, 141, 0.20);
  pointer-events: none;
}
html.dark .badge-frame {
  background: radial-gradient(circle at 30% 30%, #1b3c39 0%, #112a28 60%, #0a1c1c 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 6px 22px -10px rgba(0,0,0,0.6);
}
html.dark .badge-frame::before { border-color: rgba(43, 204, 167, 0.35); }
html.dark .badge-frame::after  { border-color: rgba(43, 204, 167, 0.22); }
.badge-frame.is-locked {
  background: radial-gradient(circle at 30% 30%, #fafaf6 0%, #ecdcbf 100%);
  opacity: 0.5;
  filter: grayscale(0.6);
}
html.dark .badge-frame.is-locked {
  background: radial-gradient(circle at 30% 30%, #1a2a28 0%, #0a1c1c 100%);
}

/* =============================================================================
   Loading shimmer (used by empty states / image fallbacks)
   ========================================================================== */
@keyframes bilh-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.shimmer { position: relative; overflow: hidden; }
.shimmer::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: bilh-shimmer 1.6s ease-in-out infinite;
}
html.rm .shimmer::after { animation: none; }



/* =============================================================================
   HOMEPAGE — editorial design system
   These classes are namespaced (.home-*, .h-*) so they don't bleed into
   the dashboard or admin UIs.
   ========================================================================== */

/* ----- typography ----- */
.h-display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 0.98;
  font-size: clamp(2.7rem, 7.5vw, 5.75rem);
}
.h-display-md {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-size: clamp(2.2rem, 5.2vw, 4rem);
}
.h-display-sm {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
}
.h-eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: 'Inter', system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  font-weight: 700;
  color: #0c5d56;
}
.h-eyebrow::before {
  content: ''; display: inline-block;
  width: 22px; height: 1px; background: currentColor; opacity: 0.55;
}
.h-numeral {
  font-family: 'Fraunces', Georgia, serif;
  font-feature-settings: "ss01" on, "lnum" on;
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  color: rgba(14, 122, 108, 0.18);
  letter-spacing: -0.02em;
}
.h-gradient {
  background: linear-gradient(120deg, #0e7a6c 0%, #2bcca7 35%, #f59e0b 72%, #f25c2b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.h-gradient-warm {
  background: linear-gradient(120deg, #f25c2b 0%, #f59e0b 55%, #fde68a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ----- section rhythm ----- */
.h-section { position: relative; padding: clamp(4rem, 9vw, 7.5rem) 0; }
.h-section-tight { position: relative; padding: clamp(3rem, 6vw, 5rem) 0; }
.h-shell { max-width: 80rem; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .h-shell { padding: 0 2rem; } }

/* ----- glass / surfaces ----- */
.h-glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 50px -22px rgba(13, 80, 70, 0.32);
}
.h-glass-dark {
  background: rgba(13, 26, 26, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ----- breathing gradient orbs (background ambience) ----- */
.h-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.55;
  will-change: transform;
}
.h-orb--sun   { background: radial-gradient(circle, #fde68a 0%, transparent 70%); }
.h-orb--coral { background: radial-gradient(circle, #ff9b75 0%, transparent 70%); }
.h-orb--sea   { background: radial-gradient(circle, #2bcca7 0%, transparent 70%); }
.h-orb--mist  { background: radial-gradient(circle, #cffaf0 0%, transparent 70%); opacity: 0.85; }

@keyframes h-drift-a { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(1.5vw,-1vw,0) scale(1.06); } }
@keyframes h-drift-b { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(-1.2vw,1vw,0) scale(0.96); } }
@keyframes h-drift-c { 0%,100% { transform: translate3d(0,0,0) scale(1.02); } 50% { transform: translate3d(0.8vw,-1.4vw,0) scale(1); } }
.h-orb--a { animation: h-drift-a 18s ease-in-out infinite; }
.h-orb--b { animation: h-drift-b 24s ease-in-out infinite; }
.h-orb--c { animation: h-drift-c 30s ease-in-out infinite; }

/* ----- soft grain (adds organic texture without an image) ----- */
.h-grain::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(13, 26, 26, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
  opacity: 0.45;
}

/* ----- divider waves ----- */
.h-divider { display: block; width: 100%; height: 64px; color: #fdfaf3; }
.h-divider--invert { transform: rotate(180deg); }

/* ----- editorial chips, pills, tags ----- */
.h-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 2.25rem; padding: 0 0.9rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 179, 141, 0.18);
  color: #0c5d56;
  font-size: 0.825rem;
  font-weight: 600;
  box-shadow: 0 4px 16px -8px rgba(13, 80, 70, 0.18);
  transition: transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms;
}
.h-chip:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(13, 80, 70, 0.32); }
.h-chip-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #0fb38d; box-shadow: 0 0 0 4px rgba(15, 179, 141, 0.18); animation: h-pulse 2.4s ease-in-out infinite; }
@keyframes h-pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(15, 179, 141, 0.18); } 50% { box-shadow: 0 0 0 9px rgba(15, 179, 141, 0); } }

/* ----- CTAs ----- */
.h-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  height: 3.5rem; padding: 0 1.75rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.005em;
  transition: transform 250ms cubic-bezier(.2,.7,.2,1), box-shadow 250ms, background 200ms, color 200ms;
}
.h-btn--primary {
  background: linear-gradient(135deg, #0fb38d 0%, #0e7a6c 100%);
  color: white;
  box-shadow: 0 18px 36px -14px rgba(15, 179, 141, 0.6), inset 0 1px 0 rgba(255,255,255,0.25);
}
.h-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 24px 48px -16px rgba(15, 179, 141, 0.7), inset 0 1px 0 rgba(255,255,255,0.3); }
.h-btn--ghost {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(13, 80, 70, 0.12);
  color: #162626;
  box-shadow: 0 8px 24px -14px rgba(13, 80, 70, 0.25);
}
.h-btn--ghost:hover { transform: translateY(-2px); background: white; }
.h-btn--ink {
  background: #162626; color: #f6efe1;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,0.4);
}
.h-btn--ink:hover { transform: translateY(-2px); background: #0d1a1a; }
.h-btn .arrow { transition: transform 250ms cubic-bezier(.2,.7,.2,1); }
.h-btn:hover .arrow { transform: translateX(4px); }

/* ----- magazine counter / overline ----- */
.h-counter {
  font-family: 'Fraunces', Georgia, serif;
  font-feature-settings: "lnum" on, "tnum" on;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: rgba(22, 38, 38, 0.55);
}

/* ----- hover lift cards ----- */
.h-lift {
  transition: transform 320ms cubic-bezier(.2,.7,.2,1), box-shadow 320ms, border-color 200ms;
  will-change: transform;
}
.h-lift:hover { transform: translateY(-4px); }

/* ----- tilted polaroids (testimonials) ----- */
.h-polaroid { transition: transform 380ms cubic-bezier(.2,.7,.2,1), box-shadow 380ms; }
.h-polaroid--l { transform: rotate(-2.2deg); }
.h-polaroid--r { transform: rotate(1.8deg); }
.h-polaroid--c { transform: rotate(-0.6deg); }
.h-polaroid:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 24px 48px -20px rgba(13, 80, 70, 0.28); }

/* ----- persona tile gradients ----- */
.h-tile { position: relative; overflow: hidden; isolation: isolate; }
.h-tile::before {
  content: ''; position: absolute; inset: -1px; z-index: -1;
  background: linear-gradient(135deg, var(--tile-grad-1, #cffaf0) 0%, var(--tile-grad-2, #fdfaf3) 100%);
}
.h-tile::after {
  content: ''; position: absolute; right: -2rem; top: -2rem;
  width: 9rem; height: 9rem; border-radius: 50%;
  background: var(--tile-bubble, rgba(15, 179, 141, 0.18));
  filter: blur(8px);
  transition: transform 600ms cubic-bezier(.2,.7,.2,1);
}
.h-tile:hover::after { transform: scale(1.25) translate(-0.5rem, 0.5rem); }

/* ----- accessibility chip group ----- */
.h-a11y-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1rem; border-radius: 9999px;
  background: white;
  border: 1px solid rgba(13, 80, 70, 0.12);
  font-weight: 600; font-size: 0.9rem;
  color: #162626;
  box-shadow: 0 4px 14px -8px rgba(13, 80, 70, 0.2);
  transition: transform 220ms, box-shadow 220ms;
}
.h-a11y-chip:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(13, 80, 70, 0.32); }

/* ----- in-view reveal animation ----- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 750ms cubic-bezier(.2,.7,.2,1),
              transform 750ms cubic-bezier(.2,.7,.2,1);
}
[data-reveal].in-view { opacity: 1; transform: none; }
[data-reveal-stagger] > * { transition-delay: 0ms; }
[data-reveal-stagger].in-view > * { transition-delay: calc(var(--step, 80ms) * var(--i, 0)); }

/* Reduced motion: skip all decorative motion */
html.rm [data-reveal] { opacity: 1; transform: none; transition: none; }
html.rm .h-orb, html.rm .h-chip-dot, html.rm .h-polaroid { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .h-orb, .h-chip-dot { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ----- mobile-first refinements ----- */
@media (max-width: 640px) {
  .h-section { padding: 4rem 0; }
  .h-display { line-height: 1.02; }
  .h-btn { height: 3.25rem; padding: 0 1.4rem; font-size: 0.98rem; }
}

/* ----- focus rings within homepage interactive elements ----- */
.h-btn:focus-visible,
.h-chip:focus-visible,
.h-a11y-chip:focus-visible { outline: 3px solid rgba(15, 179, 141, 0.55); outline-offset: 4px; }

