:root {
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
  --brand: #00b3a4;
  --accent: #7c6dfd;
  --accent-2: #00b3a4;
  --accent-3: #ff6a5b;
  --bg: #fbfbfc;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.85);
  --text: #0f1222;
  --muted: #60667a;
  --border: rgba(15, 18, 34, 0.08);
  --radius: 18px;
  --shadow-sm: 0 10px 32px rgba(15, 18, 34, 0.08);
  --shadow-md: 0 18px 46px rgba(15, 18, 34, 0.12);
  --transition: 0.3s ease;
}

body[data-theme="dark"] {
  --bg: #0d1019;
  --surface: #1a1f2b;
  --surface-soft: rgba(26, 31, 43, 0.88);
  --text: #f2f3f8;
  --muted: #b7bdd2;
  --border: rgba(245, 246, 255, 0.08);
  --shadow-sm: 0 18px 40px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 32px 60px rgba(0, 0, 0, 0.68);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
}

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

.story-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(6rem, 10vw, 8rem) 2rem;
  text-align: center;
  background: var(--bg);
}

.story-hero-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  z-index: 1;
}

.story-text .eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--accent) 58%, var(--text) 42%);
  margin-bottom: 0.9rem;
}

.story-text h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.2vw, 3.3rem);
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.story-text p {
  margin: 1.4rem auto 0;
  font-size: 1.18rem;
  line-height: 1.85;
  max-width: 680px;
  color: var(--muted);
}

.story-text strong {
  color: var(--text);
}

.story-text em {
  font-style: italic;
  color: color-mix(in oklab, var(--accent) 64%, var(--text) 36%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  z-index: 0;
}

.orb-left {
  width: 420px;
  height: 420px;
  top: -110px;
  left: -140px;
  background: var(--accent-3);
  animation: floatLeft 18s ease-in-out infinite alternate;
}

.orb-right {
  width: 380px;
  height: 380px;
  bottom: -140px;
  right: -120px;
  background: var(--accent-2);
  animation: floatRight 16s ease-in-out infinite alternate;
}

@keyframes floatLeft {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(38px, -36px); }
}

@keyframes floatRight {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-42px, 30px); }
}

.story-timeline {
  padding: clamp(4rem, 8vw, 6rem) 2rem;
  background: linear-gradient(
    180deg,
    var(--bg),
    color-mix(in oklab, var(--accent) 4%, var(--bg) 96%)
  );
}

.story-timeline h2 {
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 auto 3rem;
  color: var(--text);
}

.story-timeline .timeline-cards {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* Garantir 2 colunas em todas as telas menores que 1200px */
@media (max-width: 1199px) {
  .story-timeline .timeline-cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1200px) {
  .story-timeline .timeline-cards {
    grid-template-columns: repeat(4, 1fr) !important;
    max-width: 1400px;
    padding: 0 2rem;
  }
}

.timeline-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem 1.7rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(24px);
  width: 100%;
  min-width: 0;
}

.timeline-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.timeline-card span {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.85rem;
}

.timeline-card h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-heading);
  color: var(--accent);
}

.timeline-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.story-prose {
  max-width: 820px;
  margin: clamp(3rem, 8vw, 4rem) auto;
  display: grid;
  gap: 1.6rem;
  padding: 0 2rem;
}

.story-block {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(24px);
}

.story-block.visible {
  opacity: 1;
  transform: translateY(0);
}

.story-block:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.story-block h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent);
}

.story-block p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.story-ending {
  text-align: center;
  padding: clamp(5rem, 10vw, 8rem) 1.6rem;
  background: radial-gradient(circle at center, rgba(124, 109, 253, 0.08), transparent 70%);
}

.story-ending h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 1.2rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.story-ending p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.4rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

body[data-theme="dark"] .story-text strong,
body[data-theme="dark"] .timeline-card h3,
body[data-theme="dark"] .story-block h3 {
  color: color-mix(in oklab, var(--accent) 68%, #ffffff 32%);
}

body[data-theme="dark"] .timeline-card,
body[data-theme="dark"] .story-block {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .timeline-card p,
body[data-theme="dark"] .story-block p,
body[data-theme="dark"] .story-text p,
body[data-theme="dark"] .story-ending p {
  color: var(--muted);
}

body[data-theme="dark"] .story-ending {
  background: radial-gradient(circle at center, rgba(124, 109, 253, 0.16), transparent 72%);
}

@media (max-width: 960px) {
  .story-timeline {
    padding-inline: 1.6rem;
  }

  .story-prose {
    padding-inline: 1.6rem;
  }

  .story-timeline .timeline-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 0 1rem;
  }
}

@media (max-width: 720px) {
  .story-text p {
    font-size: 1.05rem;
  }

  .story-timeline {
    padding-inline: 1.2rem;
  }

  .story-timeline .timeline-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.2rem;
    padding: 0 0.8rem;
  }

  .timeline-card {
    padding: 1.6rem 1.2rem;
  }

  .story-prose {
    gap: 1.2rem;
  }

  .story-ending {
    padding-inline: 1.3rem;
  }
}

@media (max-width: 480px) {
  .story-timeline {
    padding-inline: 1rem;
  }

  .story-timeline .timeline-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
    padding: 0 0.6rem;
  }

  .timeline-card {
    padding: 1.4rem 1rem;
  }
}
