:root {
  --paper: #f7f2e7;
  --paper-alt: #efe6d3;
  --card: #fffdf8;
  --ink: #1f2430;
  --ink-soft: #5c6270;
  --border: rgba(31, 36, 48, 0.14);
  --red: #c8412c;
  --red-dark: #a6331f;
  --navy: #1e3a5f;
  --gold: #b08d2b;
  --success: #2f7a4d;
  --success-bg: rgba(47, 122, 77, 0.12);
  --warning-bg: rgba(176, 141, 43, 0.14);
  --peach: #f7dad3;
  --peach-ink: #c8412c;
  --blue-badge: #dbe8f5;
  --brown-badge: #f1e0c8;
  --radius: 10px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --font-script: "Caveat", cursive;
}

* { box-sizing: border-box; }

.icon { width: 16px; height: 16px; vertical-align: -3px; flex-shrink: 0; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(31,36,48,0.05) 1px, transparent 0);
  background-size: 22px 22px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: -0.01em; }

a { color: inherit; text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Airmail stripe ---------- */
.airmail-stripe {
  height: 7px;
  background: repeating-linear-gradient(
    135deg,
    var(--red) 0 16px,
    var(--paper) 16px 22px,
    var(--navy) 22px 38px,
    var(--paper) 38px 44px
  );
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 242, 231, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.05rem; margin-right: auto; font-family: var(--font-display); }
.postmark {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px dashed var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--red); transform: rotate(-8deg);
  position: relative;
  flex-shrink: 0;
}
.postmark::after {
  content: ""; position: absolute; inset: 5px;
  border: 1px solid var(--ink); border-radius: 50%; opacity: 0.35;
}
.nav-links { display: flex; gap: 22px; font-size: 0.9rem; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 56px 24px 60px; position: relative; overflow: hidden; }
.hero-grid {
  max-width: 1180px; margin: 0 auto; display: grid;
  grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
  position: relative; z-index: 2;
}
.hero-copy { text-align: left; }
.hero .eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 16px; display: inline-flex; align-items: center; gap: 8px;
}
.hero .eyebrow::before, .hero .eyebrow::after {
  content: ""; width: 24px; height: 1px; background: var(--red); opacity: 0.5;
}
.hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); line-height: 1.14; color: var(--navy); }
.hero h1 .accent { color: var(--red); }
.hero p.lead { color: var(--ink-soft); max-width: 480px; margin: 18px 0 0; font-size: 1.02rem; }

.search-card {
  max-width: 520px; margin: 32px 0 0; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 14px; box-shadow: 0 20px 40px -22px rgba(31,36,48,0.35);
}

