@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;0,900;1,700;1,800;1,900&display=swap');

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

html {
  overflow-x: hidden;
}

:root {
  --red: #cc0000;
  --red-light: #ff3333;
  --orange: #f97316;
  --yellow: #eab308;
  --rose: #9f1239;
  --white: #ffffff;
  --black: #000000;
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --zinc-950: #09090b;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.section-headline-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.25rem;
  object-fit: contain;
  max-height: clamp(4rem, 9vw, 7rem);
}

.story-lab-headline-img {
  max-height: clamp(4rem, 9vw, 7.5rem);
  margin-bottom: 2rem;
}

.char-engine-headline-img,
.production-headline-img {
  max-height: clamp(5rem, 11vw, 9rem);
  margin-bottom: 2rem;
}

.section-headline-img + .apple-headline,
.section-headline-img + .novel-mode-subtitle {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .section-headline-img {
    max-height: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
  }
  .story-lab-headline-img {
    max-height: clamp(3rem, 7vw, 4.5rem);
  }
  .char-engine-headline-img,
  .production-headline-img {
    max-height: clamp(3rem, 8vw, 5rem);
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--zinc-400);
  background: var(--black);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

@media (min-width: 768px) {
  .container { padding: 0 3rem; }
}

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.visible {
  transform: translateY(0);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 48px;
}

.nav-logo img {
  height: 2rem;
  object-fit: contain;
  filter: invert(1);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-links a {
  color: var(--zinc-400);
  font-size: 0.8125rem;
  font-weight: 400;
  transition: color 0.2s;
  letter-spacing: 0;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--red);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-cta:hover {
  color: var(--red-light);
}

.nav-cta svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════
   INTRO (Typing Animation) — White hero section
   ═══════════════════════════════════════════════════════════ */

.intro {
  position: relative;
  z-index: 10;
  height: 100vh;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
}

.intro-script-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 3480px;
  height: 3445px;
  max-width: none;
  opacity: 0.03;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.intro-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1200px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,1) 0%, rgba(255,255,255,0.97) 35%, rgba(255,255,255,0.8) 55%, rgba(255,255,255,0.4) 72%, rgba(255,255,255,0) 88%);
  z-index: 1;
  pointer-events: none;
}

.intro-logo-wrapper {
  position: relative;
  z-index: 2;
  display: inline-block;
  width: 75%;
  min-width: 280px;
  max-width: 960px;
}

.intro-logo {
  width: 100%;
  object-fit: contain;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.06s linear;
}

.intro-cursor {
  position: absolute;
  top: 10%;
  bottom: 10%;
  width: 3px;
  background: var(--zinc-900);
  animation: blink 0.9s ease-in-out infinite;
  left: 0%;
  transition: left 0.06s linear;
}

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

.intro-blurb {
  position: relative;
  z-index: 2;
  font-size: 1.15rem;
  color: var(--zinc-500);
  width: 90%;
  min-width: 280px;
  max-width: 960px;
  text-align: center;
  line-height: 1.7;
  margin-top: 2rem;
  padding: 0 1.5rem;
  opacity: 0;
  transition: opacity 0.8s ease;
}

@media (min-width: 640px) {
  .intro-blurb { font-size: 1.35rem; }
}

@media (min-width: 768px) {
  .intro-blurb { font-size: 1.55rem; }
}

.intro-blurb.visible { opacity: 1; }

