/* ============================================================================
   ZONVRA — public site.

   A separate layer from the application's own component sheet, on purpose. The
   product is dense by design: 13px rows, 48px controls, everything within one
   scroll of everything else. A page that has to explain the product to somebody
   who has never seen it needs the opposite — long measures, large type, air.
   Sharing `components.css` would have meant fighting it on every rule.

   What is shared is the part that must be: `tokens.css`. Colour, radius,
   elevation, motion and the type ramp all come from the same file the product
   uses, so the site and the software are recognisably one system, light and dark
   themes included, and a token changed once changes both.

   Every rule uses logical properties. Hebrew is the product's default language;
   the marketing site mirrors without a second stylesheet.
   ========================================================================== */

:root {
  /*
   * Marketing type ramp — fluid, and deliberately larger than the app's.
   * The lower bounds are set from a 390px phone, where the first draft's 41px
   * headline ran to five lines and pushed the product shot two screens down.
   */
  --m-display-1: clamp(2.15rem, 1.15rem + 4.6vw, 4.35rem);
  --m-display-2: clamp(1.8rem, 1.15rem + 2.9vw, 3.15rem);
  --m-display-3: clamp(1.4rem, 1.1rem + 1.4vw, 2.05rem);
  --m-title: clamp(1.15rem, 1.02rem + 0.5vw, 1.35rem);
  --m-lead: clamp(1.06rem, 0.98rem + 0.42vw, 1.3rem);
  --m-body: 1rem;
  --m-small: 0.875rem;

  --m-measure: 62ch;
  --m-container: 1160px;
  --m-gutter: clamp(1.25rem, 4vw, 2.5rem);
  --m-section-y: clamp(4.5rem, 8vw, 7.5rem);
  --m-header-h: 68px;

  /* The dark field. Fixed rather than themed: it is the brand's one constant. */
  --m-ink: #0a2540;
  --m-ink-deep: #061729;
  --m-ink-text: #ffffff;
  --m-ink-muted: #9fb3c8;
  --m-ink-line: rgb(255 255 255 / 0.14);
  --m-ink-raised: rgb(255 255 255 / 0.055);
}

/* Dark theme deepens the field so the page does not glow against the OS. */
[data-theme="dark"] {
  --m-ink: #050e1a;
  --m-ink-deep: #030913;
  --m-ink-muted: #8b9ab0;
  --m-ink-line: rgb(255 255 255 / 0.1);
}

/* ── page frame ─────────────────────────────────────────────────────────── */

.m-page {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--m-body);
  line-height: var(--leading-relaxed);
}

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

/* A single reading column for prose sections; the page edge never moves. */
.m-container--narrow { max-width: 760px; }

.m-section {
  padding-block: var(--m-section-y);
  border-block-start: 1px solid var(--color-border-subtle);
}

.m-section--flush { border-block-start: 0; }

/*
 * The hero already ends on its own generous padding. Stacking a full section
 * pad on top of it left about 200px of empty ground across the colour change,
 * which reads as a gap rather than as breathing room.
 */
.m-hero + .m-section { padding-block-start: clamp(3.5rem, 6vw, 5.5rem); }
.m-section--tint { background: var(--color-canvas); }

.m-section--dark {
  background: var(--m-ink);
  color: var(--m-ink-muted);
  border-block-start: 0;
}

/*
 * Every heading level, not only the big ones. `.m-h4` was left out of the first
 * version and rendered #1a1f36 on navy — invisible — everywhere a dark section
 * used a card title.
 */
.m-section--dark .m-display,
.m-section--dark .m-h2,
.m-section--dark .m-h3,
.m-section--dark .m-h4,
.m-cta .m-h2,
.m-cta .m-h3,
.m-cta .m-h4,
.m-hero .m-h2,
.m-hero .m-h3,
.m-hero .m-h4 { color: var(--m-ink-text); }

