/* ============================================================
   Clean Energy Wyoming: big-sky-sheet design system
   A typographic survey of the state's wind country: ruled map
   sheets, contour figures, block numerals, one red accent.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-var.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/space-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F3F0E6;
  --paper-deep: #E9E5D8;
  --ink: #1D1B16;
  --contour: #B7B2A2;
  --blue: #1C4E80;
  --red: #B2321B;
  --grass: #C9A227;
  --night: #16181C;
  --measure: 42rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--red); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  z-index: 100;
}
.skip-link:focus { left: 0; color: var(--paper); }

.mono {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}
.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2rem;
  padding: 1rem var(--gutter) 0.85rem;
  max-width: 76rem;
  margin: 0 auto;
}
.wordmark {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-stretch: 110%;
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
}
.wordmark:hover { color: var(--red); }
.dateline {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.menu-toggle {
  display: none;
  margin-left: auto;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 0.95rem;
  cursor: pointer;
  min-height: 44px;
}

.site-nav {
  width: 100%;
  border-top: 1px solid var(--contour);
  margin-top: 0.8rem;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  list-style: none;
  margin: 0 auto;
  padding: 0.55rem var(--gutter);
  max-width: 76rem;
}
.site-nav a {
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--red); border-bottom-color: var(--red); }

/* ---------- hero poster: one viewport, no scroll needed ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}
.hero-inner {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  max-width: 76rem;
  width: 100%;
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 4rem) var(--gutter);
}
.hero-kicker {
  font-size: 0.78rem;
  color: var(--red);
  margin: 0 0 1.25rem;
}
.hero h1 {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-stretch: 108%;
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--red); }
.hero-dek {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  max-width: 34rem;
  margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.button-primary {
  display: inline-block;
  background: var(--red);
  color: var(--paper);
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 1.5rem;
  min-height: 44px;
  border: 2px solid var(--red);
}
.button-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button-quiet {
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.9rem 0.25rem;
  min-height: 44px;
  display: inline-block;
}
.hero-figure { margin: 0; }
.hero-figure img {
  border: 3px solid var(--ink);
}
.hero-figure figcaption {
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 0.6rem;
}
.hero-foot {
  border-top: 1px solid var(--contour);
  padding: 0.7rem var(--gutter) 0.9rem;
  max-width: 76rem;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--blue);
}

/* ---------- sheet sections ---------- */

.sheet {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4.5rem) var(--gutter);
  border-bottom: 1px solid var(--contour);
}
.sheet-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 0.6rem;
  margin-bottom: 2rem;
}
.sheet-index {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--red);
}
.sheet-title {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-stretch: 105%;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.sheet-note {
  margin-left: auto;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- top story ---------- */

.top-story {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.top-story-figure { margin: 0; }
.top-story-figure img { border: 3px solid var(--ink); }
.top-story-figure figcaption,
.story-figure figcaption,
.article-figure figcaption {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink);
  margin-top: 0.7rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--red);
}
.story-link {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-stretch: 103%;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.story-link:hover { color: var(--red); text-decoration: underline; text-decoration-thickness: 0.06em; }
.dek {
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0.9rem 0 1.1rem;
}
.byline {
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 1rem;
}
.byline b { color: var(--red); font-weight: 700; }

/* ---------- stories ---------- */

.story-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.story-item {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: 1.75rem 0;
  border-top: 1px solid var(--contour);
  align-items: start;
}
.story-item:first-child { border-top: 0; padding-top: 0; }
.story-meta { display: flex; flex-direction: column; gap: 0.45rem; }
.story-date { font-size: 0.72rem; color: var(--blue); }
.story-tag {
  font-size: 0.72rem;
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--contour);
  display: inline-block;
  padding: 0.2rem 0.55rem;
  width: fit-content;
}
.story-item h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-stretch: 102%;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.2;
  margin: 0 0 0.6rem;
}
.story-item h3 a { color: var(--ink); text-decoration: none; }
.story-item h3 a:hover { color: var(--red); text-decoration: underline; }
.story-item p { margin: 0 0 0.8rem; max-width: var(--measure); }
.story-figure { margin: 0; }
.story-figure img { border: 2px solid var(--ink); }
.archive-link { margin-top: 2rem; }

/* ---------- where things stand ---------- */

