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

:root {
  --header-h: 0px;
}

body {
  background: #0d0d0d;
  color: #e8e2d4;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
}

/* ── Scrollytelling layout ── */
#scroll-root {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Sticky graphic fills viewport */
#sticky-graphic {
  position: sticky;
  top: 0px;
  height: 100svh;
  width: 100%;
  overflow: hidden;
}

#svg-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#main-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1373 / 555;
  max-height: 100%;
  display: block;
  flex-shrink: 0;
}

/* ── Article: sits on top of sticky ── */
article {
  position: relative;
  padding: 0 2rem 0 3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  max-width: 80%;
  min-width: 260px;
  z-index: 1;
}

/* ── Step cards ── */
.scroll-step {
  margin: 0 0 80vh 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  background: rgba(13, 13, 13, 0.70);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1.75rem 2rem;
  border-radius: 2px;
  border: 1px solid #2a2a2a;
  border-left: 3px solid #e63946;
  pointer-events: all;
}

.scroll-step:first-child {
  margin-top: var(--first-step-mt, -65vh);
}

.scroll-step:last-child  { margin-bottom: 60vh; }

.scroll-step.is-active {
  opacity: 1;
  transform: translateY(0);
}

.step-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: #e63946;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.step-headline {
  font-family: Georgia, 'DM Serif Display', serif;
  font-size: clamp(20px, 3.5vw, 22px);
  line-height: 1.2;
  color: #e8e2d9;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.step-body {
  font-size: clamp(15px, 3vw, 18px);
  line-height: 1.65;
  color: rgba(232, 226, 217, 0.75);
}

/* ── Progress dots ── */
#progress-dots {
  position: fixed;
  bottom: 40px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background: #e63946;
}

/* ── Scroll hint ── */
#scroll-prompt {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #6b6459;
  transition: opacity 0.5s;
  white-space: nowrap;
  text-align: center;
  z-index: 10;
  pointer-events: none;
}

#scroll-arrow {
  display: block;
  margin-bottom: 4px;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

/* ── Tablet ── */

@media (min-width: 769px) and (max-width: 1024px) {
  article {
    width: 85%;
    max-width: 90%;
  }

  #main-svg {
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  .step-headline { font-size: clamp(20px, 3vw, 22px); }
  .step-body     { font-size: clamp(15px, 3vw, 18px); }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  article {
    width: 90%;
    max-width: 95%;
    min-width: 0;
    padding: 0 1.25rem;
  }

  .scroll-step {
    padding: 1.25rem;
    margin: 0 0 70vh 0;
  }

  .scroll-step:first-child { margin-top: var(--first-step-mt, -100vh); }
  .scroll-step:last-child  { margin-bottom: 40vh; }

  .step-headline { font-size: clamp(20px, 3vw, 22px); }
  .step-body     { font-size: clamp(15px, 3vw, 18px); }

  #progress-dots {
    top: calc(var(--header-h) + 20px);
    bottom: auto;
    right: 16px;
  }

  #main-svg {
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  #scroll-prompt {
    font-size: 10px;
    white-space: normal;
    width: 60%;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .step-headline { font-size: clamp(16px, 3vw, 22px); }
  .step-body     { font-size: clamp(13px, 3vw, 18px); }
}