/* ASMP marketing — reusable primitives (m-*) */

/* ── Base ───────────────────────────────────────────── */
.m-body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.m-wrap {
  max-width: var(--m-max);
  margin: 0 auto;
  padding: 0 var(--m-pad-x);
}

.m-it {
  font-style: italic;
  color: var(--amber);
}

.m-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--m-ease), transform 0.8s var(--m-ease);
}

.m-reveal.in,
.reveal.in {
  opacity: 1;
  transform: none;
}

.m-divider {
  border: none;
  border-top: 1px solid var(--line);
  max-width: var(--m-max);
  margin: 0 auto;
}

/* ── Section ────────────────────────────────────────── */
.m-section {
  position: relative;
  padding: var(--m-section-y) 0;
}

.m-section--alt {
  background: var(--bg-2);
}

.m-section--hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 90px;
  overflow: hidden;
}

.m-section__inner {
  position: relative;
  z-index: 2;
}

.m-section__inner--narrow {
  max-width: 820px;
}

/* ── Typography blocks ──────────────────────────────── */
.m-eyebrow,
.label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.m-eyebrow::before,
.label::before {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--amber);
  opacity: 0.6;
}

.m-headline,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.m-headline--hero,
#hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 8.5vw, 6.3rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  max-width: 14ch;
}

.m-lede,
.lede {
  color: var(--tan);
  max-width: 580px;
  margin-top: 22px;
  font-size: 1.12rem;
  line-height: 1.6;
}

.m-lede em,
.lede em {
  font-style: italic;
  color: var(--cream);
}

.m-kicker {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.4vw, 0.84rem);
  letter-spacing: 0.05em;
  color: var(--tan-dim);
}

.m-kicker abbr {
  text-decoration: none;
  color: var(--amber-soft);
  font-weight: 700;
}

.m-part,
.partlabel {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
}

.m-specnum {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--line);
  line-height: 0.8;
  display: block;
  margin-bottom: -10px;
}

/* ── Buttons ───────────────────────────────────────── */
.m-btn,
.btn {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 15px 30px;
  border-radius: var(--m-radius-sm);
  cursor: pointer;
  transition: 0.22s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  text-decoration: none;
}

.m-btn--primary,
.btn-primary {
  background: var(--amber);
  color: var(--bg);
}

.m-btn--primary:hover,
.btn-primary:hover {
  background: var(--amber-soft);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 146, 74, 0.25);
}

.m-btn--ghost,
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--line);
}

.m-btn--ghost:hover,
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.m-btn-row,
.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* ── Cards & grids ─────────────────────────────────── */
.m-card-grid,
.triad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: var(--m-gap-header);
  border-top: 1px solid var(--line);
}

.m-card,
.triad .card {
  padding: 36px 30px 36px 0;
  border-right: 1px solid var(--line);
  transition: 0.25s;
}

.m-card:last-child,
.triad .card:last-child {
  border-right: none;
  padding-right: 0;
}

.m-card__num,
.triad .rn {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2rem;
  color: var(--amber);
  line-height: 1;
}

.m-card__title,
.triad h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  margin: 14px 0 12px;
}

.m-card__body,
.triad p {
  color: var(--tan);
  font-size: 0.96rem;
}

@media (max-width: 780px) {
  .m-card-grid,
  .triad {
    grid-template-columns: 1fr;
  }

  .m-card,
  .triad .card {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 28px 0;
  }

  .m-card:last-child,
  .triad .card:last-child {
    border-bottom: none;
  }
}

/* ── Chips & tags ───────────────────────────────────── */
.m-chip,
.heal-tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
}

.m-chip--bad,
.heal-tag-bad {
  background: rgba(192, 106, 74, 0.14);
  color: var(--rust);
}

.m-chip--good,
.heal-tag-good {
  background: rgba(155, 176, 106, 0.14);
  color: var(--green);
}

