/* =========================================================
   AB Choice Vaping Alliance — modern Alberta prairie civic.
   Bold geometric sans, ink + sky + prairie red, magazine grid.
   Distinct from AACV (parchment+evergreen) and CFAA (parchment+forest).
   ========================================================= */

:root {
  /* Palette — ivory paper, ink, Alberta sky, prairie red */
  --paper: #f5f3ee;          /* warm ivory, cooler than parchment */
  --paper-2: #ffffff;        /* white tile */
  --paper-3: #ebe7dc;        /* deeper ivory */
  --ink: #0e1116;            /* near-black */
  --ink-2: #1d2330;          /* secondary ink */
  --ink-mute: #5a6170;       /* tertiary */
  --rule: #c9c3b3;           /* hairline */
  --rule-strong: #8e8a7c;
  --sky: #1366d4;            /* Alberta sky blue — primary accent */
  --sky-deep: #0b4ba3;       /* hover */
  --red: #c8332a;            /* prairie red — secondary accent, used sparingly */
  --wheat: #d6a85a;          /* wheat highlight, very sparing */
  --on-ink: #f5f3ee;         /* text on dark */

  /* Type — geometric display + humanist body, totally different stack */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.4rem;
  --text-2xl: 1.9rem;
  --text-3xl: 2.55rem;
  --text-hero: clamp(2.4rem, 1.4rem + 4.6vw, 4.6rem);

  /* Layout */
  --shell: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 8vw, 6.5rem);
  --radius: 2px;
  --radius-md: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sky); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sky-deep); }
::selection { background: var(--ink); color: var(--paper); }

.skip-link {
  position: absolute; left: -9999px; top: -9999px;
  background: var(--ink); color: var(--on-ink);
  padding: 0.6rem 0.9rem; font-size: var(--text-sm);
  border-radius: var(--radius); z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* =========================================================
   HEADER — thin top rule, monospace meta, no sticky drama
   ========================================================= */
.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(6px);
}
.masthead-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--gutter);
  align-items: center;
  padding: 1.1rem 0;
}
.masthead.scrolled { box-shadow: 0 1px 0 var(--rule); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wordmark .mark {
  width: 36px; height: 36px;
  display: inline-flex;
}
.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.wordmark-text .wm-1 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.wordmark-text .wm-2 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.topnav {
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 500;
}
.topnav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.topnav a:hover { color: var(--ink); border-bottom-color: var(--sky); }

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.55rem 0.95rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  transition: background 120ms ease;
}
.cta-pill:hover { background: var(--sky-deep); border-color: var(--sky-deep); color: var(--paper); }

@media (max-width: 880px) {
  .topnav { display: none; }
  .masthead-inner { grid-template-columns: auto 1fr; }
}

/* =========================================================
   HERO — magazine cover: oversized headline, slug bar, side ledger
   ========================================================= */
.hero {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin-bottom: 1.6rem;
}
.hero-meta .pip { color: var(--red); margin-right: 0.4rem; }

.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-hero);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
  max-width: 22ch;
}
.hero-headline .accent-red { color: var(--red); }
.hero-headline .accent-sky { color: var(--sky); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.hero-lede {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 1.75rem;
}
.hero-cta-row {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--sky); color: var(--paper); border-color: var(--sky);
}
.btn-primary:hover { background: var(--sky-deep); border-color: var(--sky-deep); color: var(--paper); }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-red {
  background: var(--red); color: var(--paper); border-color: var(--red);
}
.btn-red:hover { background: #a3271f; border-color: #a3271f; color: var(--paper); }

.hero-ledger {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1.4rem 1.4rem 1.2rem;
}
.hero-ledger h2 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--ink-mute);
  margin: 0 0 1rem;
  font-weight: 600;
}
.hero-ledger dl {
  margin: 0; display: grid; gap: 0.9rem;
}
.hero-ledger dl > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.6rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--rule);
}
.hero-ledger dl > div:last-child { border: 0; padding-bottom: 0; }
.hero-ledger dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 500;
}
.hero-ledger dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   HORIZON — single SVG strip used as section divider
   ========================================================= */