.stand-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.stat-rows { list-style: none; margin: 0; padding: 0; }
.stat-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--contour);
  align-items: baseline;
}
.stat-row:first-child { border-top: 0; }
.stat-num {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-stretch: 110%;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1;
  color: var(--red);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.stat-row:nth-child(even) .stat-num { color: var(--blue); }
.stat-label { font-weight: 700; margin: 0 0 0.3rem; }
.stat-note { margin: 0; font-size: 0.95rem; line-height: 1.55; }
.stand-figure { margin: 0; }
.stand-figure img { border: 3px solid var(--ink); }
.stand-figure figcaption {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.7rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--red);
}

/* ---------- how we work ---------- */

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: method;
}
.method-grid li {
  border: 2px solid var(--ink);
  padding: 1.4rem 1.4rem 1.5rem;
  background: var(--paper-deep);
  position: relative;
}
.method-grid li::before {
  counter-increment: method;
  content: counter(method, decimal-leading-zero);
  position: absolute;
  top: -0.85rem;
  left: 1.1rem;
  background: var(--paper);
  padding: 0 0.5rem;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--red);
}
.method-grid h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 0 0.55rem;
}
.method-grid p { margin: 0; font-size: 0.95rem; line-height: 1.6; }

/* ---------- footer ---------- */

.colophon {
  background: var(--night);
  color: var(--paper);
  padding: clamp(2.5rem, 6vh, 4rem) var(--gutter);
}
.colophon-inner {
  max-width: 76rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 2rem;
}
.colophon .wordmark { color: var(--paper); }
.colophon p { margin: 0.5rem 0 0; font-size: 0.95rem; line-height: 1.6; max-width: 32rem; }
.colophon-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.colophon-nav a { color: var(--paper); font-size: 0.95rem; }
.colophon-nav a:hover { color: var(--grass); }
.colophon .fine {
  grid-column: 1 / -1;
  border-top: 1px solid #3A3F47;
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: #C8C4B4;
}

/* ---------- article ---------- */

.article-band { border-bottom: 3px solid var(--ink); }
.article-band img { width: 100%; }
.article-head {
  max-width: 50rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4rem) var(--gutter) 2rem;
}
.article-head .hero-kicker { margin-bottom: 1rem; }
.article-head h1 {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-stretch: 106%;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
.article-head .dek { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }

.article-body {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 3rem;
}
.article-body p { margin: 0 0 1.15rem; }
.article-body h2 {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-stretch: 103%;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  line-height: 1.15;
  margin: 2.4rem 0 1rem;
  letter-spacing: -0.01em;
}
.article-body .lede { font-size: 1.18rem; line-height: 1.65; }
.article-figure { margin: 2rem 0; }
.article-figure img { border: 2px solid var(--ink); }
.watch-list {
  list-style: none;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.watch-list li {
  border-left: 3px solid var(--red);
  background: var(--paper-deep);
  padding: 0.85rem 1.1rem;
  font-size: 0.98rem;
  line-height: 1.55;
}

.faq-block {
  border: 2px solid var(--ink);
  background: var(--paper-deep);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  margin: 2.5rem 0;
}
.faq-block h2 { margin-top: 0; }
.faq-block details { border-top: 1px solid var(--contour); padding: 0.4rem 0; }
.faq-block details:first-of-type { border-top: 0; }
.faq-block summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.6rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq-block summary::marker { color: var(--red); }
.faq-block details p { margin: 0.3rem 0 0.9rem; }

.sources-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.sources-list li { border-left: 3px solid var(--blue); padding-left: 1rem; }
.sources-list .src-name { font-weight: 700; margin: 0 0 0.2rem; }
.sources-list .src-why { margin: 0; font-size: 0.92rem; line-height: 1.55; }
.sources-list a { overflow-wrap: anywhere; font-size: 0.9rem; }

/* ---------- responsive ---------- */

@media (max-width: 56rem) {
  .hero-inner,
  .top-story,
  .stand-grid,
  .colophon-inner { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .hero-figure { order: -1; }
  .story-item { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .sheet-note { display: none; }

  .menu-toggle { display: inline-block; }
  .site-nav { display: none; margin-top: 0.8rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0; }
  .site-nav li { border-top: 1px solid var(--contour); }
  .site-nav a { display: block; padding: 0.85rem var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
