:root {
  color-scheme: light;
  --bg: #f4f6ef;
  --ink: #151917;
  --muted: #606961;
  --surface: #ffffff;
  --surface-soft: #edf3e6;
  --line: #d7ddd2;
  --green: #65b93b;
  --green-dark: #2f7f4c;
  --teal: #08878d;
  --amber: #bd7a17;
  --shadow: 0 24px 70px rgba(20, 28, 22, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.story-nav {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(244, 246, 239, 0.78);
  border-bottom: 1px solid rgba(215, 221, 210, 0.74);
  backdrop-filter: blur(18px);
}

.story-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
}

.story-brand::before {
  content: "";
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #151917;
  box-shadow: inset 0 0 0 9px #151917, inset 0 0 0 11px #fff;
}

.story-nav nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.story-hero {
  min-height: 86vh;
  display: grid;
  align-content: center;
  padding: 120px clamp(20px, 7vw, 96px) 80px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(244, 246, 239, 0.98), rgba(244, 246, 239, 0.78)),
    url("assets/story/morpho-step-04.jpg") center / cover;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.story-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: 72px;
  line-height: 1;
  letter-spacing: 0;
}

.story-hero p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 22px;
}

.hero-link,
.closing a {
  display: inline-flex;
  width: max-content;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 34px;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.scrolly {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(24px, 4vw, 58px);
  padding: 68px clamp(20px, 5vw, 72px) 96px;
}

.visual-stage {
  position: sticky;
  top: 88px;
  height: calc(100vh - 116px);
  align-self: start;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
}

.screen-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfbf8;
}

.window-bar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.window-bar span:nth-child(1) {
  background: #ee6359;
}

.window-bar span:nth-child(2) {
  background: #f6bf43;
}

.window-bar span:nth-child(3) {
  background: #60c85f;
}

.window-bar strong {
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

#stage-image {
  display: block;
  width: 100%;
  height: calc(100% - 38px);
  min-height: 0;
  object-fit: cover;
  object-position: center top;
  transition: opacity 220ms ease, transform 420ms ease;
}

#stage-image.is-swapping {
  opacity: 0;
  transform: scale(1.015);
}

.stage-meta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  background: var(--surface);
}

.stage-meta span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.stage-meta strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.22;
}

.stage-meta p {
  margin: 8px 0 0;
  color: var(--muted);
}

.steps {
  display: grid;
  gap: 18vh;
  padding-top: 12vh;
  padding-bottom: 20vh;
}

.story-step {
  min-height: 60vh;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 38px);
  background: rgba(255, 255, 255, 0.82);
  opacity: 0.46;
  transform: translateY(18px);
  transition: opacity 240ms ease, transform 240ms ease, border-color 240ms ease;
}

.story-step.is-active {
  border-color: #abd691;
  opacity: 1;
  transform: translateY(0);
}

.step-label {
  margin: 0 0 16px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}

.story-step h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.16;
  letter-spacing: 0;
}

.story-step p:not(.step-label) {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.chat-bubble {
  max-width: 430px;
  border-radius: 8px;
  padding: 18px 20px;
  font-size: 24px;
  line-height: 1.36;
  font-weight: 800;
}

.chat-bubble.friend {
  background: #ffffff;
  border: 1px solid var(--line);
}

.chat-bubble.me {
  margin-left: auto;
  background: #dcefd1;
  color: #152315;
}

.closing {
  padding: 96px clamp(20px, 7vw, 96px);
  background: #111612;
  color: #fff;
}

.closing h2 {
  max-width: 920px;
  margin: 0;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: 0;
}

@media (max-width: 1020px) {
  .story-hero h1 {
    font-size: 56px;
  }

  .scrolly {
    grid-template-columns: 1fr;
  }

  .visual-stage {
    z-index: 5;
    top: 78px;
    height: auto;
  }

  .screen-shell {
    max-height: 54vh;
  }

  #stage-image {
    height: 44vh;
  }

  .steps {
    gap: 42px;
    padding-top: 24px;
    padding-bottom: 32px;
  }

  .story-step {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .story-nav {
    padding: 14px 18px;
  }

  .story-nav nav {
    gap: 12px;
    font-size: 13px;
  }

  .story-hero {
    min-height: 76vh;
    padding: 98px 18px 56px;
  }

  .story-hero h1 {
    font-size: 42px;
  }

  .story-hero p {
    font-size: 18px;
  }

  .scrolly {
    padding: 38px 18px 58px;
  }

  #stage-image {
    height: 34vh;
  }

  .stage-meta strong {
    font-size: 19px;
  }

  .story-step h2 {
    font-size: 27px;
  }

  .chat-bubble {
    font-size: 20px;
  }

  .closing h2 {
    font-size: 34px;
  }
}
