/* ============================================================
   DigiSwasth marketing site — shared design system (site.css)
   Contract file: index.html and products.html consume ONLY the
   classes documented below. No external URLs — fonts and images
   are self-hosted (../fonts/, ../img/).

   Palette rules (WCAG-verified):
   - Body/heading text: --ink on white/mist/washes (>= 7:1 everywhere).
   - Links + colored text on white/mist: --brand (5.07:1 / 4.72:1).
   - Links + colored text on wash tints: --brand-deep (>= 7.6:1) —
     --brand is only 4.49:1 on the dental wash, so never use it there.
   - Primary button: --accent background with INK text (7.32:1).
     White on --accent is 2.33:1 — never put white text on orange.
   - Dark surfaces (--brand-deep band, --ink footer): headings white
     (8.65:1 / 17.1:1), body --mist (8.06:1), footer muted #A9B4C9
     (8.17:1 on ink). No orange TEXT on dark (3.71:1 fails).
   ============================================================ */

/* ---------- Self-hosted fonts (latin subset) ---------- */

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/lexend-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/lexend-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/source-sans-3-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/source-sans-3-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
  /* color */
  --ink: #1A1A2E;            /* primary text */
  --ink-soft: #475069;       /* secondary text — 8.0:1 on white, 7.5:1 on mist */
  --brand: #1B72B8;          /* primary blue — links on white/mist only */
  --brand-deep: #124E80;     /* navy — clinician band bg, links on washes */
  --accent: #F5921E;         /* CTA orange — background only, always with ink text */
  --mist: #F5F7FA;           /* page background */
  --line: #E8ECF0;           /* borders / hairlines */
  --surface: #FFFFFF;        /* cards, panels, nav */
  --on-dark-soft: #A9B4C9;   /* muted text on --ink footer (8.17:1) */

  /* per-product washes — card/section backgrounds ONLY, never text */
  --wash-dental: #E8F3FB;
  --wash-physio: #E9F7F1;
  --wash-nursing: #FDF1E3;
  --wash-general: #F0EFFB;

  /* type */
  --font-display: 'Lexend', 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, Arial, sans-serif;

  /* spacing scale (marketing density) */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 80px;
  --sp-8: 96px;

  /* radii */
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* motion — every transition on the site routes through these two curves,
     so nothing eases differently from anything else. Never inline a raw
     cubic-bezier() or `ease`/`ease-out` in a transition; use a token.
     --ease       strong ease-out: commits fast, lands soft (movement, fades)
     --ease-draw  for things that fill along a length (rails, progress) */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-draw: cubic-bezier(0.3, 0.8, 0.3, 1);

  /* layout */
  --nav-h: 108px;            /* mobile: brand row + scrolling link row */
}

@media (min-width: 768px) {
  :root { --nav-h: 72px; }   /* single-row nav from tablet up */
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;             /* 16px base */
  line-height: 1.6;
  font-weight: 400;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: inherit;
}

p, ul, ol, figure { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--brand); }

::selection { background: var(--brand); color: #FFFFFF; }

/* Visible keyboard focus — brand ring on light surfaces */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
}
/* White ring on dark surfaces (8.65:1 on brand-deep, 17:1 on ink) */
.clinician-band :focus-visible,
.site-footer :focus-visible {
  outline-color: #FFFFFF;
}

/* Sticky-nav anchor offset: every #anchor lands below the fixed header */
[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

/* Screen-reader-only utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link — hidden until keyboard-focused */
.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 0 0 var(--r-md) var(--r-md);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus-visible { top: 0; }

/* ---------- Layout primitives ---------- */

/* .container — page column, max 1160px with responsive side padding */
.container {
  width: 100%;
  max-width: calc(1160px + 2 * clamp(20px, 5vw, 40px));
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

/* .section — vertical rhythm shell for one page section */
.section { padding-block: clamp(56px, 9vw, 96px); }

/* .section--white — white slab to alternate against the mist page bg */
.section--white { background: var(--surface); }

/* .section-head — eyebrow + h2 + .lede intro block for a section */
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 {
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.4rem);
  margin-bottom: var(--sp-2);
}

/* .eyebrow — small-caps letter-spaced kicker above headings */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--sp-2);
}

