/* ==========================================================================
   PreserveMemories (preservememories.space)
   Aesthetic: Warm Obsidian & Champagne Amber · Memory Sanctuary
   ========================================================================== */

:root {
  --bg-base: #0b0a0c;
  --bg-elevated: #141216;
  --bg-card: rgba(24, 21, 27, 0.72);
  --bg-glass: rgba(255, 248, 238, 0.045);
  --bg-glass-hover: rgba(255, 248, 238, 0.085);

  --border-subtle: rgba(255, 236, 210, 0.09);
  --border-strong: rgba(240, 198, 138, 0.28);

  --text-primary: #f7f3ec;
  --text-secondary: #b7afa4;
  --text-muted: #7f776d;

  --gold-300: #f6dfb9;
  --gold-400: #e7be82;
  --gold-500: #d59d56;
  --amber-glow: rgba(231, 190, 130, 0.22);
  --rose-soft: #d98a7c;
  --green-live: #58d68d;

  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 12px 36px rgba(213, 157, 86, 0.18);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-base);
  color: var(--text-primary);
}

body {
  font-family: var(--font-sans);
  line-height: 1.65;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(213, 157, 86, 0.11), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 20%, rgba(164, 102, 85, 0.09), transparent 55%),
    var(--bg-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#memory-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}

main, header, footer {
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }
.hidden { display: none !important; }

.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.text-gradient {
  background: linear-gradient(125deg, #fff5e4 0%, var(--gold-300) 42%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mono-tag, .mono-pill, .mono-val, .mono-timer { font-family: var(--font-mono); }

.mono-tag {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
}

.mono-pill {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--gold-300);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(231, 190, 130, 0.12);
  border: 1px solid rgba(231, 190, 130, 0.24);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.btn-xs { padding: 6px 12px; font-size: 0.78rem; }
.btn-sm { padding: 8px 18px; font-size: 0.875rem; }
.btn-lg { padding: 13px 26px; font-size: 0.96rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: #16110a;
  font-weight: 600;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 14px 38px rgba(213, 157, 86, 0.3);
}

.btn-glass {
  background: var(--bg-glass);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  backdrop-filter: blur(12px);
}

.btn-glass:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-strong);
}

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.25s ease, border-color 0.25s ease, padding 0.25s ease;
}

.navbar.scrolled {
  background: rgba(11, 10, 12, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }

.brand-orb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff4dc, var(--gold-400) 48%, #7b4e22 100%);
  box-shadow: 0 0 18px rgba(231, 190, 130, 0.5);
}

.brand-text { font-size: 1.04rem; letter-spacing: -0.01em; color: var(--text-primary); }
.brand-text strong { font-weight: 600; }
.brand-tld { color: var(--gold-400); font-family: var(--font-mono); font-size: 0.85rem; margin-left: 1px; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.9rem; color: var(--text-secondary); transition: color 0.2s ease; }
.nav-links a:hover { color: var(--gold-300); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.mobile-menu-btn span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; }

.mobile-drawer {
  position: fixed;
  top: 64px;
  left: 16px;
  right: 16px;
  z-index: 99;
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(20, 18, 22, 0.96);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
}
.mobile-drawer.open { display: flex; }
.drawer-link { font-size: 1rem; color: var(--text-secondary); padding: 6px 0; }

/* Hero */
.hero {
  padding: 136px 0 88px;
  min-height: 94vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(231, 190, 130, 0.08);
  border: 1px solid rgba(231, 190, 130, 0.22);
  font-size: 0.82rem;
  color: var(--gold-300);
  margin-bottom: 24px;
}

.pulse-dot, .live-dot, .online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 10px var(--gold-400);
  animation: pulse 2s infinite;
}
.live-dot, .online-dot { background: var(--green-live); box-shadow: 0 0 10px var(--green-live); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.8vw, 3.85rem);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}

.hero-desc { font-size: 1.05rem; color: var(--text-secondary); max-width: 540px; margin-bottom: 32px; }
.hero-desc strong { color: var(--text-primary); font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 42px; }

.hero-metrics {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}
.metric { display: flex; flex-direction: column; }
.metric-val { font-family: var(--font-mono); font-size: 1.45rem; font-weight: 500; color: var(--gold-300); }
.metric-val small { font-size: 0.82rem; margin-left: 2px; color: var(--text-secondary); }
.metric-label { font-size: 0.8rem; color: var(--text-muted); }
.metric-divider { width: 1px; height: 32px; background: var(--border-subtle); }

