:root {
  --page-background: #f7f5f0;
  --text: #1e1e1e;
  --muted: #656565;
  --annotation-line: rgba(25, 25, 25, 0.9);
  --image-ratio: 1272 / 920;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-background);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

img {
  display: block;
}

.page {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 64px 32px 40px;
}

.intro {
  width: min(1000px, 100%);
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  max-width: 1000px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(46px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.dek {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.5;
  color: var(--muted);
}

.comparison-section {
  width: 100%;
}

.comparison {
  position: relative;
  width: 100%;
  aspect-ratio: var(--image-ratio);
  overflow: hidden;
  background: #cfc8bb;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.13);
  touch-action: none;
  user-select: none;
}

.comparison-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.comparison-image-after {
  z-index: 1;
}

.before-layer {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
  z-index: 2;
}

.comparison-image-before {
  width: 100vw;
  max-width: none;
}

.year-label {
  position: absolute;
  top: 3%;
  z-index: 7;
  padding: 7px 10px;
  background: rgba(15, 15, 15, 0.74);
  color: white;
  font-size: clamp(12px, 1.3vw, 16px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.year-before {
  left: 2.5%;
}

.year-after {
  right: 2.5%;
}

.annotation {
  position: absolute;
  z-index: 6;
  pointer-events: none;
}

.annotation-text {
  width: clamp(165px, 17vw, 235px);
  padding: 9px 10px;
  background: rgba(248, 247, 243, 0.94);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.09);
}

.annotation-text strong,
.annotation-text span {
  display: block;
}

.annotation-text strong {
  margin-bottom: 4px;
  font-size: clamp(12px, 1.4vw, 17px);
  line-height: 1.15;
}

.annotation-text span {
  font-size: clamp(10px, 1.1vw, 14px);
  line-height: 1.4;
  color: #333;
}

.annotation-retreat {
  left: 8%;
  top: 9%;
}

.annotation-land {
  left: 9%;
  top: 47%;
}

.annotation-south {
  left: 9%;
  top: 68%;
}

.annotation-lines {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.annotation-lines polyline {
  fill: none;
  stroke: var(--annotation-line);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.annotation-lines circle {
  fill: var(--page-background);
  stroke: var(--annotation-line);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 8;
  width: 3px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.12),
    0 0 12px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
  pointer-events: none;
}

.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.97);
  color: #202020;
  font: inherit;
  font-size: 22px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.comparison-range {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
}

.instruction {
  margin: 13px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.source {
  margin-top: 34px;
  border-top: 1px solid rgba(0, 0, 0, 0.16);
  padding-top: 15px;
}

.source p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 760px) {
  .page {
    padding: 34px 15px 28px;
  }

  .intro {
    margin-bottom: 24px;
  }

  .comparison {
    aspect-ratio: 4 / 5;
  }

  .annotation-text span {
    display: none;
  }

  .annotation-text {
    width: auto;
    max-width: 145px;
    padding: 6px 7px;
  }

  .annotation-retreat {
    left: 4%;
    top: 10%;
  }

  .annotation-land {
    left: 4%;
    top: 46%;
  }

  .annotation-south {
    left: 4%;
    top: 70%;
  }

  .slider-handle {
    width: 46px;
    height: 46px;
    font-size: 19px;
  }
}