/* ===========================================================
   airtime.localhost — Postal Telegram design system

   The product is a digital telegram across distances: $5 of
   airtime from London to gogo in Mash East. The aesthetic
   leans into that — cream postal paper, ink type, stamp-red
   accent, typewriter chips for postmarks and stamps, hairline
   perforated edges. Different from tuckmein on purpose; same
   layout vocabulary so existing components still drop in.

   The historic --brass / --accent variable names are aliased
   to the new stamp-red so legacy components stay unbroken.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600;700&family=Nunito:ital,wght@0,400..900;1,400..700&family=Rubik:ital,wght@0,400..700;1,400..600&display=swap');

:root {
  /* ---- palette: warm-white paper + ink + postal-green accent ---- */
  --paper:       #FAFAF6;     /* warm off-white bg */
  --paper-warm:  #F4F2EA;     /* slight beige for bands */
  --paper-deep:  #E8E5D8;
  --ink:         #1A1614;
  --ink-2:       #2A2522;
  --ink-soft:    #4C4945;
  --muted:       #757872;
  --rule:        #E2DFD3;
  --rule-strong: #B5B2A6;
  --rule-dark:   rgba(232, 229, 216, 0.22);

  --stamp:       #1F6F4A;     /* primary accent — postal green */
  --stamp-deep:  #15553A;
  --stamp-soft:  rgba(31, 111, 74, 0.10);
  --stamp-glow:  #3FA070;     /* paler for dark sections */

  --night:       #133225;     /* deep forest for inverted sections */
  --night-2:     #1B402E;

  /* ---- backwards-compat aliases ----
     Most components reference --brass / --accent. Map them to
     the stamp palette so we don't have to rename every selector. */
  --brass:        var(--stamp);
  --brass-soft:   var(--stamp-soft);
  --brass-glow:   var(--stamp-glow);

  --bg:           var(--paper);
  --surface:      #FFFFFF;     /* pure white cards pop slightly off the warm bg */
  --surface-2:    var(--paper-warm);
  --fg:           var(--ink);
  --line:         var(--rule);
  --line-strong:  var(--rule-strong);
  --accent:       var(--stamp);
  --accent-hover: var(--stamp-deep);
  --accent-soft:  var(--stamp-soft);
  --accent-50:    rgba(31, 111, 74, 0.05);

  /* ---- fonts ---- */
  --f-display:  "Rubik", "Nunito", system-ui, -apple-system, sans-serif;
  --f-body:     "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono:     "Geist Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;
  --f-telegram: "Geist Mono", "SFMono-Regular", ui-monospace, monospace;

  /* ---- spacing / sizing ---- */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --container: 1240px;
  --section-pad: clamp(4rem, 8vw, 7rem);

  /* ---- shadows (tinted to match the ink) ---- */
  --shadow-sm: 0 1px 2px rgba(26, 22, 20, 0.06);
  --shadow-md: 0 6px 16px -8px rgba(26, 22, 20, 0.16);
  --shadow-lg: 0 18px 40px -16px rgba(26, 22, 20, 0.28);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;            /* never allow a stray wide element to scroll the page sideways */
}
/* media never overflows its container on small screens */
img, svg, video, canvas { max-width: 100%; height: auto; }

/* ─── Small-phone polish (≤560px): central mobile hygiene for every public
   page that loads almanac.css. Tap-target floor, long-title wrapping, and
   CTA stacking (rows of .btn that share a parent become a single column). */
@media (max-width: 560px) {
  /* Generous tap targets on any anchor/button styled as a pill. */
  .btn { min-height: 44px; }

  /* Long display titles never clip at narrow widths. */
  h1, h2, h3, .section-title, .hero-title { overflow-wrap: anywhere; word-break: break-word; }

  /* If a parent holds 2+ direct .btn children inline, stack them full-width.
     Catches .hero .ctas, .closer .ctas, FAQ CTA rows, etc. without per-page rules. */
  .ctas, .cta-row, .btn-row {
    width: 100%;
    display: flex; flex-direction: column;
    gap: 10px;
  }
  .ctas > .btn, .cta-row > .btn, .btn-row > .btn {
    width: 100%; justify-content: center;
  }

  /* Honour iPhone safe-area insets on sticky/inverted bands. */
  .closer, .land-banner { padding-left: max(1rem, env(safe-area-inset-left));
                          padding-right: max(1rem, env(safe-area-inset-right)); }
}

::selection { background: var(--stamp); color: var(--paper); }

a {
  color: inherit; text-decoration: none;
  transition: color 180ms ease;
}
a:focus-visible {
  outline: 1.5px solid var(--stamp);
  outline-offset: 4px; border-radius: 2px;
}
button { font: inherit; cursor: pointer; }

.wrap {
  width: 100%; max-width: var(--container);
  margin: 0 auto; padding: 0 var(--gutter);
}

