/* ==========================================================================
   viaSocket Assistant — Launch Page Design System
   Color Palette: Deep Obsidian (#0B0F10), Canvas Slate (#12181A), 
   SOCKET Emerald Accent (#5DCAA5), Subtle Glass Borders
   ========================================================================== */

:root {
  --bg-main: #090d0e;
  --bg-surface: #101618;
  --bg-surface-elevated: #161f22;
  --bg-glass: rgba(18, 25, 27, 0.75);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(93, 202, 165, 0.3);
  
  --accent-primary: #5dcaa5;
  --accent-primary-hover: #48b693;
  --accent-glow: rgba(93, 202, 165, 0.18);
  --accent-cyan: #38bdf8;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --transition-fast: 180ms ease;
  --transition-normal: 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100dvh;
}

/* Ambient glow blobs */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.glow-top {
  width: min(80vw, 700px);
  height: 450px;
  background: radial-gradient(circle, rgba(93, 202, 165, 0.12), transparent 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-bottom {
  width: min(90vw, 850px);
  height: 550px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08), transparent 70%);
  bottom: 10%;
  right: -200px;
}

/* Container */
.container {
  width: min(100% - 2rem, 1180px);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.925rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #0b1512;
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-muted);
  background: transparent;
}

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

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
}

.shadow-glow {
  box-shadow: 0 0 30px var(--accent-glow);
}

.shadow-glow:hover {
  box-shadow: 0 0 45px rgba(93, 202, 165, 0.32);
}

.icon-svg {
  display: inline-block;
  vertical-align: middle;
}

/* Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background-color: rgba(9, 13, 14, 0.78);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  border-radius: var(--radius-sm);
  display: block;
}

.brand-text {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-text strong {
  color: var(--accent-primary);
  font-weight: 700;
}

.nav-links {
  display: none;
  gap: 1.75rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

/* Hero Section */
.hero-section {
  padding-block: clamp(3rem, 7dvh, 5.5rem) 2rem;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background-color: rgba(93, 202, 165, 0.08);
  border: 1px solid rgba(93, 202, 165, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.hero-title {
  font-size: clamp(2.4rem, 1rem + 4.5vw, 4.25rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 900px;
}

.title-br {
  display: none;
}

@media (min-width: 640px) {
  .title-br {
    display: inline;
  }
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-primary) 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

.hero-subtitle strong {
  color: var(--text-main);
}

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

.justify-center {
  justify-content: center;
}

.hero-trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2.25rem;
  margin-bottom: 3.5rem;
  font-size: 0.9rem;
  color: var(--text-subtle);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.trust-icon {
  font-size: 1.1rem;
}

/* Browser Frame Mockup */
.hero-preview-frame {
  width: 100%;
  max-width: 1080px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 35px rgba(93, 202, 165, 0.08);
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.hero-preview-frame:hover {
  border-color: rgba(93, 202, 165, 0.25);
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.frame-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.frame-url {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-inline-start: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.frame-image-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: #070a0b;
}

.frame-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Section Common */
.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section-header {
  margin-bottom: 3.5rem;
}

.text-center {
  text-align: center;
}

.section-tag {
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 0.65rem;
}

.section-title {
  font-size: clamp(1.85rem, 1.2rem + 2vw, 2.75rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-inline: auto;
}

/* Interactive Showcase */
.showcase-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 4rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.showcase-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

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

.showcase-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.1rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.showcase-tab:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.03);
}

.showcase-tab.active {
  color: var(--accent-primary);
  background-color: rgba(93, 202, 165, 0.06);
  border-bottom-color: var(--accent-primary);
}

.showcase-content {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.showcase-panel {
  display: none;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.showcase-panel.active {
  display: grid;
}

@media (min-width: 900px) {
  .showcase-panel {
    grid-template-columns: 1fr 1.35fr;
  }
}

.panel-info h3 {
  font-size: 1.65rem;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.panel-info p {
  color: var(--text-muted);
  font-size: 1.025rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.feature-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-bullets li {
  position: relative;
  padding-inline-start: 1.75rem;
  color: var(--text-main);
  font-size: 0.95rem;
}

.feature-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-primary);
  font-weight: 800;
}

.panel-media {
  background-color: #070a0b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  aspect-ratio: 16 / 10;
}

.panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 6-box Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.feature-box:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
}

.box-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.feature-box h4 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

kbd {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--text-main);
}

/* Steps (How it works) */
.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.step-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.75rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(93, 202, 165, 0.12);
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(93, 202, 165, 0.25);
}

.step-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.step-card code {
  color: var(--accent-primary);
  background: rgba(93, 202, 165, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* Privacy Banner */
.privacy-banner {
  background: linear-gradient(180deg, #101618 0%, #0d1214 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.privacy-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.privacy-banner h2 {
  font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.5rem);
  margin-bottom: 1rem;
}

.privacy-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-inline: auto;
  margin-bottom: 2.75rem;
}

.privacy-points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  text-align: left;
  margin-bottom: 2.5rem;
}

.privacy-point {
  background: rgba(0, 0, 0, 0.25);
  padding: 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.privacy-point h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.privacy-point p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.link-styled {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.975rem;
  transition: color var(--transition-fast);
}

.link-styled:hover {
  text-decoration: underline;
  color: #8be5c6;
}

/* FAQ Accordion */
.faq-container {
  max-width: 800px;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.accordion-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.accordion-item[open] {
  border-color: rgba(93, 202, 165, 0.3);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.accordion-header::-webkit-details-marker {
  display: none;
}

.accordion-icon {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.accordion-item[open] .accordion-icon {
  transform: rotate(45deg);
  color: var(--accent-primary);
}

.accordion-content {
  padding: 0 1.5rem 1.35rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.975rem;
}

/* Bottom CTA */
.bottom-cta-section {
  padding-block: 5rem 6rem;
  background: radial-gradient(circle at 50% 100%, rgba(93, 202, 165, 0.1) 0%, transparent 60%);
  border-top: 1px solid var(--border-subtle);
}

.bottom-cta-section h2 {
  font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem);
  margin-bottom: 0.75rem;
}

.cta-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: #070a0b;
  padding-block: 4rem 2rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-tagline {
  color: var(--text-subtle);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 280px;
}

.footer-links-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 600px;
}

.footer-col h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-subtle);
  font-size: 0.85rem;
  text-align: center;
}

/* ==========================================================================
   Motion Graphics Canvas & Interactive Flow Simulation
   ========================================================================== */
.motion-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  transition: opacity 0.5s ease;
}

/* ==========================================================================
   Full Green Page Intro Curtain Morph
   ========================================================================== */
.intro-curtain {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 9999;
  background-color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  clip-path: circle(150% at 50% 50%);
  transition: clip-path 0.95s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
  pointer-events: auto;
}

.intro-curtain.morphing {
  clip-path: circle(28px at var(--target-x, 88vw) var(--target-y, 82vh));
}

.intro-curtain.morphed {
  clip-path: circle(28px at var(--target-x, 88vw) var(--target-y, 82vh));
  opacity: 0;
  pointer-events: none;
}

.intro-mascot-face {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: floatFace 2.4s infinite ease-in-out;
}

@keyframes floatFace {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.intro-eyes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.intro-eye {
  width: 14px;
  height: 28px;
  border-radius: 7px;
  background-color: #04342c;
  animation: introBlink 3.2s infinite ease-in-out;
}

@keyframes introBlink {
  0%, 94%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}

.intro-overlay-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #07231c;
  padding: 2rem;
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-curtain.morphing .intro-overlay-content,
.intro-curtain.morphed .intro-overlay-content {
  opacity: 0;
  transform: translateY(-20px) scale(0.92);
}

.intro-pill {
  display: inline-block;
  background: rgba(4, 52, 44, 0.12);
  border: 1px solid rgba(4, 52, 44, 0.2);
  color: #04342c;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.intro-heading {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.intro-tagline {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
  color: rgba(4, 52, 44, 0.85);
  margin-bottom: 2.5rem;
}

.intro-skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: #04342c;
  color: #5dcaa5;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(4, 52, 44, 0.25);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.intro-skip-btn:hover {
  transform: translateY(-2px);
  background-color: #02201b;
}

.intro-arrow {
  animation: bounceDown 1.5s infinite ease-in-out;
}

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

/* ==========================================================================
   Autonomous Floating Mascot Companion (SOCKET)
   ========================================================================== */
.socket-companion {
  position: fixed;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  z-index: 1000;
  pointer-events: auto;
  cursor: grab;
  will-change: transform;
  transform: translate3d(calc(100vw - 80px), calc(100vh - 90px), 0);
  transition: opacity 0.4s ease;
}

.socket-companion.is-dragging {
  cursor: grabbing;
}

.socket-companion.is-dragging .socket-thought {
  opacity: 0.3;
  pointer-events: none;
}

.socket-bubble {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 25px var(--accent-glow);
  transition: background-color 0.35s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  user-select: none;
  touch-action: none;
}

.socket-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 35px var(--accent-glow);
}

.socket-bubble:active {
  transform: scale(0.96);
}

/* Eyes */
.socket-eye {
  display: block;
  width: 7px;
  height: 11px;
  border-radius: 3.5px;
  background-color: #04342c;
  transition: height 0.18s ease, background-color 0.3s ease, transform 0.1s ease;
}

/* Soundwaves animation (Listening mode & Voice Simulation) */
.socket-soundwaves {
  position: absolute;
  inset: -12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.socket-companion.mode-listening .socket-soundwaves,
.socket-companion.simulating-voice .socket-soundwaves {
  opacity: 1;
}

.socket-soundwaves .wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  opacity: 0;
  animation: pulseWave 1.8s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

.socket-soundwaves .wave-2 {
  animation-delay: 0.6s;
}

.socket-soundwaves .wave-3 {
  animation-delay: 1.2s;
}

@keyframes pulseWave {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Speech / Thought Bubble */
.socket-thought {
  position: absolute;
  bottom: calc(100% + 14px);
  right: -20px;
  width: 280px;
  background: rgba(16, 22, 24, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  transform-origin: bottom right;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  z-index: 1001;
}

.socket-thought::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 36px;
  width: 12px;
  height: 12px;
  background: rgba(16, 22, 24, 0.94);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  transform: rotate(45deg);
}

.thought-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.thought-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
}

.thought-status {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.thought-text {
  font-size: 0.885rem;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 6px;
}

.thought-hint {
  font-size: 0.725rem;
  color: var(--text-subtle);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 5px;
}

/* Replay Button in Nav */
.btn-replay {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--accent-primary);
}

.btn-replay:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .replay-label {
    display: none;
  }
  .socket-thought {
    width: 240px;
    right: -10px;
  }
}

/* ==========================================================================
   Reaction Mood States (Colors, Eyes & Animations)
   ========================================================================== */

/* 1. Idle (Sea green) */
.socket-companion.mode-idle .socket-bubble {
  background-color: #5dcaa5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 25px rgba(93, 202, 165, 0.28);
}
.socket-companion.mode-idle .socket-eye {
  background-color: #04342c;
  height: 11px;
}

/* 2. Listening (Coral) */
.socket-companion.mode-listening .socket-bubble {
  background-color: #f0997b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 25px rgba(240, 153, 123, 0.35);
  animation: pulseScale 1.6s infinite ease-in-out;
}
.socket-companion.mode-listening .socket-eye {
  background-color: #4a1b0c;
  height: 11px;
}
.socket-companion.mode-listening .socket-soundwaves .wave {
  border-color: #f0997b;
}

/* 3. Thinking (Lavender) */
.socket-companion.mode-thinking .socket-bubble {
  background-color: #afa9ec;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 25px rgba(175, 169, 236, 0.35);
  animation: floatVertical 2.2s infinite ease-in-out;
}
.socket-companion.mode-thinking .socket-eye {
  background-color: #26215c;
  height: 9px;
}

/* 4. Working (Sky Blue) */
.socket-companion.mode-working .socket-bubble {
  background-color: #85b7eb;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 25px rgba(133, 183, 235, 0.35);
}
.socket-companion.mode-working .socket-eye {
  background-color: #042c53;
  height: 11px;
}

/* 5. Suggest (Amber) */
.socket-companion.mode-suggest .socket-bubble {
  background-color: #ef9f27;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 25px rgba(239, 159, 39, 0.35);
}
.socket-companion.mode-suggest .socket-eye {
  background-color: #412402;
  height: 11px;
}

/* 6. Error (Soft Red) */
.socket-companion.mode-error .socket-bubble {
  background-color: #f09595;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 25px rgba(240, 149, 149, 0.35);
  animation: shakeX 0.4s ease-in-out;
}
.socket-companion.mode-error .socket-eye {
  background-color: #501313;
  height: 11px;
}

/* 7. Celebrate (Lime Green) */
.socket-companion.mode-celebrate .socket-bubble {
  background-color: #97c459;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 25px rgba(151, 196, 89, 0.4);
  animation: bounceCelebrate 1.4s infinite cubic-bezier(0.28, 0.84, 0.42, 1);
}
.socket-companion.mode-celebrate .socket-eye {
  background-color: #173404;
  height: 12px;
}

/* 8. Sleeping (Muted Gray) */
.socket-companion.mode-sleeping .socket-bubble {
  background-color: #b4b2a9;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.socket-companion.mode-sleeping .socket-eye {
  background-color: #2c2c2a;
  height: 2px;
}

/* Micro-animations */
@keyframes floatVertical {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes pulseScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@keyframes bounceCelebrate {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-14px) scale(1.05); }
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Reduced Motion Safety */
@media (prefers-reduced-motion: reduce) {
  .intro-curtain,
  .socket-companion,
  .socket-bubble,
  .socket-soundwaves .wave {
    animation: none !important;
    transition: none !important;
  }
  .motion-canvas {
    display: none;
  }
}


