/* anytoany.dev — "air-mail" look: envelope paper, ink text, one air-mail red.
   The only decorative element is the striped air-mail edge around the demo. No JS. */

/* Overpass draws the middle dot with lopsided spacing; borrow just that glyph. */
@font-face { font-family: "Dot"; src: local("Helvetica Neue"), local("Arial"); unicode-range: U+00B7; }

:root {
  color-scheme: light;
  --envelope: #eef1f4;
  --paper: #ffffff;
  --ink: #15233b;
  --ink-soft: #4d5b70;
  --rule: #c9d1db;
  --red: #c8102e;
  --blue: #1f3a93;
  --code-ink: #e8edf4;
  --code-dim: #93a0b4;
  --ok: #1b6b3a;
  --warn: #9a4a00;
  --max: 1080px;
  --measure: 68ch;
  --sans: "Dot", "Overpass", "Helvetica Neue", Arial, sans-serif;
  --mono: "Overpass Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--envelope);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- header ---------- */

header.site { border-bottom: 1px solid var(--rule); }
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.01em;
}
.brand svg { width: 24px; height: 24px; flex: none; }
.brand span { color: var(--ink-soft); font-weight: 400; font-size: 15px; letter-spacing: 0; }
nav { display: flex; gap: 24px; }
nav a { color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 600; }
nav a:hover { color: var(--red); }

/* ---------- hero ---------- */

.hero { padding: 72px 0 8px; }
.eyebrow { margin: 0 0 20px; color: var(--ink-soft); font-size: 15px; }
h1 {
  font-size: clamp(38px, 6vw, 68px); line-height: 1.02; letter-spacing: -.025em;
  font-weight: 800; margin: 0 0 28px; max-width: 15em; text-wrap: balance;
}
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; max-width: 36em; margin: 0 0 16px; text-wrap: pretty; }
.lede strong { font-weight: 700; }
.hero > .muted.small { max-width: var(--measure); margin: 0 0 32px; }

.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.btn {
  display: inline-block; padding: 13px 22px 11px; border-radius: 4px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  color: var(--ink); border: 2px solid var(--ink); background: transparent;
}
.btn:hover { background: var(--paper); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: #a50d25; border-color: #a50d25; }

/* the air-mail envelope edge — the one loud thing on the page */
figure.demo { margin: 64px 0 0; }
.airmail {
  padding: 10px; border-radius: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--red) 0 18px, var(--paper) 18px 28px,
    var(--blue) 28px 46px, var(--paper) 46px 56px
  );
}
.airmail img {
  display: block; width: 100%; height: auto;
  border-radius: 2px; background: var(--paper);
}
figure.demo figcaption { margin: 14px 0 0; color: var(--ink-soft); font-size: 15px; max-width: var(--measure); }

/* ---------- sections ---------- */

section { padding: 72px 0 0; }
section > h2 { padding-top: 28px; border-top: 2px solid var(--ink); }
section > p, section > ul, section > ol, section > h3, section > blockquote { max-width: var(--measure); }
h2 {
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.02em;
  font-weight: 800; margin: 0 0 20px; text-wrap: balance;
}
h3 { font-size: 21px; font-weight: 800; margin: 36px 0 10px; }
p, ul, ol { margin: 0 0 16px; }
ul { padding-left: 1.2em; }
li { margin: 6px 0; }
li::marker { color: var(--red); }
strong { font-weight: 700; }
.muted { color: var(--ink-soft); }
.small { font-size: 15px; line-height: 1.55; }

/* "What it does": four points on a ruled grid, no boxes */
ul.features {
  list-style: none; padding: 0; max-width: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 28px 0 8px;
}
ul.features li { margin: 0; padding: 18px 0 20px; border-top: 1px solid var(--rule); color: var(--ink-soft); }
ul.features li strong { display: block; color: var(--ink); font-size: 19px; margin-bottom: 4px; }

/* security: three columns of short, rule-separated statements */
ul.cards {
  list-style: none; padding: 0; max-width: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin: 24px 0 8px;
}
ul.cards li { margin: 0; padding: 16px 0 18px; border-top: 1px solid var(--rule); font-size: 16px; color: var(--ink-soft); }
ul.cards li strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ---------- code ---------- */

code, pre { font-family: var(--mono); }
code {
  font-size: .84em; padding: 1px 5px; border-radius: 3px;
  background: var(--paper); border: 1px solid var(--rule);
  overflow-wrap: anywhere;
}
pre {
  margin: 0 0 18px; padding: 18px 22px; max-width: 920px;
  background: var(--ink); color: var(--code-ink);
  border-radius: 4px; overflow-x: auto; font-size: 14.5px; line-height: 1.75;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; overflow-wrap: normal; }
pre .c { color: var(--code-dim); }

/* ---------- steps: a real sequence, so numbered ---------- */

.steps { counter-reset: s; list-style: none; padding: 0; margin: 24px 0 20px; }
.steps li {
  counter-increment: s; position: relative;
  margin: 0; padding: 16px 0 16px 56px; border-top: 1px solid var(--rule);
}
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 14px;
  font-weight: 800; font-size: 30px; line-height: 1; color: var(--red);
}

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 24px 0 18px; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; min-width: 680px; font-size: 15.5px; line-height: 1.5; }
th, td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
tbody tr:last-child td { border-bottom: 0; }
thead th { border-bottom: 2px solid var(--ink); font-weight: 800; }
tbody td:first-child { font-weight: 700; }
td.yes { color: var(--ok); font-weight: 700; }
td.no { color: var(--warn); font-weight: 700; }
table.hl th:last-child, table.hl td:last-child { background: #f7f8fa; border-left: 2px solid var(--red); }

/* ---------- misc ---------- */

blockquote {
  margin: 0 0 18px; padding: 4px 0 4px 20px; border-left: 3px solid var(--red);
  font-size: 19px; line-height: 1.5;
}

details { max-width: 820px; border-top: 1px solid var(--rule); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
details summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 18px 44px 16px 0; font-weight: 700; font-size: 18px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px;
  font-size: 28px; font-weight: 400; line-height: 1; color: var(--red);
}
details[open] summary::after { content: "\2212"; }
details > div { padding: 0 0 8px; color: var(--ink-soft); }

footer.site { margin-top: 96px; padding: 28px 0 48px; border-top: 2px solid var(--ink); font-size: 14.5px; color: var(--ink-soft); }
footer.site p { max-width: 820px; margin: 0 0 8px; }
footer.site a { color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  ul.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .brand span { display: none; }
  nav { gap: 16px; }
  nav a { font-size: 15px; }
  .hero { padding-top: 44px; }
  .btn { flex: 1 1 auto; text-align: center; }
  figure.demo { margin-top: 44px; }
  .airmail { padding: 6px; }
  section { padding-top: 56px; }
  ul.features, ul.cards { grid-template-columns: 1fr; }
  pre { font-size: 13.5px; padding: 16px; }
  .steps li { padding-left: 40px; }
  .steps li::before { font-size: 24px; }
}

@media (max-width: 400px) {
  nav a.opt { display: none; }
}
