/* ─────────────────────────────────────────────────────────────
   LoreMaster Landing — tokens lifted from the Figma design system
   bg-base #07080A, glass surfaces, blur(50px) iOS-style
   ───────────────────────────────────────────────────────────── */

:root {
  /* Colors */
  --bg-base: #07080A;
  --bg-base-80: rgba(7, 8, 10, 0.8);
  --bg-base-0: rgba(7, 8, 10, 0);
  --bg-secondary: #16171A;
  --bg-elevated: #1E1E1E;
  --fg: #FFFFFF;
  --fg-80: rgba(255, 255, 255, 0.8);
  --fg-60: rgba(255, 255, 255, 0.6);
  --fg-50: rgba(255, 255, 255, 0.5);
  --fg-32: rgba(255, 255, 255, 0.32);
  --fg-18: rgba(255, 255, 255, 0.18);
  --fg-12: rgba(255, 255, 255, 0.12);
  --fg-08: rgba(255, 255, 255, 0.08);
  --fg-05: rgba(255, 255, 255, 0.05);
  --accent-yellow: #FFF07D;
  --accent-yellow-50: rgba(255, 240, 125, 0.5);
  --accent-red: #FF534A;
  --accent-violet: #BD9FF5;
  --accent-blue: #ADDCFF;
  --accent-rose: #FFB8B3;

  /* Glass */
  --glass: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.0432) 50%, rgba(255,255,255,0.0324) 100%);
  --glass-focus: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.096) 50%, rgba(255,255,255,0.072) 100%);
  --glass-strong: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.0672) 50%, rgba(255,255,255,0.0504) 100%);
  --glass-error: linear-gradient(180deg, rgba(255,83,74,0.21) 0%, rgba(255,83,74,0.1008) 50%, rgba(255,83,74,0.0756) 100%);

  /* Radii (Figma corner tokens) */
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 24px;
  --r-xl: 32px;
  --r-max: 100px;

  /* Blur */
  --blur-xs: 8px;
  --blur-s: 24px;
  --blur-m: 50px;
  --blur-l: 100px;

  /* Type — Inter only (matches the app system, no second display family) */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Parallax strength (controlled by Tweaks) */
  --parallax: 1;
}

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

html, body {
  scroll-behavior: smooth;
  background: var(--bg-base);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body {
  /* Base — just the dark token, ambient depth comes from each section's blurred bg */
  background: var(--bg-base);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }

/* Global film-grain over everything else — subtle */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ── Reusable surfaces ────────────────────────────────────── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  border: 1px solid var(--fg-08);
  border-radius: var(--r-l);
}

.glass-strong {
  background: var(--glass-strong);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  border: 1px solid var(--fg-12);
  border-radius: var(--r-l);
}

/* ── Buttons (Figma Button component) ─────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  height: 56px;
  border-radius: var(--r-m);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.005em;
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}
.btn:active { opacity: 0.8; transform: translateY(1px); }

.btn-primary {
  background: #FFFFFF;
  color: var(--bg-base);
}
.btn-primary:hover { box-shadow: 0 14px 50px rgba(255, 255, 255, 0.18); }

.btn-secondary {
  position: relative;
  background: var(--glass-strong);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  color: var(--fg);
  transition: background 200ms ease;
}
/* Gradient border via mask trick — soft rim */
.btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.04) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
  transition: background 200ms ease;
}
.btn-secondary:hover { background: var(--glass-focus); }
.btn-secondary:hover::before {
  background: linear-gradient(180deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0.08) 100%);
}

.btn-large { height: 62px; font-size: 17px; padding: 0 28px; }
.btn-pill { border-radius: var(--r-max); }

/* ── Inputs (Figma Input-Field) ───────────────────────────── */
.input, .select-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  border-radius: var(--r-m);
  background: var(--glass);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  border: 1px solid var(--fg-08);
  padding: 0 18px;
  transition: background 200ms ease, border-color 200ms ease;
}
.input:focus-within, .select-shell:focus-within {
  background: var(--glass-focus);
  border-color: var(--fg-18);
}
.input input,
.select-shell select {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.01em;
}
.input input::placeholder { color: var(--fg-50); }
.input .icon, .select-shell .icon { width: 22px; height: 22px; color: var(--fg-50); flex-shrink: 0; }

.select-shell select {
  appearance: none;
  cursor: pointer;
}
.select-shell::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--fg-50);
  border-bottom: 1.5px solid var(--fg-50);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ── Sections & containers ────────────────────────────────── */
.container {
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
}

section { position: relative; }

/* Section eyebrow tag — matches Figma BackgroundBorderShadowOverlayBlur (33px tag) */
.eyebrow {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--fg);
  width: fit-content;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-yellow);
  box-shadow: 0 0 8px var(--accent-yellow-50);
}
.eyebrow .em { font-size: 15px; line-height: 1; opacity: 0.85; }

/* Headings */
.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 0.95;
}
.h-sans {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* ── NAV ──────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 10px 12px 10px 24px;
  border-radius: var(--r-max);
  background: rgba(7, 8, 10, 0.55);
  backdrop-filter: blur(var(--blur-m)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur-m)) saturate(180%);
  border: 1px solid var(--fg-08);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px;
  letter-spacing: -0.01em;
}
.nav-logo-mark {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.nav-logo-mark svg { display: block; width: 100%; height: 100%; }
.nav-links {
  display: flex; gap: 24px;
  font-size: 14px;
  color: var(--fg-60);
  font-weight: 500;
}
.nav-links a { transition: color 160ms ease; }
.nav-links a:hover { color: var(--fg); }
.nav-spacer { flex: 1; }
.nav-cta {
  height: 38px; padding: 0 18px;
  font-size: 13px;
  border-radius: var(--r-max);
  /* Soften the white-against-dark abruptness: subtle gradient + halo glow */
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(238,238,240,0.95) 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.14),
    0 0 0 4px rgba(255,255,255,0.04),
    0 6px 18px rgba(0,0,0,0.35);
  transition: box-shadow 220ms ease, transform 160ms ease;
}
.nav-cta:hover {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.25),
    0 0 0 6px rgba(255,255,255,0.06),
    0 8px 24px rgba(0,0,0,0.4);
}
.lang-select {
  position: relative;
  display: flex; align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--fg-08);
  color: var(--fg-60);
  transition: color 160ms ease, background 160ms ease;
}
.lang-select:hover { color: var(--fg); background: rgba(255, 255, 255, 0.08); }
.lang-select svg { color: var(--fg-50); flex-shrink: 0; }
.lang-select select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding-right: 14px;
  cursor: pointer;
}
.lang-select select option {
  background: var(--bg-secondary);
  color: var(--fg);
}
.lang-select::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 5px; height: 5px;
  border-right: 1.5px solid var(--fg-50);
  border-bottom: 1.5px solid var(--fg-50);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 0 80px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg-castle {
  position: absolute;
  inset: -15% -10% 0 -10%;
  background: url("assets/castle-alt.png") center 35% / cover no-repeat;
  filter: blur(32px) saturate(0.4) brightness(0.85) contrast(1.05);
  opacity: 0.7;
  z-index: -3;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  /* Killing the banding: force GPU layer + scale 1.02 so blur edges stay off-canvas */
  transform: translate3d(0, 0, 0) scale(1.04);
  backface-visibility: hidden;
}