.m-section--dark .m-eyebrow { color: #a5b9ff; }

/* ── type ───────────────────────────────────────────────────────────────── */

.m-display {
  font-size: var(--m-display-1);
  line-height: 1.02;
  letter-spacing: -0.032em;
  font-weight: var(--weight-bold);
  color: var(--color-text);
  text-wrap: balance;
}

.m-h2 {
  font-size: var(--m-display-2);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: var(--weight-bold);
  color: var(--color-text);
  text-wrap: balance;
}

.m-h3 {
  font-size: var(--m-display-3);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  text-wrap: balance;
}

.m-h4 {
  font-size: var(--m-title);
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.m-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

.m-lead {
  font-size: var(--m-lead);
  line-height: 1.55;
  color: var(--color-text-secondary);
  max-width: var(--m-measure);
  text-wrap: pretty;
}

.m-body { max-width: var(--m-measure); text-wrap: pretty; }
.m-muted { color: var(--color-text-tertiary); }
.m-small { font-size: var(--m-small); line-height: 1.55; }
.m-center { margin-inline: auto; text-align: center; }
.m-center .m-lead { margin-inline: auto; }

.m-stack { display: flex; flex-direction: column; }
.m-stack-2 { gap: var(--space-2); }
.m-stack-3 { gap: var(--space-3); }
.m-stack-4 { gap: var(--space-4); }
.m-stack-5 { gap: var(--space-5); }
.m-stack-6 { gap: var(--space-6); }
.m-stack-8 { gap: var(--space-8); }
.m-stack-10 { gap: var(--space-10); }

/* A section's own heading block: eyebrow, title, lead, at one rhythm. */
.m-section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 720px;
  margin-block-end: clamp(2.5rem, 4vw, 3.75rem);
}

.m-section-head--center { margin-inline: auto; text-align: center; align-items: center; }

/* ── links and buttons ──────────────────────────────────────────────────── */

/*
 * Wrapped in `:where()` so it carries no specificity at all. As a plain
 * `.m-page a` rule it outranked `.m-btn--primary` — one class against a class
 * and a type — and every call to action on the site rendered in the muted body
 * colour instead of its own.
 */
:where(.m-page) a { color: inherit; }

.m-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-text);
  text-decoration: none;
  border-block-end: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}

.m-link:hover { border-block-end-color: currentColor; }
.m-link svg { transition: transform var(--duration-base) var(--ease-out); }
.m-link:hover svg { transform: translateX(2px); }
[dir="rtl"] .m-link:hover svg { transform: translateX(-2px); }

.m-section--dark .m-link { color: #b9c6ff; }

.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding-block: 0.72rem;
  padding-inline: 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.m-btn:active { transform: translateY(1px); }

.m-btn--primary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 1px 2px rgb(10 37 64 / 0.24), 0 6px 16px -6px rgb(99 91 255 / 0.55);
}

.m-btn--primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 2px 4px rgb(10 37 64 / 0.22), 0 10px 22px -8px rgb(99 91 255 / 0.6);
}

.m-btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}

.m-btn--secondary:hover { background: var(--color-surface-hover); border-color: var(--color-text-tertiary); }

.m-btn--ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.m-btn--ghost:hover { background: var(--color-surface-hover); }

/* On the dark field the secondary button has to read as glass, not as a hole. */
.m-section--dark .m-btn--secondary,
.m-header--dark .m-btn--secondary {
  background: var(--m-ink-raised);
  color: var(--m-ink-text);
  border-color: var(--m-ink-line);
  box-shadow: none;
}

.m-section--dark .m-btn--secondary:hover,
.m-header--dark .m-btn--secondary:hover {
  background: rgb(255 255 255 / 0.12);
  border-color: rgb(255 255 255 / 0.3);
}

.m-btn--lg { padding-block: 0.9rem; padding-inline: 1.7rem; font-size: 1.02rem; }
.m-btn--block { width: 100%; }

.m-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.m-actions--center { justify-content: center; }

