/* Post-purchase tracking pages: shared theme, v1. Urbanist is self-hosted
   (declare @font-face before this file loads).
   Per-channel values come from the channel registry and are set on :root
   (or on <body>) by the Worker: --accent, --brand-mark, --brand-mark-2. */
:root {
  --ground: #f3f6f0;
  --surface: #ffffff;
  --line: #dde5d6;
  --ink: #18231c;
  --muted: #55615a;          /* 5.9:1 on white */
  --upcoming: #b9c4b2;
  --accent: #2f6b1f;         /* VaporFi; per channel */
  --accent-hover: #1f4a14;
  --accent-soft: #eef4e8;
  --brand-mark: #6ba539;     /* wordmark fallback only */
  --brand-mark-2: #7a827d;
  --attention: #8a4b00;      /* side states and late flags; 7:1 with white */
  --notice-bg: #fff2d2;
  --notice-line: #f0d48a;
  --notice-ink: #5f3b00;
  --notice-icon: #8a5600;
  --footer-bg: #18231c;
  --footer-ink: #e3ebde;
  --footer-line: #34433a;
  --footer-link: #b9e28f;
  --radius-lg: 24px;
  --radius-md: 16px;
  --font: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 24px; display: flex; justify-content: center; }
.site-header img { height: 36px; width: auto; display: block; }
.wordmark { text-decoration: none; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; color: var(--brand-mark); }
.wordmark span { color: var(--brand-mark-2); }

.page { width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 24px 64px; display: flex; flex-direction: column; gap: 24px; }

/* Hero */
.hero { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 48px); display: flex; flex-direction: column; gap: 32px; }
.hero-head { display: flex; flex-direction: column; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.order-ref { font-size: 16px; line-height: 22px; font-weight: 600; color: var(--muted); }
.pill--attention { background: var(--attention) !important; }
.pill { font-size: 14px; line-height: 20px; font-weight: 700; color: #fff; background: var(--accent); padding: 4px 12px; border-radius: 999px; }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; font-weight: 800; letter-spacing: -0.025em; max-width: 18ch; }
.hero .sub { margin: 0; font-size: 20px; line-height: 30px; color: var(--muted); max-width: 60ch; }

/* Progress route */
.route { position: relative; }
.route::before, .route-fill { content: ""; position: absolute; left: 10%; top: 13px; height: 6px; border-radius: 3px; }
.route::before { width: 80%; background: var(--line); }
.route-fill { width: calc(80% * var(--progress, 0)); background: var(--accent); }
.route ol { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.route li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--upcoming); }
.is-done .dot { background: var(--accent); border: 0; }
.is-current .dot { border: 8px solid var(--accent); animation: pulse 2.4s ease-out infinite; }
.is-attention .dot { border: 3px solid var(--attention); color: var(--attention); font-size: 18px; font-weight: 800; line-height: 1; }
.is-attention .dot::before { content: "!"; }
.is-open-end .dot { border: 2px dashed #8a968e; }
.step-date.is-flag { color: var(--attention); font-weight: 700; }
.step-title { font-size: 16px; line-height: 20px; font-weight: 700; }
.step-date { font-size: 14px; line-height: 18px; color: var(--muted); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); } 70%, 100% { box-shadow: 0 0 0 14px transparent; } }
@media (prefers-reduced-motion: reduce) { .is-current .dot { animation: none; } }

.route-caption { display: none; justify-content: space-between; gap: 12px; font-size: 15px; line-height: 20px; }
.route-caption span:last-child { text-align: right; }
.route-caption small { display: block; font-size: 15px; color: var(--muted); }
.callout { display: flex; align-items: flex-start; gap: 14px; background: var(--accent-soft); border-radius: var(--radius-md); padding: 16px 20px; }
.callout p { margin: 0; font-size: 17px; line-height: 26px; }
.callout svg, .notice svg { flex: none; margin-top: 2px; }

/* Notices: .notice--info (still on its way), .notice--warn (running late, weather) */
.notice { display: flex; align-items: flex-start; gap: 14px; background: var(--notice-bg); border: 1px solid var(--notice-line); border-radius: var(--radius-md); padding: 18px 22px; color: var(--notice-ink); }
.notice--info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 20%, white); color: var(--ink); }
.notice strong { display: block; font-size: 18px; line-height: 24px; }
.notice p { margin: 4px 0 0; font-size: 17px; line-height: 26px; }