/* Hero Stage Card */
.hero-stage { position: relative; }
.stage-glow {
  position: absolute;
  inset: -24px;
  background: radial-gradient(circle at 50% 45%, rgba(231, 190, 130, 0.2), transparent 68%);
  filter: blur(36px);
  z-index: 0;
  pointer-events: none;
}

.hero-card {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 16px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
}

.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-primary);
  background: rgba(15, 14, 17, 0.7);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero-portrait-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 4.45;
  background: #121014;
}

.hero-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: filter 0.4s ease, opacity 0.4s ease, transform 0.5s ease;
}

.breathing { animation: portraitBreathe 7s ease-in-out infinite; }
@keyframes portraitBreathe {
  0%, 100% { transform: scale(1.01) translateY(0px); }
  50% { transform: scale(1.035) translateY(-3px); }
}

.hero-portrait-wrap.mode-voice .hero-portrait { filter: blur(18px) brightness(0.4); }
.hero-portrait-wrap.mode-text .hero-portrait { filter: blur(16px) brightness(0.28); }

.hero-voice-overlay, .hero-text-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 24px;
}
.hero-portrait-wrap.mode-voice .hero-voice-overlay { opacity: 1; }
.hero-portrait-wrap.mode-text .hero-text-overlay { opacity: 1; }
.hero-portrait-wrap.mode-text .hero-caption-bar { opacity: 0; }

.orb-ring {
  position: absolute;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  border: 1.5px solid rgba(231, 190, 130, 0.45);
  animation: ripple 2.6s ease-out infinite;
}
.orb-ring.delay-1 { animation-delay: 1.3s; }
@keyframes ripple {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.65); opacity: 0; }
}

.orb-core {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold-300);
  box-shadow: 0 0 36px rgba(231, 190, 130, 0.35);
  position: relative;
  z-index: 2;
}
.orb-core img { width: 100%; height: 100%; object-fit: cover; }

.voice-overlay-label { margin-top: 22px; font-size: 0.82rem; color: var(--gold-300); letter-spacing: 0.04em; }
.hero-text-overlay { align-items: stretch; gap: 12px; }

.mini-bubble { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 0.86rem; line-height: 1.5; }
.mini-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: #1a130b;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}
.mini-bubble.ai {
  align-self: flex-start;
  background: rgba(25, 22, 28, 0.88);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.mini-memory-tag {
  align-self: flex-start;
  font-size: 0.74rem;
  color: var(--gold-300);
  background: rgba(231, 190, 130, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

.hero-caption-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(14, 12, 16, 0.78);
  border: 1px solid rgba(255, 240, 218, 0.14);
  backdrop-filter: blur(14px);
  transition: opacity 0.3s ease;
}
.hero-caption-bar p { font-size: 0.86rem; color: var(--text-primary); line-height: 1.45; }

.mini-wave { display: inline-flex; align-items: center; gap: 3px; height: 20px; flex-shrink: 0; }
.mini-wave span {
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: var(--gold-400);
  animation: waveBar 1.1s ease-in-out infinite;
}
.mini-wave span:nth-child(2) { animation-delay: 0.15s; }
.mini-wave span:nth-child(3) { animation-delay: 0.3s; }
.mini-wave span:nth-child(4) { animation-delay: 0.45s; }
.mini-wave span:nth-child(5) { animation-delay: 0.6s; }
.mini-wave.paused span { animation-play-state: paused; height: 5px; opacity: 0.5; }
@keyframes waveBar { 0%, 100% { height: 5px; } 50% { height: 18px; } }

.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 2px 4px 0;
}
.avatar-meta { display: flex; flex-direction: column; }
.avatar-meta strong { font-size: 0.92rem; font-weight: 600; }
.avatar-meta span { font-size: 0.76rem; color: var(--text-muted); }

.hero-mode-pills {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}
.mode-pill {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mode-pill.active { background: var(--gold-400); color: #16110a; font-weight: 600; }

/* Sections */
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--gold-400);
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 14px;
}
.section-head p { color: var(--text-secondary); font-size: 1rem; }
.section-head p strong { color: var(--text-primary); font-weight: 500; }

/* Studio */
.studio-shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
  border-radius: var(--radius-xl);
  background: rgba(18, 16, 21, 0.85);
  border: 1px solid var(--border-strong);
  padding: 20px;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow-soft);
}
.studio-sidebar { display: flex; flex-direction: column; gap: 16px; }
.panel-block {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.panel-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-title-row h3 { font-size: 0.92rem; font-weight: 600; color: var(--text-primary); }
.persona-badge {
  font-size: 0.74rem;
  color: var(--gold-300);
  background: rgba(231, 190, 130, 0.14);
  padding: 3px 9px;
  border-radius: 999px;
}

.avatar-selector { display: flex; flex-direction: column; gap: 8px; }
.avatar-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.avatar-option:hover { background: rgba(255, 255, 255, 0.05); }
.avatar-option.active { background: rgba(231, 190, 130, 0.1); border-color: var(--border-strong); }
.avatar-option img, .custom-avatar-icon { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.custom-avatar-icon {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(231, 190, 130, 0.28), rgba(217, 138, 124, 0.22));
  border: 1px solid var(--border-strong);
  color: var(--gold-300);
  font-size: 1.1rem;
}
.avatar-option strong { display: block; font-size: 0.88rem; font-weight: 600; }
.avatar-option span { font-size: 0.76rem; color: var(--text-muted); }

.custom-persona-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.input-group label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.input-group input, .input-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.84rem;
  outline: none;
  resize: none;
}
.input-group input:focus, .input-group textarea:focus { border-color: var(--gold-400); }