.horizon {
  height: 28px;
  background:
    linear-gradient(to bottom, transparent 0 50%, var(--rule) 50% calc(50% + 1px), transparent calc(50% + 1px) 100%);
  position: relative;
}
.horizon::before, .horizon::after {
  content: ""; position: absolute; top: 50%;
  width: 8px; height: 8px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--paper);
}
.horizon::before { left: 12%; }
.horizon::after { right: 12%; background: var(--red); border-color: var(--red); }

/* =========================================================
   SECTION HEAD — slug bar
   ========================================================= */
.slug {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  padding: 0.3rem 0.55rem 0.3rem 0;
  border-left: 3px solid var(--red);
  padding-left: 0.7rem;
  margin: 0 0 1.3rem;
}
.slug .slug-num { color: var(--ink); font-weight: 700; }

.section-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  max-width: 28ch;
}
.section-lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 0 2rem;
}

/* =========================================================
   STACK — section base (instead of "card" / "context")
   ========================================================= */
.stack {
  padding: var(--section-y) 0;
  border-bottom: 1px solid var(--rule);
}
.stack-dark {
  background: var(--ink);
  color: var(--on-ink);
  border-bottom: 0;
}
.stack-dark .section-h2,
.stack-dark .slug .slug-num { color: var(--paper); }
.stack-dark .slug { color: #b6bcc7; border-left-color: var(--red); }
.stack-dark .section-lede { color: #c8cdd4; }
.stack-dark a { color: #ffd766; }

/* =========================================================
   TILES — three-up editorial cards (different from "card"/"context-card")
   ========================================================= */
.tile-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 900px) { .tile-row { grid-template-columns: 1fr; } }

.tile {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1.6rem 1.4rem 1.4rem;
  display: flex; flex-direction: column;
  gap: 0.8rem;
  position: relative;
  transition: border-color 140ms ease, transform 140ms ease;
}
.tile:hover { border-color: var(--ink); }
.tile-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
}
.tile h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}
.tile h3 a { color: var(--ink); text-decoration: none; }
.tile h3 a:hover { color: var(--sky); }
.tile p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--ink-2);
  line-height: 1.55;
}
.tile-link {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
  text-decoration: none;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
  font-weight: 600;
}
.tile-link:hover { color: var(--sky-deep); }

/* =========================================================
   PRAIRIE LIST — numbered priorities, big numerals
   ========================================================= */
.prairie-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.6rem;
  counter-reset: pli;
}
.prairie-list > li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.2rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
}
.prairie-list > li:last-child { border-bottom: 1px solid var(--rule); }
.prairie-list > li::before {
  counter-increment: pli;
  content: counter(pli, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: -0.04em;
  color: var(--sky);
  line-height: 1;
}
.prairie-list h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.prairie-list p { margin: 0; color: var(--ink-2); }

/* =========================================================
   ABOUT BLOCK — two columns, body text + pillars
   ========================================================= */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }
.body-prose p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 1rem;
  max-width: 60ch;
}

.pillars {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.8rem;
}
.pillars li {
  background: var(--paper-2);
  border-left: 3px solid var(--sky);
  padding: 0.95rem 1.1rem;
}
.pillars li:nth-child(2) { border-left-color: var(--red); }
.pillars li:nth-child(3) { border-left-color: var(--wheat); }
.pillars li:nth-child(4) { border-left-color: var(--ink); }
.pillars h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.005em;
}
.pillars p { margin: 0; font-size: 0.92rem; color: var(--ink-2); }

/* =========================================================
   JOIN — split: consumer vs retailer cards
   ========================================================= */
.join {
  background: var(--paper-3);
  padding: var(--section-y) 0;
  border-bottom: 1px solid var(--rule);
}
.join-head { max-width: 60ch; margin-bottom: 2.5rem; }

.join-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 880px) { .join-split { grid-template-columns: 1fr; } }

.join-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1.8rem 1.6rem;
  display: flex; flex-direction: column;
  gap: 1rem;
}
.join-card.consumer { border-top: 4px solid var(--sky); }
.join-card.retailer { border-top: 4px solid var(--red); }
.join-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.015em;
}
.join-card .who {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  font-weight: 600;
}
.join-card.consumer .who { color: var(--sky-deep); }
.join-card.retailer .who { color: var(--red); }

