/* Priority Loyalty Program — shared styles
   Civic/utilitarian: serif headings, plain sans body, mono for statement lines.
   Red (--cancel) is reserved for the Cancel Membership action only. */

:root {
  color-scheme: light dark;

  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Light: warm paper, blue-slate ink */
  --bg: #f5f4ef;
  --surface: #fffdf8;
  --surface-2: #ecebe4;
  --ink: #1b2430;
  --ink-2: #435063;
  --ink-3: #5c6878;
  --rule: #d3d0c4;
  --rule-strong: #1b2430;
  --accent: #1d4f7a;
  --accent-bg: #e3ebf2;
  --on-accent: #ffffff;
  --cancel: #b42318;
  --cancel-hover: #8f1c13;
  --on-cancel: #ffffff;
  --focus: #1d4f7a;
  --hatch: rgba(27, 36, 48, 0.06);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151b;
    --surface: #171c23;
    --surface-2: #1f262f;
    --ink: #ebe8e1;
    --ink-2: #b6bec9;
    --ink-3: #98a2ae;
    --rule: #2d3541;
    --rule-strong: #ebe8e1;
    --accent: #9cc3e6;
    --accent-bg: #192532;
    --on-accent: #0f1a24;
    --cancel: #b42318;
    --cancel-hover: #d0301f;
    --on-cancel: #ffffff;
    --focus: #9cc3e6;
    --hatch: rgba(235, 232, 225, 0.05);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern";
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 65ch; }

.num { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.mono { font-family: var(--font-mono); }

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

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--ink); color: var(--bg); padding: 0.5rem 1rem; z-index: 10;
}
.skip-link:focus { top: 0.5rem; }

/* ---------- Header ---------- */

.operator-strip {
  background: var(--ink);
  color: var(--bg);
  font-size: 0.875rem;
}
.operator-strip .wrap { padding-top: 0.4rem; padding-bottom: 0.4rem; }

.site-header {
  background: var(--surface);
  border-bottom: 4px solid var(--rule-strong);
}
.site-header .wrap {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 1rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.15;
  color: var(--ink);
  text-decoration: none;
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-3);
  letter-spacing: 0;
}

.dispatch {
  display: block;
  text-decoration: none;
  color: var(--ink);
  text-align: right;
}
.dispatch-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.dispatch-number {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}
.dispatch:hover .dispatch-number { text-decoration: underline; text-decoration-thickness: 2px; }

.btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  background: var(--cancel);
  color: var(--on-cancel);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.btn-cancel:hover { background: var(--cancel-hover); text-decoration: none; }

@media (max-width: 720px) {
  .site-header .wrap {
    grid-template-columns: 1fr auto;
    gap: 0.75rem 1rem;
  }
  .dispatch {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
    background: var(--accent-bg);
    border-left: 4px solid var(--accent);
    padding: 0.6rem 0.9rem;
  }
}

/* ---------- Sections ---------- */

main { display: block; }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }
.section-lede { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }

.eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 0.6rem;
}

/* Statement reassurance */

.statement-section { background: var(--surface-2); border-bottom: 1px solid var(--rule); padding: clamp(2rem, 5vw, 3.5rem) 0; }
.statement-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 860px) { .statement-grid { grid-template-columns: 1fr; } }

.statement {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 1rem 1.1rem 0.8rem;
}
.statement table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.statement caption {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  padding-bottom: 0.6rem;
}
.statement th {
  text-align: left;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
  padding: 0.35rem 0.5rem 0.35rem 0;
}
.statement td {
  padding: 0.55rem 0.5rem 0.55rem 0;
  border-bottom: 1px dashed var(--rule);
  vertical-align: top;
}
.statement tr.is-ours td { color: var(--ink); font-weight: 600; background: var(--accent-bg); }
.statement tr.is-ours td:first-child { padding-left: 0.5rem; }
.statement tr.muted td { color: var(--ink-3); }
.statement .amt { text-align: right; padding-right: 0.5rem; white-space: nowrap; }
.statement-note { font-family: var(--font-body); font-size: 0.85rem; color: var(--ink-3); margin: 0.7rem 0 0; }

.no-renew {
  border: 2px solid var(--rule-strong);
  background: var(--surface);
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
  max-width: 60ch;
}
.no-renew strong { display: block; font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 0.25rem; }
.no-renew p { margin: 0; }

.callout-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; margin-top: 1rem; }

/* Includes */

.includes {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0 2.5rem;
}
.includes li { border-top: 2px solid var(--rule-strong); padding: 1rem 0 1.75rem; }
.includes h3 { margin-bottom: 0.35rem; }
.includes p { margin: 0; color: var(--ink-2); }
.trades { margin: 0.5rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.trades li { border: 1px solid var(--rule); padding: 0.1rem 0.55rem; font-size: 0.9rem; color: var(--ink-2); background: var(--surface); }

/* Who we send */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.placeholder-banner {
  border: 2px dashed var(--ink-3);
  padding: 0.6rem 0.9rem;
  margin: 2.5rem 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
}

.companies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.companies li { background: var(--surface); border: 1px dashed var(--ink-3); padding: 1rem; }
.companies h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.15rem; }
.companies .loc { color: var(--ink-3); font-size: 0.95rem; margin: 0 0 0.5rem; }
.companies .maps { font-size: 0.95rem; color: var(--ink-3); font-style: italic; }