.intro-scroll {
  position: absolute;
  bottom: 3rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.intro-scroll.visible { opacity: 1; }

.intro-scroll-text {
  font-size: 0.75rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.intro-scroll-arrow {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--zinc-400);
  animation: bobArrow 1.5s ease-in-out infinite;
}

@keyframes bobArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  padding: 8rem 0 10rem;
  background: var(--black);
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero { padding: 10rem 0 12rem; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--white);
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 .gradient,
.gradient {
  background: linear-gradient(to right, #ef4444, var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-inline {
  background: linear-gradient(to right, #ef4444, var(--orange), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--zinc-400);
  line-height: 1.7;
  max-width: 48rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-description { font-size: 1.25rem; }
}

.hero-note {
  font-size: 0.875rem;
  color: var(--zinc-500);
  text-align: center;
  margin-bottom: 3rem;
}

.hero-img {
  width: 100%;
  display: block;
  border-radius: 1rem;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 80px -20px rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero .container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero .section-header {
  width: 100%;
}

.section-img-wrapper {
  width: 100%;
  max-width: 72rem;
}

.hero-crossfade {
  position: relative;
}

.hero-crossfade .hero-img-dark {
  position: relative;
  z-index: 1;
  animation: heroDarkFade 8s ease-in-out infinite;
}

.hero-crossfade .hero-img-light {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

@keyframes heroDarkFade {
  0%   { opacity: 1; }
  42%  { opacity: 1; }
  50%  { opacity: 0; }
  92%  { opacity: 0; }
  100% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   CONTENT WRAPPER
   ═══════════════════════════════════════════════════════════ */

.content-over-hero {
  position: relative;
  background: var(--black);
}

/* ═══════════════════════════════════════════════════════════
   APPLE-STYLE TYPOGRAPHY — All dark theme
   ═══════════════════════════════════════════════════════════ */

.apple-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
  text-align: center;
}

.apple-eyebrow--glow {
  color: var(--orange);
  text-shadow: 0 0 30px rgba(249, 115, 22, 0.3);
}

.apple-headline {
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--white);
  text-align: center;
  margin-bottom: 1.5rem;
}

.text-muted {
  background: linear-gradient(to right, #ef4444, var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.apple-body {
  font-size: 1.125rem;
  color: var(--zinc-400);
  line-height: 1.7;
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
}

.apple-subhead {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--white);
  text-align: center;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .apple-body { font-size: 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════
   APPLE STATEMENT SECTION (massive type, no image)
   ═══════════════════════════════════════════════════════════ */

.apple-statement {
  padding: 10rem 0 2rem;
  background: var(--black);
  text-align: center;
}

@media (min-width: 768px) {
  .apple-statement { padding: 14rem 0 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   APPLE FEATURE SECTION — All dark
   ═══════════════════════════════════════════════════════════ */

.apple-feature-section {
  padding: 6rem 0;
  background: var(--black);
}

@media (min-width: 768px) {
  .apple-feature-section { padding: 8rem 0; }
}

.apple-feature-section--elevated {
  background: #161617;
}

.apple-feature-section--dark-grey {
  background: #1d1d1f;
}

/* ═══════════════════════════════════════════════════════════
   SHOWCASE IMAGES
   ═══════════════════════════════════════════════════════════ */

.showcase-img-wrap {
  margin-top: 2rem;
  overflow: hidden;
}

.showcase-img-wrap--padded {
  padding: 0 1.5rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.showcase-img-wrap--wide {
  max-width: 1400px;
}

@media (min-width: 768px) {
  .showcase-img-wrap--padded { padding: 0 3rem; }
}

.showcase-img {
  width: 100%;
  display: block;
}

.showcase-img--framed {
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ═══════════════════════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════════════════════ */

.apple-stats {
  padding: 6rem 0;
  background: var(--zinc-950);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem 0;
  align-items: center;
}

@media (min-width: 768px) {
  .stats-row { gap: 0; }
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  min-width: 140px;
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--zinc-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.stat-divider {
  display: none;
  width: 1px;
  height: 3.5rem;
  background: var(--zinc-800);
}

@media (min-width: 768px) {
  .stat-divider { display: block; }
}

/* ═══════════════════════════════════════════════════════════
   DUAL SHOWCASE (side-by-side images)
   ═══════════════════════════════════════════════════════════ */

.dual-showcase {
  display: grid;
  gap: 1.5rem;
  padding: 0 1.5rem;
  margin-top: 4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .dual-showcase {
    grid-template-columns: 1fr 1fr;
    padding: 0 3rem;
  }
}

.dual-img {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
}

.dual-img img {
  width: 100%;
  display: block;
  border-radius: 0.75rem;
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dual-label {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--zinc-500);
}

/* ═══════════════════════════════════════════════════════════
   THE CHARACTER ENGINE — Massive Title Card (Apple-style Inter)
   ═══════════════════════════════════════════════════════════ */

.char-engine-title {
  position: relative;
  padding: 10rem 0 2rem;
  background: #161617;
  overflow: hidden;
}

@media (min-width: 768px) {
  .char-engine-title { padding: 14rem 0 2rem; }
}

.char-engine-title::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.04) 0%, rgba(249, 115, 22, 0.02) 40%, transparent 70%);
  pointer-events: none;
}

.char-engine-title-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
}

.char-engine-massive-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--white);
  margin-bottom: 2rem;
}

.char-engine-gradient {
  background: linear-gradient(to right, #ef4444, var(--orange), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.char-engine-description {
  font-size: 1.125rem;
  color: var(--zinc-400);
  max-width: 40rem;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .char-engine-description { font-size: 1.375rem; }
}

.char-engine-tagline {
  font-size: 1rem;
  color: var(--zinc-600);
  font-style: italic;
}

/* ── Story Lab Title Card ────────────────── */
.story-lab-title {
  position: relative;
  padding: 10rem 0 5rem;
  background: #161617;
  overflow: hidden;
}

@media (min-width: 768px) {
  .story-lab-title { padding: 14rem 0 6rem; }
}

.story-lab-title::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.015) 0%, transparent 50%);
  pointer-events: none;
}

.story-lab-title-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
}

.story-lab-massive-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--white);
  margin-bottom: 2rem;
}

