/* ==========================================================================
   MARQUEE — Marketing surface (brand register)
   Fluid type, one orchestrated page-load, imagery does real work.
   ========================================================================== */

.m-body {
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
}

/* --------------------------------------------------------------------------
   Marketing nav
   -------------------------------------------------------------------------- */
.m-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: oklch(1 0 0 / 0.86);
  backdrop-filter: saturate(1.7) blur(12px);
  -webkit-backdrop-filter: saturate(1.7) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.m-nav[data-scrolled='true'] { border-bottom-color: var(--line); }
.m-nav-in {
  max-width: var(--marketing-max);
  margin: 0 auto;
  padding: var(--s-4) var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-6);
}
.m-nav-links { display: flex; align-items: center; gap: var(--s-6); margin-left: var(--s-6); }
.m-nav-links a {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--ink-2);
  transition: color var(--dur-fast) var(--ease-out);
}
.m-nav-links a:hover { color: var(--ink); }
@media (max-width: 880px) { .m-nav-links { display: none; } }

/* --------------------------------------------------------------------------
   Section rhythm — varied, not uniform
   -------------------------------------------------------------------------- */
.m-sec { padding: clamp(3.5rem, 2rem + 6vw, 7rem) var(--s-6); }
.m-sec-tight { padding-top: clamp(2rem, 1rem + 3vw, 3.5rem); }
.m-in { max-width: var(--marketing-max); margin: 0 auto; }
.m-in-narrow { max-width: 760px; margin: 0 auto; }

.m-dark {
  background: var(--chrome);
  color: var(--chrome-ink);
}
.m-dark .m-lead, .m-dark .m-sub { color: var(--chrome-ink-2); }
.m-dark .panel { background: var(--chrome-2); border-color: var(--chrome-line); }
.m-dark .t-muted { color: var(--chrome-muted); }

.m-tint { background: var(--surface); }

/* --------------------------------------------------------------------------
   Display type — fluid, capped at 5.25rem. Archivo pushed to expanded width
   so headlines read as broadcast signage rather than another grotesque.
   -------------------------------------------------------------------------- */
.m-h1 {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: var(--fw-black);
  font-size: clamp(2.6rem, 1.4rem + 3.9vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.m-h2 {
  font-family: var(--font-display);
  font-stretch: 116%;
  font-weight: var(--fw-black);
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3.1rem);
  line-height: 1.03;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.m-h3 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: var(--fw-bold);
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
}
.m-lead {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 62ch;
  text-wrap: pretty;
}
.m-sub { font-size: var(--fs-md); color: var(--muted); max-width: 66ch; text-wrap: pretty; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.m-hero {
  padding: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) var(--s-6) clamp(3rem, 2rem + 4vw, 5rem);
  position: relative;
}
.m-hero-grid {
  max-width: var(--marketing-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
@media (max-width: 940px) {
  .m-hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); }
}

.m-hero-media {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  aspect-ratio: 4 / 3.4;
  background: var(--surface-2);
}
.m-hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* One card breaking the panel's corner. A deliberate grid-break, not a
   second card floated on top of the content it is meant to support — so it
   hangs off the outside edge rather than covering the mock. */
.m-float {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--s-4);
}
/* Kept compact and low so the overlap lands in the panel's reserved bottom
   strip rather than across the rationale copy it is meant to reinforce. */
.m-float-a { left: -30px; bottom: -30px; width: 216px; }

/* Below the point where the hero stacks, the card has nowhere to hang without
   colliding with the panel, so it is removed rather than squeezed. */
@media (max-width: 1080px) { .m-float-a { left: -14px; bottom: -22px; } }
@media (max-width: 940px)  { .m-float { display: none; } }

/* --------------------------------------------------------------------------
   Lifecycle strip — the product's spine, shown as a real sequence
   -------------------------------------------------------------------------- */
