/* UCExams landing page styles. Plain CSS, no build step. Colour comes from two admin-chosen
   tokens (--brand / --brand-deep); everything else derives from them with color-mix(). Headings
   use Fraunces, body text uses Manrope, both self-hosted (see assets/fonts/FONTS.txt). */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-latin-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #2563EB;
  --brand-deep: #1E3A8A;
  --brand-hover: color-mix(in srgb, var(--brand) 86%, #000);
  --brand-soft: color-mix(in srgb, var(--brand) 9%, #fff);
  --brand-softer: color-mix(in srgb, var(--brand) 5%, #fff);
  --brand-border: color-mix(in srgb, var(--brand) 28%, #fff);
  --brand-text: color-mix(in srgb, var(--brand) 88%, #000);
  --brand-ink: #ffffff;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --ink: #0f172a;
  --ink-soft: #475569;
  --border: #e2e8f0;
  --ring: 0 0 0 3px color-mix(in srgb, var(--brand) 28%, transparent);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --container: 1160px;
  --fs-base: 16px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --rotate-ring-color: #16A34A; /* AA-contrast brand-friendly green, light theme */
}

/* Dark tokens apply when the visitor (or the admin's default) explicitly chose dark
   (:root[data-theme="dark"]), and also when nobody has chosen light/dark and the OS itself
   prefers dark (:root:not([data-theme="light"]) inside the media query) — covers "follow
   visitor's device" with nothing stored yet. The two blocks must stay identical. */
:root[data-theme="dark"] {
  --brand-hover: color-mix(in srgb, var(--brand) 82%, #fff);
  --brand-soft: color-mix(in srgb, var(--brand) 20%, #0f1726);
  --brand-softer: color-mix(in srgb, var(--brand) 11%, #0f1726);
  --brand-border: color-mix(in srgb, var(--brand) 42%, #0f1726);
  --brand-text: color-mix(in srgb, var(--brand) 55%, #fff);

  --bg: #0b1220;
  --surface: #111a2c;
  --surface-alt: #0f1726;
  --ink: #e9eef7;
  --ink-soft: #9fb0c9;
  --border: #233049;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, .45);
  --rotate-ring-color: #22C55E; /* brighter green reads better against dark backgrounds */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-hover: color-mix(in srgb, var(--brand) 82%, #fff);
    --brand-soft: color-mix(in srgb, var(--brand) 20%, #0f1726);
    --brand-softer: color-mix(in srgb, var(--brand) 11%, #0f1726);
    --brand-border: color-mix(in srgb, var(--brand) 42%, #0f1726);
    --brand-text: color-mix(in srgb, var(--brand) 55%, #fff);

    --bg: #0b1220;
    --surface: #111a2c;
    --surface-alt: #0f1726;
    --ink: #e9eef7;
    --ink-soft: #9fb0c9;
    --border: #233049;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, .45);
    --rotate-ring-color: #22C55E;
  }
}

* { box-sizing: border-box; }
/* overflow-x: clip, not hidden: hidden on one axis with the other left at its default
   "visible" forces that other axis to compute to "auto" (CSS Overflow spec section 3.1),
   turning html/body into their own scroll container. That container then becomes the
   nearest scrolling ancestor for any descendant using position: sticky, so the sticky
   header stuck to ITS box instead of the viewport and scrolled away with the page. clip
   suppresses the sideways overflow without creating a scroll container, so sticky works. */
html { font-size: var(--fs-base); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.22; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.1rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.25rem); font-weight: 700; letter-spacing: -.005em; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 480px) { .container { padding: 0 20px; } }
section { padding: 48px 0; }
@media (min-width: 640px) { section { padding: 64px 0; } }
body.wa-active .site-footer { padding-bottom: 104px; }
img, svg { max-width: 100%; height: auto; }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: var(--brand-ink);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 13px 22px; border-radius: var(--radius-full); font-weight: 650; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
@media (prefers-reduced-motion: no-preference) {
  .btn:active { transform: scale(.97); }
}
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--brand-border); background: var(--brand-softer); }
.btn-whatsapp { background: #25D366; color: #06240f; border-color: #25D366; }
.btn-whatsapp:hover { background: #1fbd59; border-color: #1fbd59; }
.btn-block { width: 100%; }
.btn .icon { width: 18px; height: 18px; flex: none; }

/* Header */
html { scroll-padding-top: 84px; }
.site-header {
  position: sticky; top: 0; z-index: 40; background: var(--bg);
  border-bottom: 1px solid var(--border); box-shadow: 0 0 0 rgba(0, 0, 0, 0); transition: box-shadow .2s ease;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  }
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 10px; padding-bottom: 10px; min-height: 64px;
}
/* Guarantee, regardless of any other selector in this file: a header-row element never loses the
   horizontal padding its own .container class sets. A bug once had .header-row's shorthand
   "padding: 10px 0" (declared after .container, same specificity) zero out .container's left/right
   padding on the same element, pushing the logo and menu button flush against the viewport edges
   on mobile. This rule can never lose that fight again. */
.container.header-row { padding-left: 16px; padding-right: 16px; }
@media (min-width: 414px) { .container.header-row { padding-left: 20px; padding-right: 20px; } }
.brand-mark {
  display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1rem; color: var(--ink);
  min-width: 0; flex: 1 1 auto; overflow: hidden;
}
.brand-mark span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-mark img, .brand-mark .logo-fallback { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.logo-fallback { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); display: grid; place-items: center; color: #fff; }
.logo-fallback svg { width: 22px; height: 22px; }
@media (min-width: 480px) { .brand-mark { font-size: 1.1rem; gap: 10px; } }
.main-nav { display: none; gap: 22px; align-items: center; }
.main-nav a { color: var(--ink-soft); font-weight: 600; font-size: .95rem; position: relative; }
.main-nav a.is-active { color: var(--ink); }
.main-nav a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--brand); border-radius: 2px; }

/* "Product" (or any future) nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: flex; align-items: center; gap: 4px; background: none; border: 0; font: inherit;
  color: var(--ink-soft); font-weight: 600; font-size: .95rem; cursor: pointer; padding: 0;
}
.nav-dropdown-toggle.is-active { color: var(--ink); }
.nav-dropdown-toggle .icon { width: 16px; height: 16px; transition: transform .15s ease; }
.nav-dropdown.is-open .nav-dropdown-toggle .icon { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; left: 0; top: calc(100% + 14px); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); min-width: 200px; padding: 8px; display: none; z-index: 50;
  text-align: left;
}
.nav-dropdown.is-open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; font-size: .92rem; }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a[aria-current="page"] { background: var(--brand-softer); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.header-cta { display: none; height: 44px; align-items: center; }
@media (min-width: 1040px) { .header-cta { display: inline-flex; } }
.signin-menu { position: relative; display: none; }
@media (min-width: 1040px) { .signin-menu { display: block; } }
.signin-menu > button { display: flex; align-items: center; gap: 6px; height: 44px; }
.signin-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md); min-width: 240px; padding: 8px; display: none; z-index: 50;
  text-align: left;
}
.signin-dropdown.is-open { display: block; }
.signin-dropdown a {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; font-size: .92rem;
  text-align: left;
}
.signin-dropdown a:hover { background: var(--brand-softer); text-decoration: none; }
.signin-dropdown small { display: block; color: var(--ink-soft); font-weight: 400; font-size: .8rem; margin-top: 2px; }
.menu-toggle {
  display: none; background: none; border: 0; padding: 0; width: 44px; height: 44px; border-radius: var(--radius-sm);
  color: var(--ink); cursor: pointer; align-items: center; justify-content: center; flex: none;
}
.menu-toggle:hover { background: var(--brand-softer); }

/* Theme toggle (sun/moon). Icon swap is pure CSS (no flash while JS loads); main.js only
   handles the click, aria-pressed/aria-label and remembering the choice. */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); cursor: pointer; flex: none;
}
.theme-toggle:hover { background: var(--brand-softer); border-color: var(--brand-border); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}

@media (min-width: 1040px) {
  .main-nav { display: flex; }
}
@media (max-width: 1039px) {
  .menu-toggle { display: inline-flex; }
}

/* Mobile nav drawer (full-height panel sliding in from the right) */
.nav-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 70; opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(320px, 86vw); background: var(--surface);
  box-shadow: var(--shadow-md); transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.nav-drawer.is-open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .nav-backdrop, .nav-drawer { transition: none; }
}
html.nav-open, html.nav-open body { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); flex: none; }
.drawer-close {
  width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--ink);
  cursor: pointer; border-radius: var(--radius-sm); flex: none;
}
.drawer-close:hover { background: var(--brand-softer); }
.drawer-body { padding: 10px 0 20px; flex: 1 1 auto; overflow-y: auto; }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a {
  display: block; text-align: left; padding: 13px 20px; font-weight: 600; color: var(--ink); border-left: 3px solid transparent;
  min-height: 44px;
}
.drawer-nav a.is-active { border-left-color: var(--brand); background: var(--brand-softer); color: var(--brand-text); }
.drawer-accordion summary {
  display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer;
  padding: 13px 20px; font-weight: 600; color: var(--ink); border-left: 3px solid transparent; min-height: 44px;
}
.drawer-accordion summary::-webkit-details-marker { display: none; }
.drawer-accordion summary .icon { width: 16px; height: 16px; transition: transform .2s ease; flex: none; }
.drawer-accordion[open] summary .icon { transform: rotate(180deg); }
.drawer-accordion summary.is-active { border-left-color: var(--brand); color: var(--brand-text); }
.drawer-accordion-body { display: flex; flex-direction: column; }
.drawer-accordion-body a { display: block; text-align: left; padding: 11px 20px 11px 36px; font-weight: 500; color: var(--ink); min-height: 44px; }
.drawer-accordion-body a.is-active { color: var(--brand-text); font-weight: 650; }
.drawer-divider { height: 1px; background: var(--border); margin: 10px 0; }
.drawer-group { padding: 6px 0; }
.drawer-group-label { display: block; padding: 8px 20px 4px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.drawer-group a { display: block; text-align: left; padding: 11px 20px; min-height: 44px; color: var(--ink); font-weight: 600; font-size: .92rem; }
.drawer-group a small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .78rem; margin-top: 1px; }
.drawer-foot { padding: 14px 20px 20px; border-top: 1px solid var(--border); flex: none; }
.drawer-foot .btn { width: 100%; min-height: 48px; }

/* Background layer shared by the hero, page banners and the CTA strip: an admin image or the
   built-in default pattern, under a brand-gradient overlay strong enough to keep white text at
   AA contrast. Fixed to this dark-on-brand look regardless of the light/dark theme toggle, the
   same way the product screenshot in the hero stays a clean light card either way. */
.band { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--brand-deep), var(--brand)); color: #fff; }
.band::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, color-mix(in srgb, var(--brand-deep) 88%, #000) 0%, color-mix(in srgb, var(--brand-deep) 60%, transparent) 55%, transparent 85%);
}
.bg-layer { position: absolute; inset: 0; z-index: 0; }
.bg-layer img, .bg-layer svg { width: 100%; height: 100%; object-fit: cover; }
/* Guarantee, regardless of any other selector in this file: a background layer never takes part
   in document flow. A bug once had a sibling "position:relative" rule accidentally also match
   .bg-layer (both were plain direct-child <div>s), pulling it into flow and exploding a band's
   height to the size of its own pattern SVG (reported as "a giant empty block"). This rule can
   never lose that fight again. */
.band .bg-layer { position: absolute !important; inset: 0 !important; }
.band > .container { position: relative; z-index: 2; }
.band h1, .band h2 { color: #fff; }
.band p { color: rgba(255, 255, 255, .78); }
.band .eyebrow { color: #cfe0ff; }
.band .btn-primary { background: #fff; color: var(--brand-deep); border-color: #fff; }
.band .btn-primary:hover { background: #eef3ff; border-color: #eef3ff; }
.band .btn-secondary { background: #fff; color: var(--brand-deep); border-color: #fff; }
.band .breadcrumb { color: rgba(255, 255, 255, .72); }
.band .breadcrumb a { color: rgba(255, 255, 255, .72); }
.band .breadcrumb a:hover { color: #fff; }
.band .breadcrumb [aria-current="page"] { color: #fff; }

/* Hero */
.hero { padding: 48px 0 64px; }
@media (min-width: 640px) { .hero { padding: 72px 0 88px; } }
.hero-grid { position: relative; z-index: 2; display: grid; gap: 32px; align-items: center; min-width: 0; }
@media (min-width: 1100px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 40px; }
}
.hero-copy { min-width: 0; }
.hero-copy .eyebrow { margin-bottom: 14px; display: block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.trust-list { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.trust-list li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255, 255, 255, .85); font-size: .95rem; opacity: 1; transform: none; }
.trust-list .icon { color: #9fc4ff; flex: none; margin-top: 2px; }

/* Trust bullets: looping sequential appear/disappear (design round 8, item 3). Static and fully
   visible by default (the rule above) — main.js only adds .is-animated after confirming JS is
   present, prefers-reduced-motion is off and ?freeze=bullets is not set, so "no JS", "reduced
   motion" and the freeze hook all show the same plain, fully-visible, non-animated list for free,
   with no separate code path. Each <li> gets its own @keyframes (not a shared one with a
   per-item animation-delay) because the appear stagger (350ms) and disappear stagger (250ms)
   differ, so a simple time-shifted copy of one timeline cannot reproduce both at once. All three
   keyframes share one 6.1s cycle: item 1 appears 0-450ms, item 2 350-800ms, item 3 700-1150ms;
   all three hold fully visible until 4650ms; then disappear in the same order, item 1 at
   4650-5000ms, item 2 at 4900-5250ms, item 3 at 5150-5500ms; then a 600ms pause with the list
   empty before the next loop. Only opacity/transform are animated and every <li> keeps its box
   (flex column, fixed gap) the whole time, so the list's own height never changes. */
.trust-list.is-animated li {
  animation-duration: 6.1s; animation-timing-function: linear; animation-iteration-count: infinite;
  animation-fill-mode: both;
}
.trust-list.is-animated.is-paused li { animation-play-state: paused; }
.trust-list.is-animated li:nth-child(1) { animation-name: trustBulletItem1; }
.trust-list.is-animated li:nth-child(2) { animation-name: trustBulletItem2; }
.trust-list.is-animated li:nth-child(3) { animation-name: trustBulletItem3; }
@keyframes trustBulletItem1 {
  0% { opacity: 0; transform: translateX(-12px); animation-timing-function: ease-out; }
  7.38% { opacity: 1; transform: translateX(0); }
  76.23% { opacity: 1; transform: translateX(0); }
  81.97% { opacity: 0; transform: translateX(8px); }
  100% { opacity: 0; transform: translateX(8px); }
}
@keyframes trustBulletItem2 {
  0%, 5.74% { opacity: 0; transform: translateX(-12px); animation-timing-function: ease-out; }
  13.11% { opacity: 1; transform: translateX(0); }
  80.33% { opacity: 1; transform: translateX(0); }
  86.07% { opacity: 0; transform: translateX(8px); }
  100% { opacity: 0; transform: translateX(8px); }
}
@keyframes trustBulletItem3 {
  0%, 11.48% { opacity: 0; transform: translateX(-12px); animation-timing-function: ease-out; }
  18.85% { opacity: 1; transform: translateX(0); }
  84.43% { opacity: 1; transform: translateX(0); }
  90.16% { opacity: 0; transform: translateX(8px); }
  100% { opacity: 0; transform: translateX(8px); }
}
/* The check mark draws itself (stroke-dasharray/dashoffset, using the SVG pathLength="1" trick so
   no JS measurement is needed) just before each line's text fades in, and un-draws when that
   line disappears so it is ready to redraw next loop. */
.trust-list .icon path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.trust-list.is-animated li:nth-child(1) .icon path { animation: trustCheckDraw1 6.1s linear infinite; }
.trust-list.is-animated li:nth-child(2) .icon path { animation: trustCheckDraw2 6.1s linear infinite; }
.trust-list.is-animated li:nth-child(3) .icon path { animation: trustCheckDraw3 6.1s linear infinite; }
.trust-list.is-animated.is-paused li .icon path { animation-play-state: paused; }
@keyframes trustCheckDraw1 {
  0% { stroke-dashoffset: 1; }
  4% { stroke-dashoffset: 0; }
  76.23% { stroke-dashoffset: 0; }
  81.97% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 1; }
}
@keyframes trustCheckDraw2 {
  0%, 2.74% { stroke-dashoffset: 1; }
  5.74% { stroke-dashoffset: 0; }
  80.33% { stroke-dashoffset: 0; }
  86.07% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 1; }
}
@keyframes trustCheckDraw3 {
  0%, 8.48% { stroke-dashoffset: 1; }
  11.48% { stroke-dashoffset: 0; }
  84.43% { stroke-dashoffset: 0; }
  90.16% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .trust-list.is-animated li, .trust-list.is-animated li .icon path { animation: none !important; }
}
.hero-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 20px 44px rgba(0, 0, 0, .35); background: #fff; border: 1px solid rgba(255, 255, 255, .25); min-width: 0; }
.hero-media img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-media svg { display: block; width: 100%; height: auto; }
/* Two illustrations ship (see hero_illustration.php), both now with their own laptop+phone
   composition (design round 8 added a phone to what used to be a laptop-only compact version):
   the desktop one, sized for the clamped floating card at 1100px and up, and a compact one with
   its own lower text floors for every narrower width, including tablets (where it is simply
   scaled up by CSS, not swapped for the desktop composition — see .hero-media-float below).
   Exactly one is ever visible at a time — enforced with display:none (not visibility/opacity, so
   the hidden one has no layout box and a zero-size bounding rect), checked by a browser test that
   counts visible illustrations at every breakpoint (design round 7, item 3). Round 6 shipped this
   with a bug: ".hero-illustration-mobile { display: none }" is only one class (specificity
   0,1,0), which can never win against the generic ".hero-media svg { display: block }" rule
   above (one class plus one element, 0,1,1) — a higher specificity selector always wins
   regardless of source order or media query, so the mobile illustration never actually hid, and
   rendered stacked underneath the desktop one at every width. Every rule below matches
   ".hero-media svg" or more (also 0,2,1 or higher), so each one can actually override it.
   hero-animation.js already only animates whichever one has layout (is not display:none), via
   the existing pause-when-off-screen IntersectionObserver logic — nothing extra needed here
   beyond the display toggle itself being real. */
.hero-media svg.hero-illustration-mobile { display: block; }
.hero-media svg:not(.hero-illustration-mobile) { display: none; }
@media (min-width: 1100px) {
  .hero-media svg.hero-illustration-mobile { display: none; }
  .hero-media svg:not(.hero-illustration-mobile) { display: block; }
}

/* Phone carousel crossfade (design round 8, item 1): all 4 <g data-hero-phone-page> elements stay
   in the DOM at once and are purely opacity-driven, so switching the active one (see
   hero-animation.js) fades smoothly instead of cutting instantly. Hidden pages are also
   pointer-events:none, though none of this illustration is ever interactive to begin with. */
.hero-media [data-hero-phone-page] { opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.hero-media [data-hero-phone-page].is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-media [data-hero-phone-page] { transition: none; }
}

.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;
}

/* Hero: photo-background mode (an admin-uploaded hero photo is present). A light hero with the
   photo full-bleed behind it, a gradient so the headline stays readable over the photo's pale
   side, and the animated exam-card illustration floating over the photo's lower-right edge
   instead of replacing it. Falls back to the dark gradient .band treatment (see style.css above)
   with the full-size illustration when no photo has been uploaded. */
/* No overflow:hidden here deliberately: the floating exam card (.hero-media-float) is allowed to
   overlap slightly past the section's own bottom edge for depth (see its own rule). The photo
   background itself stays contained regardless, since it's inset:0 within this section. */
.hero-photo-mode { position: relative; background: var(--bg); }
.hero-photo-bg { position: absolute; inset: 0; z-index: 0; }
.hero-photo-bg img, .hero-photo-bg picture { display: block; width: 100%; height: 100%; }
.hero-photo-bg img { object-fit: cover; object-position: center 35%; }
.hero-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 38%, color-mix(in srgb, var(--bg) 25%, transparent) 62%, transparent 85%);
}
:root[data-theme="dark"] .hero-photo-overlay {
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-deep) 94%, #000) 0%, color-mix(in srgb, var(--brand-deep) 80%, transparent) 40%, color-mix(in srgb, var(--brand-deep) 30%, transparent) 65%, transparent 85%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-photo-overlay {
    background: linear-gradient(90deg, color-mix(in srgb, var(--brand-deep) 94%, #000) 0%, color-mix(in srgb, var(--brand-deep) 80%, transparent) 40%, color-mix(in srgb, var(--brand-deep) 30%, transparent) 65%, transparent 85%);
  }
}
.hero-photo-mode .hero-grid { position: relative; z-index: 2; }
.hero-photo-mode .trust-list li { color: var(--ink-soft); }
.hero-photo-mode .trust-list .icon { color: var(--brand); }
/* Below the two-column breakpoint the hero text runs full width over the photo (see .hero-grid's
   own breakpoint), so the left-to-right gradient above no longer guarantees it stays over the
   pale side of the photo. A near-solid scrim keeps text at AA contrast at every width instead. */
@media (max-width: 1099px) {
  .hero-photo-overlay { background: color-mix(in srgb, var(--bg) 93%, transparent) !important; }
}
.hero-media-float {
  align-self: end; box-shadow: 0 24px 48px rgba(15, 23, 42, .28); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface); border: 1px solid var(--border);
}
@media (min-width: 1100px) {
  /* Stays a normal grid item in the grid's second column (so it can never invade the text
     column on the left — justify-self: start pins its LEFT edge exactly at the column's own
     start), but is deliberately wider than that column's "fair share", bleeding past the
     container's right edge toward/over the photo, matching the round 5 composition this design
     round 7 update restores (moderately enlarged — about 1.3x — rather than round 6's much
     bigger card). Overlaps the hero's own bottom edge slightly for depth. Scales with the
     viewport between a sensible floor/ceiling: clamp(380px, 26vw, 460px) is about 410px at
     1568px wide (the reference width the owner measured the old card against, about 320px
     there) and about 455px at 1750px. Starts at 1100px: below that there isn't reliably enough
     margin outside the centred container for the card to bleed into without being clipped, so
     that range instead uses the stacked, centred treatment below. */
  .hero-photo-mode .hero-media-float {
    justify-self: start; width: clamp(380px, 26vw, 460px); max-width: 460px;
    margin: 0 0 -28px; position: relative;
  }
}
@media (min-width: 768px) and (max-width: 1099px) {
  /* Tablet: the compact (phone-included) composition, sits below the hero text, centred, capped
     at 440px (design round 9: down from 520, which read as too large alongside the moderated
     phone-size composition below) so it does not dominate the stacked layout. */
  .hero-media-float { width: 100%; max-width: 440px; margin: 8px auto 0; }
}
@media (max-width: 767px) {
  /* Phone: design round 9 caps this at 320px (the spec asked for "about" 360) and centres it,
     rather than stretching to the full container width as before, when the old, taller 320x550
     viewBox produced a card taller than the viewport on some phones. The illustration's own
     viewBox is now 320x320 (see hero_illustration.php) and deliberately square, so this cap also
     caps the rendered HEIGHT: 360 was tried first and measured out at 360px tall too, over the
     same spec's "never taller than about 320px" ceiling, so 320 was kept instead, satisfying the
     height ceiling exactly while staying closer to every text-size floor below it (a wider cap
     dilutes the render scale, shrinking the real pixel size of every font-size in the SVG). */
  .hero-media-float { width: 100%; max-width: 320px; margin: 8px auto 0; }
}

/* Rotating word in the hero sub-line (e.g. "...on any phone/tablet/computer"): the word sits
   inside a hand-drawn-style green ellipse that draws itself in, holds, then fades out as the
   word swaps with a short vertical slide+fade, and redraws around the next word. The ring SVG is
   absolutely positioned with generous padding so it is never clipped and never causes overflow,
   and the word column has a fixed width (the longest of the three words, see inline style) so
   the surrounding sentence never reflows. A screen-reader-only span states all three options
   once instead, so the swap is never re-announced on every change. With JS disabled or reduced
   motion on, the ring's default state (stroke-dashoffset: 0, see inline style set by the
   no-script/initial render) is already a complete, static ring around the first word. */
.rotating-word {
  position: relative; display: inline-block; white-space: nowrap; vertical-align: baseline;
  text-align: center; overflow: visible; line-height: inherit;
  /* A small fixed gap (not part of the ring's own padding) so the ring's stroke never touches
     the "y" of "any" before it or the word right after — constant regardless of which word is
     showing, so it never causes the sentence to reflow when the word swaps (design round 7). */
  margin: 0 .3em;
}
.rotating-word-ring {
  position: absolute; left: -0.35em; right: -0.35em; top: -0.2em; bottom: -0.2em; margin: 0;
  max-width: none; max-height: none; width: auto; height: auto;
  overflow: visible; pointer-events: none; display: block;
}
.rotating-word-ring ellipse {
  fill: none; stroke: var(--rotate-ring-color); stroke-width: 2.5; stroke-linecap: round;
}
.rotating-word-text { position: relative; display: inline-block; font-weight: 700; color: var(--brand-text); z-index: 1; white-space: nowrap; }
.rotating-word-text.is-swapping { animation: rotatingWordSwap .45s ease; }
@keyframes rotatingWordSwap {
  0% { transform: translateY(0); opacity: 1; }
  45% { transform: translateY(-100%); opacity: 0; }
  55% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .rotating-word-text.is-swapping { animation: none; }
}

/* Who it's for (home teaser) */
.audience-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.audience-card { text-align: center; padding: 22px 16px; overflow: hidden; }
.audience-card .card-icon { margin: 0 auto 14px; }
.audience-card-image {
  margin: -26px -26px 16px; aspect-ratio: 4 / 3; overflow: hidden; position: relative;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.audience-card-image picture, .audience-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.audience-card-image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, color-mix(in srgb, var(--surface) 70%, transparent) 100%);
}

/* A faint dotted texture behind a section, very low opacity, sparing use only. */
.section-dotted { position: relative; }
.section-dotted::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--brand) 35%, transparent) 1.4px, transparent 1.4px);
  background-size: 22px 22px; mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 70%);
}
.section-dotted > .container { position: relative; z-index: 1; }