.story-lab-gradient {
  background: linear-gradient(to right, var(--orange), var(--yellow), #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.story-lab-description {
  font-size: 1.125rem;
  color: var(--zinc-400);
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .story-lab-description { font-size: 1.375rem; }
}

.story-lab-tagline {
  font-size: 1rem;
  color: var(--zinc-600);
  font-style: italic;
}

.story-lab-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
  max-width: 54rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .story-lab-features { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .story-lab-features { grid-template-columns: repeat(3, 1fr); }
}

.story-lab-feature {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.story-lab-feature h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.story-lab-feature p {
  font-size: 0.825rem;
  color: var(--zinc-500);
  line-height: 1.5;
}

/* Story Lab Carousel — horizontal sliding track (mirrors Character Engine) */
.sl-carousel-text {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
  padding: 6rem 2rem 0;
  min-height: 10rem;
}

@media (min-width: 768px) {
  .sl-carousel-text { padding-top: 8rem; }
}

.sl-carousel-headline {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--white);
  margin: 0 0 0.75rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.sl-carousel-desc {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--zinc-400);
  margin: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.05s, transform 0.5s ease 0.05s;
}

@media (min-width: 768px) {
  .sl-carousel-headline { font-size: 2.75rem; }
  .sl-carousel-desc { font-size: 1.25rem; }
}

.sl-carousel-headline.fading,
.sl-carousel-desc.fading {
  opacity: 0;
  transform: translateY(8px);
}

.sl-carousel-stage {
  position: relative;
  width: 100%;
  overflow: visible;
}

.sl-carousel-viewport {
  display: flex;
  gap: 24px;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
  padding-left: calc((100% - min(1100px, 80%)) / 2);
}

.sl-carousel-slide {
  flex: 0 0 min(1100px, 80%);
  width: min(1100px, 80%);
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 80px -12px rgba(0, 0, 0, 0.7),
    0 8px 24px -4px rgba(0, 0, 0, 0.4);
  background: #0a0a0a;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.sl-carousel-slide.dimmed {
  opacity: 0.4;
  transform: scale(0.97);
}

.sl-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

.sl-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 0 2rem;
}

.sl-carousel-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sl-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zinc-700);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}

.sl-carousel-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--zinc-400);
}

.sl-carousel-arrows {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sl-carousel-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--zinc-700);
  background: transparent;
  color: var(--zinc-400);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.sl-carousel-arrow:hover {
  border-color: var(--zinc-500);
  color: var(--white);
}

.sl-carousel-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.sl-carousel-arrow svg {
  width: 16px;
  height: 16px;
}

.char-engine-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.char-engine-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.char-engine-stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.char-engine-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--zinc-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.35rem;
}

@media (min-width: 768px) {
  .char-engine-stats { gap: 3.5rem; }
}

.char-engine-grid-section {
  padding-top: 2rem !important;
}

/* ═══════════════════════════════════════════════════════════
   CHARACTER ENGINE GRID
   ═══════════════════════════════════════════════════════════ */

.engine-grid {
  display: grid;
  gap: 1px;
  background: var(--zinc-800);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--zinc-800);
}

@media (min-width: 768px) {
  .engine-grid { grid-template-columns: repeat(3, 1fr); }
}

.engine-card {
  background: var(--zinc-950);
  padding: 2rem;
  transition: background 0.3s ease;
}

.engine-card:hover {
  background: var(--zinc-900);
}

.engine-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.engine-card p {
  font-size: 0.8125rem;
  color: var(--zinc-500);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   CHARACTER ENGINE — Apple-Style Carousel Showcase
   ═══════════════════════════════════════════════════════════ */
.char-carousel-section {
  padding-bottom: 6rem;
  background: #161617;
  overflow: hidden;
}

@media (min-width: 768px) {
  .char-carousel-section { padding-bottom: 8rem; }
}

.char-carousel-text {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  min-height: 10rem;
}

.char-carousel-headline {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--white);
  margin: 0 0 0.75rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.char-carousel-desc {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--zinc-400);
  margin: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.05s, transform 0.5s ease 0.05s;
}

