/* ============================================================
   AIMYA — a warmer storytelling experience
   Soft ember light, friendly type, gentle motion.
   ============================================================ */

:root {
  /* Deep cocoa — less black, more hearth */
  --bg: #15100c;
  --bg-lift: #1c1510;
  --ink: #fff6ea;
  --ink-soft: #e4d4c0;
  --ink-mute: #a8947e;
  --honey: #f0c48a;
  --amber: #e8b878;
  --amber-deep: #d4924f;
  --peach: #f0b59a;
  --rose: #e5a48a;
  --line: rgba(240, 196, 138, 0.18);
  --glow-soft: rgba(232, 184, 120, 0.45);
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-snap-type: y proximity;
}

body {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(232, 184, 120, 0.14), transparent 55%),
    radial-gradient(90% 60% at 80% 100%, rgba(240, 181, 154, 0.1), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

.display, .serif, .step, .world__title, .whisper, .tagline, .name-reveal {
  font-variation-settings: "SOFT" 40;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Ambient warmth ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: 0.7;
  will-change: transform;
}
.glow--1 {
  width: 70vw; height: 70vw; top: -22vw; left: -16vw;
  background: radial-gradient(circle, rgba(240, 196, 138, 0.55), transparent 68%);
  animation: drift1 28s var(--ease) infinite alternate;
}
.glow--2 {
  width: 58vw; height: 58vw; bottom: -24vw; right: -16vw;
  background: radial-gradient(circle, rgba(240, 181, 154, 0.42), transparent 68%);
  animation: drift2 34s var(--ease) infinite alternate;
}
.glow--3 {
  width: 46vw; height: 46vw; top: 38%; left: 48%;
  background: radial-gradient(circle, rgba(232, 184, 120, 0.28), transparent 70%);
  animation: drift3 40s var(--ease) infinite alternate;
}
.glow--4 {
  width: 36vw; height: 28vw; bottom: 8%; left: 18%;
  background: radial-gradient(circle, rgba(212, 146, 79, 0.22), transparent 70%);
  animation: drift1 36s var(--ease) infinite alternate-reverse;
}
@keyframes drift1 { to { transform: translate3d(7vw, 8vh, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-9vw, -5vh, 0) scale(1.18); } }
@keyframes drift3 { to { transform: translate3d(-10vw, 7vh, 0) scale(0.88); } }

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* Soft edge vignette — warmer, less harsh */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(100% 80% at 50% 40%, transparent 50%, rgba(21, 16, 12, 0.55) 100%);
}

/* ---------- Progress + nav ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40;
  background: rgba(255, 246, 234, 0.05);
}
.progress__bar {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--amber-deep), var(--honey), var(--peach));
  box-shadow: 0 0 16px var(--glow-soft);
}

.dots {
  position: fixed; right: 26px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; gap: 16px;
}
.dot {
  position: relative; width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255, 246, 234, 0.2);
  border: 1px solid transparent;
  transition: all 0.45s var(--ease);
}
.dot:hover, .dot.active {
  background: var(--honey);
  transform: scale(1.35);
  border-color: rgba(255, 246, 234, 0.25);
}
.dot.active { box-shadow: 0 0 14px rgba(240, 196, 138, 0.75); }
.dot::after {
  content: attr(data-label);
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%) translateX(8px);
  font-size: 11px; letter-spacing: 0.06em; color: var(--ink-soft);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: all 0.35s var(--ease);
  text-transform: none; font-weight: 400;
}
.dot:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

.wordmark {
  position: fixed; top: 24px; left: 32px; z-index: 40;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 550; letter-spacing: 0.28em;
  font-size: 17px; text-decoration: none; padding: 8px 12px 8px 10px;
  border-radius: 999px;
  background: rgba(28, 21, 16, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(240, 196, 138, 0.12);
  transition: transform 0.4s var(--ease), border-color 0.4s ease, background 0.4s ease;
}
.wordmark__text {
  background: linear-gradient(105deg, var(--honey) 0%, var(--peach) 45%, var(--honey) 90%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(240, 196, 138, 0.4));
  padding-right: 0.12em;
  transition: background-position 0.7s var(--ease);
}
.wordmark__dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff0d4, var(--honey) 50%, var(--amber-deep));
  box-shadow: 0 0 12px rgba(240, 196, 138, 0.95), 0 0 28px rgba(212, 146, 79, 0.45);
  animation: breathe 3.6s ease-in-out infinite;
}
.wordmark:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 196, 138, 0.28);
  background: rgba(28, 21, 16, 0.55);
}
.wordmark:hover .wordmark__text { background-position: 100% center; }
@keyframes breathe {
  0%, 100% { transform: scale(0.88); opacity: 0.75; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* ---------- Scenes ---------- */
main { position: relative; z-index: 2; }

.scene {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 14vh 7vw;
  scroll-snap-align: center;
  scroll-snap-stop: normal;
  /* Warm ambient boost when this chapter is the focus */
  transition: filter 0.6s var(--ease);
}
.scene.is-active {
  filter: saturate(1.06);
}
.scene__inner {
  width: 100%; max-width: var(--maxw);
  will-change: transform, opacity;
  transform-origin: center center;
}
.scene__inner.narrow { max-width: 740px; margin: 0 auto; }

