/* RMSFA — Rocky Mountain Smoke-Free Alliance
   Static site styles */

:root {
  /* Brand palette — sampled from the RMSFA logo */
  --blue: #0075b2;        /* mountain blue */
  --blue-deep: #005a8a;   /* hover / pressed */
  --accent: #a4c3dc;      /* light-blue peak: accents on dark */
  --accent-ink: #005a8a;  /* accent used for small text on light (passes AA on white and sky) */
  --charcoal: #3a3a3c;    /* wordmark gray */
  --night: #0c1013;       /* logo black, softened for large areas */
  --night-2: #151b20;

  --ink: #1b1f23;
  --ink-soft: #4a5057;
  --sky: #eaf2f8;
  --paper: #fbfcfd;
  --line: #d6dfe6;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(12, 16, 19, 0.10);
  --max: 1160px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand: "Source Sans 3", "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.12;
  margin: 0 0 0.6em;
  color: var(--night);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 650; }
h3 { font-size: 1.35rem; font-weight: 650; }
p { margin: 0 0 1.1em; }

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: var(--night); padding: 10px 16px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 252, 253, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--charcoal);
}
.brand-mark { width: 66px; height: auto; flex: none; }
.brand-text {
  font-family: var(--brand); font-weight: 600; font-size: .96rem; line-height: 1.15;
  letter-spacing: .09em; text-transform: uppercase; color: var(--charcoal);
}
.brand-text small {
  display: block; font-weight: 500; font-size: .74rem; letter-spacing: .09em; margin-top: 1px; color: var(--charcoal);
}

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: .94rem;
  padding: 9px 11px; border-radius: 999px;
}
.nav a:hover { background: var(--sky); color: var(--night); }
.nav a[aria-current="page"] { background: var(--sky); color: var(--night); font-weight: 600; }
.nav .btn { margin-left: 8px; }
.nav .btn, .nav .btn:hover { color: var(--white); }
.nav .btn[aria-current="page"] { background: var(--blue-deep); color: var(--white); }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font: inherit; font-weight: 600; color: var(--night); cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: var(--white); text-decoration: none; font-weight: 700;
  padding: 13px 24px; border-radius: 999px; border: 2px solid var(--blue);
  font-size: 1rem; cursor: pointer; transition: transform .15s ease, background .15s ease;
  font-family: var(--sans);
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--white); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-dark { background: var(--night); border-color: var(--night); color: var(--white); }
.btn-dark:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-sm { padding: 9px 18px; font-size: .93rem; }
/* On dark / blue surfaces the primary button flips to the light-blue peak color */
.hero .btn:not(.btn-outline), .cta-band .btn, .page-hero .btn { background: var(--accent); border-color: var(--accent); color: var(--night); }
.hero .btn:not(.btn-outline):hover, .cta-band .btn:hover, .page-hero .btn:hover { background: #bcd4e8; border-color: #bcd4e8; color: var(--night); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--white); overflow: hidden;
  background:
    radial-gradient(900px 480px at 88% -5%, rgba(0,117,178,.55), transparent 62%),
    radial-gradient(700px 400px at 5% 110%, rgba(164,195,220,.14), transparent 65%),
    linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%);
}
.hero-ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: auto; opacity: .95; }
.hero-inner { padding: clamp(64px, 11vw, 150px) 0 clamp(140px, 17vw, 240px); position: relative; z-index: 2; max-width: 820px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero h1 { color: var(--white); }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 600; }
.hero p.lead { font-size: 1.22rem; color: #cfdbe4; max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.page-hero {
  background: linear-gradient(180deg, var(--night-2) 0%, var(--night) 100%);
  color: var(--white); padding: clamp(54px, 8vw, 100px) 0 clamp(54px, 8vw, 90px);
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,117,178,.5), transparent 65%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); font-size: clamp(2.2rem, 4.4vw, 3.4rem); max-width: 800px; }
.page-hero p { color: #cfdbe4; font-size: 1.15rem; max-width: 680px; margin: 0; }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
.hero.hero { padding: 0; }
.section-alt { background: var(--sky); }
.section-dark { background: var(--night); color: #dbe5ec; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section-dark .section-head p { color: #b7c6d2; }
.kicker { color: var(--accent-ink); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: .78rem; margin-bottom: 12px; display: block; }
.section-dark .kicker { color: var(--accent); }

.statement { max-width: 900px; margin-inline: auto; text-align: center; }
.statement p.big {
  font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.3; color: var(--night); font-weight: 500;
}
.statement p.big strong { color: var(--blue); font-weight: 700; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.card h3 { margin-bottom: .45em; }
.card p { color: var(--ink-soft); margin-bottom: 0; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--sky); color: var(--blue);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }
.section-alt .card { border-color: transparent; box-shadow: var(--shadow); }
.pillar { border-top: 4px solid var(--blue); }

/* Split */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.panel {
  background: var(--blue); color: #eaf4fb; border-radius: 20px; padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow);
}
.panel h3 { color: var(--white); font-size: 1.6rem; }
.panel ul { margin: 0; padding: 0; list-style: none; }
.panel li { padding: 12px 0 12px 30px; position: relative; border-top: 1px solid rgba(255,255,255,.22); }
.panel li:first-child { border-top: 0; }
.panel li::before {
  content: ""; position: absolute; left: 0; top: 19px; width: 14px; height: 8px;
  border-left: 3px solid var(--white); border-bottom: 3px solid var(--white); transform: rotate(-45deg);
}

.checklist { list-style: none; padding: 0; margin: 0 0 1.2em; }
.checklist li { position: relative; padding: 8px 0 8px 32px; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 17px; width: 14px; height: 8px;
  border-left: 3px solid var(--accent-ink); border-bottom: 3px solid var(--accent-ink); transform: rotate(-45deg);
}

/* Principles strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.strip div { padding: 26px 24px; border-left: 1px solid var(--line); }
.strip div:first-child { border-left: 0; }
.strip strong { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--night); margin-bottom: 4px; }
.strip span { color: var(--ink-soft); font-size: .95rem; }

/* Board */
.person { text-align: center; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: var(--white);
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.9rem; font-weight: 700;
  border: 4px solid var(--sky);
}
.person h3 { margin-bottom: 2px; font-size: 1.15rem; }
.person p { font-size: .93rem; color: var(--accent-ink); font-weight: 600; margin: 0; }

/* Membership */
.plans { align-items: stretch; }
.plan {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px;
  display: flex; flex-direction: column;
}
.plan.featured { border: 2px solid var(--blue); box-shadow: var(--shadow); position: relative; }
.plan .tag {
  position: absolute; top: -13px; left: 28px; background: var(--blue); color: var(--white); font-size: .72rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px;
}
.plan h3 { margin-bottom: 4px; }
.plan .for { color: var(--ink-soft); font-size: .95rem; margin-bottom: 14px; }
.price { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; color: var(--night); line-height: 1; margin-bottom: 4px; }
.price small { font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--ink-soft); }
.plan .alt { color: var(--ink-soft); font-size: .93rem; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; font-size: .97rem; }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: 13px; width: 11px; height: 6px;
  border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg);
}
.plan .btn { width: 100%; }