/* ── header ─────────────────────────────────────────────────────────────── */

.m-header {
  position: sticky;
  inset-block-start: 0;
  z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--color-surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-block-end: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-out),
    background-color var(--duration-base) var(--ease-out);
}

.m-header[data-scrolled="true"] {
  border-block-end-color: var(--color-border);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
}

/* The homepage opens on the dark field, so the header starts inside it. */
.m-header--dark {
  background: transparent;
  backdrop-filter: none;
  color: var(--m-ink-text);
}

/*
 * Once the page has left the hero the bar becomes a solid navy rail rather than
 * fading into whatever is behind it. Deliberate: the content below is light, and
 * a translucent dark bar over shifting light content reads as an artefact.
 */
.m-header--dark[data-scrolled="true"] {
  background: var(--m-ink);
  backdrop-filter: none;
  border-block-end-color: var(--m-ink-line);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.06), 0 8px 24px -16px rgb(3 12 26 / 0.6);
}

.m-header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--m-header-h);
}

.m-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1.05rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}

.m-header--dark .m-brand { color: var(--m-ink-text); }

.m-brand__mark {
  display: grid;
  place-items: center;
  inline-size: 28px;
  block-size: 28px;
  border-radius: 7px;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0;
}

.m-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-inline-end: auto;
}

.m-nav__link {
  position: relative;
  padding-block: var(--space-2);
  padding-inline: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out), background-color var(--duration-base) var(--ease-out);
}

.m-nav__link:hover { color: var(--color-text); background: var(--color-surface-hover); }
.m-nav__link[aria-current="page"] { color: var(--color-accent-text); }