.hero-bg-castle-soft {
  position: absolute;
  inset: -5%;
  background: url("assets/castle-alt.png") center 35% / cover no-repeat;
  filter: blur(80px) saturate(0.15) brightness(0.7);
  opacity: 0.5;
  z-index: -3;
  will-change: transform;
  transform: translate3d(0, 0, 0) scale(1.06);
}

/* Smoother dark wash — many more stops to avoid quantization banding */
.hero-bg-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7,8,10,0.30) 0%,
    rgba(7,8,10,0.42) 20%,
    rgba(7,8,10,0.55) 40%,
    rgba(7,8,10,0.70) 60%,
    rgba(7,8,10,0.85) 80%,
    rgba(7,8,10,0.96) 92%,
    rgba(7,8,10,1) 100%
  );
  z-index: -2;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(140% 80% at 50% 105%, rgba(7,8,10,1) 0%, rgba(7,8,10,0.4) 40%, transparent 65%),
    radial-gradient(150% 65% at 50% -5%, rgba(7,8,10,0.5) 0%, rgba(7,8,10,0.15) 35%, transparent 55%);
  z-index: -2;
  pointer-events: none;
}

/* Dithering / grain overlay specifically over the hero — hides blur banding */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
  opacity: 0.4;
}
.orb-1 { width: 520px; height: 520px; left: -8%; top: 8%;
  background: radial-gradient(circle, rgba(255,255,255,0.10), transparent 70%); }
.orb-2 { width: 420px; height: 420px; right: -6%; top: 30%;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%); }

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.hero-copy { display: flex; flex-direction: column; gap: 28px; max-width: 620px; }

.hero-title {
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  padding-bottom: 0.08em;
}
.hero-title .display {
  display: block;
  font-weight: 500;
  font-style: italic;
  color: var(--fg-60);
}
.hero-title .strong {
  display: block;
  padding-bottom: 0.08em;
  background: linear-gradient(180deg, rgb(255,255,255) 0%, rgb(189,189,189) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-60);
  max-width: 520px;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-social-proof {
  display: flex; align-items: center; gap: 14px;
  margin-top: 8px;
  color: var(--fg-50);
  font-size: 13px;
}
.avatar-stack {
  display: flex;
}
.avatar-stack .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg-base);
  margin-left: -8px;
  background-size: cover; background-position: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ── WorldGen — network graph, bigger + cleaner ───────────── */
.wg-stage {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 1 / 1;
  margin: -40px auto 0;
  padding-top: 80px;
  transition: opacity 600ms ease;
  container-type: inline-size;
  container-name: wg;
}

/* Blueprint grid — single layer, uniform, softly faded */
.wg-stage::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse 50% 50% at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.3) 65%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.3) 65%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.wg-stage::after { display: none; }

.wg-bg-pulse {
  position: absolute;
  inset: 8% 4% 0% 4%;
  border-radius: 28px;
  background: radial-gradient(50% 60% at 50% 50%, rgba(255, 240, 125, 0.22), transparent 70%);
  filter: blur(28px);
  opacity: 0;
  transition: opacity 500ms ease;
  pointer-events: none;
}
.wg-bg-pulse.on { opacity: 1; }

.wg-burst {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 4%; height: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 125, 1), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  filter: blur(2px);
}
.wg-burst.on { animation: wg-burst 700ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
@keyframes wg-burst {
  0%   { opacity: 0; width: 4%; height: 4%; }
  20%  { opacity: 1; }
  100% { opacity: 0; width: 90%; height: 90%; }
}

.wg-modes {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 0 0 1px var(--fg-18);
  z-index: 12;
}
.wg-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg-80);
  transition: color 300ms ease, background 300ms ease;
  white-space: nowrap;
}
.wg-mode-tab.active {
  color: var(--fg);
  background: rgba(255, 240, 125, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 125, 0.3);
}
.wg-mode-tab svg { opacity: 0.7; }
.wg-mode-tab.active svg { opacity: 1; color: var(--accent-yellow); }
.wg-mode-divider { width: 1px; height: 14px; background: var(--fg-12); }

.wg-input {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 78%;
  min-height: 50px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.045) 100%);
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  font-size: 13px;
  color: var(--fg);
  z-index: 7;
  transition: box-shadow 300ms ease, transform 500ms ease, opacity 500ms ease;
}
.wg-input.submit {
  box-shadow: inset 0 0 0 1.5px rgba(255, 240, 125, 0.65), 0 0 30px rgba(255, 240, 125, 0.32);
  transform: translateX(-50%) translateY(-2px);
}
.wg-input.done {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px) scale(0.94);
  pointer-events: none;
}
.wg-input-icon { color: var(--fg-60); flex-shrink: 0; display: grid; place-items: center; }
.wg-input-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.35;
  color: var(--fg);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wg-caret {
  display: inline-block;
  width: 1.5px; height: 13px;
  background: var(--fg);
  margin-left: 1px;
  vertical-align: -2px;
  animation: wg-caret 1s steps(2, start) infinite;
}
@keyframes wg-caret { to { visibility: hidden; } }
.wg-file .wg-file-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wg-file-name { font-size: 12.5px; font-weight: 600; color: var(--fg); }
.wg-file-progress { height: 3px; border-radius: 2px; background: var(--fg-08); overflow: hidden; }
.wg-file-bar {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent-yellow), rgba(255, 240, 125, 0.7));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 240, 125, 0.5);
  transition: width 80ms linear;
}
.wg-file-done {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  color: var(--accent-yellow);
}
.wg-file.in { animation: wg-file-in 360ms cubic-bezier(0.2, 0.7, 0.3, 1); }
@keyframes wg-file-in {
  from { transform: translateX(-50%) translateY(-12px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.wg-graph {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
}
.wg-net-edge {
  fill: none;
  stroke: var(--fg-12);
  stroke-width: 0.16;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: stroke 280ms ease, opacity 280ms ease;
}
.wg-net-edge.on {
  animation:
    wg-edge-draw 800ms cubic-bezier(0.45, 0, 0.25, 1) forwards;
}
@keyframes wg-edge-draw {
  0%   { opacity: 1; stroke-dashoffset: 1; stroke: rgba(255, 255, 255, 0.6); stroke-width: 0.28; filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5)); }
  100% { opacity: 1; stroke-dashoffset: 0; stroke: var(--fg-12); stroke-width: 0.14; filter: none; }
}



.wg-net-edge.dim { opacity: 0.15; }
.wg-net-edge.hi { stroke: var(--accent-yellow); stroke-width: 0.28; opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 240, 125, 0.6)); }