.join-form {
  display: grid; gap: 0.8rem;
}
.join-field { display: grid; gap: 0.3rem; }
.join-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
}
.join-field input,
.join-field select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink);
}
.join-field input:focus,
.join-field select:focus {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
  border-color: var(--sky);
}
.join-row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem;
}
@media (max-width: 480px) { .join-row-2 { grid-template-columns: 1fr; } }
.join-note {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin: 0.4rem 0 0;
  line-height: 1.45;
}

/* =========================================================
   FOOTER — masthead-style colophon
   ========================================================= */
.colophon {
  background: var(--ink);
  color: var(--on-ink);
  padding: 3rem 0 2rem;
}
.colophon a { color: #ffd766; }
.colophon-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 2rem;
}
@media (max-width: 820px) {
  .colophon-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
}
.colophon h4 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin: 0 0 0.8rem;
  color: #b6bcc7;
  font-weight: 600;
}
.colophon p, .colophon a { font-size: 0.9rem; }
.colophon .col-brand .wordmark { color: var(--paper); }
.colophon .col-brand .wordmark-text .wm-2 { color: #b6bcc7; }
.colophon nav { display: flex; flex-direction: column; gap: 0.4rem; }
.colophon nav a { text-decoration: none; }
.colophon nav a:hover { text-decoration: underline; }
.colophon-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid #2a3140;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: #8990a0;
}

/* =========================================================
   DOC pages (resources)
   ========================================================= */
.doc-wrap {
  padding: clamp(3rem, 6vw, 4.5rem) 0 var(--section-y);
}
.doc-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin: 0 0 1rem;
}
.doc-meta .red { color: var(--red); }
.doc h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 1rem;
  max-width: 24ch;
}
.doc-lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0 0 1.6rem;
}
.doc-banner {
  background: var(--paper-2);
  border-left: 3px solid var(--sky);
  padding: 0.95rem 1.1rem;
  font-size: 0.94rem;
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0 0 2.2rem;
}
.doc-banner strong {
  display: block; margin-bottom: 0.25rem;
  font-family: var(--font-display); letter-spacing: -0.005em;
}

.doc-body {
  max-width: 68ch;
}
.doc-body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 2.4rem 0 0.8rem;
}
.doc-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.005em;
  margin: 1.8rem 0 0.5rem;
}
.doc-body p {
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 1rem;
}
.doc-body ul, .doc-body ol {
  font-size: 1.04rem; line-height: 1.7; color: var(--ink-2);
  padding-left: 1.4rem; margin: 0 0 1rem;
}
.doc-body li { margin-bottom: 0.4rem; }
.doc-body blockquote {
  border-left: 3px solid var(--red);
  padding: 0.4rem 0 0.4rem 1.1rem;
  margin: 1.2rem 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.4;
  font-style: italic;
}
.doc-body .source-list {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1rem 1.2rem;
  font-size: 0.92rem;
  margin-top: 2rem;
}
.doc-body .source-list h3 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--ink-mute);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.doc-body .source-list ul {
  padding-left: 1.2rem; margin: 0;
  font-size: 0.88rem;
}

/* =========================================================
   DOC INDEX list
   ========================================================= */
.idx {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--rule);
}
.idx li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
@media (max-width: 720px) {
  .idx li { grid-template-columns: 1fr; gap: 0.5rem; }
}
.idx-kind {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  font-weight: 600;
  padding-top: 0.3rem;
}
.idx h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}
.idx h3 a { color: var(--ink); text-decoration: none; }
.idx h3 a:hover { color: var(--sky); text-decoration: underline; }
.idx-summary { margin: 0 0 0.4rem; color: var(--ink-2); font-size: 0.97rem; }
.idx-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin: 0;
}

/* =========================================================
   THANKS page
   ========================================================= */
.thanks {
  min-height: 80vh;
  display: grid;
  align-items: center;
  padding: var(--section-y) 0;
}
.thanks h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0.5rem 0 1rem;
  max-width: 18ch;
}
.thanks p { font-size: var(--text-lg); color: var(--ink-2); max-width: 50ch; }
.thanks .actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* utilities */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