@media (min-width: 768px) {
  .char-carousel-headline { font-size: 2.75rem; }
  .char-carousel-desc { font-size: 1.25rem; }
}

/* Text fade animation */
.char-carousel-headline.fading,
.char-carousel-desc.fading {
  opacity: 0;
  transform: translateY(8px);
}

/* Horizontal sliding track */
.char-carousel-stage {
  position: relative;
  width: 100%;
  overflow: visible;
}

.char-carousel-viewport {
  display: flex;
  gap: 24px;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
  padding-left: calc((100% - min(1100px, 80%)) / 2);
}

.char-carousel-slide {
  flex: 0 0 min(1100px, 80%);
  width: min(1100px, 80%);
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 80px -12px rgba(0, 0, 0, 0.7),
    0 8px 24px -4px rgba(0, 0, 0, 0.4);
  background: #0a0a0a;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.char-carousel-slide.dimmed {
  opacity: 0.4;
  transform: scale(0.97);
}

.char-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}


/* Controls: centered dots + arrows */
.char-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 0 2rem;
}

.char-carousel-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.char-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zinc-700);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}

.char-carousel-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--zinc-400);
}

.char-carousel-arrows {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.char-carousel-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--zinc-700);
  background: transparent;
  color: var(--zinc-400);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.char-carousel-arrow:hover {
  border-color: var(--zinc-500);
  color: var(--white);
}

.char-carousel-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.char-carousel-arrow svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════
   TEMPLATES STRIP (dark theme)
   ═══════════════════════════════════════════════════════════ */

.story-lab-templates-divider {
  padding: 6rem 0 !important;
}

@media (min-width: 768px) {
  .story-lab-templates-divider { padding: 8rem 0 !important; }
}

.templates-heading {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 2.5rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .templates-heading { font-size: 2.75rem; }
}

.templates-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
}

.template-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  background: var(--zinc-900);
  border: 1px solid var(--zinc-800);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--zinc-300);
  white-space: nowrap;
  transition: border-color 0.2s;
}

.template-chip:hover {
  border-color: var(--zinc-600);
}

.template-chip span {
  color: var(--zinc-500);
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════
   FEATURE TRIO (3 items row) — Dark theme
   ═══════════════════════════════════════════════════════════ */

.feature-trio {
  display: grid;
  gap: 2rem;
  margin-top: 4rem;
  text-align: center;
}

@media (min-width: 768px) {
  .feature-trio { grid-template-columns: repeat(3, 1fr); }
}

.feature-trio-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.trio-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trio-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.trio-icon--yellow { background: rgba(234, 179, 8, 0.1); color: var(--yellow); }
.trio-icon--orange { background: rgba(249, 115, 22, 0.1); color: var(--orange); }
.trio-icon--red { background: rgba(204, 0, 0, 0.1); color: var(--red); }

.feature-trio-item h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
}

.feature-trio-item p {
  font-size: 0.8125rem;
  color: var(--zinc-500);
  line-height: 1.5;
  max-width: 18rem;
}

/* ═══════════════════════════════════════════════════════════
   SCRIPT TIMELINE DEMO — Animated interactive preview
   ═══════════════════════════════════════════════════════════ */

.timeline-section {
  background: #161617;
}

.timeline-demo {
  display: grid;
  gap: 2.5rem;
  padding: 0 1.5rem;
  margin-top: 4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .timeline-demo {
    grid-template-columns: 1fr 1fr;
    padding: 0 3rem;
    align-items: center;
  }
}

.timeline-demo-screen {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6);
}

.timeline-demo-full {
  width: 100%;
  display: block;
}

.timeline-demo-closeup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.timeline-closeup-window {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 480px;
}

.timeline-closeup-img {
  width: 100%;
  display: block;
}

.timeline-cursor {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  opacity: 0;
  top: 50%;
  left: 20%;
  animation: timelineCursorMove 6s ease-in-out infinite 1s;
}

.timeline-cursor svg {
  width: 100%;
  height: 100%;
}

@keyframes timelineCursorMove {
  0% { left: 15%; top: 55%; opacity: 0; }
  5% { opacity: 1; }
  15% { left: 30%; top: 50%; }
  25% { left: 30%; top: 50%; }
  35% { left: 55%; top: 45%; }
  50% { left: 55%; top: 45%; }
  55% { left: 55%; top: 45%; transform: scale(0.9); }
  58% { left: 55%; top: 45%; transform: scale(1); }
  70% { left: 75%; top: 50%; }
  85% { left: 75%; top: 50%; }
  90% { opacity: 1; }
  95% { opacity: 0; left: 85%; top: 55%; }
  100% { opacity: 0; left: 15%; top: 55%; }
}