/* ── Panels & frames ────────────────────────────────── */
.m-panel {
  border: 1px solid var(--line);
  border-radius: var(--m-radius-lg);
  background: var(--panel);
}

.m-panel--muted {
  border-style: dashed;
  border-color: rgba(192, 106, 74, 0.35);
}

.m-panel--accent {
  border-color: var(--amber);
  background: rgba(212, 146, 74, 0.05);
  box-shadow: var(--m-shadow-accent);
}

.m-frame {
  position: relative;
  margin-top: var(--m-gap-block);
  border: 1px solid var(--line);
  border-radius: var(--m-radius-lg);
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: var(--m-shadow-panel);
}

.m-mono-box,
.hero-proof {
  margin-top: 32px;
  padding: 16px 20px;
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: var(--m-radius-md);
  background: rgba(0, 0, 0, 0.18);
}

.m-typeline,
.typeline {
  font-family: var(--mono);
  font-size: clamp(0.9rem, 1.9vw, 1.1rem);
  color: var(--cream);
  min-height: 1.5em;
}

.m-typeline .cursor,
.typeline .cursor {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--amber);
  vertical-align: -2px;
  margin-left: 3px;
  animation: m-blink 1s step-end infinite;
}

@keyframes m-blink {
  50% {
    opacity: 0;
  }
}

/* ── Code window ────────────────────────────────────── */
.m-code,
.code {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--m-radius-md);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.82rem;
  box-shadow: var(--m-shadow-panel);
}

.m-code__head,
.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.m-code__dots,
.code-head .dots {
  display: flex;
  gap: 7px;
}

.m-code__dots i,
.code-head .dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}

.m-code__dots i:nth-child(1),
.code-head .dots i:nth-child(1) {
  background: var(--rust);
}

.m-code__dots i:nth-child(2),
.code-head .dots i:nth-child(2) {
  background: var(--amber);
}

.m-code__dots i:nth-child(3),
.code-head .dots i:nth-child(3) {
  background: var(--green);
}

.m-code__fname,
.code-head .fname {
  font-size: 0.74rem;
  color: var(--tan-dim);
  margin-left: 8px;
}

.m-code__body,
.code-body {
  padding: 22px 24px;
  overflow-x: auto;
  line-height: 1.8;
  color: #d8cfc0;
}

.m-code__body .ln,
.code-body .ln {
  display: block;
  white-space: pre;
}

.m-code .k,
.code-body .k {
  color: var(--amber-soft);
}

.m-code .s,
.code-body .s {
  color: var(--green);
}

.m-code .n,
.code-body .n {
  color: var(--gold);
}

.m-code .c,
.code-body .c {
  color: var(--tan-dim);
  font-style: italic;
}

.m-code .d,
.code-body .d {
  color: var(--tan-dim);
}

/* ── Spec split (text + media) ──────────────────────── */
.m-spec,
.spec {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 54px;
  align-items: start;
  margin-top: 14px;
}

.m-spec--flip,
.spec.flip {
  grid-template-columns: 1.1fr 0.9fr;
}

.m-spec--flip .m-spec__text,
.spec.flip .spec-text {
  order: 2;
}

.m-spec__text h3,
.spec-text h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.1;
  margin-top: 10px;
}

.m-spec__text p,
.spec-text p {
  color: var(--tan);
  margin-top: 16px;
  font-size: 1.02rem;
}

.m-spec__text ul,
.spec-text ul {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m-spec__text li,
.spec-text li {
  font-size: 0.96rem;
  color: var(--tan);
  padding-left: 26px;
  position: relative;
}

.m-spec__text li::before,
.spec-text li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--amber);
  font-family: var(--mono);
}

.m-spec__text li b,
.spec-text li b {
  color: var(--cream);
  font-weight: 600;
}

.m-spec__text code,
.spec-text code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--amber-soft);
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 4px;
}