/* .eyebrow--dot — hero variant: a slow pulsing accent dot leads the kicker */
.eyebrow--dot { display: flex; align-items: center; gap: 9px; }
.eyebrow__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: ds-pulse 2.6s ease-in-out infinite;
}

/* .lede — larger intro paragraph under a section heading */
.lede {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* .prose — spaced paragraph flow for longer copy blocks */
.prose > * + * { margin-top: 1em; }
.prose p { color: var(--ink-soft); }

/* .split — generic two-column block (platform section), stacks on mobile.
   align-items: start, NOT center: the prose column is much shorter than
   the feature panel beside it, and centring it left a large void between
   the section intro and the first paragraph. */
.split {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
}

/* ---------- App store chips ---------- */

/* .store-row / .store-chip — App Store + Google Play availability.
   Deliberately NOT the official Apple/Google badge artwork: that is
   third-party imagery under its own brand rules, and this site loads
   zero third-party assets. These are our own chips with inline glyphs.
   Rendered as inert <span>s while the listings are in review; each
   becomes an <a class="store-chip" href="…"> once its URL is confirmed,
   at which point the hover lift below starts applying. */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}
.prose .store-row { margin-top: var(--sp-3); }

.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease), border-color 0.24s var(--ease);
}
.store-chip svg { flex: none; width: 22px; height: 22px; color: var(--brand-deep); }
.store-chip__text {
  display: grid;
  line-height: 1.15;
  font-size: 0.95rem;
  font-weight: 600;
}
.store-chip__text small {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
/* Only the published (linked) state responds to the pointer — an inert
   span that lifts on hover would read as clickable when it isn't. */
a.store-chip:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 16px 28px -20px rgba(18, 78, 128, 0.45);
}

/* .store-note — one line explaining the in-review state */
.store-note { color: var(--ink-soft); font-size: 0.9375rem; }
.prose .store-note { margin-top: var(--sp-2); }

/* .panel — white rounded panel (aside/media slot inside .split) */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
}

/* ---------- Buttons ---------- */

/* .btn — base button/link: pill, 48px tall, 44px+ target everywhere */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 26px;
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.24s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }

/* .btn--primary — accent orange bg + INK text (7.32:1; white would fail) */
.btn--primary {
  background: var(--accent);
  color: var(--ink);
}

/* .btn--ghost — secondary: brand outline, brand-deep text, for light bgs */
.btn--ghost {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand-deep);
}

/* .btn--inverse — secondary for dark bands/footer: white outline + text */
.btn--inverse {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.75);
  color: #FFFFFF;
}

/* ---------- Sticky top nav ---------- */

/* .site-nav — sticky header; mobile = brand+CTA row over a scrollable link row */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

/* .site-nav.is-stuck — JS adds this past 8px of scroll: the header lifts off
   the page so content scrolling under it reads as "behind", not "merged" */
.site-nav.is-stuck {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 30px -22px rgba(18, 78, 128, 0.55);
}

/* .nav-progress — read-progress hairline along the header's bottom edge.
   Width is set by JS; 0 without JS, which is simply invisible. */
.nav-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  pointer-events: none;
}

/* .nav-inner — flex row inside .container; wraps to two rows on mobile */
.nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--sp-2);
  padding-block: 8px;
}

/* .nav-brand — logo + wordmark, links home */
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  text-decoration: none;
}
.nav-brand img { width: auto; height: 34px; }

/* .nav-wordmark — "DigiSwasth" text next to the logo */
.nav-wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand-deep);
}

