/* ─── SERVI Design System — "Refined Minimal+" ────────────────────────────── */
/* Uber-inspired: minimalist, typography-driven, generous whitespace           */
/* Fonts: Outfit (headlines), Plus Jakarta Sans (body) — loaded via <link>     */

/* Landing theme tokens (activated on bodies with class="landing-page"). */
@import url('./landing-theme.css');

/* ─── Custom Properties ─────────────────────────────────────────────────── */
:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
  --color-bg: #fafbfb;
  --color-bg-dark: #0c0f10;
  --color-text: #101213;
  --color-text-secondary: #5b6166;
  --color-text-muted: #8d9498;
  --color-accent: #7fc4cf;
  --color-accent-hover: #3f8e9d;
  --color-accent-deep: #3f8e9d;   /* contrast-passing teal for text/icons on white */
  --color-accent-tint: #eaf5f7;   /* teal wash for chips/soft surfaces */
  --color-accent-ink: #16414a;    /* dark teal for text on tint */
  --color-border: #e7eaea;
  --color-border-input: #dde1e1;
  --color-card-bg: #fff;
  --color-surface: #f3f6f6;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;
  --shadow-card: 0 1px 2px rgba(16,18,19,0.04), 0 8px 24px -16px rgba(16,18,19,0.10);
  --shadow-card-hover: 0 24px 48px -20px rgba(16,18,19,0.18);
  --shadow-dropdown: 0 8px 24px rgba(16,18,19,0.12);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --morph-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.3s;
  --duration-morph: 0.35s;
}

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--color-text); color: #fff; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    radial-gradient(ellipse 200% 130% at 50% -5%,
      #ffffff 0%,
      #fafbfb 40%,
      #edf0f0 100%) fixed;
  min-height: 100vh;
  min-height: 100dvh; /* keeps the page from being taller than the visible area on mobile */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
/* Gutters and section rhythm scale with the viewport instead of holding a
   desktop value all the way down to 375px. Each clamp() reaches its max at
   roughly the tablet breakpoint, so desktop is pixel-identical to before.
   --page-gutter is a token because full-bleed carousels cancel it out with a
   negative margin; if the two ever disagree the page overflows sideways. */
:root { --page-gutter: clamp(16px, 4vw, 24px); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--page-gutter); }
.section { padding: clamp(48px, 7vw, 80px) 0; }
.section--sm { padding: clamp(36px, 5vw, 60px) 0; }

/* ─── Typography ─────────────────────────────────────────────────────────── */
/* Fluid type. Previously these were fixed px with a single step-down at 768px,
   which left 769–900px rendering a 68px headline, and had no tier below 768 at
   all. Each clamp() is tuned to hit its old desktop value at ~1280px and a
   readable size at 375px, so the 768px !important overrides are gone. */
