/* Marketing landing page styles. Loaded only on app/views/static/index.html.erb
   via stylesheet_link_tag inside content_for :head. All rules are scoped under
   .marketing-home so the file is safe to ship even if it ever loads globally. */

.marketing-home {
  --mh-bg: #0a0e1f;
  --mh-bg-alt: #0f1428;
  --mh-surface: #141a32;
  --mh-ink: #f4ecf7;
  --mh-ink-dim: rgba(244, 236, 247, 0.62);
  --mh-ink-soft: rgba(244, 236, 247, 0.42);
  --mh-line: rgba(255, 255, 255, 0.08);
  --mh-magenta: #d96bff;
  --mh-hot: #c95cff;
  --mh-gradient: linear-gradient(135deg, #1c1d6b 0%, #4d2db8 40%, #9d44d8 70%, #d96bff 100%);
  --mh-gradient-soft: linear-gradient(135deg, rgba(28, 29, 107, 0.30) 0%, rgba(111, 59, 208, 0.30) 50%, rgba(217, 107, 255, 0.30) 100%);
  --mh-gradient-text: linear-gradient(110deg, #6f8fff 0%, #b376ff 50%, #ff8fdd 100%);
  /* Match the main app's typography: alias to its global tokens (tokens.css ships
     in the tailwind bundle). Domine is a sturdy low-contrast serif — unlike the
     previous Bodoni Moda, its strokes don't vanish at small sizes on phones. */
  --mh-display: var(--font-display, "Domine", ui-serif, Georgia, serif);
  --mh-body: var(--font-sans, "Figtree", ui-sans-serif, system-ui, sans-serif);
  --mh-mono: var(--font-sans, "Figtree", ui-sans-serif, system-ui, sans-serif);  /* app has no mono — labels use the sans (letter-spacing keeps the label feel) */

  background: var(--mh-bg);
  color: var(--mh-ink);
  font-family: var(--mh-body);
  letter-spacing: 0;
  min-height: 100vh;
  overflow: hidden;
}

/* Cover html and body so no light strip leaks on mobile (elastic-scroll
   bounce, scrollbar gutter, or sub-pixel horizontal scroll). overflow-x:clip
   on html catches any descendant that nudges past 100vw. */
html:has(.marketing-home),
body:has(.marketing-home) { background: #0a0e1f; }
html:has(.marketing-home) { overflow-x: clip; }

/* The static layout renders the page in a bare <main>. Because <body> is a
   flex/grid container, <main> is an item whose default min-width:auto resolves
   to its min-content — so it grows to the calendar's widest unbreakable agenda
   line and blows the page ~40px past a 360px phone (loaded zoomed-out). The
   mobile-shell paradigm: min-width:0 lets <main> shrink back to the viewport so
   the constraint propagates down and the content reflows. */
body:has(.marketing-home) main { min-width: 0; max-width: 100%; }

.marketing-home *,
.marketing-home *::before,
.marketing-home *::after { box-sizing: border-box; }

/* Propagate the viewport-width constraint down through the nested grids.
   A grid/flex item's default min-width:auto resolves to min-content, so a wide
   leaf (the calendar, a long heading) refuses to shrink and forces every
   ancestor — and the whole shell — past 100vw. overflow-x:clip on <html> only
   *masks* that; min-width:0 on the items is what actually contains it.
   See the mobile-shell-overflow pattern. */
.marketing-home :is(
  .mh-nav,
  .mh-hero-grid,
  .mh-feature-block,
  .mh-calendar,
  .mh-appt,
  .mh-two-col,
  .mh-paragraphs,
  .mh-section-head,
  .mh-faq-layout,
  .mh-footer-grid
) > * { min-width: 0; }

.mh-shell { margin: 0 auto; max-width: 1440px; padding: 0 56px; position: relative; }
.mh-section { padding: 120px 0; position: relative; }
.mh-alt { background: var(--mh-bg-alt); }
.mh-grad-text {
  background: var(--mh-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Force upright: these sit on <em> (default italic), and Domine has no true
     italic — the synthesized slant fought background-clip:text (clipped the last
     glyph). The gradient color carries the emphasis on its own. */
  font-style: normal;
}

/* ---------- Top nav ---------- */
.mh-nav {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr auto 1fr;
  padding: 24px 0;
  position: relative;
  z-index: 3;
}
.mh-logo img { display: block; height: 36px; width: auto; }
.mh-nav-links { align-items: center; display: flex; gap: 28px; justify-content: center; }
.mh-nav-links a,
.mh-sign-in {
  color: var(--mh-ink-dim);
  font-size: 14px;
  text-decoration: none;
}
.mh-nav-links a:hover,
.mh-sign-in:hover { color: var(--mh-ink); }
.mh-nav-actions { align-items: center; display: flex; gap: 14px; justify-content: flex-end; }
.mh-menu { display: none; }

/* ---------- Buttons ---------- */
.mh-button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 48px;
  padding: 16px 24px;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease, background 160ms ease;
  white-space: nowrap;
}
.mh-button:hover { transform: translateY(-1px); }
.mh-button:focus-visible,
.mh-faq summary:focus-visible,
.mh-nav a:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px var(--mh-bg), 0 0 0 4px #d96bff;
}
.mh-primary {
  background: var(--mh-gradient);
  box-shadow: 0 16px 40px -12px rgba(217, 107, 255, 0.55);
  color: white;
}
.mh-ghost { border: 1px solid var(--mh-line); color: var(--mh-ink); }
.mh-ghost:hover { background: rgba(255, 255, 255, 0.04); }
.mh-dashed { border: 1px dashed rgba(244, 236, 247, 0.25); color: var(--mh-ink); }
.mh-navy-button { background: var(--mh-bg); color: white; margin-top: 34px; }

/* ---------- Hero ---------- */
.mh-hero {
  min-height: 880px;
  padding-bottom: 118px;
  position: relative;
}
.mh-hero::before {
  background:
    radial-gradient(900px 600px at 90% -10%, rgba(217, 107, 255, 0.20), transparent 55%),
    radial-gradient(700px 500px at -10% 20%, rgba(28, 29, 107, 0.55), transparent 55%),
    radial-gradient(600px 400px at 50% 60%, rgba(111, 59, 208, 0.12), transparent 60%);
  content: "";
  height: 760px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
}
.mh-hero-grid {
  display: grid;
  gap: 64px;
  grid-template-columns: 1fr;
  padding-top: 54px;
  position: relative;
  z-index: 1;
}

/* ---------- Type & eyebrow ---------- */
.mh-eyebrow {
  align-items: center;
  color: var(--mh-ink-dim);
  display: inline-flex;
  font-family: var(--mh-mono);
  font-size: 11px;
  font-weight: 500;
  gap: 12px;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
}
.mh-eyebrow::before { background: currentColor; content: ""; height: 1px; opacity: 0.8; width: 28px; }
.mh-eyebrow-accent { color: var(--mh-magenta); }
.mh-h1, .mh-h2 {
  font-family: var(--mh-display);
  font-weight: 500;
  letter-spacing: -0.038em;
  margin: 0;
}
.mh-h1 { font-size: clamp(72px, 9.7vw, 140px); line-height: 0.9; margin-top: 28px; }
.mh-h2 { font-size: clamp(46px, 5vw, 60px); letter-spacing: -0.025em; line-height: 1; }
.mh-copy { color: var(--mh-ink-dim); font-size: 19px; line-height: 1.55; margin: 30px 0 0; max-width: 760px; }
.mh-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.mh-trust { align-items: center; color: var(--mh-ink-soft); display: flex; flex-wrap: wrap; font-size: 13px; gap: 12px; margin-top: 28px; }
.mh-trust-dot { background: var(--mh-line); border-radius: 50%; height: 4px; width: 4px; }

/* ---------- Calendar preview ---------- */
.mh-feature-block { display: grid; gap: 18px; grid-template-columns: 2fr 1fr; }
.mh-halo { position: relative; }
.mh-halo::before {
  background: var(--mh-gradient);
  border-radius: 22px;
  content: "";
  filter: blur(16px);
  inset: -1px;
  opacity: 0.55;
  position: absolute;
  z-index: 0;
}
.mh-calendar {
  background: rgba(20, 26, 50, 0.94);
  border: 1px solid var(--mh-line);
  border-radius: 20px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.15fr 1fr;
  min-height: 520px;
  padding: 20px;
  position: relative;
  z-index: 1;
}
/* Period nav — centered label + sub with ‹ › buttons, mirrors cc-cal-pnav. */
.mh-calendar-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 14px; }
.mh-cal-pnav-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 150px; }
.mh-calendar-title { font-family: var(--mh-display); font-size: 22px; font-weight: 600; line-height: 1; }
.mh-calendar-sub { color: var(--mh-ink-dim); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.mh-calendar-sub::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: var(--accent-soft); box-shadow: 0 0 8px var(--accent-glow); }
.mh-cal-navbtn { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: #e9d5ff; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hairline); }
.mh-days, .mh-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mh-days { color: var(--mh-ink-soft); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px; text-align: center; }
.mh-grid { gap: 8px; }
/* Day cell + density dot — mirrors the in-app provider calendar
   (cc-cal-cell / cc-cal-cell__dot): airy transparent cells, the day number
   and a glowing accent dot stacked, gradient pill for the selected day. */
.mh-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--mh-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.mh-day__num { line-height: 1; }
.mh-day__dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.32);   /* default = "open" ring */
}
.mh-day.booked .mh-day__dot { background: var(--accent-soft); border-color: transparent; box-shadow: 0 0 6px var(--accent-glow); }
.mh-day.full   .mh-day__dot { background: var(--accent);      border-color: transparent; box-shadow: 0 0 7px var(--accent-glow); }
.mh-day.selected {
  color: #1a0f2e;
  font-weight: 700;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent-mid));
  box-shadow: 0 10px 22px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.mh-day.selected .mh-day__dot { background: #1a0f2e; border-color: transparent; box-shadow: none; }
.mh-legend { align-items: center; color: var(--mh-ink-soft); display: flex; flex-wrap: wrap; font-size: 12px; gap: 14px; margin-top: 18px; }
.mh-legend span { align-items: center; display: inline-flex; gap: 8px; }
.mh-legend-dot { display: inline-block; width: 4px; height: 4px; border-radius: 999px; background: var(--accent-soft); box-shadow: 0 0 6px var(--accent-glow); }
.mh-legend-dot.full { background: var(--accent); box-shadow: 0 0 7px var(--accent-glow); }
.mh-legend-dot.open { background: transparent; border: 1px solid rgba(255, 255, 255, 0.32); box-shadow: none; }

/* ---------- Schedule ---------- */
.mh-schedule { border-left: 1px solid var(--mh-line); padding-left: 18px; }
/* Day header — capacity ring + title/sub + chip, mirrors cc-cal-dayhead. */
.mh-dayhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mh-dayhead-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.mh-dayhead-title { font-family: var(--mh-display); font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.mh-dayhead-sub { color: var(--mh-ink-soft); font-size: 12.5px; margin-top: 2px; }
.mh-ring { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center; position: relative; }
.mh-ring::before { content: ""; position: absolute; inset: 0; border-radius: 999px; background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), rgba(255, 255, 255, 0.10) 0); }
/* inner hole matches the .mh-calendar surface so the ring reads as a ring */
.mh-ring::after { content: ""; position: absolute; inset: 4px; border-radius: 999px; background: rgba(20, 26, 50, 0.94); }
.mh-ring-t { position: relative; z-index: 1; font-family: var(--mh-display); font-size: 13px; font-weight: 600; }
.mh-ring-t b { color: var(--accent-soft); }
.mh-chip { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; padding: 4px 9px; border-radius: 999px; white-space: nowrap; color: var(--accent-soft); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent-soft) 30%, transparent); }
/* Booking cards — mirror the in-app agenda (cc-cal-appt): left category bar,
   tabular time gutter, serif name, dot-led service line. */