/* A soft curved shape-divider at the top of a section, used sparingly between a few sections. */
.shape-divider-top { position: relative; }
.shape-divider-top::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 48px; pointer-events: none;
  background: var(--bg);
  clip-path: ellipse(60% 100% at 50% 0%);
}

/* Feature cards */
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-grid-compact { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card-icon {
  width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card-icon .icon { width: 24px; height: 24px; }
.card p:last-child { margin-bottom: 0; }

/* Home "What UCExams does" teaser: cards one side, a large rounded image the other, with a soft
   decorative gradient blob behind the image. */
.features-teaser-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .features-teaser-grid { grid-template-columns: 1.1fr 1fr; } }
.features-teaser-image { position: relative; min-width: 0; }
.features-teaser-image picture, .features-teaser-image img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); position: relative; z-index: 1; }
.features-teaser-blob {
  position: absolute; inset: -24px -24px auto auto; width: 70%; aspect-ratio: 1; z-index: 0;
  background: radial-gradient(circle, var(--brand-soft) 0%, transparent 70%); border-radius: 50%;
}

/* How it works: a full-width band with a faint background photo under a soft gradient, and
   glass-effect step cards on top (translucent white + blur, with a solid fallback for browsers
   without backdrop-filter support). */
.how-band { position: relative; overflow: hidden; }
.how-band-bg { position: absolute; inset: 0; z-index: 0; opacity: var(--overlay-how); }
.how-band-bg picture, .how-band-bg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.how-band::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 60%, var(--bg) 100%);
}
.steps { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { position: relative; padding-left: 0; }
.step-num {
  width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 700; margin-bottom: 14px;
}
.step-glass {
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .step-glass { background: var(--surface); }
}

/* Home "Why schools choose UCExams" security teaser: image one side with small floating chips
   over it, copy the other side. Chip text is generic/sample, no invented numbers. */
.security-teaser-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .security-teaser-grid { grid-template-columns: 1fr 1.1fr; } }
.security-teaser-image { position: relative; min-width: 0; }
.security-teaser-image picture, .security-teaser-image img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.security-chip {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--border);
  border-radius: var(--radius-full); box-shadow: var(--shadow-md); font-size: .82rem; font-weight: 650;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.security-chip .icon { width: 16px; height: 16px; color: var(--brand); flex: none; }