/* Billing */

.facts { margin: 2rem 0 0; display: grid; gap: 0; border-top: 2px solid var(--rule-strong); }
.facts > div { display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: 0.5rem 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
@media (max-width: 640px) { .facts > div { grid-template-columns: 1fr; } }
.facts dt { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; }
.facts dd { margin: 0; }
.facts dd p:last-child { margin-bottom: 0; }

.descriptor {
  font-family: var(--font-mono);
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 0.05rem 0.4rem;
  white-space: nowrap;
}

/* Buttons (non-destructive) */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.6rem 1.1rem;
  border: 2px solid var(--accent); border-radius: var(--radius);
  color: var(--accent); background: transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-bg); }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: var(--accent); filter: brightness(1.1); }

/* ---------- Footer ---------- */

.site-footer { background: var(--surface); border-top: 4px solid var(--rule-strong); padding: 2.5rem 0 2rem; font-size: 0.975rem; }
.footer-phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.25rem 2rem; margin-bottom: 2rem; }
.footer-phone { border-left: 4px solid var(--accent); padding: 0.25rem 0 0.25rem 1rem; }
.footer-phone .label { display: block; font-weight: 700; }
.footer-phone .use { display: block; color: var(--ink-3); font-size: 0.9rem; }
.footer-phone a { display: inline-block; font-size: 1.6rem; font-weight: 700; text-decoration: none; margin-top: 0.15rem; }
.footer-phone a:hover { text-decoration: underline; }
.footer-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem 2rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; color: var(--ink-2); }
.footer-meta address { font-style: normal; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer-small { color: var(--ink-3); font-size: 0.875rem; margin-top: 1.5rem; }

/* ---------- Document pages (terms, privacy, policy, cancel) ---------- */

.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.doc .wrap { max-width: 50rem; }
.doc h1 { margin-bottom: 0.25rem; }
.doc .effective { color: var(--ink-3); margin-bottom: 2rem; }
.doc h2 { font-size: 1.4rem; margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.doc ul { padding-left: 1.25rem; max-width: 65ch; }
.doc li { margin-bottom: 0.4rem; }
.doc .no-renew { margin: 1.5rem 0; }
.breadcrumb { font-size: 0.95rem; margin-bottom: 1.5rem; }

/* Cancel form */

.form { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--rule-strong); padding: clamp(1.25rem, 4vw, 2rem); margin: 1.5rem 0; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.field .hint { display: block; font-size: 0.9rem; color: var(--ink-3); margin: -0.15rem 0 0.35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; max-width: 32rem; min-height: 44px;
  padding: 0.55rem 0.7rem;
  font: inherit; color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--ink-3); border-radius: var(--radius);
}
.field textarea { min-height: 6rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.field .check { display: flex; gap: 0.6rem; align-items: flex-start; max-width: 60ch; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; flex: none; accent-color: var(--accent); }
.hidden-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media print {
  .operator-strip, .btn-cancel, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
.nowrap { white-space: nowrap; }
.footer-phone a.email { display: block; font-size: 1rem; font-weight: 600; margin-top: 0.25rem; overflow-wrap: anywhere; }

/* ---------- Refinements ---------- */

/* Subtle paper grain on the page background */
body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Stamp on the no-auto-renew notice */
.no-renew { position: relative; }
.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 2px solid var(--accent);
  outline: 1px solid var(--accent);
  outline-offset: 2px;
  padding: 0.15rem 0.5rem;
  margin: 0 0 0.6rem;
  transform: rotate(-1.5deg);
}

/* How to use: numbered timeline (adapted from a 21st.dev "how it works" block) */
.split-how { align-items: center; }
.timeline {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0 0 0 3.25rem;
  border-left: 2px dashed var(--rule);
  margin-left: 1.15rem;
  display: grid;
  gap: 1.5rem;
}
.timeline li { position: relative; }
.timeline .node {
  position: absolute;
  left: -4.45rem;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
}
.timeline li:last-child .node { background: var(--accent); color: var(--on-accent); }
.timeline h3 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.timeline p { margin: 0; color: var(--ink-2); }

/* Photographs */
.photo { margin: 0; }
.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
  background: var(--surface-2);
}
.photo figcaption {
  font-size: 0.875rem;
  color: var(--ink-3);
  padding-top: 0.5rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
}

/* Billing questions: native <details> accordion (pattern from a 21st.dev accordion) */
.faq-heading { margin-top: 3rem; }
.faq { border-top: 2px solid var(--rule-strong); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 0 0.25rem 1.1rem; color: var(--ink-2); }

/* Gentle entrance, statement block only; off for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .statement-grid > * { animation: rise 0.5s ease-out both; }
  .statement-grid > *:nth-child(2) { animation-delay: 0.12s; }
  .faq details[open] p { animation: fade 0.2s ease-out; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