.dim {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(12, 8, 5, 0.28),
    transparent
  );
}
.accentbg {
  background: radial-gradient(
    85% 70% at 50% 50%,
    rgba(240, 196, 138, 0.16),
    rgba(240, 181, 154, 0.06) 45%,
    transparent 72%
  );
}

/* ---------- Typography ---------- */
.kicker {
  font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--honey); font-weight: 500;
}
.kicker.center { text-align: center; }

.display {
  font-family: var(--serif); font-weight: 360;
  font-size: clamp(2.7rem, 8vw, 6.2rem);
  line-height: 1.08; letter-spacing: -0.025em; margin-top: 22px;
}
.display .line { display: block; padding-bottom: 0.1em; }
.display--sm { font-size: clamp(2.4rem, 7vw, 4.8rem); margin-top: 8px; }
.display--md { font-size: clamp(2.5rem, 7.2vw, 5.4rem); }
.line--accent {
  font-style: italic;
  padding-bottom: 0.18em; padding-right: 0.1em;
  background: linear-gradient(105deg, var(--honey), var(--peach) 55%, var(--rose));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.serif {
  font-family: var(--serif); font-weight: 380;
  font-size: clamp(1.85rem, 4.4vw, 3.2rem); line-height: 1.18;
  letter-spacing: -0.015em;
}
.scene--center .serif { text-align: center; }

.lede {
  margin-top: 30px; font-size: clamp(1.08rem, 2.1vw, 1.42rem);
  color: var(--ink-soft); max-width: 32ch; font-weight: 350;
  line-height: 1.55;
}

.body {
  font-size: clamp(1.08rem, 1.9vw, 1.32rem); color: var(--ink-soft);
  font-weight: 350; margin-top: 24px; line-height: 1.75;
}
.scene--center .body { text-align: center; margin-left: auto; margin-right: auto; max-width: 54ch; }
.body em { color: var(--ink); font-style: italic; font-family: var(--serif); }
.body.muted { color: var(--ink-mute); font-size: clamp(1rem, 1.6vw, 1.12rem); }

.step {
  font-family: var(--serif); font-weight: 350;
  font-size: clamp(1.55rem, 3.5vw, 2.55rem); line-height: 1.28;
  color: var(--ink-soft); margin: 0 0 0.95em;
}
.step.big {
  color: var(--ink);
  position: relative;
}
.scene--center .step { text-align: center; }

.whisper {
  margin-top: 48px; text-align: center; color: var(--honey);
  font-style: italic; font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  opacity: 0.9;
}

/* ---------- Hero ---------- */
.scene--hero { text-align: left; }
.scene--hero .scene__inner {
  position: relative;
}
.scroll-cue {
  position: absolute; bottom: 5vh; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--ink-mute); font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.scroll-cue__line {
  width: 1.5px; height: 42px;
  background: linear-gradient(var(--honey), transparent);
  border-radius: 2px;
  animation: cue 2.6s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.35); opacity: 0.35; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Stats ---------- */
.scene--stats .scene__inner { text-align: center; }
.stats {
  margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: start;
}
.stat {
  text-align: center;
  padding: 28px 18px 24px;
  border-radius: 28px;
  background: linear-gradient(165deg, rgba(255, 246, 234, 0.05), rgba(255, 246, 234, 0.015));
  border: 1px solid rgba(240, 196, 138, 0.1);
  transition: border-color 0.4s ease, background 0.4s ease, transform 0.4s var(--ease);
}
.stat:hover {
  border-color: rgba(240, 196, 138, 0.22);
  background: linear-gradient(165deg, rgba(255, 246, 234, 0.08), rgba(255, 246, 234, 0.02));
  transform: translateY(-3px);
}
.stat__num {
  font-family: var(--serif); font-weight: 320;
  font-size: clamp(3.2rem, 8.5vw, 6rem); line-height: 1.08; padding-bottom: 0.08em;
  background: linear-gradient(165deg, var(--honey), var(--amber-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 24px rgba(212, 146, 79, 0.2));
}
.stat figcaption {
  margin-top: 14px; color: var(--ink-soft); font-weight: 350;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem); max-width: 22ch; margin-inline: auto;
  line-height: 1.55;
}
.stat .src {
  display: block; margin-top: 12px; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-mute); opacity: 0.8;
}

/* ---------- Two worlds ---------- */
.worlds {
  margin-top: 52px; display: grid; grid-template-columns: 1fr auto 1fr;
  gap: clamp(24px, 4vw, 48px); align-items: stretch;
}
.worlds__divider {
  width: 1px;
  background: linear-gradient(transparent, rgba(240, 196, 138, 0.35), transparent);
}
.world {
  padding: 32px 28px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 246, 234, 0.055), rgba(255, 246, 234, 0.015));
  border: 1px solid rgba(240, 196, 138, 0.1);
}
.world__who {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--honey); margin-bottom: 16px; font-weight: 500;
}
.world__title {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(1.45rem, 2.8vw, 2.05rem); line-height: 1.25; color: var(--ink);
}
.world__body {
  margin-top: 18px; color: var(--ink-soft); font-weight: 350; line-height: 1.72;
  font-size: 1.02rem;
}