.heading-xl {
  font-family: var(--font-heading);
  font-size: clamp(34px, 19.9px + 3.76vw, 68px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.heading-lg {
  font-family: var(--font-heading);
  font-size: clamp(26px, 20.2px + 1.55vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.heading-md {
  font-family: var(--font-heading);
  font-size: clamp(20px, 18.3px + 0.44vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.heading-sm {
  font-family: var(--font-heading);
  font-size: clamp(18px, 17.2px + 0.22vw, 20px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.text-body { font-size: 17px; color: var(--color-text-secondary); line-height: 1.7; }
.text-sm { font-size: 15px; color: #777; line-height: 1.6; }
.text-xs { font-size: 13px; color: var(--color-text-muted); line-height: 1.6; }
.text-bold { font-weight: 600; color: var(--color-text); }
.text-accent { color: var(--color-accent); }
.gradient-text {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Logo ───────────────────────────────────────────────────────────────── */
.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.01em;
  position: relative;
  top: -1px;
  cursor: pointer;
}
.logo-dot {
  color: #000000;
  display: inline-block;
  width: 0.34em;
  height: 0.20em;
  border-radius: 0.34em 0.34em 0 0;
  background: currentColor;
  margin-left: 2px;
  margin-bottom: 0;
  font-size: inherit;
  line-height: 1;
  vertical-align: baseline;
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--color-text);
  color: #fff;
  border: none;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: #1d2123;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -10px rgba(16,18,19,0.40);
  }
}
.btn-primary--lg { padding: 18px 36px; font-size: 16px; }

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid #d0d0d0;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: var(--font-body);
}
@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover { border-color: var(--color-text); background: var(--color-surface); transform: translateY(-2px); }
}

.btn-white {
  background: #fff;
  color: var(--color-text);
  border: none;
  padding: 16px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.25s;
}
@media (hover: hover) and (pointer: fine) {
  .btn-white:hover { background: #f0f0f0; }
}

.btn-partner {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-deep) 130%);
  color: #fff;
  border: none;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
@media (hover: hover) and (pointer: fine) {
  .btn-partner:hover {
    background: linear-gradient(135deg, #6ab8c4 0%, #357f8d 130%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -10px rgba(63,142,157,0.45);
  }
}
.btn-partner--lg { padding: 18px 36px; font-size: 16px; }

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
  padding: 16px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.25s;
}
@media (hover: hover) and (pointer: fine) {
  .btn-outline-white:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.1); }
}

/* ─── Inputs ─────────────────────────────────────────────────────────────── */
.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border-input);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-body);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
  background: #fff;
}
.input-field:focus { border-color: var(--color-accent-deep); box-shadow: 0 0 0 4px var(--color-accent-tint); }
.input-field::placeholder { color: #a8aeb1; }
textarea.input-field { resize: vertical; min-height: 100px; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  /* 113 usages app-wide — fluid padding here is the single highest-leverage
     spacing change for narrow screens. Reaches the old 28/24 at ~600px. */
  padding: clamp(20px, 4.7vw, 28px) clamp(16px, 4vw, 24px);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring), border-color 0.35s var(--ease-spring);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: #d8dddd;
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
  }
}
.card--clickable { cursor: pointer; position: relative; overflow: hidden; }

.testimonial-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 5.3vw, 32px);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring);
}
@media (hover: hover) and (pointer: fine) {
  .testimonial-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
  }
}

/* ─── Category Cards ─────────────────────────────────────────────────────── */
.cat-card { composes: card card--clickable; }
.cat-card .cat-arrow { opacity: 0; transform: translateX(-8px); transition: all 0.3s; }
@media (hover: hover) and (pointer: fine) {
  .cat-card:hover .cat-arrow { opacity: 1; transform: translateX(0); }
}

/* ─── Steps ──────────────────────────────────────────────────────────────── */
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-text);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