/* .nav-links — text links; horizontally scrollable strip on mobile (no JS) */
.nav-links {
  order: 3;
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
/* Mobile: fade the strip's right edge so a clipped last link reads as
   "scroll for more", not as a layout bug */
@media (max-width: 767px) {
  .nav-links {
    font-size: 0.9375rem;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 32px), transparent 100%);
  }
}
.nav-links a {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--r-md);
  transition: color 0.2s var(--ease);
}
/* Hover wipes an accent bar in from the left instead of underlining */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--ease);
}
.nav-links a:hover { color: var(--brand-deep); }
.nav-links a:hover::after { transform: scaleX(1); }

/* .nav-cta — the one orange button in the header */
.nav-cta { order: 2; min-height: 44px; padding: 8px 20px; }

@media (min-width: 768px) {
  .nav-inner { flex-wrap: nowrap; min-height: 72px; padding-block: 0; }
  .nav-brand { margin-right: 0; }
  .nav-brand img { height: 38px; }
  .nav-links { order: 0; flex: 1; justify-content: center; overflow: visible; }
  .nav-cta { order: 0; }
}

/* ---------- Hero ---------- */

/* .hero — landing opener: copy column + live demo card, stacks on mobile */
.hero {
  position: relative;
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
  padding-block: clamp(48px, 8vw, 88px);
}
@media (min-width: 1024px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; }
}

/* .hero-aura — DECORATIVE soft colour fields behind the hero. Purely
   atmospheric: aria-hidden, no pointer events, never overlaps text
   contrast (both top out at 12% alpha on the mist background). */
.hero-aura {
  position: absolute;
  z-index: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(6px);
  pointer-events: none;
  /* Promoted to its own compositor layer: JS rewrites transform on every
     scroll frame, and without this the blurred gradient re-rasterises
     each time, which is the main source of scroll jank in the hero. */
  will-change: transform;
}
.hero-aura--brand {
  top: -14%;
  right: -6%;
  width: min(620px, 72vw);
  background: radial-gradient(circle at 40% 40%, rgba(27, 114, 184, 0.12), rgba(27, 114, 184, 0) 62%);
}
.hero-aura--accent {
  bottom: -20%;
  left: -10%;
  width: min(460px, 60vw);
  background: radial-gradient(circle at 50% 50%, rgba(245, 146, 30, 0.10), rgba(245, 146, 30, 0) 60%);
}

/* .hero-copy — headline side of the hero */
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 {
  font-size: clamp(2.2rem, 1.5rem + 3.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
}
.hero-copy .lede { margin-bottom: var(--sp-2); }

/* .hero-apps — inline row naming the four apps as real links */
.hero-apps {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--sp-2);
  align-items: center;
  color: var(--ink-soft);
}
.hero-apps a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-color: rgba(18, 78, 128, 0.35);
  text-underline-offset: 4px;
}
.hero-apps a:hover { text-decoration-color: var(--brand-deep); }

/* .hero-actions — primary/secondary CTA row under the hero copy */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

/* .hero-visual — holds the demo card; hugs its content height so the grid
   doesn't stretch it to the copy column on wide screens */
.hero-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(470px, 100%);
  margin-inline: auto;
  align-self: center;
  /* Parallax target — same reason as .hero-aura: keep the card on its own
     layer so scrolling composites instead of repainting the glass card. */
  will-change: transform;
}

/* ---------- Hero demo card ----------
   The signature element: a glass card previewing one booking per app.
   Tabs switch the panel; JS also auto-advances both the tab and the
   three-stage booking track. The four oversized corners across the
   panels (TL, TR, BL, BR) carry the plus-cross motif the rest of the
   system uses for per-app identity. */

.demo {
  position: relative;
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 40px 70px -44px rgba(18, 78, 128, 0.55);
}

/* .demo__head — "live" status strip above the tabs */
.demo__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.demo__live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.demo__live-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2FA36B;
  animation: ds-pulse 2.2s ease-in-out infinite;
}
.demo__count { font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); }

