/* PostalMCP marketing site — static, no build step, no external requests.
   Design language: system-stack display type, postal red #c8102e accent,
   dark #131313 panels, warm paper-white surfaces, 1.5rem card radii,
   pill buttons. Sibling to dialmcp.com; the accent is what distinguishes it. */

:root {
  --bg: #ffffff;
  --paper: #faf9f6;          /* warm off-white: this product is about paper */
  --ink: #1d1d1d;
  --ink-strong: #131313;     /* dark panels, buttons */
  --ink-soft: #2f2f2f;
  --text-secondary: #585858;
  --soft: #c7c7c7;           /* two-tone headings */
  --grey-100: #f2f1ed;
  --grey-200: #e9e7e1;
  --border: #eeece7;
  --red: #c8102e;            /* postal red */
  --red-soft: #fdecee;
  --on-dark-body: #c7c7c7;
  --on-dark-faint: #8a8a8a;
  --radius-card: 1.5rem;
  --radius-panel: 2rem;
  --radius-md: 1rem;
  --radius-sm: 0.75rem;
  --radius-pill: 5rem;
  --shadow-card: 0 1px 2px rgba(19, 19, 19, 0.04), 0 8px 24px -12px rgba(19, 19, 19, 0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--ink-strong); outline-offset: 2px; }

code, pre { font-family: var(--font-mono); }
pre {
  background: var(--ink-strong);
  color: #e8e8e8;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
}
pre .c { color: #8a8a8a; }
pre .k { color: #ffb3bd; }
code.inline {
  background: var(--grey-100);
  border-radius: 0.375rem;
  padding: 0.125rem 0.4375rem;
  font-size: 0.8125em;
  font-weight: 500;
  white-space: nowrap;
}
.code-block { position: relative; }
.copy-btn {
  position: absolute; top: 0.625rem; right: 0.625rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e8e8e8; cursor: pointer; opacity: 0;
  transition: opacity 0.15s ease, background-color 0.15s ease;
  font-size: 0.6875rem; font-family: var(--font-mono);
}
.code-block:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.16); }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .wrap { padding: 0 2rem; } }

/* ---- type helpers ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
  display: inline-block;
}
.eyebrow.red { color: var(--red); }
.eyebrow.on-dark { color: var(--on-dark-faint); }
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.08; font-weight: 600; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); line-height: 1.12; }
h3 { font-size: 1.1875rem; line-height: 1.25; }
.soft { color: var(--soft); }
.lead { color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.65; }

/* ---- header ---- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 4rem; gap: 1rem;
}
.logo { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.03em; }
.logo .dot { color: var(--red); }
.logo-credit { font-size: 0.75rem; color: var(--text-secondary); margin-left: 0.75rem; }
.logo-credit a { text-decoration: underline; text-underline-offset: 2px; }
nav.main { display: flex; align-items: center; gap: 1.5rem; font-size: 0.9375rem; }
nav.main a:not(.btn) { color: var(--text-secondary); }
nav.main a:not(.btn):hover { color: var(--ink); }
@media (max-width: 860px) { nav.main a:not(.btn) { display: none; } .logo-credit { display: none; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8125rem 1.375rem;
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.9375rem;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn.accent { background: var(--red); color: #fff; }
.btn.accent:hover { background: #a60d26; }
.btn.dark { background: var(--ink-strong); color: #fff; }
.btn.dark:hover { background: var(--ink-soft); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--grey-200); }
.btn.ghost:hover { background: var(--grey-100); }
.btn.small { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* ---- hero ---- */
.hero { padding: 4.5rem 1.5rem 0; }
.hero .panel {
  max-width: 72rem; margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem) clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.hero h1 { margin: 1.25rem 0 1.25rem; }
.hero .sub {
  max-width: 40rem; margin: 0 auto;
  color: var(--text-secondary); font-size: 1.0625rem; line-height: 1.65;
}
.cta-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin: 2rem 0 0; }
.fineprint { margin-top: 1.75rem; font-size: 0.875rem; color: var(--text-secondary); }