.wg-rel-edge {
  fill: none;
  stroke-width: 0.24;
  stroke-linecap: round;
  stroke-dasharray: 1.2 1.2;
  opacity: 0;
  transition: opacity 280ms ease;
}
.wg-rel-edge.on {
  animation:
    wg-rel-draw 700ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes wg-rel-draw {
  0%   { opacity: 0; stroke-width: 0.4; filter: drop-shadow(0 0 5px var(--rel-color, rgba(255, 240, 125, 0.8))); }
  40%  { opacity: 1; stroke-width: 0.34; }
  100% { opacity: 1; stroke-width: 0.24; filter: none; }
}


.wg-rel-edge.dim { opacity: 0.18; }
.wg-rel-edge.hi {
  stroke-width: 0.34;
  opacity: 1;
  filter: drop-shadow(0 0 6px var(--rel-color, rgba(255, 240, 125, 0.7)));
}

/* Relation labels — glass pills, colored by edge type */
.wg-rel-label {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(7, 8, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--rel-color, rgba(255, 240, 125, 0.4));
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--rel-color, var(--accent-yellow));
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  transition: opacity 280ms ease, box-shadow 280ms ease, background 280ms ease;
  animation: wg-rel-pop 320ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.wg-rel-label.hi {
  background: color-mix(in srgb, var(--rel-color, #FFF07D) 18%, rgba(7, 8, 10, 0.85));
  box-shadow:
    inset 0 0 0 1px var(--rel-color, rgba(255, 240, 125, 0.7)),
    0 0 14px color-mix(in srgb, var(--rel-color, #FFF07D) 35%, transparent);
}
@keyframes wg-rel-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.wg-stage:has(.wg-net-node.hi) .wg-rel-label { opacity: 0 !important; }
@container wg (max-width: 560px) {
  .wg-rel-label { font-size: 9px; padding: 2px 8px; }
}
@container wg (max-width: 460px) {
  .wg-rel-label { font-size: 8.5px; padding: 2px 6px; }
}



.wg-net-node {
  position: absolute;
  display: block;
  z-index: 2;
  cursor: pointer;
  will-change: transform, opacity;
  transform-style: preserve-3d;
  transition: opacity 280ms ease;
}
.wg-net-node.dim {
  filter: brightness(0.45) saturate(0.4);
}
.wg-net-node.dim .wg-net-label,
.wg-net-node.dim .wg-net-summary { opacity: 0.6; }
.wg-net-node.hi  { z-index: 5; }

.wg-net-portrait,
.wg-net-icon {
  background-size: cover;
  background-position: center;
  border: 2px solid var(--bg-base);
  /* Solid dark base + frosted-glass tint on top — fully opaque,
     so SVG edges behind the node are never visible through it. */
  background-color: rgba(20, 22, 28, 1);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 100%);
  background-blend-mode: normal;
  box-shadow:
    0 0 0 1px var(--fg-18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  transition: box-shadow 280ms ease, transform 280ms ease, clip-path 280ms ease;
}
/* Portraits use the image; the dark base only shows through if the PNG has alpha */
.wg-net-portrait { background-blend-mode: normal; background-color: rgba(20, 22, 28, 1); }
.wg-net-icon {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 100%);
  background-color: rgba(20, 22, 28, 1);
  padding: 18%;
}

.wg-net-node.wg-world .wg-net-portrait,
.wg-net-node.wg-world .wg-net-icon,
.wg-net-node.wg-char  .wg-net-portrait,
.wg-net-node.wg-char  .wg-net-icon { border-radius: 50%; }

.wg-net-node.wg-loc .wg-net-icon {
  border-radius: 16%;
  box-shadow:
    0 0 0 1px rgba(255, 213, 128, 0.5),
    0 0 0 4px rgba(255, 213, 128, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.55);
}
.wg-net-node.wg-fact .wg-net-icon {
  position: relative;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  border: none;
  /* Outer layer = border color (visible only on the rim) */
  background: linear-gradient(180deg, rgba(173, 220, 255, 0.62) 0%, rgba(173, 220, 255, 0.32) 100%);
  box-shadow: none;
  padding: 0;
}
.wg-net-node.wg-fact .wg-net-icon::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  background: linear-gradient(180deg, rgba(20, 22, 28, 1) 0%, rgba(14, 16, 22, 1) 100%);
  z-index: 0;
}
.wg-net-node.wg-fact .wg-net-icon svg {
  position: relative;
  z-index: 1;
  width: 56%;
  height: 56%;
}
.wg-net-node.wg-quest .wg-net-icon {
  position: relative;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  border: none;
  background: linear-gradient(135deg, rgba(255, 179, 123, 0.62) 0%, rgba(255, 179, 123, 0.32) 100%);
  box-shadow: none;
  padding: 0;
}
.wg-net-node.wg-quest .wg-net-icon::before {
  content: "";
  position: absolute;
  inset: 1.5px;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: linear-gradient(135deg, rgba(22, 18, 14, 1) 0%, rgba(14, 12, 10, 1) 100%);
  z-index: 0;
}
.wg-net-node.wg-quest .wg-net-icon svg {
  position: relative;
  z-index: 1;
  width: 46%;
  height: 46%;
}

.wg-net-node.wg-lg .wg-net-portrait,
.wg-net-node.wg-lg .wg-net-icon {
  width: 108px; height: 108px;
  box-shadow:
    0 0 0 1px rgba(255, 240, 125, 0.4),
    0 0 0 5px rgba(255, 240, 125, 0.06),
    0 0 32px rgba(255, 240, 125, 0.24),
    0 16px 38px rgba(0, 0, 0, 0.65);
  animation: wg-root-pulse 4s ease-in-out infinite;
}
@keyframes wg-root-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 240, 125, 0.4), 0 0 0 5px rgba(255, 240, 125, 0.06), 0 0 32px rgba(255, 240, 125, 0.24), 0 16px 38px rgba(0, 0, 0, 0.65); }
  50%      { box-shadow: 0 0 0 1px rgba(255, 240, 125, 0.6), 0 0 0 6px rgba(255, 240, 125, 0.10), 0 0 46px rgba(255, 240, 125, 0.38), 0 16px 38px rgba(0, 0, 0, 0.65); }
}
.wg-net-node.wg-md .wg-net-portrait,
.wg-net-node.wg-md .wg-net-icon { width: 72px; height: 72px; }
.wg-net-node.wg-sm .wg-net-portrait,
.wg-net-node.wg-sm .wg-net-icon { width: 56px; height: 56px; }

.wg-net-node.hi .wg-net-portrait,
.wg-net-node.hi .wg-net-icon {
  box-shadow:
    0 0 0 2px var(--accent-yellow),
    0 0 0 6px rgba(255, 240, 125, 0.12),
    0 0 36px rgba(255, 240, 125, 0.5),
    0 14px 36px rgba(0, 0, 0, 0.6);
  transform: scale(1.06);
}

.wg-net-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--fg);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.wg-net-summary {
  position: absolute;
  top: calc(100% + 24px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg-60);
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.wg-net-node.wg-lg .wg-net-label { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.wg-net-node.wg-lg .wg-net-summary {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-yellow);
  opacity: 0.85;
}
.wg-net-node.wg-sm .wg-net-label { font-size: 12px; }
.wg-net-node.wg-sm .wg-net-summary { font-size: 10px; }

/* DETAIL OVERLAY — plain text rows beside hovered node, fully opaque,
   rendered at stage level so node bounds don't extend on hover. */
.wg-detail-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 20;
  pointer-events: none;
  min-width: 120px;
  max-width: 200px;
}
.wg-detail-right {
  transform: translateY(-50%);
  text-align: left;
  align-items: flex-start;
}
.wg-detail-left {
  transform: translate(-100%, -50%);
  text-align: right;
  align-items: flex-end;
}
.wg-detail-below {
  transform: translateX(-50%);
  text-align: center;
  align-items: center;
}
.wg-detail-above {
  transform: translate(-50%, -100%);
  text-align: center;
  align-items: center;
}
.wg-detail-line {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(7, 8, 10, 0.82);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--fg-08);
  animation: wg-detail-line-in 220ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.wg-detail-left .wg-detail-line { flex-direction: row-reverse; }