.sliders-list { display: flex; flex-direction: column; gap: 12px; }
.slider-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 5px; }
.slider-label .mono-val { color: var(--gold-300); font-size: 0.76rem; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--gold-300);
  border: 2px solid #16110a;
  box-shadow: 0 0 10px rgba(231, 190, 130, 0.5);
  cursor: pointer;
}

.tts-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; color: var(--text-secondary); cursor: pointer; }
.tts-toggle input { accent-color: var(--gold-400); }

.voice-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 12px; }
.voice-chip {
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.voice-chip.active { background: rgba(231, 190, 130, 0.14); border-color: var(--gold-400); color: var(--gold-300); }

.voiceprint-box {
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
}
.voiceprint-head { display: flex; align-items: center; justify-content: space-between; font-size: 0.74rem; color: var(--text-secondary); margin-bottom: 8px; }
#voiceprintCanvas { width: 100%; height: 44px; display: block; margin-bottom: 10px; }
.voiceprint-actions { display: flex; align-items: center; gap: 8px; }
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff6b6b; }
.upload-label { cursor: pointer; }

/* Stage Right */
.studio-stage {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: rgba(11, 10, 14, 0.82);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  min-height: 640px;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: wrap;
}
.active-twin-info { display: flex; align-items: center; gap: 12px; }
.active-twin-info img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--gold-400); }
.twin-name-row { display: flex; align-items: center; gap: 8px; }
.twin-name-row strong { font-size: 0.96rem; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--green-live); }
.twin-sub { font-size: 0.78rem; color: var(--text-muted); }

.stage-mode-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}
.stage-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.83rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.stage-tab.active { background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); color: #16110a; font-weight: 600; }

.mode-view { display: none; flex: 1; flex-direction: column; }
.mode-view.active { display: flex; }

.memory-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.78rem;
  color: var(--gold-300);
  background: rgba(231, 190, 130, 0.07);
  border-bottom: 1px solid var(--border-subtle);
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 410px;
}

.msg-row { display: flex; flex-direction: column; max-width: 82%; animation: msgFade 0.25s ease; }
@keyframes msgFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg-row.user { align-self: flex-end; align-items: flex-end; }
.msg-row.ai { align-self: flex-start; align-items: flex-start; }

