/* ==========================================================================
   Apex Roofing Automations — styles.css
   Design system: design-system/apex-roofing-automations/MASTER.md
   Tokens follow a semantic (shadcn-style) model so light/dark swap cleanly.
   Mobile-first. Breakpoints: 640 / 768 / 1024 / 1280.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand palette (MASTER.md) */
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-500: #3B82F6;
  --orange-600: #EA580C;
  --orange-500: #F97316;
  --navy-950: #0B1220;

  /* Semantic: light (default) */
  --background: #F8FAFC;
  --background-alt: #FFFFFF;
  --foreground: #1E293B;
  --heading: #0F172A;
  --card: #FFFFFF;
  --card-foreground: #1E293B;
  --muted: #E9EFF8;
  --muted-foreground: #475569;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --input: #FFFFFF;
  --input-border: #7C8BA1; /* 3.4:1 on white, meets WCAG 1.4.11 */
  --primary: var(--blue-600);
  --primary-hover: var(--blue-700);
  --on-primary: #FFFFFF;
  --link: #1D4ED8;
  --accent: var(--orange-600);
  --accent-hover: var(--orange-500);
  --on-accent: #0B1220;
  --accent-soft: #FFF1E7;
  --accent-text: #C2410C;
  --primary-soft: #E8F0FE;
  --success: #166534;
  --success-soft: #DCFCE7;
  --destructive: #DC2626;
  --destructive-text: #B91C1C;
  --ring: var(--blue-600);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --hero-blob-1: rgba(37, 99, 235, 0.22);
  --hero-blob-2: rgba(234, 88, 12, 0.16);
  --hero-bg-opacity: 1;

  /* Spacing (MASTER.md) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius & shadow */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);

  /* Type */
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur: 220ms;

  --header-h: 68px;
  --container: 1200px;
  --gutter: 16px;

  color-scheme: light;
}

/* Dark theme: applied via [data-theme="dark"] on <html> (toggle in header). */
:root[data-theme="dark"] {
  --background: #0B1220;
  --background-alt: #0E1628;
  --foreground: #E2E8F0;
  --heading: #F8FAFC;
  --card: #111A2E;
  --card-foreground: #E2E8F0;
  --muted: #1A2440;
  --muted-foreground: #A3B1C6;
  --border: #22304D;
  --border-strong: #334466;
  --input: #0E1628;
  --input-border: #5B6B88;
  --link: #93C5FD;
  --accent-soft: rgba(234, 88, 12, 0.14);
  --accent-text: #FDBA74;
  --primary-soft: rgba(37, 99, 235, 0.18);
  --success: #4ADE80;
  --success-soft: rgba(34, 197, 94, 0.14);
  --destructive-text: #FCA5A5;
  --ring: #60A5FA;
  --glass: rgba(14, 22, 40, 0.72);
  --glass-border: rgba(148, 163, 184, 0.16);
  --hero-blob-1: rgba(37, 99, 235, 0.32);
  --hero-blob-2: rgba(234, 88, 12, 0.18);
  --hero-bg-opacity: 0.7;
  --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px -6px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 40px -10px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; --header-h: 72px; }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}

@supports (overflow: clip) {
  body { overflow-x: clip; }
}

body.menu-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}
h3 { font-weight: 700; letter-spacing: -0.01em; }
p { text-wrap: pretty; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--primary); color: var(--on-primary); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 72px; position: relative; }
.section--alt { background: var(--background-alt); }
:root[data-theme="dark"] .section--alt { background: var(--background-alt); }
@media (min-width: 1024px) { .section { padding-block: 104px; } }