.wg-detail-below .wg-detail-line,
.wg-detail-above .wg-detail-line { justify-content: center; }
@keyframes wg-detail-line-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wg-detail-k {
  color: var(--fg-50);
  font-weight: 500;
  font-size: 11px;
}
.wg-detail-v {
  color: var(--fg);
  font-weight: 600;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Hide relation tags whenever a node is hovered */

.wg-stats {
  position: absolute;
  left: 50%;
  bottom: -64px;
  transform: translate(-50%, 0) translateY(8px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 125, 0.25), 0 0 24px rgba(255, 240, 125, 0.1);
  opacity: 0;
  transition: opacity 500ms cubic-bezier(0.2, 0.7, 0.3, 1), transform 500ms cubic-bezier(0.2, 0.7, 0.3, 1);
  z-index: 6;
  white-space: nowrap;
}
.wg-stats.in { opacity: 1; transform: translate(-50%, 0) translateY(0); }
.wg-stat { display: inline-flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; }
.wg-stat-n { font-size: 16px; font-weight: 700; color: var(--fg); letter-spacing: -0.01em; }
.wg-stat-l { font-size: 11px; font-weight: 500; color: var(--fg-60); letter-spacing: 0.02em; }
.wg-stat-sep { width: 1px; height: 12px; background: var(--fg-18); }

@container wg (max-width: 640px) {
  .wg-input { font-size: 12px; min-height: 46px; padding: 10px 14px; }
  .wg-net-node.wg-lg .wg-net-portrait,
  .wg-net-node.wg-lg .wg-net-icon { width: 92px; height: 92px; }
  .wg-net-node.wg-md .wg-net-portrait,
  .wg-net-node.wg-md .wg-net-icon { width: 60px; height: 60px; }
  .wg-net-node.wg-sm .wg-net-portrait,
  .wg-net-node.wg-sm .wg-net-icon { width: 48px; height: 48px; }
  .wg-net-label { font-size: 12px; }
  .wg-net-summary { font-size: 9.5px; }
  .wg-net-node.wg-lg .wg-net-label { font-size: 15px; }
}
@container wg (max-width: 460px) {
  .wg-stage { padding-top: 64px; }
  .wg-input { top: 50px; font-size: 11px; padding: 8px 12px; min-height: 40px; width: 88%; }
  .wg-net-node.wg-lg .wg-net-portrait,
  .wg-net-node.wg-lg .wg-net-icon { width: 72px; height: 72px; }
  .wg-net-node.wg-md .wg-net-portrait,
  .wg-net-node.wg-md .wg-net-icon { width: 48px; height: 48px; }
  .wg-net-node.wg-sm .wg-net-portrait,
  .wg-net-node.wg-sm .wg-net-icon { width: 40px; height: 40px; }
  .wg-net-label { font-size: 10.5px; }
  .wg-net-summary { display: none; }
  .wg-net-node.wg-lg .wg-net-summary { display: inline; font-size: 9px; }
}
@container wg (max-width: 360px) {
  .wg-net-summary { display: none; }
  .wg-net-node.wg-lg .wg-net-summary { display: none; }
}

/* iPhone screen content — matches real app: dark cards, big header, emoji tags */
.screen-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px 0;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.screen-status .right { display: flex; align-items: center; gap: 4px; }
.screen-status svg { width: 14px; height: 14px; }

.screen-stage {
  position: relative;
  width: 100%; height: calc(100% - 28px);
  margin-top: 14px;
  overflow: hidden;
}
.screen-slide {
  position: absolute;
  inset: 0;
  padding: 16px 18px 56px;
  display: flex; flex-direction: column;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.screen-slide.active { opacity: 1; transform: none; }

/* Slide 1 — World Overview (matches real app) */
.s-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0 16px;
}
.s-header .s-title-block { display: flex; flex-direction: column; gap: 2px; }
.s-header .s-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); }
.s-header .s-sub { font-size: 12px; color: var(--fg-50); font-weight: 500; }
.s-header .s-action {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--fg-05);
  border: 1px solid var(--fg-08);
  display: grid; place-items: center;
  color: var(--fg);
}
.s-header .s-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #4a3a6e, #1e1f24);
  border: 1px solid var(--fg-08);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  color: var(--fg);
}

.world-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 28px;
  padding: 18px 16px;
  margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  overflow: hidden;
}
.world-card .row { display: flex; align-items: flex-start; gap: 14px; }
.world-card .cover {
  width: 56px; height: 56px;
  border-radius: 14px;
  background-size: cover; background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--fg-08);
}
.world-card .cover.placeholder {
  background: rgba(255,255,255,0.04);
}
.world-card .meta { flex: 1; min-width: 0; padding-top: 2px; }
.world-card .meta .name-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.world-card .meta .name { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.world-card .meta .badge-new {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--fg-12);
  color: var(--fg);
}
.world-card .more {
  width: 24px; height: 24px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 2.5px;
  color: var(--fg-50);
  flex-shrink: 0;
}
.world-card .more::before, .world-card .more::after, .world-card .more span {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.world-card .more span { display: block; }
.world-card .desc {
  font-size: 13px; line-height: 1.45;
  color: var(--fg-60);
}
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 12px; font-weight: 500;
  color: var(--fg);
}
.tag .e { font-size: 13px; line-height: 1; }

/* Slide 2 — Region edit card (matches Onboarding "Настраивайте Ваш мир") */
.region-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 28px;
  padding: 18px;
  margin-top: 18px;
}
.region-card .top { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--fg-05); }
.region-card .cover {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--fg-08);
  flex-shrink: 0;
}
.region-card .nm { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.region-card .rg { font-size: 13px; color: var(--fg-50); font-weight: 500; margin-top: 2px; }
.region-card .fields { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; }
.region-card .field {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.region-card .field .k { color: var(--fg-50); font-weight: 500; }
.region-card .field .v { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.region-card .field .v .em { font-size: 16px; line-height: 1; }
.region-card .field .v.violet { color: var(--accent-violet); }
.region-card .stepper {
  display: flex; align-items: center;
  background: var(--fg-08);
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
  margin-left: 6px;
}
.region-card .stepper button {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--fg);
  font-size: 16px;
  line-height: 1;
}
.region-card .stepper button:hover { background: var(--fg-12); }

.chat-bubble {
  margin: 28px auto 0;
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  border-bottom-left-radius: 6px;
  position: relative;
  align-self: center;
}

/* Slide 3 — AI chat with city result */
.ai-thread {
  display: flex; flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  flex: 1;
  overflow: hidden;
}
.ai-msg-user {
  align-self: flex-end;
  max-width: 84%;
  padding: 11px 14px;
  border-radius: 18px;
  border-bottom-right-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.ai-result {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--fg-08);
  border-radius: 18px;
  padding: 14px;
  font-size: 13px;
}
.ai-result .lead {
  color: var(--fg-60);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.5;
}
.ai-result .lead .chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-weight: 600;
  color: var(--fg);
  font-size: 12px;
}
.ai-result .ready { color: var(--fg); font-weight: 600; margin-top: 10px; margin-bottom: 6px; }
.ai-result .diff {
  display: flex; flex-direction: column;
  font-size: 12px;
}
.ai-result .diff-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
  color: var(--fg-60);
  border-top: 1px solid rgba(255,255,255,0.04);
}
.ai-result .diff-row:first-child { border-top: none; }
.ai-result .diff-row > span:first-child {
  color: var(--fg-50);
  flex-shrink: 0;
  min-width: 56px;
}
.ai-result .diff-row .val {
  color: var(--fg);
  font-weight: 500;
}
.ai-result .diff-row::before { display: none; }