@media (max-width: 880px) {
  .m-spec,
  .spec,
  .m-spec--flip,
  .spec.flip {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .m-spec--flip .m-spec__text,
  .spec.flip .spec-text {
    order: 0;
  }
}

/* ── Metrics ────────────────────────────────────────── */
.m-metric-row,
.heal-impact {
  margin-top: var(--m-gap-block);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.m-metric,
.heal-impact-card {
  padding: 32px 28px 32px 0;
  border-right: 1px solid var(--line);
}

.m-metric:last-child,
.heal-impact-card:last-child {
  border-right: none;
  padding-right: 0;
}

.m-metric__k,
.heal-impact-k {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  color: var(--amber);
  line-height: 1;
  display: block;
  margin-bottom: 10px;
}

.m-metric p,
.heal-impact-card p {
  color: var(--tan);
  font-size: 0.94rem;
  line-height: 1.5;
}

.m-metric b,
.heal-impact-card b {
  color: var(--cream);
}

.m-stat,
.heal-stat {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.m-stat__num,
.heal-stat-num {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
}

.m-stat--bad .m-stat__num,
.heal-stat-bad .heal-stat-num {
  color: var(--rust);
}

.m-stat--good .m-stat__num,
.heal-stat-good .heal-stat-num {
  color: var(--amber);
}

.m-stat__label,
.heal-stat-label {
  color: var(--tan);
  font-size: 0.88rem;
}

/* ── Flow steps ─────────────────────────────────────── */
.m-flow,
.flow-track {
  margin-top: var(--m-gap-header);
  max-width: 680px;
}

.m-flow__step,
.fstep {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  position: relative;
  padding-bottom: 38px;
}

.m-flow__step:last-child,
.fstep:last-child {
  padding-bottom: 0;
}

.m-flow__step::after,
.fstep::after {
  content: '';
  position: absolute;
  left: 31px;
  top: 56px;
  bottom: -4px;
  border-left: 1px dashed var(--line);
}

.m-flow__step:last-child::after,
.fstep:last-child::after {
  display: none;
}

.m-flow__icon,
.fstep .si {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--amber);
  position: relative;
  z-index: 2;
  transition: 0.25s;
}

.m-flow__step:hover .m-flow__icon,
.fstep:hover .si {
  border-color: var(--amber);
  transform: scale(1.06);
}

.m-flow__step h4,
.fstep h4 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.1;
  padding-top: 8px;
}

.m-flow__step p,
.fstep p {
  color: var(--tan);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* ── Pull quote ─────────────────────────────────────── */
.m-quote,
.pullquote {
  border-left: 2px solid var(--amber);
  padding: 8px 0 8px 28px;
  margin-top: 40px;
  max-width: 680px;
}

.m-quote p,
.pullquote p {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.3;
  color: var(--cream);
  font-style: italic;
}

/* ── Stack diagram ──────────────────────────────────── */
.m-stack,
.archdiagram {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.m-stack__row,
.archrow {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 28px;
  padding: 30px 0;
  position: relative;
}

.m-stack__row:not(:last-child)::after,
.archrow:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 84px;
  bottom: 0;
  width: 1px;
  height: 30px;
  border-left: 1px dashed var(--line);
}

.m-stack__box,
.archbox {
  border: 1px dashed var(--tan-dim);
  border-radius: var(--m-radius-md);
  padding: 18px 22px;
  background: var(--panel);
  text-align: center;
  transition: 0.25s;
}

.m-stack__box .layer,
.archbox .layer {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tan);
}

.m-stack__box .pname,
.archbox .pname {
  font-family: var(--serif);
  font-size: 1.65rem;
  margin-top: 4px;
  color: var(--cream);
  display: block;
}

.m-stack__row--accent .m-stack__box,
.archrow.asmp .archbox {
  border-color: var(--amber);
  border-style: solid;
  background: rgba(212, 146, 74, 0.07);
}

.m-stack__row--accent .pname,
.archrow.asmp .archbox .pname {
  color: var(--amber);
}

.m-stack__q,
.archq {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--tan);
  line-height: 1.25;
}