.section-head { max-width: 720px; margin-bottom: var(--space-2xl); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
.section-head p { margin-top: var(--space-md); color: var(--muted-foreground); font-size: 1.0625rem; }
@media (min-width: 768px) { .section-head p { font-size: 1.125rem; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-md);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.sample-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px dashed currentColor;
  white-space: nowrap;
}

.note {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ---------- 3. Icons ---------- */
.icon { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 28px; height: 28px; }

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-bg: var(--card);
  --btn-fg: var(--foreground);
  --btn-border: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur) ease, box-shadow var(--dur) ease, border-color var(--dur) ease, color var(--dur) ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn:active { transform: translateY(0) scale(0.98); box-shadow: none; }
.btn .icon { transition: transform var(--dur) var(--ease-out); }
.btn:hover .icon--arrow { transform: translateX(3px); }

.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-border: var(--accent); }
.btn--accent:hover { --btn-bg: var(--accent-hover); --btn-border: var(--accent-hover); box-shadow: 0 8px 20px -6px rgba(234, 88, 12, 0.55); }
.btn--primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-border: var(--primary); }
.btn--primary:hover { --btn-bg: var(--primary-hover); --btn-border: var(--primary-hover); box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.55); }
.btn--outline { --btn-bg: transparent; }
.btn--outline:hover { --btn-bg: var(--muted); }
.btn--ghost { --btn-bg: transparent; --btn-border: transparent; }
.btn--ghost:hover { --btn-bg: var(--muted); box-shadow: none; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: background-color var(--dur) ease, transform var(--dur-fast) var(--ease-out), border-color var(--dur) ease;
}
.icon-btn:hover { background: var(--muted); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.icon-btn:disabled:hover { background: var(--card); }

/* ---------- 5. Badges / chips ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }

/* ---------- 6. Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease, background-color var(--dur) ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--heading);
  min-height: 44px;
  flex: none;
}
.logo svg { width: 40px; height: 40px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.logo-text span { font-size: 0.75rem; font-weight: 600; color: var(--muted-foreground); margin-top: 4px; letter-spacing: 0.01em; }

.nav-desktop { display: none; }
.nav-list { display: flex; gap: 2px; list-style: none; padding: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  position: relative;
  transition: color var(--dur) ease, background-color var(--dur) ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 8px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.nav-link:hover { color: var(--heading); }
.nav-link:hover::after, .nav-link[aria-current="true"]::after { transform: scaleX(1); }
.nav-link[aria-current="true"] { color: var(--heading); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-cta { display: none; }

.theme-toggle .icon-moon { display: block; }
.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; }

.menu-toggle .bar {
  display: block;
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) ease;
}
.menu-toggle .bars { display: grid; gap: 5px; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 99;
  background: var(--background);
  padding: var(--space-lg) var(--gutter) var(--space-2xl);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition: opacity var(--dur) ease, transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
}
.mobile-nav.is-open {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity var(--dur) ease, transform var(--dur) var(--ease-out), visibility 0s;
}
.mobile-nav ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.mobile-nav a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:not(.btn):hover { background: var(--muted); }
.mobile-nav .btn { margin-top: var(--space-lg); }

@media (min-width: 640px) {
  .header-cta { display: inline-flex; min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }
}
@media (min-width: 1080px) {
  .nav-desktop { display: block; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding-block: 48px 56px;
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 1024px) { .hero { padding-block: 72px 88px; } }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-bg__art {
  position: absolute;
  inset: 0;
  background: url("../assets/hero-bg.svg") center / cover no-repeat;
  opacity: var(--hero-bg-opacity);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  will-change: transform;
}
.hero-blob--1 { width: 520px; height: 520px; right: -160px; top: -140px; background: var(--hero-blob-1); animation: blob-a 18s ease-in-out infinite alternate; }
.hero-blob--2 { width: 380px; height: 380px; left: -140px; bottom: -160px; background: var(--hero-blob-2); animation: blob-b 22s ease-in-out infinite alternate; }
@keyframes blob-a { to { transform: translate3d(-90px, 70px, 0) scale(1.12); } }
@keyframes blob-b { to { transform: translate3d(110px, -60px, 0) scale(1.08); } }

.hero-grid {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.08fr 0.92fr; gap: 56px; }
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: var(--space-lg);
}
.hero-kicker .dot {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--success-soft);
}
.hero-kicker .dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); } 100% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } }

.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 4.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.hero h1 .hl { color: var(--accent-text); }
.hero-sub {
  margin-top: var(--space-lg);
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 560px;
}
@media (min-width: 768px) { .hero-sub { font-size: 1.25rem; } }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-xl);
}
.hero-ctas .btn { flex: 1 1 200px; }
@media (min-width: 640px) { .hero-ctas .btn { flex: 0 0 auto; } }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: var(--space-lg);
  padding: 0;
  list-style: none;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  font-weight: 500;
}
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .icon { color: var(--success); }

/* Workflow visual */
.flow-card {
  position: relative;
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  outline: 1px solid var(--border);
  outline-offset: -1px;
}
@media (min-width: 768px) { .flow-card { padding: var(--space-xl); } }

.flow-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-lg);
}
.flow-card__title { font-size: 0.875rem; font-weight: 700; color: var(--heading); display: flex; align-items: center; gap: 8px; }
.flow-card__live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--success);
}
.flow-card__live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2s ease-out infinite; }

.flow { list-style: none; padding: 0; display: grid; }
.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.flow-step__glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  opacity: 0;
  pointer-events: none;
}
.flow-step__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--link);
}
.flow-step--done .flow-step__icon { background: var(--accent); color: var(--on-accent); }
.flow-step__label { font-weight: 700; color: var(--heading); font-size: 0.9375rem; line-height: 1.3; }
.flow-step__meta { font-size: 0.8125rem; color: var(--muted-foreground); line-height: 1.35; }
.flow-step__time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--muted);
  white-space: nowrap;
}
.flow-step__check { color: var(--success); opacity: 0; }

.flow-link {
  position: relative;
  height: 28px;
  margin-left: 35px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--border-strong) 0 4px, transparent 4px 8px);
}
.flow-link__dot {
  position: absolute;
  left: -4px; top: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.2);
  opacity: 0;
}