.ai-compose {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--fg-08);
  backdrop-filter: blur(var(--blur-m));
  display: flex; align-items: center;
  padding: 0 8px 0 16px;
  font-size: 13px;
  color: var(--fg);
}
.ai-compose .caret {
  display: inline-block;
  width: 1px; height: 14px;
  background: var(--fg);
  margin-left: 2px;
  animation: caret-blink 1s steps(2, start) infinite;
}
@keyframes caret-blink { to { visibility: hidden; } }
.ai-compose .send-btn {
  margin-left: auto;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
  color: var(--fg);
}

/* Slide 4 — Roleplay simulation (3 portraits + quest + dialogue) */
.rp-scene {
  position: relative;
  flex: 1;
  margin-top: 12px;
  min-height: 360px;
}
.rp-portrait {
  position: absolute;
  border-radius: 50%;
  background-size: cover; background-position: center;
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 1px var(--fg-12), 0 8px 20px rgba(0,0,0,0.5);
}
.rp-portrait.p1 { width: 64px; height: 64px; top: 38px; left: 24px; }
.rp-portrait.p2 { width: 68px; height: 68px; top: 62px; right: 12px; }
.rp-portrait.p3 {
  width: 100px; height: 100px;
  top: 140px; left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px var(--fg-32), 0 0 0 6px rgba(255,255,255,0.04), 0 12px 30px rgba(0,0,0,0.6);
}

.quest-bubble {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-22%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 16px;
  border-bottom-left-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.quest-bubble .scroll { font-size: 14px; line-height: 1; }
.quest-bubble .label { color: var(--fg-60); font-weight: 500; }
.quest-bubble .title { color: var(--fg); font-weight: 700; }

.rp-dialogue {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  margin: 0 4px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--fg-08);
  border-radius: 18px;
  border-top-left-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg);
}
.import-icon {
  margin: 30px auto 20px;
  width: 72px; height: 72px;
  border-radius: 20px;
  background: rgba(255,240,125,0.12);
  border: 1px solid rgba(255,240,125,0.2);
  display: grid; place-items: center;
  font-size: 36px;
}
.import-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.15;
}
.import-sub {
  font-size: 13px;
  color: var(--fg-50);
  text-align: center;
  margin-top: 8px;
  line-height: 1.4;
  padding: 0 8px;
}
.import-list {
  margin-top: 22px;
  display: flex; flex-direction: column;
}
.import-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--fg-05);
  font-size: 15px;
  font-weight: 600;
}
.import-row:last-child { border-bottom: none; }
.import-row .ico {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  color: var(--fg);
  flex-shrink: 0;
}
.import-row .lbl { flex: 1; }
.import-row .status {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
}
.import-row .status.add {
  background: var(--accent-yellow);
  color: var(--bg-base);
}
.import-row .status.ok {
  background: #4ade80;
  color: var(--bg-base);
}

.import-cta {
  position: absolute;
  bottom: 24px; left: 18px; right: 18px;
  height: 54px;
  border-radius: 18px;
  background: var(--fg);
  color: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.005em;
}

/* Slide 3 — AI Roleplay chat with character */
.rp-header {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0 18px;
  border-bottom: 1px solid var(--fg-05);
}
.rp-header .av {
  width: 44px; height: 44px;
  border-radius: 50%;
  background-size: cover; background-position: center;
  border: 1px solid var(--fg-12);
  position: relative;
}
.rp-header .av::after {
  content: ""; position: absolute;
  bottom: 0; right: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent-yellow);
  border: 2px solid var(--bg-base);
}
.rp-header .who { flex: 1; min-width: 0; }
.rp-header .nm { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.rp-header .tag-line {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--fg-50);
  font-weight: 500;
  margin-top: 2px;
}
.rp-header .tag-line .sparkle { color: var(--accent-yellow); }

.rp-thread {
  display: flex; flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  flex: 1;
  overflow: hidden;
}
.rp-msg {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.45;
}
.rp-msg.player {
  align-self: flex-end;
  background: var(--fg);
  color: var(--bg-base);
  border-bottom-right-radius: 6px;
  font-weight: 500;
}
.rp-msg.npc {
  align-self: flex-start;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.06);
  border-bottom-left-radius: 6px;
  color: var(--fg);
}
.rp-msg.npc .narration {
  font-style: italic;
  color: var(--fg-60);
  font-size: 12px;
  margin-bottom: 6px;
}

.rp-compose {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  height: 48px;
  border-radius: 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  backdrop-filter: blur(var(--blur-m));
  display: flex; align-items: center;
  padding: 0 6px 0 18px;
  font-size: 13px;
  color: var(--fg-50);
}
.rp-compose .send {
  margin-left: auto;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--fg);
  display: grid; place-items: center;
  color: var(--bg-base);
}

/* Slide 4 — Character connections / relationship graph */
.cn-header { padding: 6px 0 14px; }
.cn-canvas {
  position: relative;
  height: 280px;
  border-radius: 24px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
  margin-bottom: 14px;
}
.cn-canvas svg.lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.cn-node {
  position: absolute;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 4px;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.cn-node .face {
  width: 42px; height: 42px;
  border-radius: 50%;
  background-size: cover; background-position: center;
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 1px var(--fg-12), 0 6px 16px rgba(0,0,0,0.45);
}
.cn-node.center .face {
  width: 60px; height: 60px;
  box-shadow: 0 0 0 1px var(--fg-32), 0 0 0 6px rgba(255,255,255,0.06), 0 8px 24px rgba(0,0,0,0.5);
}
.cn-node .nm {
  font-size: 9px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.cn-node .rel {
  font-size: 8px;
  color: var(--fg-50);
  font-weight: 500;
}

.cn-list { display: flex; flex-direction: column; gap: 8px; }
.cn-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}
.cn-row .av-s {
  width: 30px; height: 30px;
  border-radius: 50%;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.cn-row .nm { font-weight: 600; flex: 1; color: var(--fg); }
.cn-row .rel { color: var(--fg-50); font-size: 11px; }

/* Slide 3 — Lore AI */
.lore-thread { display: flex; flex-direction: column; gap: 10px; padding-bottom: 80px; }
.bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 12px;
  line-height: 1.5;
}
.bubble.user {
  align-self: flex-end;
  background: var(--fg);
  color: var(--bg-base);
  border-bottom-right-radius: 6px;
}
.bubble.ai {
  align-self: flex-start;
  background: var(--glass);
  border: 1px solid var(--fg-08);
  border-bottom-left-radius: 6px;
}
.bubble.ai .role {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-violet);
  margin-bottom: 4px;
}
.compose {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  height: 46px;
  border-radius: 23px;
  background: var(--glass);
  backdrop-filter: blur(var(--blur-m));
  border: 1px solid var(--fg-08);
  display: flex; align-items: center;
  padding: 0 6px 0 16px;
  font-size: 12px;
  color: var(--fg-50);
}
.compose .send {
  margin-left: auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--fg);
  display: grid; place-items: center;
  color: var(--bg-base);
}

/* Slide 4 — Map (regions) */
.map-canvas {
  position: relative;
  height: 280px;
  border-radius: var(--r-m);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(189,159,245,0.25), transparent 60%),
    radial-gradient(100% 80% at 80% 90%, rgba(173,220,255,0.18), transparent 60%),
    linear-gradient(180deg, #0e0f12, #1a1c20);
  margin-bottom: 12px;
}
.map-canvas::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(80% 80% at 50% 50%, #000 60%, transparent);
}
.pin {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent-yellow);
  box-shadow: 0 0 0 4px rgba(255,240,125,0.18), 0 0 24px rgba(255,240,125,0.6);
}
.pin.violet { background: var(--accent-violet); box-shadow: 0 0 0 4px rgba(189,159,245,0.2), 0 0 24px rgba(189,159,245,0.6); }
.pin.blue { background: var(--accent-blue); box-shadow: 0 0 0 4px rgba(173,220,255,0.2), 0 0 24px rgba(173,220,255,0.6); }
.pin.rose { background: var(--accent-rose); box-shadow: 0 0 0 4px rgba(255,184,179,0.2), 0 0 24px rgba(255,184,179,0.6); }