.tracker-form {
  display: flex; gap: 8px; align-items: center;
  background: var(--paper); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px 6px 6px 14px;
}
.field-icon { display: inline-flex; color: var(--ink-soft); opacity: 0.8; }
.field-icon .icon { width: 18px; height: 18px; }
.tracker-form input {
  flex: 1; border: none; background: transparent; color: var(--ink);
  font-size: 0.92rem; padding: 10px 8px; outline: none; font-family: var(--font-mono);
}
.tracker-form input::placeholder { color: var(--ink-soft); font-family: var(--font-body); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; border-radius: 8px;
  padding: 12px 20px; font-size: 0.9rem; font-weight: 700;
  background: var(--red); color: #fff9f2; transition: background 0.15s;
  text-decoration: none; font-family: var(--font-body); white-space: nowrap;
}
.btn:hover { background: var(--red-dark); }
.btn .icon { width: 15px; height: 15px; vertical-align: -2px; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.carrier-note { margin-top: 12px; font-size: 0.78rem; color: var(--ink-soft); padding: 0 4px; }
.carrier-note .icon { width: 14px; height: 14px; vertical-align: -2px; }

.carrier-field {
  position: relative; margin-top: 8px; display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px 6px 6px 14px;
}
.carrier-field input {
  flex: 1; width: 100%; padding: 8px 4px; border: none; background: transparent; color: var(--ink);
  font-family: var(--font-body); font-size: 0.85rem; outline: none;
}
.carrier-results {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; z-index: 10; text-align: left;
  box-shadow: 0 12px 24px -12px rgba(31,36,48,0.3);
}
.carrier-option { padding: 10px 14px; font-size: 0.86rem; cursor: pointer; }
.carrier-option:hover { background: var(--paper-alt); }

.feature-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.feature-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--navy); font-weight: 500;
}
.feature-icon {
  width: 30px; height: 30px; border-radius: 50%; background: var(--peach); color: var(--peach-ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.feature-icon .icon { width: 15px; height: 15px; }

/* ---------- Hero illustration ---------- */
.hero-illustration {
  position: relative; aspect-ratio: 1 / 0.92; width: 100%; max-width: 480px; margin: 0 auto;
}
.hero-illustration svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-illustration .parcel-box {
  position: absolute; width: 50%; height: 54%; top: 23%; left: 6%; right: auto; bottom: auto;
}
.hero-illustration .parcel-box img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.map-pin { position: absolute; color: var(--red); filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25)); }
.map-pin .icon { width: 26px; height: 26px; fill: var(--red); }
.map-pin-a { top: 20%; left: -3%; }
.map-pin-b { top: 26%; left: 75%; z-index: 4; }
.plane-icon { position: absolute; top: 1%; left: 80%; color: var(--navy); transform: rotate(20deg); }
.plane-icon .icon { width: 26px; height: 26px; }

.status-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 14px 26px -14px rgba(31,36,48,0.4); font-size: 0.78rem;
  white-space: nowrap; z-index: 3;
}
.status-card strong { font-size: 0.82rem; color: var(--ink); display: block; }
.status-card span { color: var(--ink-soft); }
.status-icon { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.status-icon .icon { width: 16px; height: 16px; }
.status-card .status-icon-blue { background: var(--blue-badge); color: var(--navy); }
.status-card .status-icon-green { background: var(--success-bg); color: var(--success); }
.status-card .status-icon-brown { background: var(--brown-badge); color: #8a6338; }
.status-top { top: 5%; left: 24%; right: auto; }
.status-right { top: 39%; left: 60%; right: auto; }
.status-bottom { top: 79%; left: -8%; bottom: auto; }
.chev { color: var(--ink-soft); display: inline-flex; }
.chev .icon { width: 14px; height: 14px; }

.script-note {
  position: absolute; top: 76%; left: 51%; bottom: auto; margin: 0;
  font-family: var(--font-script); color: var(--red); font-size: 1.5rem; line-height: 1.15;
  transform: rotate(-3deg);
}

.postmark-stamp { position: absolute; top: 83%; left: 82%; bottom: auto; right: auto; width: 96px; height: 96px; }
.postmark-globe {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: var(--navy);
}
.postmark-globe .icon { width: 22px; height: 22px; }

/* ---------- Envelope edge decorations ---------- */
.corner-flap {
  position: fixed; width: 160px; height: 160px; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(
    -45deg, var(--red) 0 10px, var(--paper) 10px 14px, var(--navy) 14px 24px, var(--paper) 24px 28px
  );
}
.corner-flap-tl { top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.corner-flap-br { bottom: 0; right: 0; clip-path: polygon(100% 100%, 0 100%, 100% 0); }

.edge-stamp {
  position: fixed; top: 220px; left: 14px; z-index: 1; pointer-events: none;
  width: 130px; text-align: center; transform: rotate(-8deg);
  border: 1.5px dashed var(--ink-soft); border-radius: 6px;
  padding: 10px 6px; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.06em; color: var(--ink-soft); background: var(--paper);
}
@media (max-width: 1400px) {
  .edge-stamp { display: none; }
}
@media (max-width: 900px) {
  .corner-flap, .edge-stamp { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero p.lead, .search-card { margin-left: auto; margin-right: auto; }
  .feature-row { justify-content: center; }
  .hero-illustration { margin-top: 24px; }
}

/* ---------- Sections ---------- */
section { padding: 52px 24px; }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 34px; }
.section-head .eyebrow {
  color: var(--red); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em;
}
.section-head h2 { margin-top: 10px; font-size: 1.7rem; color: var(--ink); }
.section-head p { color: var(--ink-soft); margin-top: 10px; }

.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 1080px; margin: 0 auto; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: relative;
  box-shadow: 0 8px 20px -16px rgba(31,36,48,0.4);
}
.card h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--ink); }
.card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
.card .step-num {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px dashed var(--red); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; margin-bottom: 14px;
}