.mh-appt {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  margin-bottom: 9px;
  padding: 15px 14px 15px 18px;
  position: relative;
  overflow: hidden;
}
.mh-appt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--accent-soft);
  box-shadow: 2px 0 12px var(--accent-glow);
}
.mh-appt.featured {
  background: linear-gradient(110deg, color-mix(in srgb, var(--accent-mid) 42%, transparent) 0%, color-mix(in srgb, var(--accent) 26%, transparent) 60%, color-mix(in srgb, var(--accent) 12%, transparent) 100%);
  border-color: color-mix(in srgb, var(--accent-soft) 45%, transparent);
  box-shadow: 0 14px 34px -16px var(--accent-glow);
}
.mh-time { color: var(--mh-ink-soft); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; width: 42px; flex: 0 0 42px; }
.mh-appt-body { flex: 1 1 auto; min-width: 0; }
.mh-client { display: block; font-family: var(--mh-display); font-size: 16px; font-weight: 600; line-height: 1.15; }
.mh-service { display: flex; align-items: center; gap: 7px; color: var(--mh-ink-soft); font-size: 12.5px; margin-top: 3px; white-space: nowrap; }
.mh-service span { color: rgba(255, 255, 255, 0.32); }
.mh-cat { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 999px; background: var(--accent-soft); }
.mh-calendar-actions { display: flex; gap: 10px; margin-top: 18px; }
.mh-calendar-actions .mh-button { font-size: 12px; min-height: 38px; padding: 11px 14px; }