/* .demo__tabs — segmented control, one segment per app */
.demo__tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 6px;
  margin-bottom: var(--sp-2);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* .demo-tab — one segment: app logo over a short label */
.demo-tab {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 60px;
  padding: 8px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.demo-tab img { width: 26px; height: 26px; object-fit: contain; }
.demo-tab span {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.3s var(--ease);
}
.demo-tab.is-active {
  background: var(--surface);
  box-shadow: 0 8px 18px -14px rgba(18, 78, 128, 0.7);
  transform: translateY(-1px);
}
.demo-tab.is-active span { color: var(--ink); }

/* .demo__panels — all panels stacked in one grid cell, so the card's height
   is the tallest panel and never jumps as the tabs cycle */
.demo__panels { display: grid; }

/* .demo-panel — one app's sample booking; combine with .wash--* for tint */
.demo-panel {
  grid-area: 1 / 1;
  padding: 20px;
  border-radius: var(--r-lg);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.demo-panel.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 1;
}
/* Oversized corner per app — same quadrant mapping as the product cards */
.demo-panel.wash--dental  { border-top-left-radius: 40px; }
.demo-panel.wash--physio  { border-top-right-radius: 40px; }
.demo-panel.wash--nursing { border-bottom-left-radius: 40px; }
.demo-panel.wash--general { border-bottom-right-radius: 40px; }

/* .demo-panel__app — app name kicker (brand-deep: the only safe blue on washes) */
.demo-panel__app {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 10px;
}
.demo-panel__title { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.demo-panel__meta { color: var(--ink-soft); margin-bottom: var(--sp-2); }
.demo-panel .chip-row { margin-top: var(--sp-2); }

/* .demo-track — the three-stage booking progress line (requested →
   approved → paid). Decorative: .demo__stage carries the same state as
   text, so the track itself is aria-hidden. */
.demo-track {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--sp-2);
}
.demo-track__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--track-rest);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}
.demo-track__dot.is-on { background: var(--brand); }
.demo-track__dot.is-current { transform: scale(1.5); }
/* Final stage = paid: the one moment the accent appears in the track */
.demo-track__dot:last-child.is-on { background: var(--accent); }
.demo-track__line {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: var(--track-rest);
  overflow: hidden;
}
.demo-track__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width 0.8s var(--ease-draw);
}
/* Unreached track colour = a deeper step of each app's own wash */
.wash--dental  { --track-rest: #D6E6F4; }
.wash--physio  { --track-rest: #D2EBE0; }
.wash--nursing { --track-rest: #F2DDC4; }
.wash--general { --track-rest: #DEDCF3; }

/* .demo__foot — live stage label + a link into the app being previewed */
.demo__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: var(--sp-2);
}
.demo__stage { font-size: 0.875rem; font-weight: 600; color: var(--ink-soft); }
.demo__open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--brand-deep);
  color: #FFFFFF;          /* 8.65:1 on brand-deep */
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.22s var(--ease);
}
.demo__open:hover { transform: translateY(-2px); }
.demo__open svg { width: 16px; height: 16px; }

@media (max-width: 380px) {
  .demo__foot { flex-wrap: wrap; }
}

/* ---------- Product cards (landing strip) ---------- */

/* .card-grid — products strip: 1 col mobile, 2 col tablet, 4 col desktop */
.card-grid {
  display: grid;
  gap: var(--sp-3);
}
@media (min-width: 640px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }

/* .product-card — one app card: icon, name, one-liner, chips, links */
.product-card {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: clamp(20px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform 0.32s var(--ease);
}
.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 30px 52px -28px rgba(18, 78, 128, 0.42);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
  pointer-events: none;
}
.product-card:hover { transform: translateY(-6px); }
.product-card:hover::after { opacity: 1; }

/* Hover detail: the icon pops and tilts, the chips cascade up behind it,
   and the "Open web app" arrow slides. All CSS — no JS hover handlers. */
.product-card:hover .product-card__icon { transform: translateY(-3px) rotate(-4deg) scale(1.06); }
.product-card:hover .chip { transform: translateY(-3px); }
.product-card:hover .chip:nth-child(2) { transition-delay: 55ms; }
.product-card:hover .chip:nth-child(3) { transition-delay: 110ms; }

/* .wash--* — tinted variant for cards AND sections; borders melt away */
.wash--dental  { background: var(--wash-dental);  border-color: transparent; }
.wash--physio  { background: var(--wash-physio);  border-color: transparent; }
.wash--nursing { background: var(--wash-nursing); border-color: transparent; }
.wash--general { background: var(--wash-general); border-color: transparent; }

/* .product-card__icon — white chip holding the inline SVG; its oversized
   corner mirrors that app's quadrant position in the hero cross */
.product-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--surface);
  border-radius: var(--r-md);
  color: var(--brand-deep);
}
.product-card__icon svg { width: 26px; height: 26px; }
.product-card__icon { padding: 6px; overflow: hidden; transition: transform 0.35s var(--ease); }
.product-card__icon img { width: 100%; height: 100%; object-fit: contain; }
/* .btn__logo — small app logo inside jump/CTA chips */
.btn__logo { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; flex: none; }
/* .product-logo — app logo chip above each product section heading */
.product-logo {
  display: block;
  width: 60px;
  height: 60px;
  padding: 6px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: var(--sp-2);
}
.wash--dental  .product-card__icon { border-top-left-radius: 26px; }
.wash--physio  .product-card__icon { border-top-right-radius: 26px; }
.wash--nursing .product-card__icon { border-bottom-left-radius: 26px; }
.wash--general .product-card__icon { border-bottom-right-radius: 26px; }