.m-header--dark .m-nav__link { color: #c3d2e3; }
.m-header--dark .m-nav__link:hover { color: #ffffff; background: var(--m-ink-raised); }
.m-header--dark .m-nav__link[aria-current="page"] { color: #ffffff; }

.m-header__actions { display: flex; align-items: center; gap: var(--space-2); }

.m-header__actions .m-btn { padding-block: 0.5rem; padding-inline: 1rem; font-size: var(--text-base); }

/*
 * Mobile navigation is a native <details>. It opens, closes, takes focus and
 * responds to the keyboard with no JavaScript at all — which matters here for
 * the same reason it matters in the product: the first paint has to be the
 * useful one.
 */
.m-menu { position: relative; display: none; }

.m-menu__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}

.m-menu__toggle::-webkit-details-marker { display: none; }
.m-header--dark .m-menu__toggle { background: var(--m-ink-raised); border-color: var(--m-ink-line); color: var(--m-ink-text); }
.m-menu[open] .m-menu__toggle .m-menu__open { display: none; }
.m-menu:not([open]) .m-menu__toggle .m-menu__close { display: none; }

.m-menu__panel {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  inline-size: min(88vw, 320px);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  animation: m-menu-in var(--duration-base) var(--ease-out);
}

@keyframes m-menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.m-menu__panel a {
  padding-block: var(--space-3);
  padding-inline: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  text-decoration: none;
}

.m-menu__panel a:hover { background: var(--color-surface-hover); }
.m-menu__panel .m-btn { margin-block-start: var(--space-2); }
.m-menu__sep { block-size: 1px; background: var(--color-border-subtle); margin-block: var(--space-2); }

/* ── hero ───────────────────────────────────────────────────────────────── */

/*
 * The header is sticky and therefore still in flow, so the hero is pulled up
 * under it by exactly its height. That is what lets the bar sit transparent on
 * the dark field at rest and turn into a frosted one on scroll, instead of
 * leaving a white strip above every page.
 */
.m-hero {
  position: relative;
  margin-block-start: calc(-1 * var(--m-header-h));
  background: var(--m-ink);
  color: var(--m-ink-muted);
  padding-block-start: calc(var(--m-header-h) + clamp(2.75rem, 5.5vw, 4.75rem));
  padding-block-end: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

/*
 * One light source, from behind the headline. Not a decorative blob: it gives
 * the flat navy a direction so the product shot below reads as sitting in front
 * of something rather than pasted onto it.
 */
.m-hero::before {
  content: "";
  position: absolute;
  inset-block-start: -30%;
  inset-inline-start: 50%;
  inline-size: min(1100px, 130%);
  block-size: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(99 91 255 / 0.28), transparent 72%);
  pointer-events: none;
}

.m-hero > * { position: relative; }

.m-hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.m-hero .m-display { color: var(--m-ink-text); }
.m-hero .m-lead { color: #c3d2e3; font-size: clamp(1.08rem, 1rem + 0.5vw, 1.32rem); }

.m-hero__note { font-size: var(--m-small); color: var(--m-ink-muted); }
.m-hero__note strong { color: #e3ebf5; font-weight: var(--weight-semibold); }

.m-badge-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.m-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: 0.3rem;
  padding-inline: 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.m-section--dark .m-pill,
.m-hero .m-pill {
  background: var(--m-ink-raised);
  border-color: var(--m-ink-line);
  color: #cddaea;
}

/* ── product shot ───────────────────────────────────────────────────────── */

.m-shot {
  border-radius: var(--radius-lg);
  border: 1px solid rgb(255 255 255 / 0.1);
  background: var(--color-surface);
  overflow: hidden;
  box-shadow: 0 40px 80px -32px rgb(3 12 26 / 0.65), 0 12px 28px -14px rgb(3 12 26 / 0.5);
}

.m-shot--plain {
  border-color: var(--color-border);
  box-shadow: 0 24px 48px -28px rgb(10 37 64 / 0.35), 0 4px 12px -6px rgb(10 37 64 / 0.18);
}

.m-shot__chrome {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: 0.6rem;
  padding-inline: var(--space-4);
  background: var(--color-canvas);
  border-block-end: 1px solid var(--color-border-subtle);
}

.m-shot__dots { display: flex; gap: 6px; }
.m-shot__dots span { inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--color-border-strong); }

.m-shot__url {
  flex: 1;
  min-inline-size: 0;
  text-align: center;
  font-size: var(--text-2xs);
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-shot img { inline-size: 100%; block-size: auto; display: block; }

.m-caption {
  margin-block-start: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  text-align: center;
}

.m-section--dark .m-caption,
.m-hero .m-caption { color: #8ea3bb; }

/* ── cards and grids ────────────────────────────────────────────────────── */

.m-grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.m-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.m-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: clamp(1.25rem, 2.2vw, 1.75rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.m-card p { max-width: 46ch; }

a.m-card { text-decoration: none; }

a.m-card:hover {
  border-color: var(--color-accent-border);
  box-shadow: 0 12px 28px -18px rgb(10 37 64 / 0.4);
  transform: translateY(-2px);
}

.m-section--dark .m-card {
  background: var(--m-ink-raised);
  border-color: var(--m-ink-line);
  color: #b7c7da;
}

.m-section--dark a.m-card:hover { border-color: rgb(255 255 255 / 0.3); background: rgb(255 255 255 / 0.09); }

.m-card__icon {
  display: grid;
  place-items: center;
  inline-size: 38px;
  block-size: 38px;
  border-radius: var(--radius-md);
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
  flex-shrink: 0;
}

.m-section--dark .m-card__icon { background: rgb(138 131 255 / 0.18); color: #b9b3ff; }

.m-card__more {
  margin-block-start: auto;
  padding-block-start: var(--space-2);
  font-size: var(--m-small);
  font-weight: var(--weight-semibold);
  color: var(--color-accent-text);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* ── the pain list ──────────────────────────────────────────────────────── */

.m-pain { display: grid; gap: 0; }

.m-pain__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(1.1rem, 2vw, 1.5rem);
  border-block-end: 1px solid var(--color-border-subtle);
  align-items: baseline;
}

.m-pain__row:first-child { border-block-start: 1px solid var(--color-border-subtle); }

.m-pain__before {
  font-size: var(--m-title);
  font-weight: var(--weight-medium);
  color: var(--color-text-tertiary);
  letter-spacing: -0.012em;
}

.m-pain__after {
  font-size: var(--m-title);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  letter-spacing: -0.012em;
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
}

.m-pain__after svg { color: var(--color-positive); flex-shrink: 0; translate: 0 2px; }
.m-pain__legend { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem); margin-block-end: var(--space-3); }

/* ── numbered steps ─────────────────────────────────────────────────────── */

.m-steps { counter-reset: m-step; display: grid; gap: clamp(1rem, 2vw, 1.5rem); }

/*
 * The numeral is absolutely positioned, so the card has to reserve room for it
 * rather than guess: the first version's top padding and the badge's own offset
 * were tuned separately and the number ended up sitting on the heading.
 */
.m-step {
  --step-inset: clamp(1.25rem, 2.2vw, 1.75rem);
  --step-badge: 28px;
  position: relative;
  counter-increment: m-step;
  padding: var(--step-inset);
  padding-block-start: calc(var(--step-inset) + var(--step-badge) + var(--space-4));
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.m-step::before {
  content: counter(m-step);
  position: absolute;
  inset-block-start: var(--step-inset);
  inset-inline-start: var(--step-inset);
  display: grid;
  place-items: center;
  inline-size: var(--step-badge);
  block-size: var(--step-badge);
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}

.m-section--dark .m-step { background: var(--m-ink-raised); border-color: var(--m-ink-line); }

/* ── evidence strip: the claim, then the proof ──────────────────────────── */

.m-proof {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.m-proof--flip > :first-child { order: 2; }

/*
 * The demo page puts its form in the wider column and aligns to the top rather
 * than the middle. A modifier, not an inline style: an inline
 * `grid-template-columns` outranks every media query, so the first version of
 * this stayed two columns on a phone and pushed the form off the screen.
 */
.m-proof--form { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }

.m-facts { display: grid; gap: var(--space-4); }

.m-fact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.m-fact svg { color: var(--color-accent); translate: 0 3px; }
.m-fact strong { display: block; color: var(--color-text); font-weight: var(--weight-semibold); }
.m-section--dark .m-fact strong { color: var(--m-ink-text); }
.m-section--dark .m-fact svg { color: #9d96ff; }

/* ── stat row ───────────────────────────────────────────────────────────── */

.m-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}

.m-stat { display: flex; flex-direction: column; gap: var(--space-1); }

.m-stat__value {
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.m-section--dark .m-stat__value { color: var(--m-ink-text); }
.m-stat__label { font-size: var(--m-small); color: var(--color-text-tertiary); }
.m-section--dark .m-stat__label { color: var(--m-ink-muted); }

/* ── tabbed workflows ───────────────────────────────────────────────────── */

.m-tabs__list {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  padding-block-end: var(--space-2);
  margin-block-end: var(--space-6);
  border-block-end: 1px solid var(--color-border);
  scrollbar-width: thin;
}

.m-tabs__tab {
  flex-shrink: 0;
  padding-block: var(--space-3);
  padding-inline: var(--space-4);
  border: 0;
  background: none;
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  color: var(--color-text-tertiary);
  cursor: pointer;
  border-block-end: 2px solid transparent;
  margin-block-end: -1px;
  white-space: nowrap;
  transition: color var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}

.m-tabs__tab:hover { color: var(--color-text); }

.m-tabs__tab[aria-selected="true"] {
  color: var(--color-accent-text);
  border-block-end-color: var(--color-accent);
  font-weight: var(--weight-semibold);
}

.m-tabs__panel { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); }

.m-tabs__intro {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

/*
 * Without JavaScript every panel is visible, stacked, each behind its own
 * heading — the content is all there, it simply is not folded. The enhancement
 * hides the list of headings and folds them; the fallback is not a broken tab
 * strip but an ordinary long section.
 */
.m-tabs:not([data-enhanced="true"]) .m-tabs__list { display: none; }
.m-tabs:not([data-enhanced="true"]) .m-tabs__panel { margin-block-end: clamp(2.5rem, 5vw, 4rem); }
.m-tabs[data-enhanced="true"] .m-tabs__panel[hidden] { display: none; }
.m-tabs[data-enhanced="true"] .m-tabs__panel-title { display: none; }

/* ── comparison / spec tables ───────────────────────────────────────────── */

/*
 * The comparison table is wider than a phone, so it scrolls. The same
 * scroll-shadow the product uses marks that there is more to the right:
 * without it, a cut-off Enterprise column is indistinguishable from a table
 * that simply ends, and the most expensive plan looks like it does not exist.
 */
.m-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background:
    linear-gradient(to right, var(--color-surface) 30%, rgb(255 255 255 / 0)) left center,
    linear-gradient(to left, var(--color-surface) 30%, rgb(255 255 255 / 0)) right center,
    radial-gradient(farthest-side at 0 50%, rgb(10 37 64 / 0.13), rgb(10 37 64 / 0)) left center,
    radial-gradient(farthest-side at 100% 50%, rgb(10 37 64 / 0.13), rgb(10 37 64 / 0)) right center;
  background-repeat: no-repeat;
  background-size: 36px 100%, 36px 100%, 12px 100%, 12px 100%;
  background-attachment: local, local, scroll, scroll;
}

.m-table { inline-size: 100%; border-collapse: collapse; font-size: var(--m-small); min-inline-size: 640px; }

/* Sits inside the scrolling box, so it stays with the table it explains. */
.m-table__caption {
  caption-side: top;
  text-align: start;
  padding: var(--space-4) var(--space-5) 0;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-text-tertiary);
}

.m-table th,
.m-table td {
  padding-block: var(--space-4);
  padding-inline: var(--space-5);
  text-align: start;
  border-block-end: 1px solid var(--color-border-subtle);
  vertical-align: top;
}

.m-table thead th {
  background: var(--color-canvas);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.m-table tbody tr:last-child th,
.m-table tbody tr:last-child td { border-block-end: 0; }

.m-table th[scope="row"] { font-weight: var(--weight-medium); color: var(--color-text); }
.m-table td.is-yes { color: var(--color-positive); font-weight: var(--weight-semibold); }
.m-table td.is-no { color: var(--color-text-disabled); }

/* ── pricing ────────────────────────────────────────────────────────────── */

.m-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: clamp(1rem, 2vw, 1.25rem); align-items: stretch; }

.m-plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: clamp(1.35rem, 2.2vw, 1.75rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.m-plan--featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent), 0 22px 44px -30px rgb(99 91 255 / 0.6);
}

.m-plan__name { font-size: var(--m-title); font-weight: var(--weight-semibold); color: var(--color-text); }

.m-plan__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.m-plan__period { font-size: var(--m-small); font-weight: var(--weight-regular); color: var(--color-text-tertiary); letter-spacing: 0; }
.m-plan .m-checks { margin-block-start: var(--space-1); }
.m-plan__cta { margin-block-start: auto; padding-block-start: var(--space-2); }

.m-plan__tag {
  align-self: start;
  padding-block: 0.15rem;
  padding-inline: 0.55rem;
  border-radius: var(--radius-full);
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* A ticked list. Used by plan cards, the workflow panels and the demo page. */
.m-checks { display: grid; gap: var(--space-3); font-size: var(--m-small); }
.m-checks li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2); align-items: start; list-style: none; }
.m-checks svg { color: var(--color-positive); translate: 0 3px; }

/*
 * Term and definition side by side, sharing the two-column rhythm of the
 * before/after ledger. A metric's name carries the weight; its own description
 * — the product's, not a rewrite of it — sits beside it.
 */
.m-deflist { display: grid; gap: 0; }

.m-deflist > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(1.1rem, 2vw, 1.5rem);
  border-block-end: 1px solid var(--color-border-subtle);
}

.m-deflist > div:first-child { border-block-start: 1px solid var(--color-border-subtle); }

.m-deflist dt {
  font-size: var(--m-title);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  letter-spacing: -0.012em;
}

.m-deflist dd { margin: 0; }

/* ── callout ────────────────────────────────────────────────────────────── */

.m-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-canvas);
  font-size: var(--m-small);
}

.m-note svg { color: var(--color-text-tertiary); translate: 0 2px; }
.m-note strong { color: var(--color-text); }
.m-section--dark .m-note { background: var(--m-ink-raised); border-color: var(--m-ink-line); }
.m-section--dark .m-note strong { color: var(--m-ink-text); }

/* ── FAQ ────────────────────────────────────────────────────────────────── */

.m-faq { display: grid; gap: 0; border-block-start: 1px solid var(--color-border-subtle); }

.m-faq__item { border-block-end: 1px solid var(--color-border-subtle); }

.m-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-size: var(--m-title);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  letter-spacing: -0.012em;
  cursor: pointer;
  list-style: none;
  transition: color var(--duration-base) var(--ease-out);
}

.m-faq__q::-webkit-details-marker { display: none; }
.m-faq__q:hover { color: var(--color-accent-text); }

.m-faq__sign { position: relative; inline-size: 14px; block-size: 14px; flex-shrink: 0; }
.m-faq__sign::before,
.m-faq__sign::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform var(--duration-base) var(--ease-out), opacity var(--duration-base) var(--ease-out);
}
.m-faq__sign::before { inset-block-start: 6px; inset-inline: 0; block-size: 2px; }
.m-faq__sign::after { inset-inline-start: 6px; inset-block: 0; inline-size: 2px; }
.m-faq__item[open] .m-faq__sign::after { transform: rotate(90deg); opacity: 0; }