/* ─── Stats ──────────────────────────────────────────────────────────────── */
.stat-num {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}
.stat-label { font-size: 13px; color: #777; margin-top: 6px; letter-spacing: 0.02em; }

/* ─── Provider Dark Section ──────────────────────────────────────────────── */
.provider-section {
  background: var(--color-bg-dark);
  color: #fff;
  border-radius: clamp(24px, 5vw, 32px);
  padding: clamp(32px, 10vw, 64px) clamp(20px, 7vw, 64px);
  margin: 0 clamp(16px, 4vw, 24px);
}

/* ─── Language Toggle ────────────────────────────────────────────────────── */
.lang-toggle {
  display: flex;
  background: #f0f0f0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border-input);
}
.lang-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast);
  font-family: var(--font-body);
  letter-spacing: 0.03em;
}
.lang-active { background: var(--color-text); color: #fff; }
.lang-inactive { background: transparent; color: var(--color-text-muted); }

/* ─── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all var(--duration-normal);
  padding: 20px 0;
}
.navbar--scrolled {
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 12px 0;
}
.navbar--light-on-dark:not(.navbar--scrolled) {
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.navbar--light-on-dark:not(.navbar--scrolled) .logo { color: #fff; }
.navbar--light-on-dark:not(.navbar--scrolled) .logo-dot { color: #fff; }
.navbar--light-on-dark:not(.navbar--scrolled) .nav-link { color: rgba(255,255,255,0.82); }
@media (hover: hover) and (pointer: fine) {
  .navbar--light-on-dark:not(.navbar--scrolled) .nav-link:hover { color: #fff; }
}
.navbar--light-on-dark:not(.navbar--scrolled) .nav-login-btn { color: #fff; }
.navbar--light-on-dark:not(.navbar--scrolled) .nav-signup-btn {
  background: #fff;
  color: var(--color-text);
}
.navbar--light-on-dark:not(.navbar--scrolled) .lang-toggle {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.24);
}
.navbar--light-on-dark:not(.navbar--scrolled) .lang-active {
  background: #fff;
  color: var(--color-text);
}
.navbar--light-on-dark:not(.navbar--scrolled) .lang-inactive { color: rgba(255,255,255,0.82); }
.navbar--light-on-dark:not(.navbar--scrolled) .hamburger { color: #fff; }
.navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-link {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--duration-fast);
  letter-spacing: 0.01em;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { color: var(--color-text); }
}

.nav-login-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  font-family: var(--font-body);
}
.nav-signup-btn {
  background: var(--color-text);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
}

/* ─── User Menu Dropdown ─────────────────────────────────────────────────── */
.user-menu { position: relative; }
.user-menu-trigger {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1.5px solid var(--color-border-input); border-radius: 24px;
  padding: 4px 14px 4px 4px; cursor: pointer; font-family: var(--font-body);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
@media (hover: hover) and (pointer: fine) {
  .user-menu-trigger:hover { border-color: var(--color-text); }
}
.user-menu-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--color-text); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; font-family: var(--font-heading); flex-shrink: 0;
}
.user-menu-name { font-size: 14px; font-weight: 500; color: var(--color-text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown); min-width: 220px; z-index: 1001;
  padding: 8px 0; animation: fadeIn 0.15s ease;
}
.user-menu-dropdown--open { display: block; }
.user-menu-dropdown-header {
  padding: 12px 16px; border-bottom: 1px solid #f0f0f0;
}
.user-menu-dropdown-header .um-name { font-size: 15px; font-weight: 600; color: var(--color-text); }
.user-menu-dropdown-header .um-email { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.user-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 16px; border: none; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--color-text); text-decoration: none;
  font-family: var(--font-body); transition: background 0.15s;
}
@media (hover: hover) and (pointer: fine) {
  .user-menu-item:hover { background: var(--color-surface); }
}
.user-menu-item--danger { color: #ef4444; }
@media (hover: hover) and (pointer: fine) {
  .user-menu-item--danger:hover { background: #fef2f2; }
}
.user-menu-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }

.navbar--light-on-dark:not(.navbar--scrolled) .user-menu-trigger { border-color: rgba(255,255,255,0.3); }
.navbar--light-on-dark:not(.navbar--scrolled) .user-menu-name { color: #fff; }
.navbar--light-on-dark:not(.navbar--scrolled) .user-menu-avatar { background: #fff; color: var(--color-text); }

/* ─── Hamburger & Mobile Menu ────────────────────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1000;
}
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: #fff;
  z-index: 1001;
  padding: 24px;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  animation: slideInRight 0.3s ease;
}

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--duration-fast);
  /* This backdrop is a <div> with a click handler, so mobile-base.css's
     touch-action list (button, [role=button], a, label, …) does not reach it.
     Without these, tap-to-dismiss keeps the ~300ms double-tap-zoom delay on
     Android, and iOS Safari will not reliably synthesize a click on a
     non-interactive element that has no cursor:pointer. */
  touch-action: manipulation;
  cursor: pointer;
}
.modal-content { cursor: auto; }
.modal-content {
  background: #fff;
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 92%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  animation: slideUp 0.35s var(--ease-spring);
}

/* ─── Booking Panel ──────────────────────────────────────────────────────── */
.booking-panel {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 999;
  overflow-y: auto;
  animation: slideUp 0.4s var(--ease-spring);
}
.booking-cat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s;
  background: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .booking-cat:hover { border-color: var(--color-text); background: var(--color-bg); }
}
.booking-cat--active { border-color: var(--color-text); background: var(--color-surface); }
.booking-cat__emoji {
  flex: 0 0 auto;
  width: 42px;
  font-size: 34px;
  line-height: 1;
  text-align: center;
}

/* ─── Radio Options ──────────────────────────────────────────────────────── */
.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border-input);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}
@media (hover: hover) and (pointer: fine) {
  .radio-option:hover { border-color: #999; }
}
.radio-option--selected { border-color: var(--color-text); background: #f8f8f8; }
.radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--duration-fast);
}
.radio-option--selected .radio-dot { border-color: var(--color-text); }
.radio-option--selected .radio-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text);
}