/* ---------- Side stack of mini cards ---------- */
.mh-side-stack { display: grid; gap: 18px; }
.mh-mini-card {
  background: var(--mh-surface);
  border: 1px solid var(--mh-line);
  border-radius: 18px;
  min-height: 150px;
  padding: 22px;
}
.mh-mini-card.gradient { background: var(--mh-gradient); border: 0; color: white; }
.mh-label { color: var(--mh-ink-soft); font-family: var(--mh-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.gradient .mh-label { color: rgba(255, 255, 255, 0.72); }
.mh-big-number { font-family: var(--mh-display); font-size: 58px; line-height: 0.95; margin-top: 14px; }
.mh-mini-body { color: var(--mh-ink-dim); font-size: 16px; line-height: 1.45; margin-top: 18px; }
.mh-avatar { background: var(--mh-gradient); border-radius: 50%; height: 40px; margin-bottom: 18px; width: 40px; }
.mh-mini-title { font-weight: 700; }
.mh-mini-subtitle { color: var(--mh-ink-dim); font-size: 13px; margin-top: 5px; }

/* ---------- Story / quote / stats ---------- */
.mh-two-col { display: grid; gap: 68px; grid-template-columns: 0.9fr 1.1fr; }
.mh-paragraphs { display: grid; gap: 22px; }
.mh-paragraphs p { color: var(--mh-ink-dim); font-size: 18px; line-height: 1.75; margin: 0; }
.mh-quote {
  background: var(--mh-surface);
  border: 1px solid var(--mh-line);
  border-radius: 18px;
  margin-top: 34px;
  padding: 28px 30px;
  position: relative;
}
.mh-quote::before { background: var(--mh-gradient); border-radius: 999px; content: ""; inset: 24px auto 24px 0; position: absolute; width: 2px; }
.mh-quote p { font-family: var(--mh-display); font-size: 28px; line-height: 1.2; margin: 0; }
.mh-quote cite { color: var(--mh-ink-soft); display: block; font-size: 13px; font-style: normal; margin-top: 18px; }

/* Founder attribution — circular avatar + name/role. Avatar source is a
   pre-cropped square headshot, so object-fit:cover just drops it into the circle. */
.mh-quote-author { align-items: center; display: flex; gap: 18px; margin-top: 24px; }
.mh-quote-avatar {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--mh-line);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.mh-quote-author cite { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.mh-quote-name { color: var(--mh-ink); font-size: 16px; font-weight: 600; }
.mh-quote-role { color: var(--mh-ink-soft); font-size: 13px; }
.mh-stats { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 44px; }
.mh-stat-value { font-family: var(--mh-display); font-size: 44px; line-height: 1; }
.mh-stat-label { color: var(--mh-ink-soft); font-family: var(--mh-mono); font-size: 11px; letter-spacing: 0.18em; margin-top: 10px; text-transform: uppercase; }

/* ---------- Section heading shared by steps/action station/faq ---------- */
.mh-section-head { align-items: end; display: flex; gap: 28px; justify-content: space-between; margin-bottom: 44px; }
.mh-section-head .mh-copy { margin: 0; max-width: 470px; }
.mh-section-title { margin-top: 22px; }

/* ---------- Steps ---------- */
.mh-steps { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.mh-step {
  background: var(--mh-surface);
  border: 1px solid var(--mh-line);
  border-radius: 18px;
  overflow: hidden;
  padding: 26px;
  position: relative;
}
.mh-step::before {
  background: var(--mh-gradient);
  content: "";
  height: 2px;
  left: 0;
  opacity: var(--stripe-opacity, 0.6);
  position: absolute;
  right: 0;
  top: 0;
}
.mh-num { font-family: var(--mh-display); font-size: 30px; line-height: 1; }
.mh-card-title { font-size: 22px; font-weight: 700; line-height: 1.15; margin-top: 30px; }
.mh-card-copy { color: var(--mh-ink-dim); font-size: 14px; line-height: 1.65; margin-top: 14px; }

/* ---------- Action Station (provider-home screenshot) ---------- */
.mh-action { overflow: hidden; }
.mh-action-stage { position: relative; display: flex; justify-content: center; margin-top: 56px; }
/* On-brand glow behind the phone body (sits below the faded-in top). */
.mh-action-stage::before {
  content: "";
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  width: min(540px, 92%);
  height: 64%;
  background: radial-gradient(58% 56% at 50% 52%, rgba(217, 107, 255, 0.22), transparent 70%);
  filter: blur(26px);
  pointer-events: none;
  z-index: 0;
}
/* The screenshot: rounded like a phone. Fade the TOP (iOS status bar / dynamic
   island) into the section so it reads as emerging from the page, while the
   bottom nav bar stays fully crisp. */
.mh-action-shot {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 42px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%);
}

/* ---------- FAQ ---------- */
.mh-faq-layout { display: grid; gap: 70px; grid-template-columns: 0.78fr 1.22fr; }
.mh-faq-list { border-top: 1px solid var(--mh-line); }
.mh-faq { border-bottom: 1px solid var(--mh-line); padding: 0; }
.mh-faq summary {
  color: var(--mh-ink);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  list-style: none;
  padding: 24px 0;
  position: relative;
}
.mh-faq summary::-webkit-details-marker { display: none; }
.mh-faq summary::after { color: var(--mh-ink-soft); content: "+"; position: absolute; right: 0; top: 24px; }
.mh-faq[open] summary::after { content: "-"; }
.mh-faq p { color: var(--mh-ink-dim); font-size: 15px; line-height: 1.7; margin: 10px 48px 24px 0; }

/* ---------- Final CTA card ---------- */
.mh-final-card {
  background: var(--mh-gradient);
  border-radius: 28px;
  overflow: hidden;
  padding: 90px 64px;
  position: relative;
}
.mh-final-card::before {
  background:
    radial-gradient(420px 280px at 20% 0%, rgba(10, 14, 31, 0.48), transparent 65%),
    radial-gradient(520px 340px at 80% 100%, rgba(255, 255, 255, 0.18), transparent 60%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}
.mh-final-content { max-width: 760px; position: relative; z-index: 1; }
.mh-final-card .mh-h2 { color: white; }
.mh-final-card .mh-copy { color: rgba(255, 255, 255, 0.76); }

/* ---------- Footer ---------- */
.mh-footer { border-top: 1px solid var(--mh-line); padding: 72px 0 30px; }
.mh-footer-grid { display: grid; gap: 42px; grid-template-columns: 1.6fr repeat(4, 1fr); }
.mh-footer-logo { height: 42px; width: auto; }
.mh-footer-copy { color: var(--mh-ink-dim); font-size: 14px; line-height: 1.7; margin-top: 22px; max-width: 330px; }
.mh-footer h3 { font-family: var(--mh-mono); font-size: 11px; letter-spacing: 0.18em; margin: 0 0 18px; text-transform: uppercase; }
.mh-footer a { color: var(--mh-ink-dim); display: block; font-size: 14px; margin-top: 12px; text-decoration: none; }
.mh-footer a:hover { color: var(--mh-ink); }
.mh-legal {
  border-top: 1px solid var(--mh-line);
  color: var(--mh-ink-soft);
  display: flex;
  font-family: var(--mh-mono);
  font-size: 11px;
  justify-content: space-between;
  letter-spacing: 0.18em;
  margin-top: 58px;
  padding-top: 24px;
  text-transform: uppercase;
}

/* ---------- Beta signup form ---------- */
.mh-form { display: grid; gap: 18px; }
.mh-field { display: block; }
.mh-field-error { color: var(--danger); font-size: 12.5px; margin: 7px 0 0; }
.mh-form-error { color: var(--danger); font-size: 13px; margin: 0; }
.mh-form-submit { width: 100%; margin-top: 4px; }

/* Honeypot — off-screen, kept out of the tab order and the a11y tree. */
.mh-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Success state that replaces the form. */
.mh-form-confirmation { text-align: center; padding: 18px 0 8px; }
.mh-confirmation-check {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 26px;
  color: #1a0f2e;
  background: var(--mh-gradient-text);
  box-shadow: 0 10px 26px -10px var(--accent-glow);
}
.mh-confirmation-title { font-family: var(--mh-display); font-size: 22px; font-weight: 600; margin: 0; }
.mh-confirmation-body { color: var(--mh-ink-dim); font-size: 15px; margin: 6px 0 0; }

/* Full-page /beta_signups/new (no-JS fallback). The dialog (Step 4b) reuses the
   form + confirmation partials with its own shell. */
.mh-beta { display: grid; place-items: center; min-height: 100vh; }
.mh-beta-shell { max-width: 520px; text-align: center; }
.mh-beta-title { margin: 14px 0 0; }
.mh-beta-copy { margin: 14px auto 0; }
.mh-beta-card {
  margin-top: 32px;
  padding: 28px;
  text-align: left;
  border: 1px solid var(--border-glass);
  border-radius: var(--r-screen);
  background: var(--surface-glass);
  box-shadow: var(--shadow-screen);
  backdrop-filter: blur(4px);
}

/* ---------- Beta signup dialog (modal desktop / full-screen mobile) ---------- */
/* The <dialog> fills the viewport (transparent) and centers the card, so a click
   outside the card hits the dialog element = backdrop close. */
.mh-dialog {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--mh-ink);
  overflow: hidden;
}
.mh-dialog[open] { display: flex; align-items: center; justify-content: center; }
.mh-dialog::backdrop {
  background: rgba(8, 6, 20, 0.62);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.mh-dialog-card {
  position: relative;
  min-width: 0;
  width: calc(100% - 40px);
  max-width: 460px;
  max-height: calc(100% - 40px);
  overflow-y: auto;
  padding: 34px 28px 30px;
  border: 1px solid var(--border-glass);
  border-radius: var(--r-screen);
  background: var(--mh-bg-alt);
  box-shadow: var(--shadow-screen);
}
.mh-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--mh-ink-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
}
.mh-dialog-close:hover { color: var(--mh-ink); border-color: var(--accent-soft); }
.mh-dialog-title { margin: 14px 0 0; }
.mh-dialog-copy { margin: 12px 0 24px; }

@media (max-width: 760px) {
  .mh-dialog-card {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100%;
    border: 0;
    border-radius: 0;
    padding: calc(env(safe-area-inset-top) + 60px) 22px calc(env(safe-area-inset-bottom) + 28px);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .marketing-home .mh-hero-grid,
  .marketing-home .mh-feature-block,
  .marketing-home .mh-two-col,
  .marketing-home .mh-faq-layout { grid-template-columns: 1fr; }
  .marketing-home .mh-h1 { font-size: clamp(64px, 9vw, 96px); }
  .marketing-home .mh-side-stack { grid-template-columns: repeat(3, 1fr); }
  .marketing-home .mh-calendar { grid-template-columns: 1.1fr 0.9fr; }
  .marketing-home .mh-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) and (max-width: 1180px) {
  .marketing-home .mh-faq-layout {
    gap: 48px;
    grid-template-columns: minmax(250px, 0.52fr) minmax(0, 1fr);
  }
  .marketing-home .mh-faq-list {
    justify-self: end;
    max-width: 720px;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .marketing-home .mh-shell { padding: 0 20px; }
  .marketing-home .mh-section { padding: 60px 0; }
  .marketing-home .mh-nav { grid-template-columns: 1fr auto; padding: 18px 0; }
  .marketing-home .mh-logo img { height: 28px; }
  .marketing-home .mh-nav-links,
  .marketing-home .mh-sign-in { display: none; }
  .marketing-home .mh-nav-actions { gap: 10px; }
  .marketing-home .mh-nav-actions .mh-primary { min-height: 38px; padding: 11px 14px; }
  .marketing-home .mh-menu {
    background: transparent;
    border: 1px solid var(--mh-line);
    border-radius: 999px;
    color: var(--mh-ink);
    display: inline-flex;
    min-height: 38px;
    padding: 0 13px;
  }
  .marketing-home .mh-hero { min-height: auto; padding-bottom: 60px; }
  .marketing-home .mh-hero-grid { gap: 42px; padding-top: 24px; }
  /* Scale display headings with viewport width so the longest line
     ("The chair is yours." / "Software that respects the craft.")
     fits without forcing horizontal scroll on narrow phones. */
  .marketing-home .mh-h1 { font-size: clamp(40px, 12.5vw, 58px); }
  .marketing-home .mh-h2 { font-size: clamp(28px, 8.5vw, 38px); }
  .marketing-home .mh-copy { font-size: 16px; }
  .marketing-home .mh-hero-actions,
  .marketing-home .mh-calendar-actions { flex-direction: column; }
  .marketing-home .mh-button { width: 100%; }
  .marketing-home .mh-calendar { grid-template-columns: 1fr; min-height: auto; padding: 16px; }
  .marketing-home .mh-side-stack { display: none; }
  /* Stack the agenda below the month grid — the calendar card is already
     single-column on mobile. Drop the desktop left-divider. */
  .marketing-home .mh-schedule { border-left: 0; padding-left: 0; }
  /* Let the agenda service line wrap instead of forcing its nowrap min-content
     width (the thing that was widening the whole page on narrow phones). */
  .marketing-home .mh-service { white-space: normal; }
  .marketing-home .mh-grid { gap: 6px; }
  .marketing-home .mh-day { border-radius: 8px; font-size: 12px; }
  .marketing-home .mh-section-head { align-items: start; flex-direction: column; }
  .marketing-home .mh-steps,
  .marketing-home .mh-stats,
  .marketing-home .mh-footer-grid { grid-template-columns: 1fr; }
  .marketing-home .mh-quote p { font-size: 23px; }
  .marketing-home .mh-quote-avatar { flex-basis: 68px; width: 68px; height: 68px; }
  .marketing-home .mh-final-card { border-radius: 22px; padding: 44px 24px; }
  .marketing-home .mh-legal { flex-direction: column; gap: 12px; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  .marketing-home *,
  .marketing-home *::before,
  .marketing-home *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
