.merrow-story {
  
  --frost:       #DEE3E1;
  --frost-deep:  #C3CCC8;
  --cocoa:       #1E1A17;
  --cocoa-mid:   #574E47;
  --temper:      #B45F16;

  
  --ms-header: 84px;

  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --f-mono:    'IBM Plex Mono', ui-monospace, 'Courier New', monospace;

  background: var(--frost);
  color: var(--cocoa);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

.merrow-story p { margin: 0 0 1.1em; }
.merrow-story p:last-child { margin-bottom: 0; }

.ms-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.ms-hero {
  padding: clamp(72px, 12vw, 150px) 0 clamp(56px, 9vw, 110px);
}
.ms-hero-inner { max-width: 780px; }

.ms-eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--temper);
  margin: 0 0 clamp(20px, 4vw, 36px);
}

.ms-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(46px, 8.5vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 clamp(24px, 4vw, 40px);
}
.ms-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--temper);
}

.ms-lead {
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.6;
  max-width: 60ch;
  color: var(--cocoa-mid);
}
.ms-lead strong {
  color: var(--cocoa);
  font-weight: 500;
}

.ms-cue {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cocoa-mid);
  margin-top: clamp(40px, 7vw, 72px);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ms-cue span {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--cocoa-mid);
  transform-origin: left;
  animation: ms-cue-pull 2.4s ease-in-out infinite;
}
@keyframes ms-cue-pull {
  0%, 100% { transform: scaleX(0.4); opacity: 0.4; }
  50%      { transform: scaleX(1);   opacity: 1; }
}

.ms-timeline { position: relative; }

.ms-grid {
  display: grid;
  grid-template-columns: 60px minmax(0, 0.92fr) minmax(0, 1fr);
  gap: 0 clamp(28px, 4vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.ms-rail {
  position: relative;
  grid-column: 1;
}
.ms-rail-inner {
  position: sticky;
  top: var(--ms-header);
  height: calc(100vh - var(--ms-header));
}
.ms-rail svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ms-rail-base   { stroke: var(--frost-deep); }
.ms-rail-draw   { stroke: var(--temper); }
.ms-rail path {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.ms-rail-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--temper);
  margin: -4.5px 0 0 -4.5px;
  box-shadow: 0 0 0 5px rgba(180, 95, 22, 0.14);
}
.ms-rail-scale {
  position: absolute;
  left: 0;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cocoa-mid);
  opacity: 0.55;
  white-space: nowrap;
}

.ms-sticky { grid-column: 2; }
.ms-panel {
  position: sticky;
  top: var(--ms-header);
  padding: clamp(24px, 5vh, 56px) 0;
}

.ms-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--frost-deep);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.ms-year {
  font-family: var(--f-display);
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.ms-temp {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--temper);
  transition: opacity 0.32s ease;
}
.ms-readout.is-swapping .ms-year { opacity: 0; transform: translateY(-8px); }
.ms-readout.is-swapping .ms-temp { opacity: 0; }

.ms-frames {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--frost-deep);
  overflow: hidden;
}
.ms-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ms-frame.is-active { opacity: 1; }
.ms-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ms-shot {
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cocoa-mid);
  text-align: center;
  max-width: 24ch;
}
.ms-shot::before {
  content: "fotka";
  display: block;
  color: var(--temper);
  margin-bottom: 8px;
}

.ms-caption {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cocoa-mid);
  margin-top: 12px;
}

.ms-chapters { grid-column: 3; }

.ms-chapter {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 0;
  opacity: 0.32;
  transition: opacity 0.5s ease;
}
.ms-chapter.is-active { opacity: 1; }

.ms-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--temper);
  margin: 0 0 14px;
}
.ms-h {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 3.9vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.ms-body { max-width: 46ch; color: var(--cocoa-mid); }
.ms-body strong { color: var(--cocoa); font-weight: 500; }

.ms-chapter--quiet { min-height: 118vh; }
.ms-chapter--quiet .ms-h {
  font-size: clamp(30px, 4.4vw, 52px);
  font-style: italic;
  font-weight: 300;
  max-width: 18ch;
}

.ms-outro {
  border-top: 1px solid var(--frost-deep);
  margin-top: clamp(60px, 10vw, 120px);
  padding: clamp(60px, 10vw, 120px) 0 clamp(72px, 12vw, 140px);
}
.ms-outro-inner { max-width: 680px; }
.ms-outro .ms-h { margin-bottom: 18px; }

.ms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.ms-btn {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 26px;
  border: 1px solid var(--cocoa);
  color: var(--cocoa);
  transition: background 0.2s ease, color 0.2s ease;
}
.ms-btn:hover { background: var(--cocoa); color: var(--frost); }
.ms-btn--solid {
  background: var(--temper);
  border-color: var(--temper);
  color: #fff;
}
.ms-btn--solid:hover { background: var(--cocoa); border-color: var(--cocoa); color: #fff; }
.ms-btn:focus-visible {
  outline: 2px solid var(--temper);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .merrow-story { font-size: 16px; }
  .ms-wrap, .ms-grid { padding: 0 20px; }

  .ms-grid {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 0 18px;
  }
  .ms-rail { grid-column: 1; grid-row: 1 / span 2; }
  .ms-sticky { grid-column: 2; grid-row: 1; }
  .ms-chapters { grid-column: 2; grid-row: 2; }

  .ms-rail-scale { display: none; }
  .ms-panel { padding: 16px 0 20px; }
  .ms-frames { aspect-ratio: 3 / 2; }
  .ms-chapter { min-height: 78vh; padding: 6vh 0; }
  .ms-chapter--quiet { min-height: 90vh; }
  .ms-body { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .merrow-story *,
  .merrow-story *::before {
    animation: none !important;
    transition: none !important;
  }
  .ms-chapter { opacity: 1; }
  .ms-frame { opacity: 0; }
  .ms-frame.is-active { opacity: 1; }
}

body:has(.merrow-story) .overall-wrapper { overflow: visible; }