.timeline-tooltip {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--zinc-900);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  max-width: 280px;
  width: 80%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: timelineTooltipPulse 6s ease-in-out infinite 1s;
  pointer-events: none;
  z-index: 5;
}

@keyframes timelineTooltipPulse {
  0%, 10% { opacity: 0; transform: translateX(-50%) translateY(4px); }
  18% { opacity: 1; transform: translateX(-50%) translateY(0); }
  30% { opacity: 1; transform: translateX(-50%) translateY(0); }
  38% { opacity: 0; transform: translateX(-50%) translateY(4px); }
  42% { opacity: 0; }
  48% { opacity: 1; transform: translateX(-50%) translateY(0); }
  60% { opacity: 1; }
  65% { opacity: 0; transform: translateX(-50%) translateY(4px); }
  100% { opacity: 0; }
}

.timeline-tooltip-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-tooltip-body {
  font-size: 0.625rem;
  color: var(--zinc-400);
  line-height: 1.4;
  margin-bottom: 0.375rem;
}

.timeline-tooltip-tag {
  display: inline-block;
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--red);
  background: rgba(204, 0, 0, 0.12);
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  letter-spacing: 0.02em;
}

.timeline-closeup-label {
  font-size: 0.875rem;
  color: var(--zinc-500);
  text-align: center;
  font-style: italic;
}

.timeline-click-ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--red);
  pointer-events: none;
  z-index: 11;
  opacity: 0;
  animation: clickRipple 6s ease-in-out infinite 1s;
}

@keyframes clickRipple {
  0%, 52% { opacity: 0; transform: scale(0.5); }
  55% { opacity: 1; transform: scale(0.5); }
  58% { opacity: 0.6; transform: scale(2); }
  62% { opacity: 0; transform: scale(3); }
  100% { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════
   NOVEL MODE — Dark background, red headline
   ═══════════════════════════════════════════════════════════ */

.novel-mode-hero {
  padding: 8rem 0 4rem;
  background: #161617;
  text-align: center;
}

@media (min-width: 768px) {
  .novel-mode-hero { padding: 10rem 0 5rem; }
}

.novel-mode-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  background: linear-gradient(to right, #ef4444, var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.novel-mode-subtitle {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--white);
}

.novel-mode-muted {
  background: linear-gradient(to right, #ef4444, var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.novel-mode-features {
  padding: 2rem 0 6rem;
  background: #161617;
}

@media (min-width: 768px) {
  .novel-mode-features { padding: 2rem 0 8rem; }
}

.novel-mode-features .novel-grid {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 4px 24px -4px rgba(0, 0, 0, 0.3),
    0 12px 40px -8px rgba(0, 0, 0, 0.2);
}

.novel-mode-features .novel-card {
  background: rgba(255, 255, 255, 0.03);
}

.novel-mode-features .novel-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.novel-mode-features .novel-card-number {
  color: #ef4444;
}

.novel-mode-features .novel-card h4 {
  color: var(--white);
}

.novel-mode-features .novel-card p {
  color: var(--zinc-500);
}

/* ═══════════════════════════════════════════════════════════
   NOVEL MODE GRID
   ═══════════════════════════════════════════════════════════ */

.novel-grid {
  display: grid;
  gap: 1px;
  background: var(--zinc-800);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--zinc-800);
}

@media (min-width: 768px) {
  .novel-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .novel-grid { grid-template-columns: repeat(4, 1fr); }
}

.novel-card {
  background: var(--zinc-950);
  padding: 2rem;
  transition: background 0.3s ease;
}

.novel-card:hover {
  background: var(--zinc-900);
}

.novel-card-number {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--zinc-600);
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.novel-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.375rem;
}

.novel-card p {
  font-size: 0.8125rem;
  color: var(--zinc-500);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   PRODUCTION SUITE — Title Card + Carousel
   ═══════════════════════════════════════════════════════════ */

.production-title {
  position: relative;
  padding: 10rem 0 5rem;
  background: #161617;
  overflow: hidden;
}

@media (min-width: 768px) {
  .production-title { padding: 14rem 0 6rem; }
}

.production-title::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, rgba(99, 102, 241, 0.02) 40%, transparent 70%);
  pointer-events: none;
}

.production-title-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
}

.production-massive-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--white);
  margin-bottom: 2rem;
}