.m-faq__a { padding-block-end: var(--space-6); max-width: var(--m-measure); }
.m-faq__a p + p { margin-block-start: var(--space-3); }

/* ── forms ──────────────────────────────────────────────────────────────── */

.m-form { display: grid; gap: var(--space-5); }
.m-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.m-field { display: grid; gap: var(--space-2); }

.m-field__label { font-size: var(--m-small); font-weight: var(--weight-semibold); color: var(--color-text); }
.m-field__label span { color: var(--color-negative); }
.m-field__hint { font-size: var(--text-xs); color: var(--color-text-tertiary); }

.m-input,
.m-select,
.m-textarea {
  inline-size: 100%;
  padding-block: 0.7rem;
  padding-inline: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--m-body);
  line-height: 1.4;
  transition: border-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}

.m-textarea { min-block-size: 118px; resize: vertical; }

.m-input:focus,
.m-select:focus,
.m-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.m-input[aria-invalid="true"],
.m-select[aria-invalid="true"],
.m-textarea[aria-invalid="true"] { border-color: var(--color-negative); }

.m-error { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-negative); }

.m-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-negative-border);
  background: var(--color-negative-subtle);
  color: var(--color-negative);
  font-size: var(--m-small);
}

.m-alert svg { translate: 0 2px; }
.m-alert--success { border-color: var(--color-positive-border); background: var(--color-positive-subtle); color: var(--color-positive); }

