:root {
  --story-green: #63ea69;
  --story-green-deep: #57dd5d;
  --story-lime: #deff5c;
  --story-pink: #ff4fb6;
  --story-black: #111111;
  --story-white: #ffffff;
  --story-ink: rgba(17, 17, 17, 0.92);
  --story-muted: rgba(17, 17, 17, 0.68);
  --story-card: rgba(255, 255, 255, 0.86);
  --story-card-strong: rgba(255, 255, 255, 0.94);
  --story-border: 3px solid #111111;
  --story-shadow: 6px 6px 0 #111111;
  --story-radius: 22px;
  --story-radius-pill: 999px;
  --story-font-heading: 'Unbounded', system-ui, sans-serif;
  --story-font-body: 'Sora', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--story-font-body);
  color: var(--story-ink);
  background:
    radial-gradient(circle at top right, rgba(255, 79, 182, 0.16), transparent 22%),
    radial-gradient(circle at 18% 28%, rgba(222, 255, 92, 0.28), transparent 22%),
    linear-gradient(180deg, var(--story-green) 0%, #61e567 44%, var(--story-green-deep) 100%);
}

.story-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.story-fireflies {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.story-firefly {
  position: absolute;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 218, 1) 0%, rgba(255, 242, 111, 0.98) 42%, rgba(255, 242, 111, 0) 76%);
  box-shadow:
    0 0 12px rgba(255, 245, 145, 0.95),
    0 0 28px rgba(255, 242, 111, 0.82),
    0 0 46px rgba(255, 210, 70, 0.34);
  animation:
    story-float 11s linear infinite,
    story-blink 2.8s ease-in-out infinite;
}

.story-firefly-1 { top: 10%; left: 12%; }
.story-firefly-2 { top: 14%; right: 10%; animation-delay: -1.2s, -0.6s; }
.story-firefly-3 { top: 34%; left: 9%; animation-delay: -4.4s, -1.2s; }
.story-firefly-4 { top: 48%; right: 12%; animation-delay: -3.2s, -0.8s; }
.story-firefly-5 { top: 72%; left: 18%; animation-delay: -6.4s, -1.1s; }
.story-firefly-6 { top: 84%; right: 18%; animation-delay: -5.1s, -0.5s; }

.story-nav,
.story-main {
  position: relative;
  z-index: 1;
}

.story-nav {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: rgba(120, 239, 125, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.12);
}

.story-brand,
.story-nav-link {
  text-decoration: none;
}

.story-brand-word,
.story-nav-link,
.story-kicker,
.story-section-tag,
.story-card-label,
.story-timeline-marker,
.story-cta {
  font-family: var(--story-font-heading);
}

.story-brand-word {
  color: var(--story-black);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.story-brand-accent {
  color: var(--story-pink);
}

.story-nav-link {
  padding: 0.7rem 1rem;
  border: var(--story-border);
  border-radius: var(--story-radius-pill);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 4px 4px 0 #111111;
  color: var(--story-black);
  font-size: 0.68rem;
  font-weight: 700;
}

.story-main {
  padding: 1.1rem 1rem 3rem;
}

.story-hero {
  display: grid;
  gap: 1rem;
  padding-top: 0.6rem;
}

.story-hero-copy,
.story-hero-card,
.story-card,
.story-panel,
.story-close-card {
  --story-tilt-x: 0deg;
  --story-tilt-y: 0deg;
  --story-tilt-lx: 50%;
  --story-tilt-ly: 30%;
  border: var(--story-border);
  border-radius: var(--story-radius);
  box-shadow: var(--story-shadow);
  transform:
    perspective(1100px)
    rotateX(var(--story-tilt-x))
    rotateY(var(--story-tilt-y))
    translateZ(0);
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease;
  will-change: transform;
}

.story-hero-copy {
  padding: 1.2rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 255, 244, 0.92) 100%);
  position: relative;
  overflow: hidden;
}