.flow-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--border-strong);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.flow-card__foot strong { color: var(--heading); font-size: 1.125rem; }

/* Trust strip */
.trust {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.trust p { font-size: 0.875rem; font-weight: 600; color: var(--muted-foreground); }
.trust-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.trust-badge {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--heading);
  letter-spacing: -0.01em;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) ease;
}
.trust-badge:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.trust-badge i { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--primary); }
@media (min-width: 768px) {
  .trust { flex-direction: row; align-items: center; gap: var(--space-xl); }
  .trust p { flex: none; }
}

/* ---------- 8. Cards (generic) ---------- */
.card {
  position: relative;
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) ease, border-color var(--dur) ease;
}
@media (min-width: 768px) { .card { padding: var(--space-xl); } }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card h3 { font-size: 1.1875rem; }
.card p { color: var(--muted-foreground); margin-top: var(--space-sm); }

.card-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--link);
  margin-bottom: var(--space-lg);
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) ease, color var(--dur) ease;
}
.card--hover:hover .card-icon { transform: rotate(-6deg) scale(1.06); background: var(--primary); color: var(--on-primary); }

/* ---------- 9. Problem → Solution ---------- */
.ps-list { display: grid; gap: var(--space-md); list-style: none; padding: 0; }
.ps-row {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.ps-side { padding: var(--space-lg); display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.ps-side h3 { font-size: 1.0625rem; }
.ps-side p { color: var(--muted-foreground); margin-top: 4px; font-size: 0.9688rem; }
.ps-side .tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.ps-problem .tag { color: var(--destructive-text); }
.ps-solution .tag { color: var(--success); }
.ps-problem { background: var(--card); }
.ps-solution { background: var(--primary-soft); border-top: 1px solid var(--border); position: relative; }
.ps-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.ps-problem .ps-ico { background: rgba(220, 38, 38, 0.1); color: var(--destructive-text); }
.ps-solution .ps-ico { background: var(--success-soft); color: var(--success); }
.ps-arrow {
  position: absolute;
  top: 0; left: 50%;
  translate: -50% -50%;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 4px var(--card);
  rotate: 90deg;
}
@media (min-width: 900px) {
  .ps-row { grid-template-columns: 1fr 1fr; }
  .ps-solution { border-top: 0; border-left: 1px solid var(--border); }
  .ps-arrow { left: 0; top: 50%; rotate: 0deg; }
  .ps-side { padding: var(--space-xl); }
}

/* ---------- 10. Services ---------- */
.grid-3 { display: grid; gap: var(--space-lg); }
@media (min-width: 700px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.service-outcome {
  display: flex; align-items: center; gap: 8px;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--heading);
}
.service-outcome .icon { color: var(--accent-text); }

.grid-2 { display: grid; gap: var(--space-lg); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 11. Process timeline ---------- */
.timeline { position: relative; list-style: none; padding: 0; display: grid; gap: var(--space-xl); }
.timeline__track {
  position: absolute;
  left: 23px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.timeline__fill {
  position: absolute; inset: 0;
  background: linear-gradient(var(--primary), var(--accent));
  transform-origin: top;
  transform: scaleY(1);
}
.timeline__step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: var(--space-lg); }
.timeline__num {
  position: relative;
  z-index: 1;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--primary);
  color: var(--link);
  font-weight: 800;
  font-size: 1.0625rem;
  box-shadow: 0 0 0 6px var(--background);
}
.section--alt .timeline__num { box-shadow: 0 0 0 6px var(--background-alt); }
.timeline__body { padding-bottom: 4px; }
.timeline__body h3 { font-size: 1.25rem; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.timeline__body p { color: var(--muted-foreground); margin-top: 6px; }
.timeline__time { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); letter-spacing: 0.02em; }
.timeline__body ul { margin-top: 10px; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.timeline__body li { display: flex; gap: 8px; color: var(--foreground); font-size: 0.9375rem; }
.timeline__body li .icon { color: var(--success); margin-top: 3px; }

@media (min-width: 1024px) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
  .timeline__track { left: 24px; right: 24px; top: 23px; bottom: auto; width: auto; height: 2px; }
  .timeline__fill { transform-origin: left; }
  .timeline__step { grid-template-columns: 1fr; gap: var(--space-lg); }
}

/* ---------- 12. Case studies ---------- */
.case-card { display: flex; flex-direction: column; height: 100%; }
.case-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-md); }
.case-card__client { min-height: 28px; font-size: 0.8125rem; padding: 2px 10px; }
.case-card__type { font-size: 0.8125rem; font-weight: 700; color: var(--muted-foreground); }
.case-card__result {
  margin-top: var(--space-md);
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--primary-soft);
}
.case-card__result strong { display: block; font-size: 1.75rem; font-weight: 800; color: var(--heading); letter-spacing: -0.02em; line-height: 1.1; }
.case-card__result span { font-size: 0.875rem; color: var(--muted-foreground); font-weight: 500; }
.case-card dl { margin-top: var(--space-md); display: grid; gap: 10px; }
.case-card dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); }
.case-card dd { margin: 2px 0 0; font-size: 0.9375rem; color: var(--foreground); }
.case-card .badge-list { margin-top: var(--space-md); }
.case-card .badge { min-height: 28px; font-size: 0.8125rem; padding: 2px 10px; background: var(--muted); border-color: transparent; }
.case-card__cta { margin-top: auto; padding-top: var(--space-lg); }