.msg-bubble { padding: 12px 16px; border-radius: 18px; font-size: 0.92rem; line-height: 1.55; }
.msg-row.user .msg-bubble {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: #181109;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}
.msg-row.ai .msg-bubble {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.msg-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; padding: 0 4px; }

.quick-prompts { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 18px 0; }
.prompt-chip, .v-chip {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.prompt-chip:hover, .v-chip:hover { border-color: var(--gold-400); color: var(--gold-300); background: rgba(231, 190, 130, 0.1); }

.chat-input-bar { display: flex; gap: 10px; padding: 14px 18px 18px; }
.chat-input-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 0.92rem;
  outline: none;
}
.chat-input-bar input:focus { border-color: var(--gold-400); }
.btn-send { padding: 0 22px; }

/* Voice View */
.voice-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 26px;
  background: radial-gradient(circle at 50% 40%, rgba(231, 190, 130, 0.12), transparent 65%);
}
.call-meta-bar { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.mono-timer { font-size: 0.84rem; color: var(--text-secondary); }

.voice-orb-area { position: relative; width: 100%; max-width: 420px; height: 220px; display: grid; place-items: center; }
#voiceVisualizerCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.voice-center-avatar {
  position: relative;
  z-index: 2;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold-300);
  box-shadow: 0 0 40px rgba(231, 190, 130, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.voice-center-avatar.speaking { transform: scale(1.06); box-shadow: 0 0 55px rgba(231, 190, 130, 0.65); }
.voice-center-avatar img { width: 100%; height: 100%; object-fit: cover; }

.live-subtitle-box {
  width: 100%;
  max-width: 560px;
  text-align: center;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
}
.subtitle-speaker { display: block; font-size: 0.74rem; color: var(--gold-400); margin-bottom: 4px; }
.live-subtitle-box p { font-size: 0.94rem; color: var(--text-primary); }

.voice-quick-utterances { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0; }
.call-controls { display: flex; align-items: center; gap: 16px; }

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ctrl-btn:hover { border-color: var(--border-strong); color: var(--text-primary); }
.ctrl-btn.active { background: rgba(255, 107, 107, 0.16); border-color: rgba(255, 107, 107, 0.45); color: #ffb3b3; }
.ctrl-talk {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: #171109;
  font-weight: 600;
  padding: 13px 24px;
  box-shadow: var(--shadow-gold);
}
.ctrl-talk:hover { color: #171109; transform: translateY(-1px); }

/* Video View */
.video-stage { flex: 1; padding: 14px; display: flex; }
.video-frame {
  position: relative;
  flex: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #100e12;
  min-height: 540px;
}
.video-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.video-frame.speaking::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(231, 190, 130, 0.65);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 42px rgba(231, 190, 130, 0.22);
  pointer-events: none;
}
.video-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 9, 12, 0.62) 0%, transparent 25%),
    linear-gradient(to top, rgba(10, 9, 12, 0.88) 0%, rgba(10, 9, 12, 0.35) 32%, transparent 55%);
  pointer-events: none;
}
.video-hud-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 3;
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 8px; }

.video-pip {
  position: absolute;
  top: 62px;
  right: 16px;
  width: 112px;
  height: 146px;
  border-radius: 14px;
  background: rgba(18, 16, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  z-index: 3;
  transition: opacity 0.25s ease;
}
.video-pip.cam-off { opacity: 0.32; }
.pip-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.72rem; }

.video-hud-bottom {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video-subtitle-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(12, 11, 15, 0.76);
  border: 1px solid rgba(255, 240, 218, 0.16);
  backdrop-filter: blur(14px);
}
.video-subtitle-card p { font-size: 0.9rem; color: var(--text-primary); }
.video-action-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.video-quick-pills, .video-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.v-icon-btn {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 13, 18, 0.75);
  color: var(--text-primary);
  font-size: 0.82rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}
.v-icon-btn:hover { border-color: var(--gold-400); }
.v-talk-btn { background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); color: #16110a; font-weight: 600; border: none; }

/* Grids */
.bento-grid, .steps-grid, .scenes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.bento-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.bento-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.bento-card.featured {
  background: linear-gradient(160deg, rgba(231, 190, 130, 0.11), rgba(20, 18, 23, 0.9));
  border-color: var(--border-strong);
}
.card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #181109;
  background: var(--gold-300);
  padding: 3px 10px;
  border-radius: 999px;
}
.card-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(231, 190, 130, 0.12);
  border: 1px solid rgba(231, 190, 130, 0.25);
  color: var(--gold-300);
  margin-bottom: 20px;
}
.bento-card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.bento-card > p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 18px; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.feature-list li { font-size: 0.85rem; color: var(--text-secondary); padding-left: 18px; position: relative; }
.feature-list li::before { content: "✦"; position: absolute; left: 0; color: var(--gold-400); font-size: 0.72rem; top: 2px; }

.step-card { padding: 28px; border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border-subtle); }
.step-num { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 500; color: var(--gold-400); opacity: 0.85; margin-bottom: 14px; }
.step-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.step-card p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 18px; }
.step-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.step-tags span {
  font-size: 0.75rem;
  color: var(--gold-300);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(231, 190, 130, 0.09);
  border: 1px solid rgba(231, 190, 130, 0.18);
}