/* History + details */
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.card { background: var(--surface); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.card h2 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 800; }
.history { flex: 999 1 520px; }
.details { flex: 1 1 300px; }
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 16px; }
.events .rail { display: flex; flex-direction: column; align-items: center; }
.events .rail::before { content: ""; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--upcoming); }
.events.is-attention li:first-child .rail::before { background: var(--attention); }
.events li:first-child .rail::before { width: 14px; height: 14px; margin-top: 5px; background: var(--accent); }
.events li:not(:last-child) .rail::after { content: ""; flex: 1; width: 2px; margin-top: 6px; background: var(--line); }
.events .body { display: flex; flex-direction: column; gap: 2px; padding-bottom: 24px; }
.ev-pkg { font-size: 14px; line-height: 18px; font-weight: 700; color: var(--muted); }
.ev-title { font-size: 18px; line-height: 24px; font-weight: 700; }
.ev-when { font-size: 15px; line-height: 20px; color: var(--muted); }
.ev-detail { font-size: 16px; line-height: 24px; margin-top: 4px; }
.details dl { margin: 0; display: flex; flex-direction: column; gap: 18px; }
.details dt { font-size: 15px; line-height: 20px; color: var(--muted); }
.details dd { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.packages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.packages li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.packages .pk-label { font-size: 15px; line-height: 20px; color: var(--muted); }
.packages .pk-status { font-size: 17px; line-height: 24px; font-weight: 700; }
.packages .pk-tracking { font-size: 15px; line-height: 20px; font-variant-numeric: tabular-nums; }
.btn-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px; border-radius: 14px; background: var(--accent); color: #fff; text-decoration: none; font-size: 18px; font-weight: 700; }
.btn-link:hover { background: var(--accent-hover); color: #fff; }
.route--3 ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.route--3::before { left: 16.6%; width: 66.8%; }
.route--3 .route-fill { left: 16.6%; width: calc(66.8% * var(--progress, 0)); }
.route--3 { max-width: 720px; }
.turnstile-slot { min-height: 65px; }
.help { border-top: 1px solid var(--line); padding-top: 20px; font-size: 16px; line-height: 24px; color: var(--muted); }
.help strong { display: block; color: var(--ink); font-size: 17px; }

/* Shop links */
.shop { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.shop h2 { margin: 0; font-size: 28px; line-height: 34px; font-weight: 800; letter-spacing: -0.015em; }
.shop nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.shop a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); text-decoration: none; color: var(--ink); font-size: 18px; line-height: 22px; font-weight: 700; }
.shop a:hover { border-color: var(--accent); }

/* Lookup */
.lookup { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.lookup-intro { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.lookup-intro h1 { margin: 0; font-size: clamp(38px, 5.5vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; max-width: 12ch; }
.lookup-intro p { margin: 0; font-size: 20px; line-height: 30px; color: var(--muted); max-width: 40ch; }
.lookup form { flex: 1 1 400px; background: var(--surface); border-radius: var(--radius-lg); padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 17px; line-height: 22px; font-weight: 700; }
.field input { height: 54px; padding: 0 16px; border: 1.5px solid var(--upcoming); border-radius: 12px; font: inherit; font-size: 18px; color: var(--ink); background: #fff; }
.field .hint, .form-note { font-size: 15px; line-height: 20px; color: var(--muted); margin: 0; }
.field .error { font-size: 15px; line-height: 20px; color: #9b1c1c; margin: 0; }
.btn { height: 56px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font: inherit; font-size: 19px; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--accent-hover); }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 48px 24px 56px; }
.site-footer .inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.site-footer .legal { display: flex; flex-wrap: wrap; gap: 32px; }
.site-footer .legal > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; }
.site-footer h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 700; color: #fff; }
.site-footer p { margin: 0; font-size: 16px; line-height: 25px; }
.site-footer .contact { border-top: 1px solid var(--footer-line); padding-top: 24px; }
.site-footer a { color: var(--footer-link); font-weight: 600; }

/* Phone */
@media (max-width: 600px) {
  .page { padding: 20px 16px 40px; gap: 16px; }
  .hero { border-radius: 20px; gap: 20px; }
  .card { padding: 22px 20px; border-radius: 20px; }
  .route .step-title, .route .step-date { display: none; }
  .route ol { gap: 0; }
  .dot { width: 24px; height: 24px; }
  .is-current .dot { border-width: 6px; }
  .route::before, .route-fill { top: 9px; }
  .route-caption { display: flex; }
  .shop nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop a svg { display: none; }
}