.stats {
  margin-top: var(--space-2xl);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat { background: var(--card); padding: var(--space-lg) var(--space-md); text-align: center; }
.stat__value {
  display: block;
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 2.75rem);
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat__label { display: block; margin-top: 6px; font-size: 0.875rem; color: var(--muted-foreground); font-weight: 500; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } .stat { padding: var(--space-xl) var(--space-lg); } }
.stats-note { margin-top: var(--space-md); text-align: center; }

/* Modal (native <dialog>) */
.modal {
  width: min(680px, calc(100% - 32px));
  max-height: min(88vh, 900px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; animation: modal-in 260ms var(--ease-out); }
.modal::backdrop { background: rgba(11, 18, 32, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade-in 200ms ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } }
.modal__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}
.modal__head h3 { font-size: 1.375rem; margin-top: 8px; }
.modal__body { padding: var(--space-lg); overflow-y: auto; }
.modal__body h4 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground); margin-top: var(--space-lg); margin-bottom: 6px; font-weight: 700; }
.modal__body h4:first-child { margin-top: 0; }
.modal__body ul { padding-left: 1.2em; display: grid; gap: 6px; }
.modal__body p { color: var(--foreground); }
.modal__body .badge-list { display: flex; padding-left: 0; }
.modal__result { padding: 14px 16px; border-radius: 12px; background: var(--primary-soft); font-weight: 600; color: var(--heading); }
.modal__head .case-card__type { display: block; }
.modal__results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 8px; }
.modal__results div { padding: 14px; border-radius: 12px; background: var(--primary-soft); }
.modal__results strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--heading); line-height: 1.1; }
.modal__results span { font-size: 0.8125rem; color: var(--muted-foreground); }
.modal__foot { padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (min-width: 768px) { .modal__head, .modal__body { padding: var(--space-xl); } }

/* ---------- 13. Pricing ---------- */
.billing-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--muted);
  border: 1px solid var(--border);
  margin-top: var(--space-lg);
  position: relative;
}
.billing-toggle button {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  transition: color var(--dur) ease, background-color var(--dur) ease, box-shadow var(--dur) ease;
}
.billing-toggle button[aria-pressed="true"] { background: var(--card); color: var(--heading); box-shadow: var(--shadow-md); }