.m-success {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-positive-border);
  background: var(--color-positive-subtle);
}

.m-success__mark {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--radius-full);
  background: var(--color-positive);
  color: #ffffff;
}

/* ── footer ─────────────────────────────────────────────────────────────── */

.m-footer {
  background: var(--m-ink-deep);
  color: var(--m-ink-muted);
  padding-block: clamp(3rem, 6vw, 4.5rem) var(--space-8);
  font-size: var(--m-small);
}

.m-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block-end: clamp(2rem, 4vw, 3rem);
  border-block-end: 1px solid var(--m-ink-line);
}

.m-footer .m-brand { color: var(--m-ink-text); }

.m-footer__col { display: flex; flex-direction: column; gap: var(--space-3); align-items: start; }

.m-footer__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7f93ab;
}

.m-footer__col a { color: var(--m-ink-muted); text-decoration: none; transition: color var(--duration-base) var(--ease-out); }
.m-footer__col a:hover { color: var(--m-ink-text); }

.m-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block-start: var(--space-6);
  font-size: var(--text-xs);
  color: #7f93ab;
}

.m-footer__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }

.m-lang { display: inline-flex; gap: var(--space-1); align-items: center; }

.m-lang button {
  padding-block: 0.28rem;
  padding-inline: 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: none;
  color: #7f93ab;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: color var(--duration-base) var(--ease-out), background-color var(--duration-base) var(--ease-out);
}