.production-gradient {
  background: linear-gradient(to right, #3b82f6, #8b5cf6, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.production-description {
  font-size: 1.125rem;
  color: var(--zinc-400);
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .production-description { font-size: 1.375rem; }
}

.production-tagline {
  font-size: 1rem;
  color: var(--zinc-600);
  font-style: italic;
}

.production-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
  max-width: 54rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .production-features { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .production-features { grid-template-columns: repeat(3, 1fr); }
}

.production-feature {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.production-feature h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.production-feature p {
  font-size: 0.825rem;
  color: var(--zinc-500);
  line-height: 1.5;
}

.prod-carousel-text {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
  padding: 6rem 2rem 0;
}

@media (min-width: 768px) {
  .prod-carousel-text { padding-top: 8rem; }
}

.prod-carousel-headline {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--white);
  margin: 0 0 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.prod-carousel-desc {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--zinc-400);
  margin: 0;
  height: 4.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease 0.05s, transform 0.5s ease 0.05s;
}

@media (min-width: 768px) {
  .prod-carousel-headline { font-size: 2.75rem; }
  .prod-carousel-desc { font-size: 1.25rem; height: 6em; }
}

.prod-carousel-headline.fading,
.prod-carousel-desc.fading {
  opacity: 0;
  transform: translateY(8px);
}

.prod-carousel-stage {
  position: relative;
  width: 100%;
  overflow: visible;
}

.prod-carousel-viewport {
  display: flex;
  gap: 24px;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
  padding-left: calc((100% - min(1100px, 80%)) / 2);
}

.prod-carousel-slide {
  flex: 0 0 min(1100px, 80%);
  width: min(1100px, 80%);
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 80px -12px rgba(0, 0, 0, 0.7),
    0 8px 24px -4px rgba(0, 0, 0, 0.4);
  background: #0a0a0a;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.prod-carousel-slide.dimmed {
  opacity: 0.4;
  transform: scale(0.97);
}

.prod-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

.prod-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 0 2rem;
}

.prod-carousel-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prod-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zinc-700);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}

.prod-carousel-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--zinc-400);
}

.prod-carousel-arrows {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prod-carousel-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--zinc-700);
  background: transparent;
  color: var(--zinc-400);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.prod-carousel-arrow:hover {
  border-color: var(--zinc-500);
  color: var(--white);
}

.prod-carousel-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.prod-carousel-arrow svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════════════════════ */

.cta {
  padding: 10rem 0;
  background: var(--black);
  text-align: center;
}

@media (min-width: 768px) {
  .cta { padding: 14rem 0; }
}

.cta h2 {
  font-size: clamp(2.25rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.cta-description {
  font-size: 1.125rem;
  color: var(--zinc-400);
  max-width: 36rem;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2.25rem;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--red);
  color: var(--white);
}

.btn--primary:hover {
  opacity: 0.9;
}

.btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.cta-note {
  font-size: 0.8125rem;
  color: var(--zinc-500);
  margin-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.footer {
  padding: 2rem 0;
  background: var(--zinc-950);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--zinc-600);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--zinc-500);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

/* ═══════════════════════════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-img {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.2s; }
.reveal-delay-5 { transition-delay: 0.25s; }
.reveal-delay-6 { transition-delay: 0.3s; }
.reveal-delay-7 { transition-delay: 0.35s; }
.reveal-delay-8 { transition-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════════
   GROW-ON-SCROLL EFFECT
   Images scale up smoothly as they scroll into view
   ═══════════════════════════════════════════════════════════ */

.grow-on-scroll {
  will-change: transform;
}

/* ═══════════════════════════════════════════════════════════
   MODE SWITCHING DEMO — Real Screenshot Crossfade
   ═══════════════════════════════════════════════════════════ */

.mode-demo {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 80px -12px rgba(0, 0, 0, 0.7);
  aspect-ratio: 16 / 10;
}

.mode-demo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: opacity 1s ease;
  opacity: 1;
}

.mode-demo-img--hidden {
  opacity: 0;
}

.mode-demo-label {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.375rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 5;
}

.mode-demo-label.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .mode-demo-label {
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    bottom: 0.5rem;
    right: 0.5rem;
  }
}

/* ═══════════════════════════════════════════
   AI SHOWCASE — 6-Frame Progressive Demo
   ═══════════════════════════════════════════ */

.ai-showcase {
  padding: 6rem 0;
}

@media (min-width: 768px) {
  .ai-showcase { padding: 8rem 0; }
}

.ai-showcase-frames {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

.ai-frame-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  border-radius: 12px;
  display: block;
}

.ai-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s;
  pointer-events: none;
}

