/* ═══ Passion Site — Character-First Entity Theme ═══ */
:root {
  --bg: #08080f;
  --violet: #8b5cf6;
  --violet-dim: rgba(139, 92, 246, 0.04);
  --violet-border: rgba(139, 92, 246, 0.1);
  --violet-border-hover: rgba(139, 92, 246, 0.3);
  --violet-glow: rgba(139, 92, 246, 0.3);
  --pink: #ec4899;
  --text: rgba(255, 255, 255, 0.85);
  --text-secondary: rgba(255, 255, 255, 0.4);
  --text-muted: rgba(255, 255, 255, 0.2);
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Orbitron', var(--font-body);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ═══ BEAT 1: HOOK ═══ */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100vh;
  min-width: 177.78vh; /* 100 / 0.5625 */
  border: none;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(8, 8, 15, 0.4) 0%,
    rgba(8, 8, 15, 0.1) 30%,
    rgba(8, 8, 15, 0.1) 60%,
    rgba(8, 8, 15, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 60px;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  position: relative;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  padding: 3px;
  box-shadow: 0 0 60px var(--violet-glow), 0 0 120px rgba(139, 92, 246, 0.1);
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
}

.hero-mood {
  font-size: 12px;
  color: var(--violet);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  letter-spacing: 1px;
}

.scroll-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

/* ═══ BEAT 2: INTRIGUE ═══ */
.intrigue {
  padding: 80px 24px;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.intrigue-quote {
  font-size: 22px;
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
  position: relative;
  border: none;
  quotes: none;
}

.intrigue-quote::before {
  content: '\201C';
  position: absolute;
  top: -20px;
  left: -10px;
  font-size: 60px;
  color: rgba(139, 92, 246, 0.2);
  font-style: normal;
}

.intrigue-meta {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.intrigue-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.stat { text-align: center; }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  display: block;
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

/* ═══ SHARED ═══ */
.section-header {
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(139, 92, 246, 0.6);
  margin-bottom: 32px;
  text-align: center;
  font-weight: 600;
}

/* ═══ BEAT 3: FLEX ═══ */
.flex-section {
  padding: 60px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.flex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.flex-card {
  background: var(--violet-dim);
  border: 1px solid var(--violet-border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s;
  cursor: default;
}

.flex-card:hover {
  border-color: var(--violet-border-hover);
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.08);
}

.flex-card-stat {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 10px;
  color: rgba(139, 92, 246, 0.5);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.flex-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.flex-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═══ SECTION AVATARS ═══ */
.section-avatar {
  text-align: center;
  margin-bottom: 20px;
}

.section-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  background: var(--bg);
  border: 2px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.section-avatar-mood {
  font-size: 10px;
  color: var(--violet);
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
}

/* ═══ FLOATING CHAT WIDGET ═══ */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
}

.chat-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 8px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.chat-toggle:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.2);
}

.chat-toggle-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-toggle-label {
  letter-spacing: 1px;
}

.chat-panel {
  display: none;
  position: absolute;
  bottom: 56px;
  right: 0;
  width: 320px;
  max-height: 400px;
  background: rgba(12, 12, 20, 0.95);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.chat-panel.open { display: flex; flex-direction: column; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.chat-header-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.chat-close:hover { color: var(--text); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  max-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 85%;
}

.chat-msg-passion {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.15);
  color: var(--text);
  align-self: flex-start;
}

.chat-msg-user {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  align-self: flex-end;
}

.chat-input-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.chat-input:focus {
  border-color: rgba(139, 92, 246, 0.4);
}

.chat-input::placeholder { color: var(--text-muted); }

.chat-send {
  background: var(--violet);
  border: none;
  border-radius: 8px;
  color: #fff;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-send:hover { background: #7c3aed; }

/* ═══ BEAT 4: PLAY ═══ */
.play-section {
  padding: 60px 24px;
  overflow: hidden;
}

.play-subhead {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-style: italic;
}

.carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 24px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.2) transparent;
}

.carousel::-webkit-scrollbar { height: 4px; }
.carousel::-webkit-scrollbar-track { background: transparent; }
.carousel::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.2); border-radius: 2px; }

.game-card {
  flex: 0 0 180px;
  background: var(--violet-dim);
  border: 1px solid var(--violet-border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  scroll-snap-align: start;
  display: block;
}

.game-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
}

.game-tag {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 8px;
  font-weight: 600;
  display: block;
}

.game-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.game-hook {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.4;
}

/* ═══ BEAT 5: EXIT ═══ */
.exit-section {
  padding: 80px 24px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.exit-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  padding: 2px;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.2);
}

.exit-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
}

.exit-text {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 32px;
}

.exit-text strong { color: #fff; }

.exit-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.exit-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-block;
}

.exit-btn-primary {
  background: linear-gradient(135deg, var(--violet), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 24px var(--violet-glow);
}

.exit-btn-primary:hover {
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.exit-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.exit-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text);
}

/* ═══ FOOTER ═══ */
.footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ═══ SCROLL REVEAL ═══ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ═══ MOBILE ═══ */
@media (max-width: 640px) {
  .hero-name { font-size: 36px; }
  .hero-avatar { width: 90px; height: 90px; }
  .intrigue-quote { font-size: 18px; }
  .intrigue-stats { gap: 20px; }
  .stat-value { font-size: 22px; }
  .flex-grid { grid-template-columns: 1fr; }
  .exit-buttons { flex-direction: column; align-items: center; }
  /* Hide YouTube on mobile — gradient fallback only */
  .hero-video iframe { display: none; }
  .hero-video {
    background: linear-gradient(180deg, #0d0d1a 0%, #1a0a2e 50%, #0d0d1a 100%);
  }
}

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .scroll-hint { animation: none; opacity: 0.4; }
  .game-card { transition: none; }
  .flex-card { transition: none; }
  .exit-btn { transition: none; }
}