/* ============ almanac / postmark label ============ */
.almanac {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-telegram);
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.almanac .num {
  color: var(--stamp); font-weight: 400;
}
.almanac .dash {
  width: 28px; height: 1px;
  background: var(--rule-strong);
  display: inline-block;
}

/* ============ postmark circular badge ============
   Circular stamp-style mark with two concentric rings and
   a typewriter-style label inside. Used as a section anchor
   or the brand mark. */
.postmark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.4px solid var(--ink);
  position: relative;
  background: var(--paper);
  flex-shrink: 0;
}
.postmark::before {
  content: ""; position: absolute; inset: 4px;
  border: 1px dashed var(--ink);
  border-radius: 50%;
  opacity: 0.55;
}
.postmark svg { width: 22px; height: 22px; color: var(--ink); position: relative; }
.postmark.tilt { transform: rotate(-8deg); }
.invert .postmark { background: transparent; border-color: var(--stamp-glow); }
.invert .postmark::before { border-color: var(--stamp-glow); }
.invert .postmark svg { color: var(--stamp-glow); }

/* ============ moon-mark — kept for backwards compat ============ */
.moon-mark {
  width: 44px; height: 44px;
  border: 1.4px solid var(--ink);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper); position: relative;
  flex-shrink: 0;
}
.moon-mark::before {
  content: ""; position: absolute; inset: 4px;
  border: 1px dashed var(--ink); border-radius: 50%;
  opacity: 0.5;
}
.moon-mark svg { width: 22px; height: 22px; color: var(--ink); position: relative; }
.invert .moon-mark { background: transparent; border-color: var(--stamp-glow); }
.invert .moon-mark::before { border-color: var(--stamp-glow); }
.invert .moon-mark svg { color: var(--stamp-glow); }

/* ============ STAMPED — block-letter status chip ============ */
.stamped {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-telegram);
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--stamp);
  border: 1.5px solid var(--stamp);
  padding: 4px 10px; border-radius: 4px;
  background: var(--stamp-soft);
  line-height: 1; white-space: nowrap;
  transform: rotate(-1.5deg);
  transform-origin: center;
}
.stamped.dark { color: var(--ink); border-color: var(--ink); background: rgba(27,19,16,0.06); }
.stamped.ok   { color: #2E5945; border-color: #2E5945; background: rgba(46,89,69,0.10); }

/* ============ Route bar — FROM → TO ============ */
.route {
  display: grid; grid-template-columns: auto 1fr auto 1fr;
  gap: 16px; align-items: center;
  padding: 12px 0; border-top: 1px dashed var(--rule);
}
.route .lbl {
  font-family: var(--f-telegram);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.route .name {
  font-family: var(--f-display);
  font-weight: 500; font-size: 1.1rem; letter-spacing: -0.005em;
}
.route .arrow {
  color: var(--stamp); font-family: var(--f-display);
  font-size: 1.4rem; font-style: italic; font-weight: 400;
}

/* ============ Perforated edge ============
   Horizontal divider with little half-circle cut-outs.
   Use as `<div class="perf-edge"></div>` between sections. */
.perf-edge {
  height: 14px; position: relative;
  background-color: var(--paper);
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
}
.perf-edge.scissors::before {
  content: "✂"; position: absolute; left: 24px; top: -2px;
  background: var(--paper); padding: 0 6px;
  font-size: 14px; color: var(--muted);
}

/* ============ headings ============ */
.h-display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.018em;
  font-variation-settings: "opsz" 120;
  margin: 0;
}
.h-display em { font-style: italic; font-weight: 450; color: var(--stamp); }
.tg-display {
  font-family: var(--f-telegram);
  letter-spacing: 0.04em;
}

/* ============ button ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 8px;
  font-family: var(--f-body); font-weight: 600; font-size: 15px;
  letter-spacing: -0.005em;
  border: 1.4px solid transparent;
  transition: all 200ms cubic-bezier(.2,.7,.2,1);
  line-height: 1; cursor: pointer;
}
.btn.primary { background: var(--stamp); color: var(--paper); }
.btn.primary:hover { background: var(--stamp-deep); transform: translateY(-1px); }
.btn.brass, .btn.stamp { background: var(--stamp); color: var(--paper); }
.btn.brass:hover, .btn.stamp:hover { background: var(--stamp-deep); transform: translateY(-1px); }
.btn.ghost {
  background: transparent; color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.sm { padding: 9px 14px; font-size: 13.5px; }
.btn .arrow { transition: transform 200ms ease; display: inline-block; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============ card / feat ============ */
.card, .feat {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: clamp(1.5rem, 2vw, 2rem);
  background: var(--surface);
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 220ms ease, transform 220ms ease;
}
.card:hover, .feat:hover { border-color: var(--ink); transform: translateY(-2px); }
.card.no-hover:hover, .feat.no-hover:hover { border-color: var(--rule); transform: none; }

/* a postal-stamp-style card variant with scalloped border */
.card.stamp-card, .feat.stamp-card {
  background:
    radial-gradient(circle 5px at 0 50%, transparent 4px, var(--surface) 4px) repeat-y left,
    radial-gradient(circle 5px at 100% 50%, transparent 4px, var(--surface) 4px) repeat-y right,
    var(--surface);
  background-size: 10px 14px, 10px 14px, auto;
  border: 0;
}

/* ============ inverted dark section ============ */
.invert {
  background: var(--night);
  color: var(--paper-warm);
}
.invert h1, .invert h2, .invert h3 { color: var(--paper); }
.invert p { color: rgba(250, 250, 246, 0.82); }
.invert .almanac { color: rgba(250, 250, 246, 0.55); }
.invert .almanac .num { color: var(--stamp-glow); }
.invert .almanac .dash { background: rgba(250, 250, 246, 0.32); }
.invert .stamped { color: var(--stamp-glow); border-color: var(--stamp-glow); background: rgba(63, 160, 112, 0.10); }

/* ============ sticky header ============ */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 250, 246, 0.94);
  backdrop-filter: saturate(120%) blur(4px);
  -webkit-backdrop-filter: saturate(120%) blur(4px);
  border-bottom: 1px solid var(--rule);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 18px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--ink);
}
.brand .word {
  font-family: var(--f-display);
  font-weight: 600; font-size: 21px;
  letter-spacing: -0.01em; line-height: 1;
  font-variation-settings: "opsz" 36;
}
.brand .word em {
  font-style: italic; font-weight: 500;
  color: var(--stamp);
}
.nav-links {
  display: inline-flex; align-items: center;
  gap: clamp(12px, 2.4vw, 32px);
}
.nav-links a {
  font-family: var(--f-telegram);
  font-size: 13px; font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.nav-links a:hover { color: var(--stamp); }
.nav-links a.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: var(--stamp); color: var(--paper);
  border-radius: 999px;
  transition: background 180ms ease, transform 180ms ease;
  font-family: var(--f-telegram);
  font-size: 13px;
}
.nav-links a.nav-cta:hover { background: var(--stamp-deep); color: var(--paper); transform: translateY(-1px); }
@media (max-width: 640px) {
  .nav-links a.hide-on-mobile { display: none; }
}