/* .product-card__name — app name (exact shipped casing) */
.product-card__name { font-size: 1.15rem; letter-spacing: -0.01em; }

/* .product-card__tag — one-line value prop */
.product-card__tag { color: var(--ink-soft); }

/* .product-card__links — bottom link row, pushed to the card's end */
.product-card__links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--sp-3);
}

/* .card-link — in-card text link: brand-deep (safe on washes), 44px target */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--brand-deep);
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-link svg { width: 16px; height: 16px; }

/* Arrow glyphs lead the eye on hover, wherever they appear */
.card-link svg, .btn svg, .demo__open svg {
  transition: transform 0.25s var(--ease);
}
.card-link:hover svg, .btn:hover svg, .demo__open:hover svg,
.product-card:hover .card-link svg { transform: translateX(4px); }

/* .chip-row — horizontal wrap row of feature chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

/* .chip — small feature pill (ink text on white keeps contrast on washes) */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  transition: transform 0.3s var(--ease);
}

/* ---------- Numbered steps (how booking works) ---------- */

/* .flow — wraps the rail + the steps so the rail can span their full width */
.flow { position: relative; }

/* .flow__rail-track — hairline the rail draws along, above the steps */
.flow__rail-track {
  position: relative;
  height: 2px;
  margin-bottom: var(--sp-3);
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

/* .flow__rail — fills to 33/66/100% as JS walks the steps in view.
   Without JS it stays at 0 and the track reads as a plain divider. */
.flow__rail {
  position: absolute;
  inset: 0;
  display: block;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 2px;
  transition: width 0.9s var(--ease-draw);
}

/* .steps — 3-step row; stacks on mobile */
.steps {
  display: grid;
  gap: var(--sp-3);
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* .step — one step card: number, title, copy */
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 28px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: 0 26px 48px -30px rgba(18, 78, 128, 0.38); }

/* .step.is-active — JS highlights one step at a time while the flow is in
   view, so the three-step sequence plays itself out instead of sitting still */
.step.is-active {
  transform: translateY(-4px);
  border-color: rgba(27, 114, 184, 0.45);
  box-shadow: 0 26px 48px -30px rgba(18, 78, 128, 0.45);
}

/* .step__num — big display digit (a real sequence, not decoration) */
.step__num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--brand);
  margin-bottom: var(--sp-2);
  transform-origin: left center;
  transition: transform 0.4s var(--ease), color 0.4s var(--ease);
}
.step.is-active .step__num { transform: scale(1.14); color: var(--accent); }

