/*
 * marketing.css — section sheet for the public landing page (marketing#index).
 *
 * tokens.css + ui.css load globally; this sheet loads AFTER them (content_for
 * :head), so it may use any token and compose ui.css primitives. It carries
 * only the landing's layout/rhythm; it never restyles shared ui.css primitives
 * in a way that leaks elsewhere.
 */

/* ===== Brand mark ======================================================= */
.m-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
}

.m-brand__mark {
  width: 13px;
  height: 13px;
  border-radius: 4px 4px 4px 0;
  background: var(--color-primary);
}

/* ===== Hero stage (full-bleed dark) ===================================== */
.m-hero-stage {
  border-radius: 0;
  background:
    radial-gradient(900px 460px at 78% -120px, color-mix(in srgb, var(--ember) 26%, transparent), transparent),
    var(--color-stage);
  padding-bottom: var(--space-20);
}

.m-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-5);
}

.m-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

/* Plain nav links stay cream (override .stage a -> ember); buttons keep theirs. */
.m-nav__links > a:not(.btn) {
  color: var(--color-on-stage-muted);
  text-decoration: none;
}

.m-nav__links > a:not(.btn):hover {
  color: var(--color-on-stage);
}

.m-hero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: var(--space-12);
  align-items: center;
  padding-top: var(--space-12);
}

.m-hero__title {
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  margin-bottom: var(--space-5);
}

.m-hero__title span {
  color: var(--color-primary);
}

.m-hero__sub {
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--color-on-stage-muted);
  max-width: 30em;
  margin-bottom: var(--space-6);
}

.m-hero__note {
  font-size: var(--text-sm);
  color: var(--color-on-stage-faint);
  margin-top: var(--space-4);
}

/* ===== Builder panel (the chip selector) =============================== */
.m-builder__head {
  font-weight: var(--weight-semibold);
  color: var(--color-on-stage-muted);
  margin-bottom: var(--space-4);
}

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

.m-builder__preview {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-stage-border);
}

.m-builder__stat {
  font-weight: var(--weight-semibold);
}

.m-builder__stat span:not(.m-builder__sep) {
  color: var(--ember);
}

.m-builder__sep {
  color: var(--color-on-stage-faint);
  margin-inline: var(--space-1);
}

.m-builder__list {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
  min-height: 44px;
}

.m-builder__list li {
  font-size: var(--text-sm);
  color: var(--color-on-stage);
  background: var(--color-stage-sunk);
  border-left: 2px solid var(--color-secondary);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}

.m-builder__empty {
  color: var(--color-on-stage-faint);
  background: transparent;
  border-left-color: var(--color-stage-border);
}

/* ===== Sections (light working surface) ================================ */
.m-section-title {
  font-size: var(--text-2xl);
  text-align: center;
  margin-bottom: var(--space-10);
}

.m-pillars {
  padding-block: var(--space-20);
}

/* Three co-equal pillars ("Three things, one calm place") — the equal 3-up is
   intentional, not templated; a generous gap gives the cards room to breathe. */
.m-pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.m-pillar__icon {
  display: inline-flex;
  font-size: var(--text-xl);
  color: var(--color-primary-ink);
  margin-bottom: var(--space-4);
}

.m-pillar h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.m-how {
  padding-bottom: var(--space-20);
}

.m-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.m-step__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-3);
}

.m-step h3 {
  font-size: var(--text-md);
  margin-bottom: var(--space-2);
}

/* ===== Closing CTA band ================================================= */
.m-cta {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  margin-block: var(--space-8) var(--space-20);
}

.m-cta h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}

/* ===== Footer ========================================================== */
.m-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-8) var(--space-16);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

/* ===== Responsive ====================================================== */
@media (max-width: 860px) {
  .m-hero {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 760px) {
  .m-pillars__grid,
  .m-steps {
    grid-template-columns: 1fr;
  }

  /* Adapt the nav instead of amputating it: the brand holds the first line and
     the links (section anchors + CTAs) wrap beneath, all still reachable. */
  .m-nav {
    flex-wrap: wrap;
    gap: var(--space-3);
  }

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