:root {
  --paper: #f5f1ea;
  --paper-2: #ece6da;
  --card: #fbf8f2;
  --ink: #161412;
  --ink-2: #3a342e;
  --muted: #7a7068;
  --rule: #d9d2c4;
  --accent: #c0411e;
  --accent-2: #8a2f17;
  --good: #4a7a3a;
  --bad: #b53a2b;
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container: 1120px;
  --pad: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.search input:focus-visible,
.sort:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  font-family: var(--serif); font-weight: 600; font-style: italic;
  background: var(--ink); color: var(--paper);
  padding: 2px 8px; border-radius: 3px; letter-spacing: .02em;
  font-size: 14px;
}
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 18px; }
.nav nav { display: flex; gap: clamp(10px, 2.4vw, 24px); }
.nav nav a {
  font-size: 14px; color: var(--ink-2); text-decoration: none;
  padding: 6px 2px; border-bottom: 1px solid transparent;
}
.nav nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 620px) {
  .brand-name { display: none; }
  .nav nav { gap: 14px; }
  .nav nav a { font-size: 13px; }
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 120px) var(--pad) clamp(40px, 6vw, 64px);
}
.kicker {
  font-family: var(--sans);
  text-transform: uppercase; letter-spacing: .14em;
  font-size: 12px; color: var(--muted);
  margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  max-width: 18ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.lede {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0 0 40px;
}
.lede strong { font-weight: 600; color: var(--ink); }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 560px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
}
.countdown > div {
  display: flex; flex-direction: column; align-items: flex-start;
}
.countdown span {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.countdown small {
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted); margin-top: 6px;
}
.meta { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Stat rail ---------- */
.rail {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.4vw, 32px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(28px, 4vw, 40px);
  margin-top: clamp(16px, 4vw, 32px);
}
@media (max-width: 800px) { .rail { grid-template-columns: repeat(2, 1fr); } }
.stat .num {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -0.02em; line-height: 1;
}
.stat .lbl { font-size: 13.5px; color: var(--muted); margin-top: 8px; max-width: 28ch; }

/* ---------- Section ---------- */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) var(--pad);
}
.section-alt {
  background: var(--paper-2);
  max-width: none;
  padding-left: 0; padding-right: 0;
}
.section-alt > * { max-width: var(--container); margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }

.section-head { max-width: 64ch; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -0.02em; line-height: 1.05;
  margin: 0 0 14px;
}
.section-head p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--ink-2);
  margin: 0;
  max-width: 60ch;
}