/* .step__title — step heading */
.step__title { font-size: 1.1rem; margin-bottom: var(--sp-1); }
.step p { color: var(--ink-soft); }

/* ---------- Icon list (platform features) ---------- */

/* .tick-list — vertical feature list; each li = inline SVG + text */
.tick-list { display: grid; gap: var(--sp-2); }
.tick-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-soft);
  transition: transform 0.3s var(--ease);
}
.tick-list li:hover { transform: translateX(4px); }
.tick-list li strong { color: var(--ink); }
.tick-list svg { flex: none; width: 22px; height: 22px; margin-top: 3px; color: var(--brand); }

/* ---------- Clinician band ---------- */

/* .clinician-band — full-bleed brand-deep slab; light text only */
.clinician-band {
  position: relative;
  overflow: hidden;
  background: var(--brand-deep);
  color: var(--mist);
  padding-block: clamp(56px, 8vw, 88px);
}
.clinician-band > .container { position: relative; z-index: 1; }

/* .band-glow — DECORATIVE drifting highlight inside the dark band. White at
   10% alpha, so it never touches the text contrast on brand-deep. */
.band-glow {
  position: absolute;
  top: -40%;
  left: 20%;
  width: min(700px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 62%);
  pointer-events: none;
  animation: ds-blob 18s ease-in-out infinite;
}
.clinician-band h2 { color: #FFFFFF; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); margin-bottom: var(--sp-2); }
.clinician-band .eyebrow { color: var(--mist); }
.clinician-band p { color: var(--mist); max-width: 62ch; }

/* .clinician-band__links — row of app-login links (.btn--inverse) */
.clinician-band__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

/* ---------- Alternating product sections (products.html) ---------- */

/* .product-section — one full app section; combine with .wash--* for tint */
.product-section { padding-block: clamp(56px, 8vw, 88px); }

/* .product-section__grid — two columns from 900px; body left, aside right */
.product-section__grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (min-width: 900px) {
  .product-section__grid { grid-template-columns: 1.1fr 0.9fr; }
  /* .product-section--flip — swaps columns for the alternating rhythm */
  .product-section--flip .product-section__body { order: 2; }
  .product-section--flip .product-section__aside { order: 1; }
}

/* .product-section__body — name, who it's for, feature bullets, CTA row */
.product-section__body h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); margin-bottom: var(--sp-2); }

/* .product-section__aside — white service-list panel; corner mirrors quadrant */
.product-section__aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
}
.wash--dental  .product-section__aside { border-top-left-radius: 64px; border-color: transparent; }
.wash--physio  .product-section__aside { border-top-right-radius: 64px; border-color: transparent; }
.wash--nursing .product-section__aside { border-bottom-left-radius: 64px; border-color: transparent; }
.wash--general .product-section__aside { border-bottom-right-radius: 64px; border-color: transparent; }

/* .service-list — real service names; 2 columns from 640px, square markers */
.service-list {
  display: grid;
  gap: 10px var(--sp-3);
}
@media (min-width: 640px) { .service-list { grid-template-columns: 1fr 1fr; } }
.service-list li {
  position: relative;
  padding-left: 20px;
  color: var(--ink);
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px 2px 2px 6px;
  background: var(--brand);
}

/* .cta-row — generic horizontal CTA group inside sections */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

/* ---------- Footer ---------- */

/* .site-footer — ink background (band stays brand-deep, footer goes darker) */
.site-footer {
  background: var(--ink);
  color: var(--mist);
  padding-block: clamp(48px, 7vw, 72px) var(--sp-3);
}