.ai-frame:first-child:not(.inactive) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ai-frame.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ai-frame.inactive {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Mockup shell */
.ai-mock {
  border-radius: 0.75rem;
  overflow: hidden;
  font-family: 'Courier Prime', 'Courier New', monospace;
  border: 1px solid rgba(255,255,255,0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.ai-mock--light {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
}

.ai-mock--dark {
  background: #1a1a1e;
}

.ai-mock--with-sidebar {
  display: flex;
  flex-direction: column;
}

.ai-mock-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* App header bar (realistic toolbar matching real app) */
.ai-mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  height: 36px;
  background: rgba(17, 17, 20, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  gap: 0.5rem;
}

.ai-hdr-left {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.ai-hdr-logo {
  font-family: 'Georgia', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e4e4e7;
  letter-spacing: -0.01em;
  padding-right: 0.5rem;
  margin-right: 0.25rem;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.ai-hdr-sep {
  width: 0.3rem;
}

.ai-hdr-filmicon,
.ai-hdr-labicon {
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 0.15rem;
}

.ai-hdr-mode {
  color: #d4d4d8;
  font-size: 0.68rem;
  font-weight: 500;
}

.ai-hdr-caret {
  color: #52525b;
  font-size: 0.5rem;
  margin-left: 0.1rem;
}

.ai-hdr-menubtn {
  color: #a1a1aa;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  cursor: default;
  white-space: nowrap;
}

.ai-hdr-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.ai-hdr-doctitle {
  color: #71717a;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
}

/* Script page area */
.ai-mock-page {
  padding: 2rem 2rem 2rem 3rem;
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.65;
  overflow: hidden;
}

.ai-mock-page--light { color: #27272a; }
.ai-mock-page--dark { color: #d4d4d8; }

.ai-mock-page--narrow {
  flex: 1;
  min-width: 0;
}

/* Script line elements */
.ai-line { margin-bottom: 0.5rem; }

.ai-slug {
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.ai-slug--light { color: #18181b; }
.ai-slug--dark { color: #e4e4e7; }

.ai-action { max-width: 480px; }
.ai-action--light { color: #3f3f46; }
.ai-action--dark { color: #d4d4d8; }

.ai-char {
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 0.8rem;
}

.ai-char--light { color: #71717a; }
.ai-char--dark { color: #a1a1aa; }

.ai-dial {
  text-align: center;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.ai-dial--light { color: #3f3f46; }
.ai-dial--dark { color: #d4d4d8; }

/* Selection highlight */
.ai-selected {
  background: rgba(96, 165, 250, 0.25);
  border-radius: 3px;
  padding: 2px 6px;
  color: #bfdbfe !important;
}

/* AI-inserted text (blue-purple) */
.ai-inserted {
  color: #818cf8 !important;
}

/* AI tab on right edge */
.ai-mock-tab {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 6px 0 0 6px;
  border: 1px solid rgba(0, 206, 209, 0.3);
  border-right: none;
  background: rgba(0, 206, 209, 0.08);
  color: #00CED1;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.ai-mock-tab-icon {
  font-size: 0.8rem;
}

.ai-mock-tab--glow {
  border-color: rgba(0, 206, 209, 0.5);
  background: rgba(0, 206, 209, 0.15);
  box-shadow: 0 0 10px rgba(0, 206, 209, 0.2);
}

/* Sidebar */
.ai-mock-sidebar {
  width: 280px;
  background: #111114;
  border-left: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
  overflow: hidden;
}

.ai-sb-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #00CED1;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ai-sb-icon {
  font-size: 0.9rem;
  color: #F5C842;
}

.ai-sb-title {
  color: #00CED1;
}

.ai-sb-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ai-sb-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(161, 161, 170, 0.8);
}

.ai-sb-selected {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.7rem;
  line-height: 1.45;
  color: #a1a1aa;
  padding: 0.5rem 0.6rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(161, 161, 170, 0.2);
  border-radius: 6px;
  max-height: 4rem;
  overflow: hidden;
}

.ai-sb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ai-sb-chip {
  font-size: 0.62rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #d4d4d8;
}

.ai-sb-prompt {
  font-size: 0.7rem;
  line-height: 1.45;
  color: #d4d4d8;
  padding: 0.5rem 0.6rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
}

.ai-sb-result {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.7rem;
  line-height: 1.5;
  color: #818cf8;
  padding: 0.6rem;
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 6px;
}

.ai-sb-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.ai-sb-btn {
  flex: 1;
  text-align: center;
  padding: 0.4rem 0.5rem;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: default;
}

.ai-sb-btn--send,
.ai-sb-btn--accept {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #d4d4d8;
}

.ai-sb-btn--neutral {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #a1a1aa;
}

/* Dots & labels */
.ai-showcase-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.ai-showcase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}

.ai-showcase-dot.active {
  background: #00CED1;
  transform: scale(1.3);
}

.ai-showcase-label-wrap {
  text-align: center;
  margin-top: 1rem;
  height: 2rem;
  position: relative;
}

.ai-showcase-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.4s;
  white-space: nowrap;
}

.ai-showcase-label.active {
  opacity: 1;
}

@media (max-width: 768px) {
  .ai-showcase-frames {
    aspect-ratio: auto;
    min-height: 520px;
  }
  .ai-mock-page {
    padding: 1.25rem 1rem;
    font-size: 0.72rem;
  }
  .ai-mock-body {
    flex-direction: column;
  }
  .ai-mock-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .ai-mock-tab {
    display: none;
  }
  .ai-mock-page--narrow {
    flex: none;
  }
}

/* ═══════════════════════════════════════════
   AI SCRIPT EDITOR MOCKUP (legacy)
   ═══════════════════════════════════════════ */
.ai-editor-mockup {
  display: flex;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #1a1a1e;
  border: 1px solid rgba(255,255,255,0.08);
  font-family: 'Courier Prime', 'Courier New', monospace;
  max-width: 960px;
  margin: 0 auto;
}

.ai-editor-script {
  flex: 1;
  padding: 2.5rem 2rem 2.5rem 3rem;
  position: relative;
  min-height: 380px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #d4d4d8;
}

.ai-editor-script-line {
  margin-bottom: 0.6rem;
}

.ai-editor-slug {
  font-weight: 700;
  color: #e4e4e7;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.ai-editor-action {
  max-width: 480px;
}

.ai-editor-character {
  text-align: center;
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  margin-top: 1rem;
}

.ai-editor-dialogue {
  text-align: center;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.ai-editor-highlight {
  background: rgba(96, 165, 250, 0.25);
  border-radius: 3px;
  padding: 2px 4px;
  display: inline-block;
  color: #bfdbfe;
}

/* AI tab on right edge of script panel */
.ai-editor-tab {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 6px 0 0 6px;
  border: 1px solid rgba(0, 206, 209, 0.3);
  border-right: none;
  background: rgba(0, 206, 209, 0.08);
  color: #00CED1;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.ai-editor-tab-icon {
  font-size: 0.8rem;
}

/* AI Sidebar */
.ai-editor-sidebar {
  width: 300px;
  background: #111114;
  border-left: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: 'Inter', sans-serif;
}

.ai-editor-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #00CED1;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ai-editor-sidebar-icon {
  font-size: 1rem;
}

.ai-editor-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ai-editor-sidebar-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #71717a;
}

.ai-editor-sidebar-selected {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #a1a1aa;
  padding: 0.6rem 0.75rem;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 6px;
  max-height: 5rem;
  overflow: hidden;
}

.ai-editor-sidebar-prompt {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #d4d4d8;
  padding: 0.6rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
}

.ai-editor-sidebar-result {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #86efac;
  padding: 0.75rem;
  background: rgba(134, 239, 172, 0.06);
  border: 1px solid rgba(134, 239, 172, 0.15);
  border-radius: 6px;
}

.ai-editor-sidebar-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.ai-editor-btn {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: default;
}

.ai-editor-btn-accept {
  background: rgba(0, 206, 209, 0.15);
  border: 1px solid rgba(0, 206, 209, 0.3);
  color: #00CED1;
}

.ai-editor-btn-archive {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
}

@media (max-width: 768px) {
  .ai-editor-mockup {
    flex-direction: column;
  }
  .ai-editor-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .ai-editor-script {
    padding: 1.5rem 1rem;
    min-height: auto;
  }
  .ai-editor-tab {
    display: none;
  }
}

.type-reveal {
  clip-path: inset(0 100% 0 0);
}

.type-reveal.typed {
  clip-path: inset(0 0% 0 0);
}

.hwu-headline-img {
  max-height: clamp(4rem, 9vw, 7rem);
  margin-bottom: 2rem;
}

.hwu-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

.hwu-toggle-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: -0.01em;
}

.hwu-toggle-btn:first-child {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.hwu-toggle-btn:last-child {
  border-radius: 0 8px 8px 0;
}

.hwu-toggle-btn.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.hwu-toggle-btn:hover:not(.active) {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
}

#hwuScreenImg {
  transition: opacity 0.35s ease;
}

@media (max-width: 768px) {
  .hwu-headline-img {
    max-height: clamp(2.5rem, 6vw, 3.5rem);
  }
  .hwu-toggle-btn {
    font-size: 0.85rem;
    padding: 0.55rem 1.5rem;
  }
}
