:root {
  --ink: #101215;
  --paper: #f3efe6;
  --paper-deep: #d9d0c1;
  --green: #c9f34b;
  --pink: #f35d8b;
  --orange: #f68d46;
  --blue: #4358d8;
  --line: rgba(16, 18, 21, 0.22);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 280px;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 280px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
}

a, button { color: inherit; font: inherit; }

button { border: 0; cursor: pointer; }

a:focus-visible,
button:focus-visible,
.skip-link:focus {
  outline: 3px solid var(--pink);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--green);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.weather-header,
.weather-footer {
  position: relative;
  z-index: 20;
  width: min(1400px, calc(100% - 68px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.weather-header a,
.weather-footer a { text-decoration: none; }

.weather-header a:hover,
.weather-header a:focus-visible,
.weather-footer a:hover,
.weather-footer a:focus-visible { color: var(--pink); }

.weather-header time { justify-self: end; }

.weather-hero {
  position: relative;
  min-height: calc(100svh - 62px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px 24px 100px;
  overflow: hidden;
  text-align: center;
}

.hero-kicker,
.hero-foot,
.hero-cue,
.step-kicker,
.visual-topline,
.visual-key,
.visual-readout,
.pin-tool,
.weather-choice,
.weather-response,
.ending-actions,
.weather-footer {
  font-family: var(--sans);
  text-transform: uppercase;
}

.hero-kicker,
.hero-foot,
.hero-cue,
.step-kicker,
.visual-topline,
.visual-key,
.visual-readout,
.pin-tool,
.weather-choice,
.weather-response,
.ending-actions,
.weather-footer {
  font-size: 10px;
  font-weight: 700;
}

.weather-hero .hero-kicker { position: relative; z-index: 4; margin: 0 0 24px; color: var(--blue); }

.weather-hero h1 {
  position: relative;
  z-index: 3;
  margin: 0;
  font-size: clamp(58px, 10vw, 152px);
  font-weight: 400;
  line-height: 0.79;
  letter-spacing: -0.05em;
}

.weather-hero h1 span,
.weather-hero h1 em { display: block; }

.weather-hero h1 span { margin-left: -9vw; }

.weather-hero h1 em {
  margin: 7px 0 0 9vw;
  color: var(--pink);
  font-style: italic;
  white-space: nowrap;
}

.hero-deck {
  position: relative;
  z-index: 4;
  margin: 40px 0 0;
  color: #625f58;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.18;
}

.hero-cue {
  position: absolute;
  bottom: 54px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding-bottom: 7px;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}

.hero-cue span { color: var(--pink); font-size: 19px; }

.hero-foot {
  position: absolute;
  right: 0;
  bottom: 58px;
  left: 0;
  width: min(1400px, calc(100% - 68px));
  margin: auto;
  display: flex;
  justify-content: space-between;
  color: #817b70;
}

.hero-sun {
  position: absolute;
  top: 12%;
  right: 12%;
  width: clamp(120px, 18vw, 260px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: rotate(17deg);
}

.hero-sun::before,
.hero-sun::after,
.hero-sun span {
  position: absolute;
  inset: 15%;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.hero-sun::after { inset: 31%; background: var(--green); border-color: transparent; }

.hero-sun span { inset: 47%; background: var(--ink); border: 0; }

.weather-study {
  min-height: 300vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
}

.sticky-visual {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 600px;
  padding: 28px clamp(24px, 4vw, 62px) 30px;
  overflow: hidden;
}

.visual-topline {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  color: var(--green);
}

.visual-topline strong { color: var(--paper); font-size: 24px; font-weight: 400; }

.visual-key {
  position: absolute;
  top: 78px;
  left: clamp(24px, 4vw, 62px);
  z-index: 4;
  display: grid;
  gap: 9px;
  color: var(--paper-deep);
}

.visual-key span { display: flex; align-items: center; gap: 8px; }

.visual-key i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
  background: var(--paper-deep);
}

.visual-key .key-drift { background: var(--pink); }
.visual-key .key-pin { background: var(--green); }

.weather-field {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(43vw, 620px);
  aspect-ratio: 1;
  border: 1px solid rgba(243, 239, 230, 0.27);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.weather-field::before,
.weather-field::after {
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(243, 239, 230, 0.18);
  border-radius: 50%;
  content: "";
}

.weather-field::after { inset: 29%; border-color: rgba(201, 243, 75, 0.22); }

#weather-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.field-label {
  position: absolute;
  z-index: 3;
  color: var(--paper-deep);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.field-label-top { top: 7%; left: 50%; transform: translateX(-50%); }
.field-label-bottom { bottom: 8%; left: 50%; transform: translateX(-50%); white-space: nowrap; }

.visual-readout {
  position: absolute;
  bottom: 34px;
  left: clamp(24px, 4vw, 62px);
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--paper-deep);
}

.visual-readout strong { color: var(--green); font-family: var(--serif); font-size: 42px; font-weight: 400; }

.pin-tool,
.step-pin {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--green);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.pin-tool { position: absolute; right: clamp(24px, 4vw, 62px); bottom: 35px; min-width: 126px; }

.pin-tool b,
.step-pin span { color: var(--pink); font-size: 20px; font-weight: 400; line-height: 0.5; }

.user-pin {
  position: absolute;
  z-index: 5;
  width: 14px;
  height: 14px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--green);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px rgba(201, 243, 75, 0.2);
}

.user-pin span {
  position: absolute;
  top: 19px;
  left: 50%;
  color: var(--green);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.story-steps { padding: 0 clamp(28px, 7vw, 120px) 0 clamp(24px, 5vw, 80px); }

.story-step {
  min-height: 100vh;
  display: flex;
  align-items: center;
  opacity: 0.28;
  transition: opacity 260ms ease;
}

.story-step.is-active { opacity: 1; }

.step-copy { max-width: 500px; }

.step-kicker { margin: 0 0 26px; color: var(--green); }

.step-copy h2 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.step-copy > p:not(.step-kicker):not(.pin-readout) {
  max-width: 370px;
  margin: 30px 0 0;
  color: var(--paper-deep);
  font-size: 18px;
  line-height: 1.3;
}

.scroll-cue {
  display: inline-flex;
  gap: 24px;
  margin-top: 48px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--pink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.scroll-cue span { color: var(--pink); font-size: 18px; }

.chapter-stat { display: flex; align-items: center; gap: 14px; margin-top: 36px; font-family: var(--sans); text-transform: uppercase; }

.chapter-stat strong { color: var(--pink); font-family: var(--serif); font-size: 52px; font-weight: 400; }

.chapter-stat span { color: var(--paper-deep); font-size: 10px; font-weight: 700; line-height: 1.2; }

.step-pin { min-width: 152px; margin-top: 31px; }

.pin-readout { margin: 14px 0 0; color: var(--paper-deep); font-family: var(--sans); font-size: 10px; text-transform: uppercase; }

.pin-readout strong { color: var(--green); font-family: var(--serif); font-size: 24px; font-weight: 400; }

.weather-ending {
  min-height: 78svh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  padding: 120px max(34px, calc((100% - 1400px) / 2)) 100px;
  background: var(--green);
}

.weather-ending .hero-kicker { margin: 0 0 24px; color: var(--blue); }

.weather-ending h2 { margin: 0; font-size: clamp(46px, 7vw, 104px); font-weight: 400; line-height: 0.84; letter-spacing: -0.05em; }

.weather-ending h2 em { color: var(--pink); font-style: italic; }

.weather-choice { display: flex; flex-wrap: wrap; gap: 8px; align-self: center; }

.weather-choice button {
  padding: 13px 15px;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.weather-choice button:hover,
.weather-choice button.is-selected { color: var(--paper); background: var(--ink); }

.weather-response { grid-column: 2; margin: -100px 0 0; color: var(--blue); line-height: 1.3; }

.ending-actions { grid-column: 1 / -1; display: flex; gap: 34px; padding-top: 30px; border-top: 1px solid var(--ink); }

.ending-actions a { text-decoration: none; }
.ending-actions a:hover { color: var(--pink); }
.ending-actions span { margin-left: 15px; font-size: 18px; }

.weather-footer { border-bottom: 0; color: #817b70; }
.weather-footer span:nth-child(2) { justify-self: center; color: var(--pink); }
.weather-footer span:last-child { justify-self: end; }

body[data-weather="cloudy"] .weather-ending { background: var(--paper-deep); }
body[data-weather="electric"] .weather-ending { background: var(--pink); }
body[data-weather="electric"] .weather-ending h2 em { color: var(--green); }

@media (max-width: 900px) {
  .weather-header, .weather-footer, .hero-foot { width: min(100% - 32px, 760px); }
  .weather-study { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr); }
  .weather-field { width: min(54vw, 500px); }
  .story-steps { padding-right: 30px; padding-left: 30px; }
  .step-copy h2 { font-size: clamp(36px, 6vw, 58px); }
  .step-copy > p:not(.step-kicker):not(.pin-readout) { font-size: 16px; }
}

@media (max-width: 680px) {
  .weather-header, .weather-footer { min-height: 56px; }
  .weather-header, .weather-footer, .hero-foot { width: calc(100% - 28px); }
  .weather-header span { justify-self: center; }
  .weather-hero { min-height: calc(100svh - 56px); padding-top: 100px; }
  .weather-hero h1 { font-size: clamp(49px, 14vw, 92px); line-height: 0.82; }
  .weather-hero h1 span { margin-left: -4vw; }
  .weather-hero h1 em { margin-left: 4vw; white-space: normal; }
  .hero-deck { margin-top: 30px; font-size: 17px; }
  .hero-sun { top: 11%; right: -8%; width: 150px; }
  .hero-foot { bottom: 24px; }
  .hero-cue { bottom: 72px; }
  .weather-study { min-height: 0; display: block; }
  .sticky-visual { position: sticky; height: 80svh; min-height: 500px; padding: 22px 16px; }
  .visual-key { top: 68px; left: 16px; }
  .weather-field { width: min(82vw, 420px); }
  .visual-readout { bottom: 22px; left: 16px; }
  .pin-tool { right: 16px; bottom: 21px; }
  .story-steps { padding: 0 28px; background: var(--ink); }
  .story-step { min-height: 86svh; opacity: 1; }
  .story-step:first-child { min-height: 76svh; }
  .story-step:last-child { min-height: 86svh; }
  .step-copy h2 { font-size: clamp(40px, 12vw, 66px); }
  .weather-ending { min-height: 82svh; display: block; padding: 92px 28px 70px; }
  .weather-ending h2 { font-size: clamp(48px, 13vw, 82px); }
  .weather-choice { margin-top: 52px; }
  .weather-response { margin: 20px 0 0; }
  .ending-actions { margin-top: 70px; padding-top: 25px; display: grid; gap: 18px; }
  .weather-footer { grid-template-columns: 1fr auto; }
  .weather-footer span:nth-child(2) { display: none; }
}

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