.security-chip-1 { top: 10%; left: -8%; }
.security-chip-2 { bottom: 14%; left: -6%; }
.security-chip-3 { bottom: -4%; right: 6%; }
/* Below the 960px two-column breakpoint the image is full-width and the chips stay floating
   over it (the same arrangement as desktop, just smaller and repositioned), instead of dropping
   out of flow into plain stacked pills — every offset here is a plain percentage inside 0-100%
   (never negative), which can never push a chip outside the image's own box and so can never
   cause horizontal page overflow or get clipped at the viewport edge the way the desktop
   negative offsets would if reused here. The image crop is short and wide (roughly 3:1), so
   there is not enough vertical room to stack three chips in one column without them touching;
   instead they sit in two rows (top-left alone, bottom-left + bottom-right side by side) with a
   max-width so the two bottom chips can never reach each other, and text is allowed to wrap to a
   second line rather than forcing a one-line width that would collide with its neighbour.
   Positions keep clear of the shield at the image's centre-right and never overlap each other. */
@media (max-width: 959px) {
  .security-chip {
    padding: 5px 8px; font-size: .72rem; line-height: 1.15; gap: 5px;
    max-width: 42%; white-space: normal; text-align: left;
  }
  .security-chip .icon { width: 12px; height: 12px; margin-top: 1px; }
  .security-chip-1 { top: 4%; left: 4%; bottom: auto; right: auto; max-width: 58%; }
  .security-chip-2 { top: auto; bottom: 4%; left: 4%; right: auto; }
  .security-chip-3 { top: auto; bottom: 4%; right: 4%; left: auto; }
}