.region-list { display: flex; flex-direction: column; gap: 8px; }
.region {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--fg-08);
  font-size: 12px;
}
.region .dot { width: 8px; height: 8px; border-radius: 50%; }
.region .nm { font-weight: 600; flex: 1; }
.region .ct { color: var(--fg-50); font-size: 11px; }

/* iPhone carousel dots */
.dots {
  display: flex; gap: 6px;
  position: absolute;
  bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 6;
}
.dots .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-32);
  transition: width 300ms ease, background 300ms ease;
}
.dots .dot.active {
  width: 18px;
  background: var(--fg);
  border-radius: 3px;
}

/* ── FEATURES ─────────────────────────────────────────────── */
.features {
  padding: 80px 0 60px;
}
.section-head {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: 60px;
  max-width: 720px;
}
.section-head h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.section-head h2 .em {
  font-style: italic;
  font-weight: 500;
  color: var(--fg-60);
  letter-spacing: -0.02em;
}
.section-head p {
  color: var(--fg-60);
  font-size: 18px;
  line-height: 1.55;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  position: relative;
  padding: 32px;
  border-radius: var(--r-m);
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.0432) 50%, rgba(255,255,255,0.0324) 100%);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  box-shadow: inset 0 0 0 1px var(--fg-08);
  display: flex; flex-direction: column;
  gap: 14px;
  min-height: 240px;
  overflow: hidden;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.feature-card:hover {
  box-shadow: inset 0 0 0 1px var(--fg-18);
  transform: translateY(-2px);
}
.feature-card .icon-box {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px var(--fg-12);
  display: grid; place-items: center;
  color: var(--fg);
}
.feature-card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.feature-card p {
  color: var(--fg-60);
  font-size: 14px;
  line-height: 1.55;
  margin-top: auto;
}
.feature-card.tall { grid-row: span 2; min-height: 540px; }
.feature-card.wide { grid-column: span 2; }

.feature-card .accent-glow {
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
  pointer-events: none;
  right: -80px; top: -80px;
}

/* ── SHOWCASE — compact 4-up rail with stagger reveal ───────── */
.showcase {
  padding: 60px 0;
  position: relative;
}
.sc-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 56px;
  max-width: 720px;
}
.sc-head h2 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.sc-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.sc-line {
  position: absolute;
  top: 18px;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--fg-12) 10%, var(--fg-12) 90%, transparent 100%);
  pointer-events: none;
}
.sc-step {
  position: relative;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease, background 280ms ease;
}
.sc-step.in {
  opacity: 1;
  transform: none;
  animation: sc-pop 700ms cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
  animation-delay: inherit;
}
@keyframes sc-pop {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.sc-step.dim { opacity: 0.4; }
.sc-step.hover { opacity: 1; }
.sc-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-base);
  box-shadow: inset 0 0 0 1px var(--fg-18), 0 0 0 6px var(--bg-base);
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fg);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  z-index: 1;
  transition: box-shadow 280ms ease, transform 280ms ease;
}
.sc-step.hover .sc-num {
  box-shadow: inset 0 0 0 1px var(--fg-32), 0 0 0 6px var(--bg-base), 0 0 24px rgba(255,255,255,0.18);
  transform: scale(1.05);
}
.sc-step h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--fg);
  padding-right: 12px;
}
.sc-step p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-60);
  padding-right: 12px;
}
.sc-step::before {
  content: "";
  position: absolute;
  inset: -16px -8px;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  box-shadow: inset 0 0 0 1px var(--fg-08);
  opacity: 0;
  transition: opacity 280ms ease;
  z-index: -1;
  pointer-events: none;
}
.sc-step.hover::before { opacity: 1; }

@media (max-width: 900px) {
  .sc-rail { grid-template-columns: 1fr 1fr; gap: 32px 0; }
  .sc-line { display: none; }
}
@media (max-width: 540px) {
  .sc-rail { grid-template-columns: 1fr; }
  .sc-step { padding: 0; }
}

/* Scene 1 — worlds (scaled-up world cards) */
.sp-worlds { display: flex; flex-direction: column; gap: 16px; }
.sp-world-card {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 16px;
}
.sp-world-card .row { display: flex; align-items: center; gap: 14px; }
.sp-world-card .cover {
  width: 56px; height: 56px;
  border-radius: 14px;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.sp-world-card .name { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.sp-world-card .name-row { display: flex; align-items: center; gap: 10px; }
.sp-world-card .badge-new {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 7px; border-radius: 6px;
  background: var(--fg-12); color: var(--fg);
}
.sp-world-card .desc { font-size: 14px; line-height: 1.5; color: var(--fg-60); }
.sp-world-card .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-world-card .tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 13px; font-weight: 500; color: var(--fg);
}
.sp-world-card .tag .e { font-size: 14px; line-height: 1; }

/* Scene 2 — region card, scaled */
.sp-region { display: flex; flex-direction: column; }
.sp-region .region-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  padding: 22px;
}
.sp-region .top { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--fg-05); }
.sp-region .cover { width: 56px; height: 56px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--fg-08); }
.sp-region .nm { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.sp-region .rg { font-size: 13px; color: var(--fg-50); font-weight: 500; margin-top: 2px; }
.sp-region .fields { display: flex; flex-direction: column; padding-top: 8px; }
.sp-region .field {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0;
  font-size: 15px;
}
.sp-region .field + .field { border-top: 1px solid var(--fg-05); }
.sp-region .field .k { color: var(--fg-50); font-weight: 500; }
.sp-region .field .v { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.sp-region .field .v .em { font-size: 16px; }
.sp-region .field .v.violet { color: var(--accent-violet); }
.sp-region .stepper {
  display: inline-flex; padding: 2px;
  background: var(--fg-08); border-radius: 10px;
  gap: 2px; margin-left: 6px;
}
.sp-region .stepper button {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 15px; color: var(--fg);
}
.sp-region .chat-bubble {
  align-self: flex-start;
  margin: 22px 0 0;
  padding: 11px 16px;
  border-radius: 18px; border-bottom-left-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-size: 14px; font-weight: 500; color: var(--fg);
}

/* Scene 3 — AI chat, scaled */
.sp-ai { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.sp-ai .ai-msg-user {
  align-self: flex-end; max-width: 88%;
  padding: 12px 16px;
  border-radius: 18px; border-bottom-right-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-size: 14px; font-weight: 500; line-height: 1.45;
}
.sp-ai .ai-result {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--fg-08);
  border-radius: 18px;
  padding: 16px;
  font-size: 14px;
}
.sp-ai .ai-result .lead { color: var(--fg-60); margin-bottom: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sp-ai .ai-result .chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 7px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-weight: 600; color: var(--fg); font-size: 13px;
}
.sp-ai .ai-result .ready { color: var(--fg); font-weight: 600; margin-top: 12px; margin-bottom: 8px; }
.sp-ai .ai-result .diff { display: flex; flex-direction: column; }
.sp-ai .ai-result .diff-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 0;
  color: var(--fg-60);
  font-size: 13px;
}
.sp-ai .ai-result .diff-row + .diff-row { border-top: 1px solid rgba(255,255,255,0.04); }
.sp-ai .ai-result .diff-row > span:first-child { color: var(--fg-50); min-width: 80px; flex-shrink: 0; }
.sp-ai .ai-result .diff-row .val { color: var(--fg); font-weight: 500; }
.sp-ai .ai-compose {
  margin-top: auto;
  height: 52px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--fg-08);
  display: flex; align-items: center;
  padding: 0 8px 0 18px;
  font-size: 14px; color: var(--fg);
}
.sp-ai .ai-compose .caret {
  display: inline-block;
  width: 1px; height: 16px;
  background: var(--fg);
  margin-left: 2px;
  animation: caret-blink 1s steps(2, start) infinite;
}
.sp-ai .ai-compose .send-btn {
  margin-left: auto;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center; color: var(--fg);
}