.pricing-grid { display: grid; gap: var(--space-lg); align-items: stretch; }
@media (min-width: 1024px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

.plan { display: flex; flex-direction: column; }
.plan--featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-xl);
}
@media (min-width: 1024px) { .plan--featured { transform: translateY(-12px); } .plan--featured.card--hover:hover { transform: translateY(-16px); } }
.plan__badge {
  position: absolute;
  top: 0; left: 50%;
  translate: -50% -50%;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.plan__name { font-size: 1.25rem; }
.plan__desc { min-height: 3.2em; }
.plan__price { margin-top: var(--space-lg); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan__amount { font-size: clamp(2.25rem, 1.8rem + 1.6vw, 2.75rem); font-weight: 800; color: var(--heading); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; display: inline-block; }
.plan__period { color: var(--muted-foreground); font-weight: 600; font-size: 0.9375rem; }
.plan__sub { margin-top: 6px; font-size: 0.875rem; color: var(--muted-foreground); min-height: 1.5em; }
.plan .btn { margin-top: var(--space-lg); }
.plan__features { list-style: none; padding: 0; margin-top: var(--space-lg); display: grid; gap: 10px; }
.plan__features li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 0.9375rem; color: var(--foreground); }
.plan__features .icon { color: var(--success); margin-top: 3px; }
.plan__features li.inherit { font-weight: 700; color: var(--heading); }

.custom-line {
  margin-top: var(--space-xl);
  display: flex; flex-direction: column; gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  background: var(--card);
}
.custom-line h3 { font-size: 1.125rem; }
.custom-line p { color: var(--muted-foreground); margin-top: 4px; }
@media (min-width: 768px) { .custom-line { flex-direction: row; align-items: center; justify-content: space-between; padding: var(--space-lg) var(--space-xl); } }

.pricing-note { margin-top: var(--space-md); text-align: center; }

/* Comparison table */
.compare { margin-top: var(--space-2xl); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.compare > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px;
  padding: 0 var(--space-lg);
  font-weight: 700;
  color: var(--heading);
  cursor: pointer;
  list-style: none;
}
.compare > summary::-webkit-details-marker { display: none; }
.compare > summary .icon { transition: transform var(--dur) var(--ease-out); }
.compare[open] > summary .icon { transform: rotate(180deg); }
.compare > summary:hover { background: var(--muted); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.compare-table caption { text-align: left; padding: 0 var(--space-lg) var(--space-md); color: var(--muted-foreground); font-size: 0.875rem; }
.compare-table th, .compare-table td { padding: 14px var(--space-lg); text-align: left; border-top: 1px solid var(--border); }
.compare-table thead th { font-size: 0.875rem; color: var(--heading); background: var(--muted); }
.compare-table tbody th { font-weight: 600; color: var(--foreground); }
.compare-table td { text-align: center; }
.compare-table thead th:not(:first-child) { text-align: center; }
.compare-table .yes { color: var(--success); display: inline-flex; }
.compare-table .no { color: var(--muted-foreground); display: inline-flex; }
.compare-table .col-featured { background: var(--primary-soft); }

/* Mobile: table rows collapse into stacked blocks */
@media (max-width: 767.98px) {
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare-table, .compare-table caption, .compare-table tbody, .compare-table tr, .compare-table th, .compare-table td { display: block; width: 100%; }
  .compare-table tr { border-top: 1px solid var(--border); padding: 12px var(--space-lg); }
  .compare-table tbody th { border: 0; padding: 0 0 8px; }
  .compare-table td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; align-items: center; text-align: right; background: none !important; }
  .compare-table td::before { content: attr(data-label); font-weight: 600; color: var(--muted-foreground); font-size: 0.875rem; }
}

/* ---------- 14. About ---------- */
.about-grid { display: grid; gap: var(--space-2xl); align-items: start; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 0.8fr 1.2fr; gap: 64px; } }
.about-photo {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 6 / 7;
  background: var(--muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  max-width: 440px;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo__tag {
  position: absolute;
  left: 16px; bottom: 16px; right: 16px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  font-size: 0.875rem;
}
.about-photo__tag strong { display: block; color: var(--heading); font-size: 0.9375rem; }
.about-photo__tag span { color: var(--muted-foreground); }
.about-title { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); margin-bottom: var(--space-lg); }
.about-copy p { color: var(--foreground); margin-top: var(--space-md); font-size: 1.0625rem; }
.about-copy p:first-of-type { margin-top: 0; }
.about-facts { list-style: none; padding: 0; margin-top: var(--space-xl); display: grid; gap: 12px; }
@media (min-width: 640px) { .about-facts { grid-template-columns: 1fr 1fr; } }
.about-facts li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.about-facts .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--link); }
.about-facts strong { display: block; color: var(--heading); font-size: 0.9375rem; line-height: 1.35; }
.about-facts span { font-size: 0.875rem; color: var(--muted-foreground); }
.about-sub { margin-top: var(--space-xl); font-size: 1rem; font-weight: 700; color: var(--heading); }
.about-sub + .badge-list { margin-top: 12px; }
.badge--tool { min-height: 40px; padding: 6px 14px; transition: transform var(--dur) var(--ease-out), border-color var(--dur) ease; }
.badge--tool:hover { transform: translateY(-2px); border-color: var(--primary); }
.cert-list { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 10px; }
.cert-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 12px; font-size: 0.9375rem; flex-wrap: wrap; }
.cert-list .icon { color: var(--accent-text); }

/* Tools logo strip (infinite right-to-left marquee) */
.tools-strip { margin-top: var(--space-3xl); }
.tools-strip__title { text-align: center; font-size: 1.25rem; margin-bottom: var(--space-lg); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; gap: 12px; padding: 0 12px 0 0; margin: 0; list-style: none; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
.logo-tile {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 168px;
  height: 104px;
  padding: 0 16px;
  border-radius: 16px;
  background: #16191F;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #F8FAFC;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) ease;
}
.logo-tile:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.18); }
.logo-tile img { width: 32px; height: 32px; object-fit: contain; flex: none; border-radius: 6px; }
.logo-tile img.logo-tile__wordmark { width: 128px; height: auto; border-radius: 0; }
@media (min-width: 768px) {
  .logo-tile { width: 200px; height: 120px; font-size: 1.0625rem; }
  .logo-tile img { width: 36px; height: 36px; }
  .logo-tile img.logo-tile__wordmark { width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; width: auto; }
  .marquee__group { flex-wrap: wrap; justify-content: center; padding: 0; }
  .marquee__group[aria-hidden="true"] { display: none; }
}