/* .footer-grid — brand blurb + link columns + contact */
.footer-grid {
  display: grid;
  gap: var(--sp-5) var(--sp-4);
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; } }

/* .footer-brand — logo + wordmark + one-line tagline */
.footer-brand { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; }
.footer-brand .nav-brand .nav-wordmark { color: #FFFFFF; }

/* .footer-tagline — muted one-liner under the footer brand */
.footer-tagline { color: var(--on-dark-soft); max-width: 32ch; }

/* .footer-col — one link column (nav element with a title + links) */
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col__title {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  margin-bottom: var(--sp-1);
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--mist);
  text-decoration: none;
}
.footer-col a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* .footer-contact — support email line */
.footer-contact { color: var(--on-dark-soft); }
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--mist);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* .footer-bottom — hairline + © line */
.footer-bottom {
  margin-top: clamp(32px, 5vw, 48px);
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--on-dark-soft);
  font-size: 0.9rem;
}

/* ---------- Motion (progressive enhancement) ---------- */

/* Ambient loops used by the hero dot, the demo card's live dot and the
   clinician band's glow. Everything else animates via transitions. */
@keyframes ds-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.5); }
}
@keyframes ds-blob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(3%, -4%, 0) scale(1.07); }
  66%      { transform: translate3d(-3%, 3%, 0) scale(0.95); }
}
/* No idle float on the demo card, deliberately. The design's Signature
   preset sets float:true, but its script only ever applied ds-float to
   [data-quad] tiles, which its markup no longer contains — so float
   rendered nothing there either. Putting it on the demo card would mean
   a permanently drifting target for its tab buttons and link, which is
   worst for anyone with a motor impairment. Signature's visible motion
   is the parallax, tilt and larger reveals, all of which are live. */

/* While the cursor is over a product card, shorten the transform
   transition so the tilt tracks the pointer instead of trailing it. */
.product-card.is-tilting { transition: transform 0.15s var(--ease); }

/* Hidden initial states exist ONLY when JS is running (html.js) and only
   until GSAP marks the element .is-in. No JS = everything fully visible.
   Distance and scale here must match MOTION in site.js. */
html.js [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(34px) scale(0.97);
}

/* Reduced motion: everything visible and static, no loops, no reveals.
   The demo card still switches panels on click — just without the
   cross-fade, and with its booking track parked on the final stage. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .demo-panel.is-active { transform: none !important; }
  .hero-aura, .band-glow { display: none; }
}

/* ---------- page: products ---------- */

/* .page-hero — hero-lite copy block at the top of products.html
   (section-head's margin-bottom + .cta-row's margin-top would
   double up, so this is its own block; the jump row follows it) */
.page-hero { max-width: 780px; }
.page-hero h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
}

/* ---------- Small-phone polish (≤480px) ---------- */
/* Calmer headline scale (4 lines, not 5) and app-like full-width CTAs */
@media (max-width: 480px) {
  .hero-copy h1 { font-size: 2.05rem; line-height: 1.12; }
  .page-hero h1 { font-size: 1.85rem; line-height: 1.14; }
  .cta-row .btn { flex: 1 1 100%; justify-content: center; text-align: center; }
  .clinician-band__links .btn { flex: 1 1 calc(50% - var(--sp-1)); justify-content: center; }
}

/* Eyebrows inside washed product sections: --brand is only 4.49:1
   on the dental wash (palette notes above say colored text on
   washes must be --brand-deep), so deepen them there. */
.product-section .eyebrow { color: var(--brand-deep); }

/* Space each product section's feature list away from the
   who-it's-for lede above it. */
.product-section__body .tick-list { margin-top: var(--sp-4); }

/* Sub-heading inside the white aside/panel cards
   (e.g. "12 dental services", "What the hub does"). */
.product-section__aside h3,
.panel h3 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-3);
}