/* Scene 4 — roleplay portraits */
.sp-rp { position: relative; flex: 1; }
.sp-rp .quest-bubble {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-26%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 18px; border-bottom-left-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.sp-rp .quest-bubble .label { color: var(--fg-60); }
.sp-rp .quest-bubble .title { color: var(--fg); font-weight: 700; }
.sp-rp .rp-portrait {
  position: absolute;
  border-radius: 50%;
  background-size: cover; background-position: center;
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 1px var(--fg-12), 0 12px 28px rgba(0,0,0,0.55);
}
.sp-rp .rp-portrait.p1 { width: 80px; height: 80px; top: 60px; left: 4%; }
.sp-rp .rp-portrait.p2 { width: 84px; height: 84px; top: 80px; right: 4%; }
.sp-rp .rp-portrait.p3 {
  width: 120px; height: 120px;
  top: 160px; left: 50%; transform: translateX(-50%);
  box-shadow: 0 0 0 1px var(--fg-32), 0 0 0 6px rgba(255,255,255,0.04), 0 14px 36px rgba(0,0,0,0.65);
}
.sp-rp .rp-dialogue {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--fg-08);
  border-radius: 18px; border-top-left-radius: 6px;
  font-size: 14px; line-height: 1.55;
  color: var(--fg);
}
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.showcase-card {
  position: relative;
  padding: 28px;
  border-radius: var(--r-m);
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.0432) 50%, rgba(255,255,255,0.0324) 100%);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  box-shadow: inset 0 0 0 1px var(--fg-08);
  overflow: hidden;
  display: flex; flex-direction: column;
  gap: 24px;
  min-height: 480px;
}
.showcase-card .scene {
  position: relative;
  border-radius: 20px;
  background: rgba(0,0,0,0.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  height: 260px;
  padding: 18px;
}
.showcase-card .body {
  display: flex; flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.showcase-card .step-no {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--fg-50);
  text-transform: uppercase;
}
.showcase-card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.showcase-card p {
  color: var(--fg-60);
  font-size: 14.5px;
  line-height: 1.55;
}

.showcase-steps { display: flex; flex-direction: column; gap: 140px; padding: 100px 0 200px; }
.showcase-step {
  padding: 32px 0;
  opacity: 0.35;
  transition: opacity 400ms ease;
}
.showcase-step.active { opacity: 1; }
.showcase-step .num {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--fg-50);
  line-height: 1;
  text-transform: uppercase;
}
.showcase-step h3 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 14px 0 16px;
  line-height: 1.05;
}
.showcase-step p {
  color: var(--fg-60);
  font-size: 17px;
  line-height: 1.55;
  max-width: 460px;
}
.sc-worlds { display: flex; flex-direction: column; gap: 10px; }
.sc-world-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.05);
}
.sc-world-row .cv {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  flex-shrink: 0;
}
.sc-world-row .nm { font-size: 14px; font-weight: 700; letter-spacing: -0.005em; flex: 1; }
.sc-world-row .pill {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--fg-12);
}
.sc-tags { display: flex; gap: 6px; margin-top: 4px; }
.sc-tag {
  font-size: 10px; font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Scene 2 — region card with fields */
.sc-region {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px;
}
.sc-region .head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--fg-05);
}
.sc-region .cv {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--fg-08);
}
.sc-region .nm { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.sc-region .rg { font-size: 11px; color: var(--fg-50); font-weight: 500; }
.sc-region .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  font-size: 13px;
}
.sc-region .row + .row { border-top: 1px solid var(--fg-05); }
.sc-region .row .k { color: var(--fg-50); }
.sc-region .row .v { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.sc-region .row .v .em { font-size: 14px; }
.sc-region .row.cap .v { color: var(--accent-violet); }
.sc-region .stepper {
  display: inline-flex; padding: 2px;
  background: var(--fg-08);
  border-radius: 8px;
  gap: 2px;
  margin-left: 4px;
}
.sc-region .stepper span {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 6px;
  font-size: 12px;
  color: var(--fg);
}

/* Scene 3 — AI prompt + diff card */
.sc-ai { display: flex; flex-direction: column; gap: 10px; }
.sc-ai-prompt {
  align-self: flex-end;
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 14px;
  border-bottom-right-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.sc-ai-result {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--fg-08);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 12px;
}
.sc-ai-result .lead { color: var(--fg-60); }
.sc-ai-result .chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  margin-left: 4px;
  font-weight: 600;
  color: var(--fg);
}
.sc-ai-result .ready { color: var(--fg); font-weight: 600; margin-top: 6px; font-size: 12px; }
.sc-ai-result .diff { margin-top: 4px; font-size: 11px; display: flex; flex-direction: column; gap: 2px; }
.sc-ai-result .diff-row {
  display: flex; align-items: center; gap: 6px;
  color: var(--fg-60);
}
.sc-ai-result .diff-row::before {
  content: ""; width: 12px; height: 1px;
  background: var(--fg-32);
  flex-shrink: 0;
}
.sc-ai-result .diff-row .val { color: var(--fg); font-weight: 500; }

/* Scene 4 — roleplay portraits + dialogue */
.sc-rp {
  position: relative;
  height: 100%;
}
.sc-rp-portrait {
  position: absolute;
  border-radius: 50%;
  background-size: cover; background-position: center;
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 1px var(--fg-12), 0 8px 18px rgba(0,0,0,0.5);
}
.sc-rp-portrait.a { width: 50px; height: 50px; top: 0; left: 0; }
.sc-rp-portrait.b { width: 52px; height: 52px; top: 4px; right: 0; }
.sc-rp-portrait.c {
  width: 78px; height: 78px;
  top: 64px; left: 50%; transform: translateX(-50%);
  box-shadow: 0 0 0 1px var(--fg-32), 0 0 0 5px rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.6);
}
.sc-rp-quest {
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-26%);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--fg-08);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.sc-rp-quest .label { color: var(--fg-60); }
.sc-rp-quest .title { color: var(--fg); font-weight: 700; }
.sc-rp-dialogue {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--fg-08);
  border-radius: 12px;
  border-top-left-radius: 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--fg);
}

/* ── HOW IT WORKS ─────────────────────────────────────────── */
.how {
  padding: 80px 0;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.how-card {
  padding: 32px;
  border-radius: var(--r-m);
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.0432) 50%, rgba(255,255,255,0.0324) 100%);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  box-shadow: inset 0 0 0 1px var(--fg-08);
  position: relative;
  display: flex; flex-direction: column;
  gap: 14px;
  min-height: 240px;
}
.how-card .step-no {
  position: absolute; top: 24px; right: 28px;
  font-weight: 700;
  font-size: 48px;
  color: var(--fg-12);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.how-card h4 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: auto;
}
.how-card p {
  color: var(--fg-60);
  font-size: 14px;
  line-height: 1.55;
}