/* ─── Divider ────────────────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, #ddd, transparent);
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid #eee;
  padding: 48px 0 32px;
  background: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}
.footer-col-title { font-weight: 700; font-size: 14px; margin-bottom: 16px; color: var(--color-text); }
.footer-link {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  cursor: pointer;
  transition: color var(--duration-fast);
  display: block;
}
@media (hover: hover) and (pointer: fine) {
  .footer-link:hover { color: var(--color-text); }
}
.footer-bottom {
  border-top: 1px solid #eee;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-8px); } }

.animate-fadeUp { animation: fadeUp 0.8s ease both; }
.animate-fadeIn { animation: fadeIn 0.5s ease both; }

/* mobile-base.css only neutralizes the :active press transform, so with Reduce
   Motion on, the auth modal still played its full 0.35s sheet slide. On a phone
   .modal-content is a bottom sheet, making translateY(100%) the whole sheet
   height — the largest motion in the app. */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-content,
  .animate-fadeUp,
  .animate-fadeIn { animation: none; }
}

/* Pre-paint hide for GSAP scroll reveals (see motion.js). The `reveal-armed`
   class is set in each page's <head> before first paint and removed by motion.js
   once it takes over (or by a failsafe timeout if the motion layer never loads),
   so content is never permanently trapped hidden. Prevents the flash where
   reveal targets paint visible, then GSAP hides + re-animates them. */
   pointer-events is disabled alongside the opacity: motion.js bails early when
   the GSAP CDN scripts lose the race on a slow mobile connection, so the only
   escape is the 2000ms failsafe. Until it fires these elements are invisible but
   were still fully hit-testable — the user saw blank space, tapped it, and
   silently activated a control they could not see. */
html.reveal-armed [data-reveal],
html.reveal-armed [data-reveal-stagger] > * { opacity: 0; pointer-events: none; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .desktop-nav { display: none !important; }
  .hamburger { display: block; }
}

@media (max-width: 768px) {
  /* .heading-xl / .heading-lg / .section / .provider-section step-downs removed —
     the base rules now use clamp() and scale continuously, which also fixes the
     769–900px dead zone where a 68px headline was still being rendered. */
  .grid-3 { grid-template-columns: 1fr !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  .about-layout { flex-direction: column !important; }
}

/* ─── Narrow phones ──────────────────────────────────────────────────────── */
/* There was previously no tier below 768px at all. */
@media (max-width: 480px) {
  .stats-grid { gap: 16px !important; }
  .stat-num { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ─── Touch sizing ───────────────────────────────────────────────────────── */
/* Keyed on pointer type rather than width so a small touch laptop is treated as
   touch and a narrow desktop window is not. Desktop density is unchanged. */
@media (pointer: coarse) {
  /* 44px is the documented minimum tap target on both platforms; 48px gives the
     comfortable margin these are all primary CTAs. */
  .btn-primary,
  .btn-secondary,
  .btn-white,
  .btn-partner,
  .btn-outline-white {
    min-height: 48px;
    font-size: 16px;
    justify-content: center;
  }
  .btn-primary--lg,
  .btn-partner--lg { min-height: 52px; }

  /* iOS zooms the whole page when a focused field is under 16px. The old rule
     was scoped to max-width:768px, which missed tablets in landscape. */
  .input-field,
  textarea.input-field,
  select.input-field { font-size: 16px; }

  .radio-option { min-height: 48px; }
  .lang-toggle button { min-height: 40px; }
}

/* ─── Modals become bottom sheets on phones ──────────────────────────────── */
/* A centered 440px box with 8% side margins reads as a web dialog. Anchoring it
   to the bottom edge, full width, is the native pattern — and the existing
   `slideUp` keyframe already animates from translateY(100%), so it was already
   the right motion for a sheet, just applied to the wrong anchor. */
@media (max-width: 600px) {
  .modal-overlay { align-items: flex-end; }
  .modal-content {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    /* Clears the iOS home indicator so the last control is never under it. */
    padding-bottom: var(--safe-b, 0px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

/* ─── Grid helpers ───────────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.flex-gap-12 { display: flex; gap: 12px; flex-wrap: wrap; }
.flex-gap-32 { display: flex; gap: 32px; align-items: center; }

#navbar { visibility: hidden; }
#footer { visibility: hidden; }