.m-lang button:hover { color: var(--m-ink-text); background: var(--m-ink-raised); }
.m-lang button[aria-current="true"] { color: var(--m-ink-text); background: var(--m-ink-raised); border-color: var(--m-ink-line); }

/* ── final call to action ───────────────────────────────────────────────── */

.m-cta {
  position: relative;
  overflow: hidden;
  background: var(--m-ink);
  color: var(--m-ink-muted);
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.m-cta::before {
  content: "";
  position: absolute;
  inset-block-end: -60%;
  inset-inline-start: 50%;
  inline-size: min(900px, 120%);
  block-size: 520px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(99 91 255 / 0.24), transparent 70%);
  pointer-events: none;
}

.m-cta > * { position: relative; }
.m-cta .m-lead { color: #c3d2e3; }

/* ── skip link ──────────────────────────────────────────────────────────── */

.m-skip {
  position: absolute;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-3);
  z-index: var(--z-toast);
  padding-block: var(--space-2);
  padding-inline: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: #ffffff;
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transform: translateY(-200%);
}

.m-skip:focus { transform: translateY(0); }

/* Focus is visible on every interactive thing, including the dark field. */
.m-page :focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.m-section--dark :focus-visible,
.m-hero :focus-visible,
.m-cta :focus-visible,
.m-footer :focus-visible,
.m-header--dark :focus-visible { outline-color: #a9a3ff; }

/* ── reveal on scroll ───────────────────────────────────────────────────── */

/*
 * Only applied once the enhancement has run. Written this way round on purpose:
 * with no JavaScript, or before it loads, nothing is hidden — an animation that
 * fails to trigger must never leave a page blank.
 */
[data-reveal="ready"] .m-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}

[data-reveal="ready"] .m-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal="ready"] .m-reveal { opacity: 1; transform: none; transition: none; }
  .m-menu__panel { animation: none; }
}

/* Printing never scrolls, so nothing would ever be revealed. */
@media print {
  [data-reveal="ready"] .m-reveal { opacity: 1; transform: none; transition: none; }
  .m-header { position: static; }
}

/* ── responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .m-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .m-nav { display: none; }
  .m-header__actions .m-btn--secondary { display: none; }
  .m-menu { display: block; margin-inline-start: auto; }
  .m-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-proof,
  .m-proof--form,
  .m-tabs__intro { grid-template-columns: minmax(0, 1fr); }
  .m-proof--flip > :first-child { order: 0; }
}

@media (max-width: 720px) {
  .m-hero { padding-block-start: calc(var(--m-header-h) + 2.25rem); }
  .m-grid--2,
  .m-grid--3,
  .m-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .m-form__row { grid-template-columns: minmax(0, 1fr); }
  .m-pain__row,
  .m-pain__legend,
  .m-deflist > div { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .m-pain__row,
  .m-deflist > div { padding-block: var(--space-5); }
  .m-footer__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .m-actions .m-btn { inline-size: 100%; }
  .m-shot__url { display: none; }
}