/* ---------- Promise toolbar ---------- */
.toolbar {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 16px 20px;
  margin-bottom: 14px;
}
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.search { position: relative; display: flex; align-items: center; }
.search-icon {
  position: absolute; left: 13px;
  width: 15px; height: 15px;
  color: var(--muted); pointer-events: none;
}
.search input {
  font-family: var(--sans); font-size: 13.5px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 16px 8px 35px;
  width: 230px; max-width: 100%;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search input:hover { border-color: var(--ink); }
.sort {
  font-family: var(--sans); font-size: 13.5px;
  color: var(--ink-2);
  background-color: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 34px 8px 15px;
  cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%237a7068' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px;
  transition: border-color .15s ease;
}
.sort:hover { border-color: var(--ink); color: var(--ink); }

.result-count {
  font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin: 0 0 22px;
}
.grid-empty {
  grid-column: 1 / -1;
  font-family: var(--serif); font-size: 18px;
  color: var(--ink-2); text-align: center;
  padding: 56px 24px; margin: 0;
  background: var(--card);
  border: 1px dashed var(--rule);
  border-radius: 6px;
}

@media (max-width: 720px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .tools { width: 100%; }
  .search { flex: 1 1 auto; }
  .search input { width: 100%; }
  .sort { flex: 0 0 auto; }
}

/* ---------- Filters ---------- */
.filter {
  font-family: var(--sans); font-size: 13px;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px;
  cursor: pointer; transition: all .15s ease;
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.is-active {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}

/* ---------- Promise grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px 22px 20px;
  display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover {
  border-color: color-mix(in srgb, var(--ink) 30%, var(--rule));
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -22px rgba(20,16,12,.35);
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-org { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; line-height: 1.15; }
.card-sector { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 3px; }
.card-promise { font-family: var(--serif); font-size: 17px; line-height: 1.4; color: var(--ink); margin: 0 0 16px; }
.card-foot { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-year { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.status {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  padding: 4px 9px; border-radius: 3px; font-weight: 600;
  white-space: nowrap;
}
.status-on-track { background: #e6efdd; color: #3d5e2e; }
.status-behind { background: #f4e6cc; color: #82591a; }
.status-walked-back { background: #f1d8d2; color: #8a2f17; }
.status-achieved { background: #d9e8ea; color: #2f5a63; }

/* ---------- Progress bars ---------- */
.bars { display: grid; gap: 28px; max-width: 880px; }
.bar-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-bottom: 10px;
  font-family: var(--serif); font-size: 19px;
}
.bar-val { font-family: var(--sans); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track {
  height: 8px; background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px; overflow: hidden;
}
.fill {
  height: 100%; width: var(--p, 0%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width 1s cubic-bezier(.2,.7,.2,1);
}
.fill.is-bad { background: linear-gradient(90deg, #c0411e, #6d1a0d); }
.bar-note { font-size: 14px; color: var(--ink-2); margin: 10px 0 0; max-width: 70ch; }

/* ---------- Facts ---------- */
.facts {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
.facts li {
  font-family: var(--serif);
  font-size: 17px; line-height: 1.5; color: var(--ink-2);
  padding: 22px 22px 22px 28px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  position: relative;
}
.facts li::before {
  content: ""; position: absolute;
  left: 16px; top: 26px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
}
.facts strong { color: var(--ink); font-weight: 600; }

/* ---------- Quotes ---------- */
.quotes {
  columns: 2;
  column-gap: clamp(20px, 3vw, 36px);
}
@media (max-width: 760px) { .quotes { columns: 1; } }
.quote {
  break-inside: avoid;
  margin: 0 0 clamp(20px, 3vw, 32px);
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.4;
  color: var(--ink);
}
.quote figcaption {
  margin-top: 12px;
  font-size: 13px; color: var(--muted);
}

/* ---------- Newsletter ---------- */
.newsletter { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(72px, 9vw, 120px); }
.news-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  padding: clamp(32px, 5vw, 56px);
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.news-card::after {
  content: "2030";
  position: absolute; right: -10px; bottom: -50px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(180px, 28vw, 320px);
  letter-spacing: -0.04em;
  color: rgba(245,241,234,0.05);
  line-height: 1;
  pointer-events: none;
}
.news-card .kicker { color: rgba(245,241,234,0.55); }
.news-card h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.02em; line-height: 1.1;
  margin: 0 0 14px;
  max-width: 22ch;
  position: relative;
}
.news-card > p {
  font-family: var(--serif);
  font-size: 17px;
  color: rgba(245,241,234,0.78);
  max-width: 52ch;
  margin: 0 0 28px;
  position: relative;
}
#news-form {
  display: flex; gap: 8px; flex-wrap: wrap;
  position: relative;
  max-width: 480px;
}
#news-form input {
  flex: 1 1 240px;
  background: rgba(245,241,234,0.08);
  border: 1px solid rgba(245,241,234,0.18);
  color: var(--paper);
  padding: 13px 16px;
  font-family: var(--sans); font-size: 15px;
  border-radius: 5px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
#news-form input::placeholder { color: rgba(245,241,234,0.4); }
#news-form input:focus {
  border-color: var(--accent);
  background: rgba(245,241,234,0.12);
}
#news-form button {
  background: var(--accent);
  color: var(--paper);
  border: 0;
  padding: 0 22px;
  height: 46px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  border-radius: 5px;
  cursor: not-allowed;
}

/* ---- Lock zone ---- */
/* Form, note and lock are stacked in one grid cell so the zone is always
   as tall as the lock — the countdown can't overflow onto the card text. */
.lock-zone {
  position: relative;
  display: grid;
}
.lock-zone > * { grid-area: 1 / 1; }
.lock-zone #news-form,
.lock-zone .news-note { align-self: center; }
.lock-zone #news-form input[disabled],
.lock-zone #news-form button[disabled] {
  opacity: 0.6;
  filter: blur(1px);
  user-select: none;
}
.lock {
  position: relative;
  align-self: stretch;
  background: linear-gradient(135deg, rgba(22,20,18,0.96), rgba(58,52,46,0.96));
  border: 1px solid rgba(245,241,234,0.18);
  border-radius: 8px;
  padding: clamp(22px, 3.4vw, 32px);
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  gap: 16px;
  z-index: 2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 12px 40px -20px rgba(0,0,0,0.5);
}
.lock-kicker {
  margin: 0;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  color: rgba(245,241,234,0.65);
}
.lock-countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 460px;
  border-top: 1px solid rgba(245,241,234,0.15);
  border-bottom: 1px solid rgba(245,241,234,0.15);
  padding: 12px 0;
}
.lock-countdown > div { display: flex; flex-direction: column; align-items: flex-start; }
.lock-countdown span {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.lock-countdown small {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(245,241,234,0.55);
  margin-top: 6px;
}
.lock-foot {
  margin: 0;
  font-size: 13px;
  color: rgba(245,241,234,0.55);
}
.news-note {
  font-size: 13px; color: rgba(245,241,234,0.55);
  margin: 14px 0 0;
  position: relative;
}
.news-note.is-success { color: #b8d6a0; }
.news-note.is-error { color: #e8a89a; }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  padding: 36px var(--pad);
  display: flex; flex-wrap: wrap; gap: 24px;
  justify-content: space-between; align-items: flex-start;
  max-width: var(--container);
  margin: 0 auto;
}
.foot-brand { font-family: var(--serif); font-size: 18px; font-weight: 500; margin: 0 0 6px; }
.foot-tag { font-size: 14px; color: var(--muted); margin: 0; max-width: 44ch; }
.foot-meta { font-size: 13px; color: var(--muted); text-align: right; }
.foot-meta p { margin: 0 0 4px; }
.foot-meta a { color: var(--ink-2); }

@media (max-width: 640px) {
  .foot-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