.m-stages { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
@media (max-width: 1000px) { .m-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .m-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.m-stage {
  padding: var(--s-5) var(--s-4);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.m-dark .m-stage { border-left-color: var(--chrome-line); }
.m-stage:first-child { border-left: 0; }
@media (max-width: 1000px) { .m-stage:nth-child(3n+1) { border-left: 0; } }
@media (max-width: 620px)  { .m-stage:nth-child(3n+1) { border-left: 1px solid var(--line); }
                             .m-stage:nth-child(2n+1) { border-left: 0; } }
.m-stage-num {
  font-family: var(--font-display);
  font-stretch: 116%;
  font-weight: var(--fw-black);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.m-dark .m-stage-num { color: var(--signal); }

/* --------------------------------------------------------------------------
   Feature blocks — alternating, asymmetric. Not an identical card grid.
   -------------------------------------------------------------------------- */
.m-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: center;
  padding: clamp(2.5rem, 1.5rem + 3vw, 4rem) 0;
  border-top: 1px solid var(--line);
}
.m-feature:nth-child(even) > .m-feature-media { order: -1; }
@media (max-width: 900px) {
  .m-feature { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .m-feature:nth-child(even) > .m-feature-media { order: 0; }
}
.m-feature-media {
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */
.m-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: var(--s-4);
  align-items: stretch;
}
.m-plan {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .m-plan:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
}
.m-plan[data-featured='true'] {
  border-color: var(--chrome);
  background: var(--chrome);
  color: var(--chrome-ink);
  box-shadow: var(--shadow-lg);
}
.m-plan[data-featured='true'] .m-plan-price { color: var(--chrome-ink); }
.m-plan[data-featured='true'] .t-muted,
.m-plan[data-featured='true'] .m-plan-note { color: var(--chrome-muted); }
.m-plan[data-featured='true'] .m-plan-feat li { color: var(--chrome-ink-2); }
.m-plan[data-featured='true'] .m-plan-feat .icon { color: var(--signal); }

.m-plan-price {
  font-family: var(--font-display);
  font-stretch: 114%;
  font-weight: var(--fw-black);
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.m-plan-note { font-size: var(--fs-2xs); color: var(--muted); }
.m-plan-feat { display: flex; flex-direction: column; gap: 9px; font-size: var(--fs-sm); }
.m-plan-feat li { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-2); }
.m-plan-feat .icon { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; margin-top: 3px; stroke-width: 2.2; }

/* --------------------------------------------------------------------------
   Marketing footer
   -------------------------------------------------------------------------- */
.m-foot {
  background: var(--chrome);
  color: var(--chrome-ink);
  padding: var(--s-9) var(--s-6) var(--s-6);
}
.m-foot a { color: var(--chrome-ink-2); font-size: var(--fs-sm); transition: color var(--dur-fast) var(--ease-out); }
.m-foot a:hover { color: var(--chrome-ink); }
.m-foot-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--s-7);
}
@media (max-width: 780px) { .m-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.m-foot-h {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--chrome-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}

/* --------------------------------------------------------------------------
   Auth layout
   -------------------------------------------------------------------------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } }
.auth-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-7) var(--s-6);
}
.auth-form-in { width: 100%; max-width: 396px; margin: 0 auto; }
.auth-aside {
  background: var(--chrome);
  color: var(--chrome-ink);
  padding: var(--s-9) var(--s-8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-8);
  position: relative;
  overflow: hidden;
}
@media (max-width: 900px) { .auth-aside { display: none; } }

/* --------------------------------------------------------------------------
   Page-load orchestration — marketing only. The app loads into a task and
   gets none of this. Content is visible by default; the class only adds the
   entrance, so a failed transition can never ship a blank section.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal-up 620ms var(--ease-out) both;
    animation-delay: var(--d, 0ms);
  }
  @keyframes reveal-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }

  /* Scroll-triggered sections.
     The default state is VISIBLE. The hidden state only exists while
     html.js-motion is set, which JS adds at runtime and removes again after a
     safety timeout. So if the observer never fires — headless render, hidden
     tab, JS error, no JS at all — the section still paints. A reveal must
     enhance an already-visible default, never gate it. */
  .on-scroll {
    transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  html.js-motion .on-scroll:not([data-seen='true']) {
    opacity: 0.001;
    transform: translateY(18px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .on-scroll { opacity: 1; transform: none; }
}