.scene-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.035), rgba(255, 248, 238, 0.01));
  border: 1px solid var(--border-subtle);
}
.scene-kicker { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--gold-400); margin-bottom: 12px; }
.scene-card h3 { font-size: 1.16rem; margin-bottom: 10px; }
.scene-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* Privacy */
.privacy-box {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
  padding: 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(24, 21, 27, 0.92), rgba(14, 12, 16, 0.92));
  border: 1px solid var(--border-strong);
}
.privacy-left h2 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 14px; }
.privacy-left p { color: var(--text-secondary); font-size: 0.95rem; }
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.privacy-item { padding: 18px; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border-subtle); }
.privacy-item strong { display: block; font-size: 0.95rem; color: var(--gold-300); margin-bottom: 6px; }
.privacy-item p { font-size: 0.84rem; color: var(--text-secondary); }

/* Waitlist */
.waitlist-card {
  text-align: center;
  padding: 56px 32px;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 50% 0%, rgba(231, 190, 130, 0.16), transparent 65%), rgba(22, 19, 25, 0.85);
  border: 1px solid var(--border-strong);
}
.waitlist-card h2 { font-family: var(--font-serif); font-size: clamp(1.7rem, 3vw, 2.35rem); margin-bottom: 12px; }
.waitlist-card > p { max-width: 580px; margin: 0 auto 28px; color: var(--text-secondary); }

.waitlist-form { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; max-width: 780px; margin: 0 auto; }
.waitlist-form input, .waitlist-form select {
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 0.92rem;
  outline: none;
  min-width: 240px;
}
.waitlist-form input { flex: 1; }
.waitlist-form input:focus, .waitlist-form select:focus { border-color: var(--gold-400); }
.waitlist-feedback { margin-top: 16px; font-size: 0.9rem; color: var(--green-live); }

/* Footer */
.footer { border-top: 1px solid var(--border-subtle); padding: 48px 0 32px; background: rgba(9, 8, 10, 0.9); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; margin-bottom: 32px; }
.footer-brand p { margin-top: 10px; font-size: 0.88rem; color: var(--text-muted); max-width: 340px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 0.88rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--gold-300); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-stage { max-width: 480px; margin: 0 auto; width: 100%; }
  .studio-shell { grid-template-columns: 1fr; }
  .bento-grid, .steps-grid, .scenes-grid { grid-template-columns: 1fr; }
  .privacy-box { grid-template-columns: 1fr; padding: 28px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero { padding: 108px 0 64px; }
  .hero-metrics { flex-wrap: wrap; gap: 16px; }
  .metric-divider { display: none; }
  .privacy-grid { grid-template-columns: 1fr; }
  .stage-header { flex-direction: column; align-items: flex-start; }
  .stage-mode-tabs { width: 100%; justify-content: space-between; }
  .stage-tab { flex: 1; justify-content: center; padding: 7px 8px; font-size: 0.78rem; }
  .call-controls { flex-wrap: wrap; justify-content: center; }
  .video-pip { width: 84px; height: 110px; }
}

/* ==========================================================================
   Quota Badge, Pricing Section & Subscription Modal
   ========================================================================== */
.quota-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-300);
  background: rgba(231, 190, 130, 0.12);
  border: 1px solid rgba(231, 190, 130, 0.25);
  padding: 2px 9px;
  border-radius: 999px;
}

.quota-pill.exhausted {
  color: #ffb3b3;
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.4);
}

.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.billing-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.86rem;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.billing-btn.active {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: #16110a;
  font-weight: 600;
}

.save-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(88, 214, 141, 0.2);
  color: #79e6a6;
}

.billing-btn.active .save-tag {
  background: rgba(22, 17, 10, 0.18);
  color: #16110a;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
}

.pricing-card.featured {
  background: linear-gradient(160deg, rgba(231, 190, 130, 0.12), rgba(20, 18, 23, 0.94));
  border-color: var(--border-strong);
  box-shadow: var(--shadow-gold);
}

.plan-head h3 {
  font-size: 1.24rem;
  margin-bottom: 6px;
}

.plan-head p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 22px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.price-amt {
  font-family: var(--font-serif);
  font-size: 2.65rem;
  font-weight: 600;
  color: var(--gold-300);
  line-height: 1;
}

.price-unit {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pricing-card .feature-list {
  flex: 1;
  margin-bottom: 26px;
}

.plan-cta {
  width: 100%;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 5, 8, 0.78);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 32px 28px;
  border-radius: var(--radius-xl);
  background: #17141b;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-card h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-form input {
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 0.94rem;
  outline: none;
}

.modal-form input:focus {
  border-color: var(--gold-400);
}

@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