/* ---------- Why now ---------- */
.curves {
  margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 32px);
}
.curve {
  padding: 26px 22px 28px;
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(255, 246, 234, 0.05), transparent);
  border: 1px solid rgba(240, 196, 138, 0.1);
  transition: border-color 0.4s ease, transform 0.4s var(--ease);
}
.curve:hover {
  border-color: rgba(240, 196, 138, 0.22);
  transform: translateY(-2px);
}
.curve__k {
  font-family: var(--serif); font-size: 1.15rem; color: var(--honey);
  letter-spacing: 0.08em; font-style: italic;
}
.curve p {
  margin-top: 14px; color: var(--ink-soft); font-weight: 350;
  font-size: 1.05rem; line-height: 1.55;
}
.curve strong { color: var(--ink); font-weight: 560; }

/* ---------- The turn ---------- */
.scene--reveal { text-align: center; }
.scene--reveal .step { text-align: center; }
.scene--reveal .body { text-align: center; margin-inline: auto; }
.name-reveal {
  margin-top: 52px; font-family: var(--serif); font-weight: 340;
  font-size: clamp(1.55rem, 3.8vw, 2.45rem); color: var(--ink-soft);
}
.name-reveal span {
  font-weight: 520; letter-spacing: 0.16em;
  display: inline-block; padding: 0.06em 0.12em 0.1em;
  background: linear-gradient(105deg, var(--honey), var(--peach));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgba(240, 196, 138, 0.35));
}
.tagline {
  margin-top: 14px; color: var(--ink-mute); font-style: italic;
  font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.32rem);
}

/* ---------- Close ---------- */
.scene--close { text-align: center; flex-direction: column; }
.scene--close .scene__inner { text-align: center; }
.cta {
  margin: 40px auto 0; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.cta__btn {
  display: inline-block;
  background: linear-gradient(105deg, var(--honey), var(--amber-deep));
  color: #2a1808; text-decoration: none;
  padding: 16px 32px; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 1.02rem;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 36px rgba(212, 146, 79, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, filter 0.3s ease;
}
.cta__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(212, 146, 79, 0.4);
  filter: brightness(1.04);
}
.cta__btn:active { transform: translateY(-1px); }
.contact { margin-top: 22px; }
.contact a {
  color: var(--ink-soft); text-decoration: none; letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(240, 196, 138, 0.28); padding-bottom: 3px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.contact a:hover { color: var(--honey); border-color: var(--honey); }

.foot {
  margin-top: 12vh; width: 100%; max-width: var(--maxw);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding-top: 24px;
  border-top: 1px solid rgba(240, 196, 138, 0.14);
  color: var(--ink-mute); font-size: 12px; letter-spacing: 0.06em;
}
.foot span:first-child {
  font-family: var(--serif); font-weight: 550; letter-spacing: 0.28em; font-size: 14px;
  background: linear-gradient(105deg, var(--honey), var(--peach));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(4px);
  transition:
    opacity 1.1s var(--ease),
    transform 1.1s var(--ease),
    filter 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.display .line {
  opacity: 0;
  transform: translateY(0.32em) scale(0.98);
  filter: blur(3px);
  transition:
    opacity 1.05s var(--ease),
    transform 1.05s var(--ease),
    filter 1.05s var(--ease);
}
.display.in .line {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.display.in .line:nth-child(2) { transition-delay: 0.12s; }
.display.in .line:nth-child(3) { transition-delay: 0.24s; }

/* Accent glow pulse when a scene is focused */
.accentbg.is-active {
  background: radial-gradient(
    85% 70% at 50% 50%,
    rgba(240, 196, 138, calc(0.12 + var(--focus, 0.5) * 0.14)),
    rgba(240, 181, 154, 0.06) 45%,
    transparent 72%
  );
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .dots { display: none; }
  .scene { padding: 11vh 6vw; }
  .stats { grid-template-columns: 1fr; gap: 16px; max-width: 360px; margin-inline: auto; }
  .worlds { grid-template-columns: 1fr; }
  .worlds__divider {
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(240, 196, 138, 0.35), transparent);
  }
  .curves { grid-template-columns: 1fr; gap: 14px; }
  .foot { flex-direction: column; text-align: center; }
  .wordmark { top: 16px; left: 16px; font-size: 15px; padding: 7px 10px 7px 9px; }
  .world { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  .glow, .scroll-cue__line, .wordmark__dot { animation: none; }
  .reveal, .display .line {
    transition: opacity 0.35s ease; transform: none; filter: none;
  }
  .stat:hover, .curve:hover { transform: none; }
  .scene__inner { transform: none !important; opacity: 1 !important; }
}