.m-stack__row--accent .m-stack__q,
.archrow.asmp .archq {
  color: var(--cream);
}

.m-callout,
.compose-note {
  margin-top: 56px;
  padding: 26px 30px;
  background: var(--panel);
  border-radius: var(--m-radius-md);
  border: 1px solid var(--line);
  color: var(--tan);
  font-size: 1rem;
  line-height: 1.6;
}

.m-callout b,
.compose-note b {
  color: var(--cream);
  font-weight: 600;
}

.m-callout .mono,
.compose-note .mono {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--amber);
}

/* ── Endpoints ──────────────────────────────────────── */
.m-ep-list,
.endpoints {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.m-ep,
.ep {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 0.82rem;
  transition: 0.2s;
}

.m-ep:hover,
.ep:hover {
  border-color: var(--amber);
  transform: translateX(5px);
}

.m-ep__verb,
.verb {
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 0.69rem;
  min-width: 60px;
  text-align: center;
}

.m-ep__verb--get,
.verb.get {
  background: rgba(155, 176, 106, 0.14);
  color: var(--green);
}

.m-ep__verb--post,
.verb.post {
  background: rgba(212, 146, 74, 0.16);
  color: var(--amber-soft);
}

.m-ep__verb--patch,
.verb.patch {
  background: rgba(201, 162, 74, 0.16);
  color: var(--gold);
}

.m-ep__verb--del,
.verb.del {
  background: rgba(192, 106, 74, 0.16);
  color: var(--rust);
}

.m-ep__path,
.ep .path {
  color: var(--cream);
}

.m-ep__desc,
.ep .desc {
  color: var(--tan-dim);
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.82rem;
  text-align: right;
}

/* ── Principles & roadmap ───────────────────────────── */
.m-principle-grid,
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: var(--m-gap-header);
  border-top: 1px solid var(--line);
}

.m-principle,
.pcard {
  padding: 38px 40px 38px 0;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: start;
  transition: 0.25s;
}

.m-principle:nth-child(2n),
.pcard:nth-child(2n) {
  border-right: none;
  padding-right: 0;
  padding-left: 40px;
}

.m-principle:nth-last-child(-n + 2),
.pcard:nth-last-child(-n + 2) {
  border-bottom: none;
}

.m-principle:hover,
.pcard:hover {
  background: rgba(212, 146, 74, 0.03);
}

.m-roadmap,
.roadmap {
  margin-top: var(--m-gap-header);
  max-width: 760px;
}

.m-roadmap__item,
.ritem {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.m-roadmap__item:last-child,
.ritem:last-child {
  border-bottom: 1px solid var(--line);
}

.m-roadmap__tag,
.ritem .tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--amber);
  text-transform: uppercase;
  padding-top: 6px;
}

.m-roadmap__item h4,
.ritem h4 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.1;
}

.m-roadmap__item p,
.ritem p {
  color: var(--tan);
  font-size: 0.96rem;
  margin-top: 6px;
}

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

  .m-principle,
  .pcard,
  .m-principle:nth-child(2n),
  .pcard:nth-child(2n) {
    border-right: none;
    padding: 30px 0;
  }

  .m-principle:nth-last-child(2),
  .pcard:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .m-metric-row,
  .heal-impact {
    grid-template-columns: 1fr;
  }

  .m-metric,
  .heal-impact-card {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 24px 0;
  }

  .m-metric:last-child,
  .heal-impact-card:last-child {
    border-bottom: none;
  }
}

@media (max-width: 600px) {
  .m-roadmap__item,
  .ritem {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .m-ep__desc,
  .ep .desc {
    display: none;
  }
}

@media (max-width: 680px) {
  .m-stack__row,
  .archrow {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .m-stack__row:not(:last-child)::after,
  .archrow:not(:last-child)::after {
    left: 50%;
    height: 24px;
  }

  .m-stack__q,
  .archq {
    font-size: 1.25rem;
  }
}