/* ── WAITLIST ─────────────────────────────────────────────── */
.waitlist {
  padding: 60px 0;
}
.waitlist-card {
  position: relative;
  padding: 56px;
  border-radius: var(--r-m);
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.0432) 50%, rgba(255,255,255,0.0324) 100%);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  box-shadow: inset 0 0 0 1px var(--fg-08);
  overflow: hidden;
}
.waitlist-card::before {
  content: ""; position: absolute;
  width: 520px; height: 520px;
  right: -160px; top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,125,0.10), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.waitlist-card::after {
  content: ""; position: absolute;
  width: 420px; height: 420px;
  left: -120px; bottom: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.waitlist-grid {
  position: relative;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
}
.waitlist-copy h2 {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 16px 0 20px;
}
.waitlist-copy h2 .em {
  font-style: italic;
  font-weight: 500;
  color: var(--fg-60);
}
.waitlist-copy p {
  color: var(--fg-60);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.waitlist-stats { display: flex; gap: 32px; }
.waitlist-stats .stat-block {
  display: flex; flex-direction: column; gap: 2px;
}
.waitlist-stats .stat-block .n {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.waitlist-stats .stat-block .l {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-50);
  margin-top: 6px;
}

.waitlist-form {
  display: flex; flex-direction: column; gap: 14px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.full { grid-template-columns: 1fr; }
.form-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-50);
  margin-bottom: 6px;
  display: block;
}

.checkbox {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--fg-60);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox input { display: none; }
.checkbox .box {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--fg-32);
  background: var(--fg-05);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all 160ms ease;
}
.checkbox input:checked + .box {
  background: var(--fg);
  border-color: var(--fg);
}
.checkbox input:checked + .box::after {
  content: "";
  position: absolute; inset: 0;
  margin: auto;
  width: 5px; height: 9px;
  border: solid var(--bg-base);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
  left: 6px; top: 2px;
  position: absolute;
}
.checkbox a { color: var(--fg); border-bottom: 1px solid var(--fg-32); }

.form-success {
  display: none;
  padding: 20px;
  border-radius: var(--r-m);
  background: rgba(189,159,245,0.12);
  border: 1px solid rgba(189,159,245,0.3);
  color: var(--fg);
  font-size: 14px;
  align-items: center;
  gap: 12px;
}
.form-success.show { display: flex; }
.form-success .check {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-violet);
  display: grid; place-items: center;
  color: var(--bg-base);
  flex-shrink: 0;
}

/* ── NEWSLETTER STRIP ─────────────────────────────────────── */
.newsletter {
  padding: 40px 0;
}
.news-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px;
  padding: 32px 40px;
  border-radius: var(--r-m);
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.0432) 50%, rgba(255,255,255,0.0324) 100%);
  backdrop-filter: blur(var(--blur-m));
  -webkit-backdrop-filter: blur(var(--blur-m));
  box-shadow: inset 0 0 0 1px var(--fg-08);
}
.news-card .copy { display: flex; flex-direction: column; gap: 6px; max-width: 480px; }
.news-card .copy .label {
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.news-card .copy p {
  color: var(--fg-60);
  font-size: 14px;
}
.news-form {
  display: flex; gap: 8px;
  min-width: 420px;
}
.news-form .input { flex: 1; }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq {
  padding: 60px 0;
}
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}
.faq-aside h2 {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.faq-aside h2 .em {
  font-style: italic;
  font-weight: 500;
  color: var(--fg-60);
}
.faq-aside p {
  color: var(--fg-60);
  font-size: 15px;
  margin-top: 20px;
  line-height: 1.6;
}
.faq-aside .ask {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px;
  padding: 10px 16px;
  border-radius: var(--r-max);
  background: var(--glass);
  border: 1px solid var(--fg-12);
  font-size: 13px;
  color: var(--fg);
}

.faq-list {
  display: flex; flex-direction: column;
}
.faq-item {
  border-top: 1px solid var(--fg-08);
  padding: 24px 0;
  cursor: pointer;
}
.faq-item:last-child { border-bottom: 1px solid var(--fg-08); }
.faq-item summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .plus {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--fg-05);
  border: 1px solid var(--fg-08);
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative;
  transition: transform 240ms ease, background 240ms ease;
}
.faq-item .plus::before,
.faq-item .plus::after {
  content: ""; position: absolute;
  background: var(--fg);
  border-radius: 1px;
}
.faq-item .plus::before { width: 10px; height: 1.5px; }
.faq-item .plus::after { width: 1.5px; height: 10px; transition: transform 240ms ease; }
.faq-item[open] .plus { background: var(--fg); }
.faq-item[open] .plus::before,
.faq-item[open] .plus::after { background: var(--bg-base); }
.faq-item[open] .plus::after { transform: rotate(90deg); }
.faq-item .answer {
  margin-top: 16px;
  color: var(--fg-60);
  font-size: 15px;
  line-height: 1.65;
  max-width: 640px;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  padding: 100px 0 40px;
  border-top: 1px solid var(--fg-08);
  margin-top: 80px;
  position: relative;
}
.footer::before {
  content: ""; position: absolute;
  inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--fg-18), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer-brand {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 360px;
}
.footer-brand .mark {
  display: flex; align-items: center; gap: 12px;
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.01em;
}
.footer-brand .tag {
  font-size: 14px;
  color: var(--fg-60);
  line-height: 1.55;
}
.footer-col h5 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-50);
  margin-bottom: 18px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--fg-80);
  padding: 4px 0;
  transition: color 160ms ease;
}
.footer-col a:hover { color: var(--fg); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--fg-08);
  font-size: 12px;
  color: var(--fg-50);
}
.footer-legal { display: flex; gap: 20px; }

/* Hero quote — removed (was Cormorant italic, didn't match app) */

/* Floating chevron */
.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-50);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .iphone-stage { justify-self: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; }
  .waitlist-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .news-card { flex-direction: column; align-items: stretch; gap: 20px; padding: 28px 28px; }
  .news-form { min-width: 0; width: 100%; }
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-pin { position: relative; top: auto; height: auto; }
  .showcase-steps { padding: 60px 0; gap: 60px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .wg-stage {
    max-width: 540px;
    margin: 24px auto 56px;
  }
}
@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 560px) {
  .container { width: calc(100vw - 32px); }
  .hero { padding: 100px 0 60px; }
  .nav { top: 10px; }
  .nav-inner {
    width: calc(100vw - 24px);
    gap: 8px;
    padding: 6px 6px 6px 14px;
  }
  .nav-cta { padding: 0 12px; font-size: 12px; height: 34px; }
  .lang-select { padding: 0 8px; height: 28px; gap: 6px; }
  .lang-select select { font-size: 11px; padding-right: 10px; }
  .lang-select::after { right: 7px; }
  .feature-card { padding: 24px; min-height: 0; }
  .waitlist-card { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; }
  .news-card { padding: 24px 20px; gap: 16px; }
  .news-form { flex-direction: column; gap: 10px; width: 100%; }
  .news-form .input { width: 100%; flex: none; }
  .news-form .btn { width: 100%; }
  .wg-stage {
    max-width: calc(100vw - 64px);
    margin: 40px auto 72px;
    padding-top: 64px;
  }
}


/* ── Perf: defer rendering of below-the-fold sections ──────── */
.showcase,
.waitlist,
.newsletter,
.faq,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: 1200px 800px;
}