/* ---------- 15. Testimonials carousel ---------- */
.carousel { position: relative; }
.carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: var(--radius-lg);
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__track { display: flex; gap: var(--space-lg); list-style: none; padding: 4px; }
.carousel__slide { flex: 0 0 100%; scroll-snap-align: start; }
@media (min-width: 768px) { .carousel__slide { flex-basis: calc((100% - var(--space-lg)) / 2); } }
@media (min-width: 1200px) { .carousel__slide { flex-basis: calc((100% - 2 * var(--space-lg)) / 3); } }
.quote { height: 100%; display: flex; flex-direction: column; }
.quote__stars { display: flex; gap: 2px; color: #F59E0B; margin-bottom: var(--space-md); }
.quote__stars svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.quote blockquote { font-size: 1.0625rem; color: var(--heading); font-weight: 500; line-height: 1.6; }
.quote__title { font-size: 1.1875rem; font-weight: 800; color: var(--heading); letter-spacing: -0.01em; }
.quote__ba { margin-top: var(--space-md); display: grid; gap: 12px; }
.quote__ba dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); }
.quote__ba div:last-child dt { color: var(--success); }
.quote__ba dd { margin: 2px 0 0; color: var(--foreground); }
.quote__foot, .quote figcaption { margin-top: auto; padding-top: var(--space-lg); display: flex; align-items: center; gap: 12px; }
.quote__avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--link); font-weight: 800; flex: none; }
.quote__who strong { display: block; color: var(--heading); font-size: 0.9375rem; }
.quote__who span { font-size: 0.8125rem; color: var(--muted-foreground); }
.quote .sample-tag { align-self: flex-start; margin-bottom: var(--space-md); }
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: var(--space-md); margin-top: var(--space-lg); }
.carousel__dots { display: flex; gap: 4px; }
.carousel__dot { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.carousel__dot span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); transition: transform var(--dur) var(--ease-out), background-color var(--dur) ease; }
.carousel__dot[aria-current="true"] span { background: var(--primary); transform: scale(1.3); }

/* ---------- 16. FAQ ---------- */
.faq-list { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); transition: border-color var(--dur) ease, box-shadow var(--dur) ease; }
.faq-item[open] { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px;
  padding: 14px var(--space-lg);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--heading);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--link); }
.faq-item__icon {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--muted);
  color: var(--heading);
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) ease, color var(--dur) ease;
}
.faq-item[open] .faq-item__icon { transform: rotate(45deg); background: var(--primary); color: var(--on-primary); }
.faq-item__body { padding: 0 var(--space-lg) var(--space-lg); color: var(--muted-foreground); }
.faq-item__body p + p { margin-top: 10px; }

/* ---------- 17. Booking form ---------- */
.book-grid { display: grid; gap: var(--space-2xl); }
@media (min-width: 1024px) { .book-grid { grid-template-columns: 0.75fr 1.25fr; gap: 56px; align-items: start; } }
.book-aside h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem); }
.book-aside > p { margin-top: var(--space-md); color: var(--muted-foreground); font-size: 1.0625rem; }
.book-steps { list-style: none; padding: 0; margin-top: var(--space-xl); display: grid; gap: var(--space-md); counter-reset: s; }
.book-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; counter-increment: s; }
.book-steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--link); font-weight: 800; }
.book-steps strong { display: block; color: var(--heading); }
.book-steps span { font-size: 0.9375rem; color: var(--muted-foreground); }
.book-contact { margin-top: var(--space-xl); padding: var(--space-lg); border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border); display: grid; gap: 4px; }
.book-contact a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; color: var(--heading); text-decoration: none; }
.book-contact a:hover { color: var(--link); text-decoration: underline; }
.book-contact .icon { color: var(--link); }

.form-card { padding: var(--space-lg); }
@media (min-width: 768px) { .form-card { padding: var(--space-2xl); } }
.form-card__head { display: flex; flex-direction: column; gap: 12px; padding-bottom: var(--space-lg); margin-bottom: var(--space-lg); border-bottom: 1px solid var(--border); }
.form-card__head h3 { font-size: 1.375rem; }
@media (min-width: 640px) { .form-card__head { flex-direction: row; align-items: center; justify-content: space-between; } }
.cal-link[hidden] { display: none; }
.cal-link { white-space: normal; text-align: center; padding-block: 10px; }
.book-grid > * { min-width: 0; }

.form-grid { display: grid; gap: var(--space-lg) var(--space-md); }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 0.9375rem; color: var(--heading); }
.field .req { color: var(--destructive-text); margin-left: 2px; }
.field .opt { font-weight: 500; color: var(--muted-foreground); font-size: 0.8125rem; margin-left: 4px; }
.hint { font-size: 0.8125rem; color: var(--muted-foreground); }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  background: var(--input);
  color: var(--foreground);
  font-size: 1rem; /* 16px avoids iOS zoom */
  transition: border-color var(--dur) ease, box-shadow var(--dur) ease, background-color var(--dur) ease;
}
.textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.input::placeholder, .textarea::placeholder { color: #64748B; opacity: 1; }
:root[data-theme="dark"] .input::placeholder, :root[data-theme="dark"] .textarea::placeholder { color: #8090A8; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted-foreground); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--destructive); }
.field.has-error .input:focus, .field.has-error .select:focus, .field.has-error .textarea:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2); }
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }

.error {
  display: none;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--destructive-text);
}
.error::before {
  content: "";
  flex: none;
  width: 16px; height: 16px;
  margin-top: 2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.field.has-error .error { display: flex; }

fieldset.field { border: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.check-grid { display: grid; gap: 8px; }
@media (min-width: 640px) { .check-grid { grid-template-columns: 1fr 1fr; } }
.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  background: var(--input);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: border-color var(--dur) ease, background-color var(--dur) ease;
}
.check:hover { border-color: var(--muted-foreground); }
.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 20px; height: 20px;
  margin: 0;
  border: 2px solid var(--input-border);
  border-radius: 5px;
  background: var(--input);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.check input::after {
  content: "";
  width: 10px; height: 6px;
  border: solid var(--on-primary);
  border-width: 0 0 2.5px 2.5px;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
}
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.check input:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.field.has-error .check { border-color: var(--destructive); }
.check--plain { border: 0; padding: 4px 0; background: none !important; min-height: 44px; align-items: flex-start; }
.check--plain input { margin-top: 2px; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { margin-top: var(--space-xl); display: grid; gap: var(--space-md); }
.form-actions .note { text-align: center; }
.form-status { padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: 0.9375rem; display: none; }
.form-status.is-error { display: block; background: rgba(220, 38, 38, 0.1); color: var(--destructive-text); border: 1px solid rgba(220, 38, 38, 0.3); }

.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label-idle { display: none; }
.btn .btn-label-loading { display: none; }
.btn.is-loading .btn-label-loading { display: inline; }
.btn.is-loading .icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success { text-align: center; padding: var(--space-xl) 0; }
.form-success[hidden] { display: none; }
.form-success__icon {
  width: 72px; height: 72px;
  margin: 0 auto var(--space-lg);
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--success-soft);
  color: var(--success);
}
.form-success__icon .icon { width: 36px; height: 36px; stroke-width: 2.5; }
.form-success h3 { font-size: 1.5rem; }
.form-success p { color: var(--muted-foreground); margin: var(--space-sm) auto 0; max-width: 460px; }
.form-success .btn { margin-top: var(--space-lg); }

/* ---------- 18. CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: 72px;
  background: var(--navy-950);
  color: #E2E8F0;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(37, 99, 235, 0.45), transparent 70%),
    radial-gradient(500px 280px at 10% 100%, rgba(234, 88, 12, 0.25), transparent 70%);
}
.cta-band::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
}
.cta-band__inner { display: grid; gap: var(--space-xl); align-items: center; }
.cta-band h2 { color: #F8FAFC; font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); }
.cta-band p { margin-top: var(--space-md); color: #CBD5E1; font-size: 1.125rem; max-width: 600px; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-band .btn--outline { --btn-fg: #F8FAFC; --btn-border: rgba(248, 250, 252, 0.35); }
.cta-band .btn--outline:hover { --btn-bg: rgba(248, 250, 252, 0.08); }
.cta-band :focus-visible { outline-color: #93C5FD; }
@media (min-width: 900px) { .cta-band__inner { grid-template-columns: 1fr auto; } .cta-band { padding-block: 96px; } }

/* ---------- 19. Footer ---------- */
.site-footer { background: var(--background-alt); border-top: 1px solid var(--border); padding-block: var(--space-3xl) var(--space-xl); }
.footer-grid { display: grid; gap: var(--space-2xl); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-about p { margin-top: var(--space-md); color: var(--muted-foreground); max-width: 360px; font-size: 0.9375rem; }
.footer-col h2 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--heading); margin-bottom: var(--space-md); font-weight: 800; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 2px; }
.footer-col a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--muted-foreground); text-decoration: none; font-size: 0.9375rem; font-weight: 500; transition: color var(--dur) ease; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--heading); text-decoration: underline; }
.socials { display: flex; gap: 8px; margin-top: var(--space-lg); }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); color: var(--foreground); background: var(--card); transition: transform var(--dur) var(--ease-out), color var(--dur) ease, border-color var(--dur) ease; }
.socials a:hover { transform: translateY(-2px); color: var(--link); border-color: var(--primary); }
.footer-bottom { margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 0.875rem; color: var(--muted-foreground); }
.footer-bottom a { color: var(--muted-foreground); }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }

/* ---------- 20. Legal page ---------- */
.legal { padding-block: 56px 88px; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); }
.legal h2 { font-size: 1.375rem; margin-top: var(--space-2xl); }
.legal p, .legal li { color: var(--foreground); margin-top: var(--space-md); }
.legal ul { padding-left: 1.25em; }
.legal li { margin-top: 6px; }
.legal .updated { color: var(--muted-foreground); margin-top: var(--space-sm); }

/* ---------- 20b. Chat widget ---------- */
.chat { position: fixed; right: 16px; bottom: 16px; z-index: 110; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.chat > * { pointer-events: auto; }
.chat__launcher {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 25px -6px rgba(37, 99, 235, 0.55), var(--shadow-lg);
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) ease;
}
.chat__launcher:hover { transform: translateY(-2px) scale(1.04); background: var(--primary-hover); }
.chat__launcher:active { transform: scale(0.96); }
.chat__launcher .icon { width: 26px; height: 26px; }
.chat__icon-close { display: none; }
.chat.is-open .chat__icon-open { display: none; }
.chat.is-open .chat__icon-close { display: block; }
.chat__launcher:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 50%; }