/* ============ section ============ */
section.section { padding: var(--section-pad) 0; position: relative; }
.section-head {
  display: flex; flex-direction: column; gap: 18px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 760px;
}
h2.section-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.02; letter-spacing: -0.018em;
  color: var(--ink); margin: 0;
  font-variation-settings: "opsz" 80;
}
h2.section-title em { font-style: italic; color: var(--stamp); font-weight: 450; }
.section-lede {
  font-size: 1.06rem; line-height: 1.55;
  color: var(--ink-soft); max-width: 56ch; margin: 0;
}
.invert .section-lede { color: rgba(244, 236, 219, 0.72); }

/* ============ feat tile bits ============ */
.feat-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.feat-num {
  font-family: var(--f-telegram);
  font-size: 12px; letter-spacing: 0.16em;
  color: var(--stamp); font-weight: 400;
}
.feat-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--rule); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--paper);
}
.feat-icon svg { width: 20px; height: 20px; color: var(--ink); }
h3.feat-title {
  font-family: var(--f-display);
  font-weight: 450;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.08; letter-spacing: -0.012em;
  margin: 0; color: var(--ink);
  font-variation-settings: "opsz" 48;
}
h3.feat-title em { font-style: italic; color: var(--stamp); font-weight: 450; }
.feat p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.55; }
.feat-detail {
  margin-top: auto; padding-top: 14px;
  border-top: 1px dashed var(--rule);
  font-family: var(--f-telegram);
  font-size: 12px; letter-spacing: 0.05em;
  color: var(--muted);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.feat-detail b { color: var(--ink); font-weight: 600; }

/* ============ steps ============ */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; gap: 2.5rem; } }
.step-num {
  font-family: var(--f-telegram);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  line-height: 0.9; color: var(--stamp);
  letter-spacing: -0.01em;
  display: block; margin-bottom: 14px;
}
h3.step-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.35rem; line-height: 1.18;
  margin: 0 0 10px; color: var(--ink);
  letter-spacing: -0.005em;
}
.step p { color: var(--ink-soft); font-size: 0.99rem; margin: 0; max-width: 38ch; }

/* ============ footer ============ */
footer.site {
  border-top: 1px solid var(--rule);
  padding: 3rem 0 2rem;
  background: var(--paper-warm);
}
footer.site .row {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  justify-content: space-between; align-items: baseline;
  color: var(--ink-soft); font-size: 0.92rem;
}
footer.site a { color: var(--ink-soft); margin-right: 1rem; }
footer.site a:hover { color: var(--stamp); }

/* ============ utility ============ */
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.tg { font-family: var(--f-telegram); }
.italic-brass, .italic-stamp { font-style: italic; color: var(--stamp); }
hr.rule { border: 0; border-top: 1px dashed var(--rule); margin: 1rem 0; }