/* ---- the two-step demo ---- */
.flow { display: grid; gap: 1rem; margin: 3rem auto 0; max-width: 56rem; text-align: left; }
@media (min-width: 880px) { .flow { grid-template-columns: 1fr 1fr; } }
.flow-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.5rem;
  box-shadow: var(--shadow-card);
  /* Grid items default to min-width:auto, so a wide <pre> inside would push
     the card past the viewport on a phone. The <pre> scrolls itself instead. */
  min-width: 0;
}
.flow-card pre { max-width: 100%; }
.flow-card .step {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.875rem;
}
.flow-card .step .num {
  width: 1.375rem; height: 1.375rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink-strong); color: #fff; font-size: 0.6875rem;
}
.flow-card.spend .step .num { background: var(--red); }
.flow-card h3 { margin-bottom: 0.5rem; }
.flow-card p { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 1rem; }
.flow-card pre { font-size: 0.75rem; }
.tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 0.1875rem 0.5rem; border-radius: 0.375rem; margin-top: 0.875rem;
}
.tag.free { background: #e8f5ec; color: #1a7f42; }
.tag.charge { background: var(--red-soft); color: var(--red); }

/* ---- sections ---- */
section { padding: 5.5rem 0; }
section.paper { background: var(--paper); border-block: 1px solid var(--border); }
.sec-head { max-width: 44rem; margin-bottom: 3rem; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head h2 { margin: 0.75rem 0 1rem; }

/* ---- feature grid ---- */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.feature {
  min-width: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1rem;
  box-shadow: var(--shadow-card);
}
.feature.wide { grid-column: span 2; }
@media (max-width: 760px) { .feature.wide { grid-column: span 1; } }
.feature.dark { background: var(--ink-strong); color: #fff; border-color: var(--ink-strong); }
.feature.dark p { color: var(--on-dark-body); }
.feature.red { background: var(--red); color: #fff; border-color: var(--red); }
.feature.red p { color: rgba(255, 255, 255, 0.86); }
.feature.red .eyebrow { color: rgba(255, 255, 255, 0.72); }
.feature h3 { margin-bottom: 0.4375rem; }
.feature p { font-size: 0.9375rem; color: var(--text-secondary); }

/* ---- use cases ---- */
.cases { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.case {
  min-width: 0;
  border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 2rem; background: #fff;
}
.case .kicker { font-family: var(--font-mono); font-size: 0.75rem; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.08em; }
.case h3 { margin: 0.75rem 0 0.625rem; }
.case p { color: var(--text-secondary); font-size: 0.9375rem; }
.case .quote {
  margin-top: 1.25rem; padding: 1rem 1.125rem;
  background: var(--paper); border-left: 3px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif); font-size: 0.9375rem; line-height: 1.55;
}

/* ---- pricing ---- */
.price-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.price {
  border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 1.75rem; background: #fff; text-align: center;
}
.price .name { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.5rem; }
.price .amount { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; }
.price .unit { font-size: 0.8125rem; color: var(--text-secondary); }
.price .note { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.75rem; }
.price-fine { margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-secondary); text-align: center; }

/* ---- tools table ---- */
.tools-scroll { overflow-x: auto; }
.tools { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 34rem; }
.tools th {
  text-align: left; font-family: var(--font-mono); font-size: 0.6875rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary);
  padding: 0 1rem 0.75rem 0; border-bottom: 1px solid var(--border);
}
.tools td { padding: 0.875rem 1rem 0.875rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.tools td:first-child { font-family: var(--font-mono); font-size: 0.8125rem; white-space: nowrap; }
.tools td:last-child { color: var(--text-secondary); }

/* ---- FAQ ---- */
.faq { max-width: 46rem; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--border); padding: 1.25rem 0;
}
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1.0625rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-weight: 400; font-size: 1.25rem; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 0.75rem; color: var(--text-secondary); font-size: 0.9375rem; }

/* ---- setup ---- */
.setup { max-width: 46rem; margin: 0 auto; }
.setup .code-block, .setup pre { max-width: 100%; }
.setup ol { list-style: none; counter-reset: step; }
.setup li { counter-increment: step; padding-left: 2.75rem; position: relative; margin-bottom: 1.75rem; }
.setup li::before {
  content: counter(step); position: absolute; left: 0; top: 0.0625rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--ink-strong); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; font-weight: 600;
}
.setup li h3 { margin-bottom: 0.375rem; }
.setup li p { color: var(--text-secondary); font-size: 0.9375rem; margin-bottom: 0.75rem; }

/* ---- footer ---- */
footer.site {
  background: var(--ink-strong); color: var(--on-dark-body);
  padding: 3.5rem 0 2.5rem; font-size: 0.9375rem;
}
footer.site .cols { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
footer.site a { color: var(--on-dark-body); }
footer.site a:hover { color: #fff; }
footer.site .links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
footer.site .fine { margin-top: 2.5rem; font-size: 0.8125rem; color: var(--on-dark-faint); }
footer.site .logo { color: #fff; }

/* ---- legal pages ---- */
.legal { max-width: 46rem; margin: 0 auto; padding: 4rem 1.5rem 5rem; }
.legal h1 { font-size: 2.25rem; margin-bottom: 0.5rem; }
.legal .updated { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.375rem; margin: 2.5rem 0 0.875rem; }
.legal p, .legal li { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 0.875rem; }
.legal ul { margin-left: 1.25rem; }
.legal strong { color: var(--ink); }