.chat__teaser { position: relative; max-width: 260px; animation: chat-pop 300ms var(--ease-out); }
.chat__teaser[hidden] { display: none; }
.chat__teaser-body {
  display: block; width: 100%; text-align: left;
  padding: 12px 36px 12px 14px;
  border-radius: 14px 14px 4px 14px;
  border: 1px solid var(--border);
  background: var(--card); color: var(--heading);
  font-size: 0.9375rem; font-weight: 600; line-height: 1.4;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}
.chat__teaser-close { position: absolute; top: -4px; right: -4px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted-foreground); display: grid; place-items: center; border-radius: 8px; cursor: pointer; }
.chat__teaser-close:hover { color: var(--heading); background: var(--muted); }

.chat__panel {
  width: min(380px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 120px));
  height: min(600px, calc(100dvh - 120px));
  display: flex; flex-direction: column;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transform-origin: bottom right;
  animation: chat-pop 260ms var(--ease-out);
}
.chat__panel[hidden] { display: none; }
@keyframes chat-pop { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }

.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--navy-950); color: #F8FAFC; }
.chat__avatar { width: 38px; height: 38px; flex: none; }
.chat__title { flex: 1; min-width: 0; }
.chat__title h2 { font-size: 1rem; color: #F8FAFC; letter-spacing: -0.01em; }
.chat__title p { font-size: 0.8125rem; color: #CBD5E1; display: flex; align-items: center; gap: 6px; }
.chat__online { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; }
.chat__close { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: #F8FAFC; }
.chat__close:hover { background: rgba(255, 255, 255, 0.16); }
.chat__close:focus-visible { outline-color: #93C5FD; }

.chat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--background); overscroll-behavior: contain; }
.chat__msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere; animation: chat-msg 220ms var(--ease-out); }
@keyframes chat-msg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat__msg p + p, .chat__msg p + ul, .chat__msg ul + p { margin-top: 6px; }
.chat__msg ul { padding-left: 1.1em; margin: 4px 0 0; display: grid; gap: 3px; }
.chat__msg--bot { align-self: flex-start; background: var(--card); color: var(--foreground); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat__msg--bot a { color: var(--link); font-weight: 600; }
.chat__msg--user { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 4px; }
.chat__typing { display: flex; gap: 4px; align-items: center; padding: 14px 16px; }
.chat__typing span:not(.sr-only) { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-foreground); animation: chat-dot 1.2s infinite ease-in-out; }
.chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.chat__typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.chat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; background: var(--background); }
.chat__chips[hidden] { display: none; }
.chat__chip {
  min-height: 44px; padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--card); color: var(--link);
  font-size: 0.8125rem; font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur) ease, color var(--dur) ease;
}
.chat__chip:hover { background: var(--primary); color: var(--on-primary); }

.chat__form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 12px 6px; border-top: 1px solid var(--border); background: var(--card); }
.chat__input {
  flex: 1; min-height: 44px; max-height: 120px;
  padding: 11px 14px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input); color: var(--foreground);
  font-size: 1rem; line-height: 1.4;
  resize: none;
}
.chat__input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }
.chat__send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); cursor: pointer; transition: background-color var(--dur) ease, transform var(--dur-fast) var(--ease-out); }
.chat__send:hover { background: var(--accent-hover); }
.chat__send:active { transform: scale(0.95); }
.chat__disclaimer { padding: 0 14px 10px; background: var(--card); font-size: 0.75rem; color: var(--muted-foreground); text-align: center; }

/* Phones: full-screen chat sheet */
@media (max-width: 639.98px) {
  .chat { right: 12px; bottom: 12px; }
  .chat.is-open { inset: 0; right: 0; bottom: 0; gap: 0; }
  .chat.is-open .chat__launcher { display: none; }
  .chat__panel { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; border: 0; }
  .chat__form { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  body.chat-open { overflow: hidden; }
}
body.menu-open .chat { display: none; }
@media print { .chat { display: none !important; } }

/* ---------- 21. Motion: reveal states & reduced motion ---------- */
/* Hidden-until-animated only when JS + GSAP are confirmed running (html.anim). */
.anim [data-reveal], .anim [data-stagger] > * { opacity: 0; }
.anim .hero [data-hero] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-blob { animation: none; }
  .anim [data-reveal], .anim [data-stagger] > *, .anim .hero [data-hero] { opacity: 1; }
  .flow-step__check { opacity: 1; }
}

/* ---------- 22. Print ---------- */
@media print {
  .site-header, .mobile-nav, .hero-bg, .cta-band, .carousel__controls { display: none !important; }
  body { background: #fff; color: #000; }
}