.steps-row {
  display: flex; align-items: flex-start; gap: 0; max-width: 1080px; margin: 0 auto;
}
.step-card { flex: 1; text-align: left; }
.step-card .step-num {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--peach); color: var(--peach-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; margin-bottom: 14px;
}
.step-card .step-icon { margin-bottom: 10px; color: var(--red); }
.step-card .step-icon .icon { width: 22px; height: 22px; }
.step-card h3 { font-family: var(--font-display); font-size: 1.05rem; }
.step-connector {
  flex: 0 0 40px; height: 2px; margin-top: 51px;
  background-image: linear-gradient(to right, var(--ink-soft) 50%, transparent 0);
  background-size: 8px 2px; opacity: 0.4;
}
@media (max-width: 800px) {
  .steps-row { flex-direction: column; }
  .step-connector { display: none; }
}

.carrier-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 7px 15px; font-size: 0.85rem; color: var(--ink-soft);
  margin: 4px; font-family: var(--font-mono);
}
.carrier-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* ---------- Activity feed ---------- */
.activity-list {
  max-width: 640px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 20px -16px rgba(31,36,48,0.4);
  overflow: hidden;
}
.activity-row {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 20px; border-bottom: 1px dashed var(--border);
  font-size: 0.88rem; font-family: var(--font-mono);
}
.activity-row:last-child { border-bottom: none; }
.activity-row .status { margin-left: auto; color: var(--success); font-size: 0.78rem; font-family: var(--font-body); font-weight: 600; }
.empty-state { text-align: center; color: var(--ink-soft); padding: 36px; font-size: 0.9rem; }

/* ---------- Result / track page ---------- */
.result-card {
  max-width: 640px; margin: 32px auto 0; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 30px;
  box-shadow: 0 12px 30px -18px rgba(31,36,48,0.4);
  position: relative;
}
.result-card::before {
  content: ""; position: absolute; top: -1px; left: 24px; right: 24px; height: 1px;
  background-image: linear-gradient(to right, var(--border) 60%, transparent 0);
  background-size: 10px 1px;
}
.result-status { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.result-status .badge {
  padding: 5px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: var(--success-bg); color: var(--success); font-family: var(--font-mono);
}
.timeline { border-left: 2px dashed var(--border); padding-left: 20px; margin-top: 22px; }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
  content: ""; position: absolute; left: -25px; top: 4px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 3px var(--paper);
}
.timeline-item .date { font-size: 0.76rem; color: var(--ink-soft); font-family: var(--font-mono); }

.subscribe-box {
  margin-top: 24px; padding-top: 22px; border-top: 1px dashed var(--border);
  display: flex; gap: 10px; flex-wrap: wrap;
}
.subscribe-box input {
  flex: 1; min-width: 200px; padding: 11px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--paper); color: var(--ink);
  font-family: var(--font-body);
}

.alert {
  max-width: 640px; margin: 20px auto; padding: 14px 18px; border-radius: 8px;
  font-size: 0.88rem; border: 1px solid transparent;
}
.alert-info { background: rgba(30, 58, 95, 0.08); border-color: rgba(30, 58, 95, 0.25); color: var(--navy); }
.alert-success { background: var(--success-bg); border-color: rgba(47, 122, 77, 0.3); color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: rgba(176, 141, 43, 0.35); color: #6b5518; }

footer {
  padding: 30px 24px; text-align: center; color: var(--ink-soft);
  font-size: 0.82rem; border-top: 1px solid var(--border); font-family: var(--font-mono);
}