.story-kicker,
.story-section-tag,
.story-card-label {
  margin: 0 0 0.65rem;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-kicker,
.story-section-tag {
  color: rgba(17, 17, 17, 0.72);
}

.story-title,
.story-section h2,
.story-close-card h2 {
  margin: 0;
  font-family: var(--story-font-heading);
  font-size: clamp(1.9rem, 8vw, 3.6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.story-lead,
.story-card p,
.story-panel p,
.story-close-card p,
.story-list li,
.story-timeline-body p {
  font-size: 0.97rem;
  line-height: 1.65;
}

.story-lead {
  max-width: 42rem;
  margin: 0.95rem 0 0;
}

.story-hero-card {
  padding: 1rem;
  background: linear-gradient(135deg, rgba(255, 79, 182, 0.18), rgba(255, 255, 255, 0.8));
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

.story-hero-copy::after,
.story-hero-card::after,
.story-card::after,
.story-panel::after,
.story-timeline-body::after,
.story-close-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at var(--story-tilt-lx) var(--story-tilt-ly),
      rgba(255, 255, 255, 0.22),
      rgba(255, 255, 255, 0) 30%
    );
  pointer-events: none;
}

.story-card-label {
  color: var(--story-pink);
}

.story-card-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.story-section {
  margin-top: 1.5rem;
}

.story-section-head {
  margin-bottom: 0.95rem;
}

.story-section-head h2 {
  font-size: clamp(1.45rem, 6vw, 2.4rem);
}

.story-grid {
  display: grid;
  gap: 1rem;
}

.story-card,
.story-panel,
.story-timeline-body,
.story-close-card {
  padding: 1rem;
  background: var(--story-card);
  position: relative;
  overflow: hidden;
}

.story-card h3,
.story-panel h3,
.story-timeline-body h3 {
  margin: 0 0 0.65rem;
  font-family: var(--story-font-heading);
  font-size: 1rem;
  line-height: 1.2;
}

.story-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
}

.story-hero-card .story-card-label,
.story-hero-card .story-card-text {
  position: relative;
  z-index: 2;
}

.story-hero-card .story-card-label {
  margin-top: 10.75rem;
}

.story-card p,
.story-panel p,
.story-timeline-body p,
.story-close-card p {
  margin: 0;
}

.story-split {
  display: grid;
  gap: 1rem;
}

.story-panel-dark {
  background:
    radial-gradient(circle at top right, rgba(255, 79, 182, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(17, 17, 17, 0.92) 0%, rgba(23, 23, 23, 0.9) 100%);
  color: rgba(255, 255, 255, 0.94);
}

.story-list {
  margin: 0;
  padding-left: 1rem;
}

.story-list li + li {
  margin-top: 0.65rem;
}

.story-timeline {
  display: grid;
  gap: 1rem;
  position: relative;
}

.story-timeline-item {
  display: grid;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.story-timeline-connector {
  position: absolute;
  left: 1.35rem;
  top: 2.2rem;
  bottom: 2.2rem;
  width: 4px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.18);
  overflow: hidden;
}

.story-timeline-connector::before {
  content: '';
  position: absolute;
  inset: -20% 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 79, 182, 0.65),
    rgba(222, 255, 92, 0.85),
    rgba(255, 255, 255, 0)
  );
  animation: story-connector-flow 3s linear infinite;
}

.story-timeline-glow {
  position: absolute;
  left: 50%;
  top: 14%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,79,182,0.78) 48%, rgba(255,79,182,0) 74%);
  transform: translateX(-50%);
  box-shadow: 0 0 18px rgba(255, 79, 182, 0.4), 0 0 30px rgba(222, 255, 92, 0.32);
  animation: story-connector-node 3s ease-in-out infinite;
}

.story-timeline-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.5rem 0.9rem;
  border: var(--story-border);
  border-radius: var(--story-radius-pill);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(222, 255, 92, 0.7));
  box-shadow: 4px 4px 0 #111111;
  font-size: 0.72rem;
  font-weight: 800;
}

.story-card-accent {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 79, 182, 0.12) 100%);
}

.story-close-card {
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 255, 244, 0.96) 100%);
}

.story-close-card h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.4rem, 6.5vw, 2.5rem);
}

.story-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  padding: 0.9rem 1.2rem;
  border: var(--story-border);
  border-radius: var(--story-radius-pill);
  background: linear-gradient(135deg, #f4ff9d 0%, var(--story-lime) 100%);
  box-shadow: var(--story-shadow);
  color: var(--story-black);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

@keyframes story-float {
  0% { transform: translate3d(0, 0, 0) scale(0.92); }
  25% { transform: translate3d(16px, -18px, 0) scale(1.08); }
  50% { transform: translate3d(-12px, -34px, 0) scale(0.96); }
  75% { transform: translate3d(18px, -10px, 0) scale(1.08); }
  100% { transform: translate3d(0, 0, 0) scale(0.92); }
}

@keyframes story-blink {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 1; }
}

@keyframes story-connector-flow {
  0% {
    transform: translateY(-34%);
  }
  100% {
    transform: translateY(34%);
  }
}

@keyframes story-connector-node {
  0%, 100% {
    top: 14%;
    transform: translateX(-50%) scale(0.92);
  }
  50% {
    top: 82%;
    transform: translateX(-50%) scale(1.08);
  }
}

@media (min-width: 760px) {
  .story-nav {
    padding: 1rem 1.5rem;
  }

  .story-brand-word {
    font-size: 1.2rem;
  }

  .story-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
  }

  .story-hero {
    grid-template-columns: 1.25fr 0.75fr;
    align-items: stretch;
  }

  .story-hero-card {
    min-height: 100%;
  }

  .story-hero-card .story-card-label {
    margin-top: 12rem;
  }

  .story-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .story-grid-truth {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-split {
    grid-template-columns: 1fr 1fr;
  }

  .story-timeline-item {
    grid-template-columns: 92px 1fr;
    align-items: start;
  }

  .story-timeline-connector {
    left: 44px;
    top: 1.6rem;
    bottom: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-firefly {
    animation: none;
    opacity: 0.55;
  }

  .story-hero-copy,
  .story-hero-card,
  .story-card,
  .story-panel,
  .story-close-card {
    transform: none;
  }
}
