/* MilestonePay site. One stylesheet, no external resources. */

:root {
  color-scheme: light dark;
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f1efe8;
  --text: #16181b;
  --muted: #565b64;
  --border: #e3e0d7;
  --accent: #0b6b57;
  --accent-hover: #08584a;
  --accent-ink: #ffffff;
  --accent-soft: #e2f2ec;
  --accent-soft-text: #0a5444;
  --warn-soft: #fbf0dc;
  --warn-border: #e8c98d;
  --warn-text: #5c3d05;
  --focus: #1a56db;
  --shadow: 0 1px 2px rgb(20 20 20 / 0.04), 0 8px 24px rgb(20 20 20 / 0.06);

  --radius: 14px;
  --radius-sm: 9px;
  --gutter: 16px;
  --wide: 72rem;
  --narrow: 46rem;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1012;
    --surface: #16191c;
    --surface-2: #1d2125;
    --text: #e8eaed;
    --muted: #a2a8b1;
    --border: #2a2f35;
    --accent: #5cd0ae;
    --accent-hover: #7fdcc0;
    --accent-ink: #04241c;
    --accent-soft: #123129;
    --accent-soft-text: #8fe3ca;
    --warn-soft: #2d2410;
    --warn-border: #5e4a1c;
    --warn-text: #f1d9a6;
    --focus: #8ab4ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.3);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
}

h3 {
  font-size: 1.15rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.3em;
}

li + li {
  margin-top: 0.35em;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--narrow {
  max-width: calc(var(--narrow) + 2 * var(--gutter));
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  background: var(--surface);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 0.75rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

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

.brand img {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 7px;
}
.brand svg {
  width: 30px;
  height: 30px;
  flex: none;
}

.mark-bg {
  fill: var(--accent);
}

.mark-line {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.mark-dot {
  fill: var(--accent-ink);
}

.mark-ring {
  fill: var(--accent);
  stroke: var(--accent-ink);
  stroke-width: 2.5;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 500;
  padding: 0.25rem 0;
  display: inline-block;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Buttons and badges */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-ink);
}

.button:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.button--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.button--secondary:hover {
  background: var(--surface-2);
  color: var(--text);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  font-size: 0.9rem;
  font-weight: 600;
}

.badge::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.eyebrow {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
  max-width: 38rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.92rem;
}

/* Sections */

main {
  display: block;
}

.section {
  padding: clamp(3rem, 2rem + 4vw, 5rem) 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--muted);
}

.section-head:last-child {
  margin-bottom: 0;
}

.notes-title {
  margin: 2.5rem 0 0;
  font-size: 1.05rem;
}

/* Hero */

.hero {
  padding: clamp(2.75rem, 1.5rem + 5vw, 5.5rem) 0 clamp(3rem, 2rem + 4vw, 5rem);
}

.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
  }
}

.hero h1 {
  max-width: 16ch;
}

/* Example terms card in the hero */

.terms-demo {
  margin: 0;
}

.terms-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.terms-card .product {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.terms-card .product-name {
  font-weight: 650;
  margin: 0;
}

.terms-card .product-price {
  margin: 0;
  color: var(--muted);
}

.terms-card .pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  margin-bottom: 0.75rem;
}

.timeline {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  border-top: 1px solid var(--border);
}

.timeline li {
  display: grid;
  grid-template-columns: 1.25rem 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.timeline .dot {
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.4rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.timeline li:first-child .dot {
  background: var(--accent);
}

.timeline .label {
  font-weight: 600;
  display: block;
}

.timeline .detail {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline .amount {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.terms-card .ship {
  font-size: 0.95rem;
  margin: 0;
}

.terms-demo figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

/* Feature grid */

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.grid > li {
  margin: 0;
}

/* Five feature cards: three across, then two wider cards. */
@media (min-width: 1000px) {
  .grid--five {
    grid-template-columns: repeat(6, 1fr);
  }

  .grid--five > li {
    grid-column: span 2;
  }

  .grid--five > li:nth-child(n + 4) {
    grid-column: span 3;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
}

.card h3 {
  margin-top: 0.9rem;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
}

.icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

/* Numbered steps */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3.25rem;
  margin: 0 0 2.25rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.steps > li h2,
.steps > li h3 {
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
  padding-top: 0;
}

.steps--inline {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.steps--inline > li {
  margin: 0;
}

.steps--inline p {
  color: var(--muted);
  margin: 0;
}

.where {
  font-size: 0.93rem;
  color: var(--muted);
}

.where strong {
  color: var(--text);
  font-weight: 600;
}

/* Pricing */

.pricing {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.pricing > li {
  margin: 0;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.plan h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.price {
  margin: 0 0 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.price .amount {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price .per {
  color: var(--muted);
  font-size: 0.95rem;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.plan li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
  font-size: 0.97rem;
}

.plan li:last-child {
  border-bottom: 0;
}

.notes {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 48rem;
}

.notes li + li {
  margin-top: 0.4rem;
}

/* Prose pages */

.page-head {
  padding: clamp(2.5rem, 1.5rem + 3vw, 4rem) 0 1.5rem;
}

.page-head .lede {
  margin-bottom: 0;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.75rem 0 0;
}

.prose {
  padding-bottom: clamp(3rem, 2rem + 4vw, 5rem);
}

.prose h2 {
  margin-top: 2.5rem;
  padding-top: 0.25rem;
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  scroll-margin-top: 1rem;
}

.prose h3 {
  margin-top: 1.75rem;
}

.prose > :first-child {
  margin-top: 0;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 2rem;
}

.toc h2 {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
  padding: 0;
}

.toc ol {
  margin: 0;
  columns: 2 15rem;
  column-gap: 2rem;
}

.toc li {
  break-inside: avoid;
  margin: 0 0 0.3rem;
}

.callout {
  border: 1px solid var(--border);
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout--warn {
  background: var(--warn-soft);
  border-color: var(--warn-border);
  border-left-color: var(--warn-border);
  color: var(--warn-text);
}

.callout--warn a {
  color: inherit;
}

.provider-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.provider-list > li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.provider-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.provider-list p {
  margin: 0;
}

.contact-card {
  display: grid;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 0 0 2rem;
}

.contact-card .email {
  font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem);
  font-weight: 650;
  margin: 0;
}

.contact-card p {
  margin: 0;
}

/* FAQ */

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq details:first-of-type {
  border-top: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 400;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .answer {
  padding: 0 0 1rem;
}

.faq .answer > :last-child {
  margin-bottom: 0;
}

/* 404 */

.not-found {
  padding: clamp(4rem, 3rem + 6vw, 7rem) 0;
  text-align: center;
}

.not-found .code {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.not-found .lede {
  margin: 0 auto;
}

.not-found .actions {
  justify-content: center;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media print {
  .site-header nav,
  .skip-link,
  .actions {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