/* Forms */
form { display: grid; gap: 18px; }
label { font-weight: 600; font-size: .95rem; display: block; margin-bottom: 6px; color: var(--night); }
input, select, textarea {
  width: 100%; font: inherit; padding: 13px 15px; border-radius: 10px; border: 1px solid #bfcbd3; background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(0,117,178,.35); border-color: var(--blue); }
textarea { min-height: 150px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.contact-box { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-deep) 100%); color: var(--white); border-radius: 24px;
  padding: clamp(34px, 5vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin: 0 0 8px; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.cta-band p { margin: 0; color: #e3f0f9; max-width: 560px; }

/* Prose pages */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.7rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose .checklist { padding-left: 0; }

/* Notice */
.notice {
  background: var(--sky); border: 1px solid #c4d8e8; border-left: 5px solid var(--blue); border-radius: 10px;
  padding: 18px 22px; font-size: .97rem; color: var(--ink); margin-top: 28px;
}
.notice strong { color: var(--night); }

/* ---------- Science page ---------- */
.study-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.study { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 20px; display: flex; flex-direction: column; }
.study .type { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); margin-bottom: 8px; }
.study h3 { font-family: var(--sans); font-size: 1.06rem; line-height: 1.35; margin: 0 0 6px; color: var(--night); letter-spacing: 0; }
.study .cite { font-size: .88rem; color: var(--ink-soft); margin-bottom: 14px; }
.study p { font-size: .97rem; margin-bottom: 12px; }
.study .limits { font-size: .9rem; color: var(--ink-soft); border-left: 3px solid var(--accent); padding-left: 12px; margin: 0 0 16px; }
.study .limits strong { color: var(--night); }
.study .read { margin-top: auto; font-weight: 600; font-size: .93rem; }
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.toc a { background: rgba(255,255,255,.1); color: var(--white); text-decoration: none; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem; border: 1px solid rgba(255,255,255,.25); }
.toc a:hover { background: rgba(255,255,255,.2); color: var(--white); }
.sec-num { font-family: var(--serif); color: var(--blue); font-weight: 700; margin-right: 10px; }

/* ---------- Cost of smoking / Toll of tobacco ---------- */
.stat-card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 26px 24px; }
.stat-card .num { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; color: var(--blue); margin-bottom: 10px; display: block; }
.stat-card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.stats { align-items: stretch; }
.embed-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.embed-wrap { max-width: 556px; overflow-x: auto; margin-inline: auto; }
.embed-wrap iframe { display: block; border: 0; max-width: none; }
.embed-credit { max-width: 556px; margin: 10px auto 0; font-size: .85rem; color: var(--ink-soft); }
.embed-credit a { color: var(--blue); }
.source-card { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 10px; padding: 16px 20px; font-size: .95rem; color: var(--ink-soft); }
.source-card strong { color: var(--night); }

/* ---------- Data tables ---------- */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: .97rem; min-width: 640px; }
.data-table caption { text-align: left; padding: 18px 22px 6px; font-family: var(--serif); font-weight: 650; font-size: 1.15rem; color: var(--night); }
.data-table th, .data-table td { padding: 14px 22px; text-align: right; border-top: 1px solid var(--line); }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table thead th { background: var(--sky); color: var(--night); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; border-top: 1px solid var(--line); }
.data-table tbody th { font-weight: 600; color: var(--night); }
.data-table tbody tr.total th, .data-table tbody tr.total td { background: #f4f9fc; font-weight: 700; color: var(--blue-deep); }
.data-table .rank { color: var(--ink-soft); font-size: .9rem; }
.cat-card h3 { font-size: 1.15rem; }
.cat-card .figs { display: block; margin: 2px 0 12px; font-family: var(--serif); font-weight: 700; color: var(--blue); font-size: 1.35rem; line-height: 1.2; }
.cat-card .figs small { display: block; font-family: var(--sans); font-weight: 500; font-size: .85rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #aebdc8; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12); }
.site-footer h4 { color: var(--accent); font-family: var(--sans); font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #dbe6ee; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand .brand-text, .footer-brand .brand-text small { color: var(--white); }
.footer-brand p { max-width: 380px; font-size: .96rem; }
.fine { padding-top: 24px; font-size: .84rem; color: #8a9aa6; display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; }
.fine p { margin: 0; max-width: 760px; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .menu-toggle { display: inline-block; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 14px 20px 20px; flex-direction: column; align-items: stretch; gap: 4px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; }
  .nav .btn { margin: 8px 0 0; }
}
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip div:nth-child(3) { border-left: 0; }
  .strip div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .study-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .grid-2, .grid-3, .grid-4, .form-row { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .strip div { border-left: 0; border-top: 1px solid var(--line); }
  .strip div:first-child { border-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-text { font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
