:root {
  --black: #171717;
  --gray-dark: #4a4a4a;
  --gray: #999999;
  --gray-light: #dddddd;
  --gray-faint: #f4f4f2;
  --white: #ffffff;
  --heat: #d85435;
  --green: #526b58;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 48px;
}

.intro {
  max-width: 820px;
  margin-bottom: 56px;
}

.kicker {
  margin: 0 0 18px;
  color: var(--heat);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  max-width: 750px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.6rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.dek {
  max-width: 570px;
  margin: 30px 0 24px;
  color: var(--gray-dark);
  font-size: 1.05rem;
  line-height: 1.55;
}

.graphic-section {
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  padding: 14px 0 28px;
}

.graphic-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.graphic-header p {
  margin: 0;
  color: var(--gray-dark);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

svg {
  display: block;
  width: 100%;
  height: auto;
}

#background {
  fill: var(--gray-faint);
}

.divider {
  stroke: #c8c8c8;
  stroke-width: 1;
}

.panel-number {
  fill: var(--gray);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
}

.panel-title {
  fill: var(--black);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 1px;
}

.panel-description {
  fill: var(--gray-dark);
  font-size: 14px;
}

.sun circle {
  fill: var(--heat);
}

.sun line {
  stroke: var(--heat);
  stroke-width: 2;
}

.sun {
  transform-origin: 600px 55px;
  transition:
    transform 1.2s ease,
    opacity 1.2s ease;
}

.buildings rect {
  fill: none;
  stroke: var(--black);
  stroke-width: 2;
}

.buildings line {
  stroke: var(--gray);
  stroke-width: 1.5;
}

.sidewalk {
  fill: #d7d7d2;
  transition: fill 1.5s ease;
}

.road {
  fill: #303030;
  transition: fill 1.5s ease;
}

.road-line {
  stroke: var(--white);
  stroke-width: 2;
  stroke-dasharray: 24 18;
  opacity: 0.55;
}

.temperature-label {
  fill: var(--gray-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
}

.temperature-value {
  fill: var(--black);
  font-size: 52px;
  font-weight: 400;
  letter-spacing: -3px;
  transition: fill 0.8s ease;
}

.annotation {
  fill: var(--gray-dark);
  font-size: 13px;
}

.heat-lines {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.heat-lines path {
  fill: none;
  stroke: var(--heat);
  stroke-width: 3;
  stroke-linecap: round;
}

.trees line {
  stroke: var(--black);
  stroke-width: 7;
  stroke-linecap: round;
}

.trees circle {
  fill: var(--green);
  stroke: var(--gray-faint);
  stroke-width: 3;
}

.tree {
  transform-box: fill-box;
  transform-origin: bottom center;
  transition: transform 1.2s ease;
}

#treeShadow {
  fill: rgba(23, 23, 23, 0.14);
  transform-box: fill-box;
  transform-origin: center;
  transform: scaleX(0.65);
  transition: transform 1.3s ease;
}

.controls {
  display: flex;
  gap: 10px;
  padding-top: 22px;
}

button {
  min-width: 155px;
  padding: 12px 18px;
  border: 1px solid var(--black);
  border-radius: 0;
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

button:hover {
  background: var(--heat);
  border-color: var(--heat);
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

.reset-button {
  background: transparent;
  color: var(--black);
}

.reset-button:hover {
  background: var(--gray-faint);
  border-color: var(--black);
  color: var(--black);
}

.footer-note {
  max-width: 590px;
  padding-top: 20px;
  color: var(--gray-dark);
  font-size: 0.72rem;
  line-height: 1.5;
}

/* Animated state */

body.heat-active #leftRoad {
  fill: #55332e;
}

body.heat-active #leftSidewalk {
  fill: #c98d78;
}

body.heat-active #rightRoad {
  fill: #343b37;
}

body.heat-active #rightSidewalk {
  fill: #b4b9ae;
}

body.heat-active #leftTemperature {
  fill: var(--heat);
}

body.heat-active #rightTemperature {
  fill: var(--green);
}

body.heat-active .sun {
  transform: scale(1.12);
}

body.heat-active .heat-lines {
  opacity: 1;
}

body.heat-active .heat-lines path {
  animation: heatRise 1.35s ease-in-out infinite alternate;
}

body.heat-active .heat-lines path:nth-child(2) {
  animation-delay: 0.2s;
}

body.heat-active .heat-lines path:nth-child(3) {
  animation-delay: 0.4s;
}

body.heat-active .heat-lines path:nth-child(4) {
  animation-delay: 0.6s;
}

body.heat-active .tree {
  transform: scale(1.025);
}

body.heat-active #treeShadow {
  transform: scaleX(1.15);
}

@keyframes heatRise {
  from {
    transform: translateY(5px);
    opacity: 0.25;
  }

  to {
    transform: translateY(-6px);
    opacity: 0.9;
  }
}

@media (max-width: 700px) {
  .page {
    width: min(100% - 24px, 1180px);
    padding-top: 42px;
  }

  .intro {
    margin-bottom: 38px;
  }

  h1 {
    letter-spacing: -0.05em;
  }

  .graphic-header {
    display: none;
  }

  .graphic-section {
    overflow-x: auto;
    padding-top: 10px;
  }

  svg {
    min-width: 750px;
  }

  .controls {
    position: sticky;
    left: 0;
    flex-direction: column;
    width: calc(100vw - 24px);
  }

  button {
    width: 100%;
  }
}

.no-break {
  white-space: nowrap;
}