/* Built for schools */
.builtfor { display: grid; gap: 32px; align-items: start; }
@media (min-width: 880px) { .builtfor { grid-template-columns: 1fr 1fr; } }
.builtfor-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }

/* Trusted by (auto-scrolling logo carousel) */
[data-hero-question-fade] { transition: opacity .3s ease; }
@media (prefers-reduced-motion: reduce) { [data-hero-question-fade] { transition: none; opacity: 1 !important; } }

.trusted-by { position: relative; overflow: hidden; }
.trusted-by-texture { position: absolute; inset: 0; z-index: 0; opacity: var(--overlay-teaser); }
.trusted-by-texture picture, .trusted-by-texture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.trusted-by > .container, .trusted-by > .trusted-by-viewport { position: relative; z-index: 1; }

.trusted-by-viewport {
  overflow: hidden; margin-top: 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.trusted-by-track {
  display: flex; width: max-content;
  animation: trusted-by-scroll var(--trusted-by-duration, 32s) linear infinite;
}
.trusted-by-track:hover, .trusted-by-track:focus-visible { animation-play-state: paused; }
.trusted-by-row { display: flex; gap: 20px; align-items: stretch; padding: 10px 26px; }
.trusted-by-item {
  display: flex; align-items: center; justify-content: center;
  width: 160px; height: 84px; padding: 14px 18px; flex: none;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.trusted-by-item a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.trusted-by-item img { max-height: 36px; max-width: 100%; width: auto; height: auto; object-fit: contain; opacity: .85; transition: opacity .15s ease; }
.trusted-by-item a:hover img { opacity: 1; }
@keyframes trusted-by-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .trusted-by-track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
  .trusted-by-row[aria-hidden="true"] { display: none; }
}
.partner-item { display: flex; align-items: center; }

/* Testimonials / stats */
.tstm-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tstm-quote { font-size: 1.02rem; color: var(--ink); }
.tstm-author { font-weight: 700; font-size: .9rem; color: var(--ink); }
.tstm-role { font-size: .85rem; color: var(--ink-soft); }
.stats-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }

/* About page content blocks */
.about-block-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 880px) { .about-block-grid { grid-template-columns: 1fr 1fr; } }
.about-block-text-right .about-block-grid > :first-child { order: 2; }
.about-block-image picture, .about-block-image img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.about-block-body ul { padding-left: 20px; margin: 0 0 1em; color: var(--ink-soft); }
.about-block-body ul li { margin-bottom: 6px; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--brand-text); }
.stat-label { color: var(--ink-soft); font-size: .9rem; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 650; display: flex;
  justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform .2s ease; flex: none; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item .faq-answer { padding: 0 20px 18px; }

/* Contact */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: .9fr 1.1fr; } }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.contact-list .icon { color: var(--brand); flex: none; margin-top: 2px; }
.social-row { display: flex; gap: 10px; margin-top: 20px; }
.social-row a {
  width: 38px; height: 38px; border-radius: var(--radius-full); background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--ink-soft); }
.char-count { display: block; text-align: right; font-size: .78rem; color: var(--ink-soft); margin-top: 4px; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; pointer-events: none;
}
.btn-helper { font-size: .82rem; color: var(--ink-soft); margin-top: 8px; }
.form-actions { margin-top: 4px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .92rem; }
.alert-success { background: color-mix(in srgb, #16a34a 15%, var(--surface)); color: #0f5132; border: 1px solid color-mix(in srgb, #16a34a 35%, transparent); }
.alert-error { background: color-mix(in srgb, #dc2626 12%, var(--surface)); color: #7f1d1d; border: 1px solid color-mix(in srgb, #dc2626 35%, transparent); }
:root[data-theme="dark"] .alert-success { color: #bbf7d0; }
:root[data-theme="dark"] .alert-error { color: #fecaca; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .alert-success { color: #bbf7d0; }
  :root:not([data-theme="light"]) .alert-error { color: #fecaca; }
}

/* Inner-page banner */
.page-banner { padding: 48px 0 40px; }
.page-banner h1 { margin: 0; }
.page-banner-image { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 20px; border: 1px solid rgba(255, 255, 255, .25); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-soft); margin-bottom: 14px; }

/* Contact page map */
.contact-map { max-width: 760px; margin: 0 auto 40px; }
.contact-map-frame {
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-alt);
}
@media (max-width: 639px) { .contact-map-frame { aspect-ratio: 4 / 3; } }
.contact-map-frame iframe, .contact-map-frame img { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.contact-map-open { display: inline-block; margin-top: 10px; font-weight: 600; color: var(--brand); }
.breadcrumb a { color: var(--ink-soft); font-weight: 600; }
.breadcrumb a:hover { color: var(--brand-text); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Feature groups (/features) */
.feature-group { margin-bottom: 44px; }
.feature-group:last-child { margin-bottom: 0; }
.feature-group h2 { font-size: 1.3rem; margin-bottom: 18px; }

/* Home teaser "see all" links */
.teaser-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; margin-top: 10px; }

/* Final CTA band (home). Generous bottom padding so the band never touches the footer, and a
   consistent vertical rhythm with the top padding either side of it. */
.cta-strip-wrap { padding: 56px 0 60px; }
@media (min-width: 640px) { .cta-strip-wrap { padding: 64px 0 100px; } }
.cta-band { border-radius: var(--radius-lg); padding: 52px 32px; text-align: center; }
.cta-band .bg-layer img { opacity: var(--overlay-cta); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .82); }
.cta-band .hero-actions { justify-content: center; }
.cta-band .btn-secondary { background: #fff; color: var(--brand-text); border-color: #fff; }
.cta-band > .cta-content { position: relative; z-index: 2; }

/* Referral band (design round 6, item 4): full-width designed banner shown on Home (after
   "Trusted by") and Features (replacing the plain "Earn by referring" card). Built on the same
   .band gradient + .bg-layer image pattern as the CTA band above, so it reads as the same
   family of component. Desktop: icon badge + heading/line on the left, button(s) on the right,
   with the honest terms-apply note on its own full-width row underneath. Mobile collapses to a
   single stacked column (text, then a full-width 48px-tall button), never overlapping and never
   causing horizontal overflow, per spec. */
.referral-band-wrap { padding: 8px 0; }
.referral-band-compact { padding: 0 0 8px; }
.referral-band {
  border-radius: var(--radius-lg); padding: 40px 36px; color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 28px;
}
.referral-band-compact .referral-band { padding: 32px 28px; }
.referral-band .bg-layer img { opacity: var(--overlay-referral); }
.referral-band-content { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px; flex: 1 1 320px; min-width: 0; }
.referral-band-badge {
  flex: none; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center;
}
.referral-band-badge .icon { width: 24px; height: 24px; color: #fff; }
.referral-band-text h2 { color: #fff; margin: 0 0 6px; font-size: 1.4rem; }
.referral-band-text p { color: rgba(255, 255, 255, .88); margin: 0; }
.referral-band-actions { position: relative; z-index: 2; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.referral-band-actions .btn { white-space: nowrap; background: #fff; color: var(--brand-text); border-color: #fff; }
.referral-band-signup { color: #fff; text-decoration: underline; font-size: .86rem; }
.referral-band-terms { position: relative; z-index: 2; flex-basis: 100%; margin: 4px 0 0; font-size: .78rem; color: rgba(255, 255, 255, .72); }
.referral-band-terms a { color: #fff; text-decoration: underline; }
@media (max-width: 639px) {
  .referral-band { flex-direction: column; align-items: stretch; padding: 24px 20px; gap: 16px; }
  .referral-band-content { flex-direction: column; align-items: flex-start; text-align: left; gap: 12px; }
  .referral-band-actions { align-items: stretch; width: 100%; }
  .referral-band-actions .btn { width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; }
  .referral-band-signup { text-align: center; }
}

/* Pricing tokens box */
.tokens-box { max-width: 640px; margin: 24px auto 0; }

/* How-it-works requirements list */
.req-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.req-list li { display: flex; gap: 10px; align-items: flex-start; }
.req-list .icon { color: var(--brand); flex: none; margin-top: 2px; }

/* 404 */
.error-page { text-align: center; padding-top: 90px; padding-bottom: 90px; }
.error-page .eyebrow { display: block; margin-bottom: 10px; }

/* Footer: always a dark-navy "premium" surface regardless of the visitor's light/dark toggle,
   with a slightly deeper shade in dark mode. Defined as its own tokens rather than reusing --ink
   etc. (which flip with the theme) so the footer's own contrast stays correct either way. */
:root {
  --footer-bg: #0b1733; --footer-bg-2: #0f2047;
  --footer-text: #e8edf7; --footer-text-soft: #9fb0cf;
  --footer-border: rgba(255,255,255,.12); --footer-heading: #7e93c2;
}
:root[data-theme="dark"] { --footer-bg: #070e24; --footer-bg-2: #0b1733; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --footer-bg: #070e24; --footer-bg-2: #0b1733; }
}

.footer-heading { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--footer-heading); margin-bottom: 14px; font-weight: 700; }

.site-footer {
  position: relative; padding: 56px 0 28px; color: var(--footer-text);
  background: linear-gradient(180deg, var(--footer-bg) 0%, var(--footer-bg-2) 100%);
}
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--brand-deep), transparent);
}
.site-footer p, .site-footer span, .site-footer small { color: var(--footer-text-soft); }
.site-footer .brand-mark { color: var(--footer-text); }
.footer-tagline { max-width: 32ch; font-size: .92rem; line-height: 1.5; margin: 12px 0 0; }

.footer-top { display: grid; grid-template-columns: 1fr; gap: 40px; text-align: left; }
@media (min-width: 880px) { .footer-top { grid-template-columns: 1.1fr 2fr; gap: 48px; } }
.footer-brand { max-width: 320px; }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 560px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }
.footer-col { max-width: 320px; }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer-links a, .footer-contact-list a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--footer-text-soft);
  text-decoration: none; font-size: .92rem; border-radius: var(--radius-sm);
}
.footer-links a:hover, .footer-contact-list a:hover { color: #fff; text-decoration: underline; }
.footer-links a:focus-visible, .footer-contact-list a:focus-visible,
.footer-signin-group a:focus-visible, .social-row a:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px;
}
@media (min-width: 880px) { .footer-links a, .footer-contact-list a { min-height: 0; padding: 3px 0; } }
.footer-contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.footer-contact-list li { display: flex; gap: 10px; align-items: center; color: var(--footer-text-soft); font-size: .92rem; min-height: 44px; }
.footer-contact-list .icon { width: 17px; height: 17px; color: #fff; opacity: .7; flex: none; }
@media (min-width: 880px) { .footer-contact-list li { min-height: 0; } }

.site-footer .social-row a {
  background: rgba(255,255,255,.08); border: 1px solid var(--footer-border); color: var(--footer-text);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
}
.site-footer .social-row a:hover { background: rgba(255,255,255,.16); color: #fff; }
.site-footer .social-row .icon { width: 17px; height: 17px; }

.footer-signin { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--footer-border); text-align: left; }
.footer-signin-groups { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 560px) { .footer-signin-groups { flex-direction: row; gap: 48px; } }
.footer-signin-group { display: flex; flex-direction: column; gap: 2px; }
.footer-signin-label { font-size: .78rem; font-weight: 700; color: var(--footer-heading); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.footer-signin-group a {
  color: var(--footer-text-soft); text-decoration: none; font-size: .92rem; min-height: 44px; display: flex; align-items: center;
}
.footer-signin-group a:hover { color: #fff; text-decoration: underline; }
@media (min-width: 560px) { .footer-signin-group a { min-height: 0; padding: 2px 0; } }

.footer-bottom {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--footer-border);
  font-size: .85rem; color: var(--footer-text-soft);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; text-align: left;
}
@media (max-width: 559px) {
  .footer-top, .footer-cols, .footer-signin-groups, .footer-bottom { text-align: left; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}

.bg-alt { background: var(--surface-alt); }

/* WhatsApp floating button + popup */
.wa-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: var(--radius-full);
  background: #25D366; color: #06240f; display: grid; place-items: center; box-shadow: var(--shadow-md); border: 0; cursor: pointer;
}
.wa-fab .icon { width: 28px; height: 28px; }
.wa-panel {
  position: fixed; right: 20px; bottom: 90px; z-index: 60; width: min(320px, calc(100vw - 40px)); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 18px; display: none;
}
.wa-panel.is-open { display: block; }
.wa-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wa-panel-head button { background: none; border: 0; cursor: pointer; color: var(--ink-soft); }
.wa-greeting { background: var(--surface-alt); border-radius: var(--radius-md); padding: 12px 14px; font-size: .9rem; margin-bottom: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }

  /* Staggered reveal: cards/items within a grid fade up one after another rather than all at
     once. Capped at 6 steps so a long grid doesn't leave its last rows waiting too long. */
  .card-grid > .reveal:nth-child(1), .audience-grid > .reveal:nth-child(1), .stats-grid > .reveal:nth-child(1) { transition-delay: 0s; }
  .card-grid > .reveal:nth-child(2), .audience-grid > .reveal:nth-child(2), .stats-grid > .reveal:nth-child(2) { transition-delay: .08s; }
  .card-grid > .reveal:nth-child(3), .audience-grid > .reveal:nth-child(3), .stats-grid > .reveal:nth-child(3) { transition-delay: .16s; }
  .card-grid > .reveal:nth-child(4), .audience-grid > .reveal:nth-child(4), .stats-grid > .reveal:nth-child(4) { transition-delay: .24s; }
  .card-grid > .reveal:nth-child(5), .audience-grid > .reveal:nth-child(5), .stats-grid > .reveal:nth-child(5) { transition-delay: .32s; }
  .card-grid > .reveal:nth-child(n+6), .audience-grid > .reveal:nth-child(n+6), .stats-grid > .reveal:nth-child(n+6) { transition-delay: .4s; }
  .steps > .reveal:nth-child(1) { transition-delay: 0s; }
  .steps > .reveal:nth-child(2) { transition-delay: .1s; }
  .steps > .reveal:nth-child(3) { transition-delay: .2s; }
  .steps > .reveal:nth-child(4) { transition-delay: .3s; }

  /* Hero: a one-time staggered fade-up on page load (not scroll-triggered — the hero is already
     in view when the page loads), separate from the generic scroll .reveal above. */
  .hero-copy > * { opacity: 0; animation: heroFadeUp .6s ease forwards; }
  .hero-copy .eyebrow { animation-delay: .05s; }
  .hero-copy h1 { animation-delay: .15s; }
  .hero-copy .lead { animation-delay: .28s; }
  .hero-copy .hero-actions { animation-delay: .4s; }
  .hero-copy .trust-list { animation-delay: .52s; }
  @keyframes heroFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

  /* Hover lift on cards and buttons. */
  .card, .btn { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, .1); }
  .btn:hover { transform: translateY(-2px); }

  /* Animated underline on the active primary-nav item. */
  .main-nav a { padding-bottom: 4px; }
  .main-nav a::after {
    content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--brand);
    transition: right .2s ease;
  }
  .main-nav a.is-active::after, .main-nav a:hover::after { right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy > * { opacity: 1; }
}
