/* ═══════════════════════════════════════════════════════════════
   CodeAlive — home.css
   Serves: templates/home.html  (homepage only)
   Does NOT touch editor styles (style.css handles those)
═══════════════════════════════════════════════════════════════ */

/* ── RESET & TOKENS ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Reset Spacing & Type (Theme variables are in theme.css) */
:root {
  --green:        #3fe0a0;
  --green-dim:    rgba(63,224,160,0.1);
  --green-glow:   rgba(63,224,160,0.18);
  --blue:         #5ba3ff;
  --blue-dim:     rgba(91,163,255,0.1);
  --blue-glow:    rgba(91,163,255,0.18);
  --purple:       #a78bfa;
  --amber:        #fbbf24;
  --accent:       #3fe0a0;
  --mono:         'JetBrains Mono', monospace;
  --serif:        'Fraunces', serif;
  --radius:       8px;
  --radius-lg:    14px;

  /* Responsive Spacing & Type */
  --site-pad:     clamp(1.25rem, 5vw, 3rem);
  --section-gap:  clamp(4rem, 10vw, 8rem);
  --h1-size:      clamp(2.5rem, 8vw, 4rem);
  --h2-size:      clamp(2rem, 6vw, 3rem);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: default;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* ── SHARED BUTTONS ─────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  background: var(--green); color: #080a0e;
  border: none; padding: 13px 26px; border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: opacity .2s, transform .18s, box-shadow .2s;
}
.btn-primary:hover {
  opacity: .88; transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(63,224,160,0.22);
}

.btn-primary-blue { background: var(--blue); color: #080a0e; }
.btn-primary-blue:hover { box-shadow: 0 10px 30px rgba(91,163,255,0.22); }

.btn-large { font-size: 15px; padding: 16px 34px; }

.btn-outline-collab {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px;
  background: transparent;
  border: 0.5px solid rgba(91,163,255,0.35);
  color: var(--blue); padding: 13px 24px; border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: border-color .2s, background .2s, transform .18s;
}
.btn-outline-collab:hover {
  border-color: var(--blue); background: var(--blue-dim);
  transform: translateY(-2px);
}

.btn-outline-lg {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 15px;
  background: transparent; border: 0.5px solid var(--border2);
  color: var(--text2); padding: 16px 28px; border-radius: var(--radius);
  text-decoration: none; transition: border-color .2s, color .2s, transform .18s;
}
.btn-outline-lg:hover {
  border-color: var(--text2); color: var(--text);
  transform: translateY(-2px);
}

.btn-ghost-sm {
  font-family: var(--mono); font-size: 12px;
  color: var(--text2); text-decoration: none;
  padding: 7px 14px; border-radius: var(--radius);
  border: 0.5px solid transparent;
  transition: color .2s, border-color .2s;
}
.btn-ghost-sm:hover { color: var(--text); border-color: var(--border2); }

.btn-green-sm {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  background: transparent; border: 0.5px solid rgba(63,224,160,0.4);
  color: var(--green); padding: 7px 16px; border-radius: var(--radius);
  text-decoration: none; transition: background .2s, border-color .2s;
}
.btn-green-sm:hover { background: var(--green-dim); border-color: var(--green); }

/* ── NAVBAR ─────────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--site-pad);
  border-bottom: 0.5px solid var(--border);
  background: rgba(8,10,14,0.82);
  backdrop-filter: blur(18px);
  transition: background .3s;
}
#navbar.scrolled { background: rgba(8,10,14,0.96); }

.nav-logo {
  font-family: var(--mono); font-size: 15px; font-weight: 600;
  color: var(--text); text-decoration: none; letter-spacing: .02em;
  display: flex; align-items: center; gap: 9px;
}
.logo-dim { color: rgba(226,232,244,0.38); }
.logo-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 8px var(--green-glow);
  animation: navpulse 2.5s ease-in-out infinite;
}
@keyframes navpulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:.3; transform:scale(.75); }
}

.nav-links {
  display: flex; gap: 32px; list-style: none;
}
.nav-links a {
  font-size: 12px; color: var(--text3); text-decoration: none;
  letter-spacing: .05em; transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 1px solid rgba(63, 224, 160, 0.3);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}
.nav-avatar:hover {
  transform: scale(1.1);
  border-color: var(--green);
}

/* ── MOBILE NAV OVERLAY ── */
#mobile-menu-toggle {
  display: none; flex-direction: column; gap: 4px;
  background: transparent; border: none; cursor: pointer; padding: 10px;
  position: relative; z-index: 600; /* Above the overlay */
}
#mobile-menu-toggle .bar {
  width: 20px; height: 1.5px; background: var(--text2);
  transition: transform .3s, opacity .3s;
}

#mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(8,10,14,1); /* Fully opaque for clarity */
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  padding: 80px 24px 24px; /* Space for the toggle */
  transform: translateY(-100%); transition: transform .4s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobile-nav-overlay.open { transform: translateY(0); }

.m-nav-header { 
  display: flex; align-items: center; justify-content: space-between; 
  margin-bottom: 60px;
}
.m-nav-links { display: flex; flex-direction: column; gap: 32px; text-align: center; }
.m-link { 
  font-size: 24px; color: var(--text2); text-decoration: none; 
  letter-spacing: .05em; font-family: var(--serif); font-weight: 300;
}
.m-link:hover { color: var(--green); }
.m-link-cta {
  font-size: 16px; color: var(--text2); text-decoration: none;
  padding: 16px; border: 1px solid var(--border2); border-radius: var(--radius);
}
.m-link-cta.primary { background: var(--green); color: #080a0e; border: none; font-weight: 600; }

@media (max-width: 768px) {
  #mobile-menu-toggle { display: flex; }
  .nav-right .btn-ghost-sm, .nav-right .btn-green-sm { display: none; }
}

#mobile-menu-toggle.active .bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); background: var(--text); }
#mobile-menu-toggle.active .bar:nth-child(2) { opacity: 0; }
#mobile-menu-toggle.active .bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); background: var(--text); }

/* ── HERO ────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 100px var(--site-pad) 60px;
  position: relative; overflow: hidden;
}

.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero-glow-green {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(63,224,160,0.055) 0%, transparent 65%);
  top: -120px; right: -60px; pointer-events: none;
  animation: glowFloat 6s ease-in-out infinite;
}
.hero-glow-blue {
  position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,163,255,0.04) 0%, transparent 65%);
  bottom: 60px; left: 40px; pointer-events: none;
  animation: glowFloat 8s ease-in-out infinite reverse;
}
@keyframes glowFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.04); }
}

.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; width: 100%;
}

/* hero left */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--green); letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 22px;
  border: 0.5px solid rgba(63,224,160,0.22);
  padding: 5px 13px; border-radius: 20px;
  background: rgba(63,224,160,0.05);
  animation: fadeUp .6s ease both;
}
.eyebrow-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}

h1 {
  font-family: var(--serif);
  font-size: var(--h1-size); line-height: 1.06;
  font-weight: 300; color: #f0f4ff;
  letter-spacing: -.025em; margin-bottom: 22px;
  animation: fadeUp .65s .08s ease both;
}
h1 em { font-style: italic; color: var(--green); }

.hero-sub {
  font-size: 13px; line-height: 1.9; color: var(--text2);
  max-width: 430px; margin-bottom: 34px;
  animation: fadeUp .65s .15s ease both;
}
.hero-sub strong { color: var(--text); font-weight: 500; }

.hero-actions {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 48px;
  animation: fadeUp .65s .22s ease both;
}

.collab-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue); flex-shrink: 0;
  animation: navpulse 2s ease-in-out infinite;
}

.hero-stats {
  display: flex; align-items: center; gap: 0;
  animation: fadeUp .65s .3s ease both;
}
.stat { display: flex; flex-direction: column; gap: 4px; padding: 0 20px; }
.stat:first-child { padding-left: 0; }
.stat-num {
  font-size: 22px; font-weight: 600; color: var(--text); line-height: 1;
}
.stat-label { font-size: 10px; color: var(--text3); letter-spacing: .1em; text-transform: uppercase; }
.stat-divider { width: 0.5px; height: 36px; background: var(--border2); flex-shrink: 0; }

/* hero right — editor mockup */
.hero-right { position: relative; animation: fadeUp .7s .2s ease both; }

.editor-float {
  background: #0c0f18;
  border: 0.5px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.65), 0 0 0 0.5px rgba(255,255,255,.04);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform .4s ease;
}
.editor-float:hover { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }

.editor-titlebar {
  display: flex; align-items: center; gap: 0;
  background: #090c15;
  border-bottom: 0.5px solid var(--border);
  padding: 0;
}
.editor-dots { display: flex; gap: 6px; padding: 12px 14px; }
.edot { width: 11px; height: 11px; border-radius: 50%; }
.edot.red { background: #ff5f56; }
.edot.yellow { background: #ffbd2e; }
.edot.green { background: #27c93f; }
.editor-tabs { display: flex; flex: 1; }
.etab {
  font-size: 11px; padding: 12px 15px;
  border-right: 0.5px solid var(--border); color: var(--text3);
}
.etab.active { color: var(--green); background: rgba(63,224,160,0.04); }
.editor-lang-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--text3);
  padding: 0 14px; letter-spacing: .04em;
}
.lang-dot-green {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}

.editor-body { display: grid; grid-template-columns: 36px 1fr; padding: 10px 0; }
.editor-gutter {
  display: flex; flex-direction: column; align-items: flex-end;
  padding-right: 10px; border-right: 0.5px solid rgba(255,255,255,0.05);
}
.editor-gutter span {
  font-size: 11px; line-height: 1.75;
  color: rgba(226,232,244,0.18); font-variant-numeric: tabular-nums;
}
.gline-active { color: rgba(63,224,160,0.5) !important; }
.editor-code { padding: 0 14px; }
.cl { font-size: 11.5px; line-height: 1.75; white-space: pre; }
.hl-line { background: rgba(63,224,160,0.08); border-left: 2px solid var(--green); padding-left: 12px; margin-left: -14px; }

/* Syntax tokens */
.kw { color: #c084fc; }
.fn { color: #60a5fa; }
.st { color: #86efac; }
.op { color: rgba(226,232,244,0.55); }
.va { color: #e2e8f4; }
.nu { color: #fb923c; }
.cm { color: rgba(226,232,244,0.28); font-style: italic; }

.cursor {
  display: inline-block; width: 2px; height: 13px;
  background: var(--green); vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.editor-sharebar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border-top: 0.5px solid var(--border);
  background: #090c15;
  font-size: 11px;
}
.sharebar-label { color: var(--text3); }
.sharebar-url {
  flex: 1; color: var(--green);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sharebar-copy {
  font-family: var(--mono); font-size: 10px;
  background: var(--green-dim); border: 0.5px solid rgba(63,224,160,0.3);
  color: var(--green); padding: 4px 10px; border-radius: 4px; cursor: pointer;
  transition: background .2s;
}
.sharebar-copy:hover { background: rgba(63,224,160,0.18); }

/* floating badges */
.float-badge {
  position: absolute;
  font-family: var(--mono); font-size: 11px;
  background: var(--bg3); border: 0.5px solid var(--border2);
  color: var(--text2); padding: 7px 13px; border-radius: 20px;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: floatBadge 3.5s ease-in-out infinite;
}
.badge-icon { font-size: 12px; }
.badge-dot-green { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink:0; }
.badge-top-right { top: -14px; right: -20px; animation-delay: 0s; }
.badge-bottom-left { bottom: 60px; left: -24px; animation-delay: 1.2s; }
@keyframes floatBadge {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* scroll nudge */
.scroll-nudge {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 10px; color: var(--text3); letter-spacing: .12em;
  text-transform: uppercase; animation: nudgeFade 2s ease-in-out infinite;
}
.scroll-arrow {
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, rgba(63,224,160,0.5), transparent);
}
@keyframes nudgeFade { 0%,100%{opacity:.4} 50%{opacity:1} }

/* ── TICKER ──────────────────────────────────────────────────── */
.ticker-wrap {
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  overflow: hidden; padding: 14px 0;
  background: var(--bg2);
}
.ticker-track {
  display: flex; gap: 0; white-space: nowrap;
  animation: ticker 28s linear infinite;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk { font-size: 11px; color: var(--text3); padding: 0 16px; letter-spacing: .06em; }
.tk-dot { font-size: 11px; color: rgba(255,255,255,0.1); }

/* ── SECTIONS ────────────────────────────────────────────────── */
.section { padding: var(--section-gap) 0; position: relative; }
.section-alt { background: var(--bg2); }
.section-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 var(--site-pad);
}

.section-label {
  font-size: 11px; color: var(--green); letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 16px;
}

.section-title {
  font-family: var(--serif);
  font-size: var(--h2-size); line-height: 1.1; font-weight: 300;
  color: #f0f4ff; letter-spacing: -.02em; margin-bottom: 56px;
}
.section-title em { font-style: italic; color: var(--green); }

/* reveal on scroll */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── HOW IT WORKS ────────────────────────────────────────────── */
.steps-grid {
  display: flex; align-items: flex-start;
  gap: 0; margin-bottom: 52px;
}

.step-card {
  flex: 1;
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
  position: relative; overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.step-card:hover {
  border-color: var(--border2); transform: translateY(-4px);
}
.step-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
  opacity: 0; transition: opacity .25s;
}
.step-card:hover::before { opacity: 1; }

.step-num {
  font-size: 10px; color: var(--text3); letter-spacing: .15em;
  margin-bottom: 16px; font-weight: 600;
}
.step-icon-wrap {
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--green-dim); border: 0.5px solid rgba(63,224,160,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--green); margin-bottom: 18px;
}
.step-card h3 {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 10px;
}
.step-card p { font-size: 12px; line-height: 1.75; color: var(--text2); }

.step-arrow {
  font-size: 20px; color: var(--text3); padding: 0 16px;
  align-self: center; flex-shrink: 0;
  margin-top: -20px;
}

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

.features-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
  transition-delay: 0.2s; /* Reveal after cards */
}

/* ── FEATURES ────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}

.feat-card {
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 26px;
  position: relative; overflow: hidden;
  transition: border-color .25s, transform .22s;
}
.feat-card:hover { border-color: var(--border2); transform: translateY(-3px); }

.feat-large {
  grid-column: span 2;
}

.feat-no-login {
  background: linear-gradient(135deg, #0d1018 0%, #0f1520 100%);
  border-color: rgba(91,163,255,0.15);
}
.feat-no-login:hover { border-color: rgba(91,163,255,0.35); }
.feat-no-login h3 { line-height: 1.4; }

.feat-custom-url {
  background: linear-gradient(135deg, #0d1018 0%, #0c1412 100%);
  border-color: rgba(63, 224, 160, 0.15);
}
.feat-custom-url:hover { border-color: rgba(63, 224, 160, 0.35); }

.feat-tag {
  display: inline-block;
  font-size: 9px; color: var(--text3); letter-spacing: .14em;
  text-transform: uppercase; border: 0.5px solid var(--border);
  padding: 3px 8px; border-radius: 10px; margin-bottom: 14px;
}

.feat-card h3 {
  font-size: 17px; font-weight: 600; color: var(--text);
  margin-bottom: 10px; line-height: 1.3;
}
.feat-card p { font-size: 12px; line-height: 1.8; color: var(--text2); margin-bottom: 18px; }

/* .tag-soon {
  display: inline-flex;
  align-items: center;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(251, 191, 36, 0.1);
  color: var(--amber);
  border: 0.5px solid rgba(251, 191, 36, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
} */

.feat-lang-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.feat-lang-chips span {
  font-size: 10px; color: var(--green);
  background: var(--green-dim); border: 0.5px solid rgba(63,224,160,0.2);
  padding: 3px 10px; border-radius: 10px;
}

.feat-url-demo {
  font-size: 12px; background: var(--bg); border: 0.5px solid var(--border);
  padding: 8px 12px; border-radius: 6px; margin-top: 6px;
}
.url-base { color: var(--text3); }
.url-slug { color: var(--green); }

.feat-highlight-demo {
  display: flex; flex-direction: column; gap: 4px; margin-top: 6px;
}
.fhd-line {
  height: 10px; border-radius: 3px;
  background: rgba(255,255,255,0.06);
  width: 80%;
}
.fhd-line:nth-child(2) { width: 95%; }
.fhd-line:nth-child(3) { width: 70%; }
.fhd-hl {
  background: rgba(63,224,160,0.15);
  border-left: 2px solid var(--green);
}

.feat-img-demo { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.img-pill {
  font-size: 11px; color: var(--text2);
  background: var(--bg); border: 0.5px solid var(--border2);
  padding: 5px 10px; border-radius: 5px; display: inline-block;
}

.accent { color: var(--green); }

/* ── COLLABORATION ───────────────────────────────────────────── */
.section-collab {
  background: var(--bg);
  overflow: hidden; position: relative;
}
.collab-glow {
  position: absolute; width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,163,255,0.045) 0%, transparent 65%);
  top: -200px; left: -200px; pointer-events: none;
}

.collab-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}

.collab-sub {
  font-size: 13px; line-height: 1.9; color: var(--text2);
  max-width: 420px; margin-bottom: 32px;
  margin-top: -32px;
}

.collab-features {
  list-style: none; display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 36px;
}
.collab-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text2);
}
.cf-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue); flex-shrink: 0;
}

.collab-actions { display: flex; align-items: center; gap: 16px; }
.collab-hint { font-size: 11px; color: var(--text3); }

/* room mockup */
.room-mockup {
  background: #0c0f18; border: 0.5px solid var(--border2);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

.room-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: #090c15; border-bottom: 0.5px solid var(--border);
}
.room-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text2);
}
.room-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green-glow);
  animation: navpulse 2s infinite;
}
.room-name { color: var(--green); }

.room-participants { display: flex; align-items: center; gap: 4px; }
.rp-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 8px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #0c0f18;
  margin-left: -6px;
}
.rp-avatar:first-child { margin-left: 0; }
.rp-you { background: rgba(63,224,160,0.2); color: var(--green); }
.rp-a   { background: rgba(91,163,255,0.2); color: var(--blue); }
.rp-b   { background: rgba(167,139,250,0.2); color: var(--purple); }
.rp-count { font-size: 10px; color: var(--text3); margin-left: 6px; }

.room-editor { display: grid; grid-template-columns: 28px 1fr; padding: 8px 0; }
.room-gutter {
  display: flex; flex-direction: column; align-items: flex-end;
  padding-right: 8px; border-right: 0.5px solid rgba(255,255,255,0.05);
}
.room-gutter span {
  font-size: 10px; line-height: 1.75;
  color: rgba(226,232,244,0.18); font-variant-numeric: tabular-nums;
}
.room-code { padding: 0 12px; }
.rcl { font-size: 10.5px; line-height: 1.75; white-space: pre; position: relative; }

/* collab cursors */
.cursor-a {
  display: inline-block; width: 2px; height: 12px;
  background: var(--blue); vertical-align: middle;
  animation: blink 1.3s step-end infinite;
}
.cursor-b {
  display: inline-block; width: 2px; height: 12px;
  background: var(--purple); vertical-align: middle;
  animation: blink 1s step-end infinite;
}
.rcl-cursor-a { background: rgba(91,163,255,0.06); }
.rcl-cursor-b { background: rgba(167,139,250,0.06); }

.room-status-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-top: 0.5px solid var(--border);
  background: #090c15; font-size: 10px;
}
.rs-lang { display: flex; align-items: center; gap: 5px; color: var(--text3); }
.rs-msg { color: var(--blue); animation: fadeInOut 2s ease-in-out infinite; }
@keyframes fadeInOut { 0%,100%{opacity:.5} 50%{opacity:1} }

.room-create-cta {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  margin-top: 20px;
}
.btn-create-room {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  background: var(--blue-dim); border: 0.5px solid rgba(91,163,255,0.4);
  color: var(--blue); padding: 11px 24px; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, transform .18s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-create-room:hover {
  background: rgba(91,163,255,0.16); border-color: var(--blue);
  transform: translateY(-2px);
}
.room-cta-note { font-size: 10px; color: var(--text3); }

/* ── USE CASES ───────────────────────────────────────────────── */
.usecases-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.uc-card {
  background: var(--bg3); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 22px;
  transition: border-color .22s, transform .22s;
}
.uc-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.uc-icon { font-size: 24px; margin-bottom: 14px; }
.uc-card h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.uc-card p { font-size: 12px; line-height: 1.75; color: var(--text2); }

/* ── FINAL CTA ───────────────────────────────────────────────── */
.section-cta {
  background: var(--bg); text-align: center;
  overflow: hidden; position: relative;
}
.cta-glow {
  position: absolute; width: 600px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63,224,160,0.06) 0%, transparent 65%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; }
.cta-title {
  font-family: var(--serif);
  font-size: 52px; line-height: 1.12; font-weight: 300;
  color: #f0f4ff; letter-spacing: -.025em; margin-bottom: 18px;
}
.cta-title em { font-style: italic; color: var(--green); }
.cta-sub { font-size: 13px; color: var(--text2); margin-bottom: 36px; }
.cta-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.cta-note { font-size: 11px; color: var(--text3); }

/* ── FOOTER ──────────────────────────────────────────────────── */
#footer {
  border-top: 0.5px solid var(--border);
  padding: 32px 0; background: var(--bg);
}
.footer-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.logo-pulse-sm {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); animation: navpulse 2.5s infinite;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 12px; color: var(--text3); text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--text); }
.footer-note { font-size: 11px; color: var(--text3); }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MEDIA QUERIES ───────────────────────────────────────────── */

/* Tablets & Small Laptops (max 1024px) */
@media (max-width: 1024px) {
  .hero-inner, .collab-grid { gap: 40px; }
  .usecases-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablets (max 768px) */
@media (max-width: 768px) {
  .nav-links { display: none; } /* Hide secondary links on mobile */
  
  #hero { text-align: center; height: auto; min-height: auto; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  
  .hero-right { margin-top: 40px; width: 100%; max-width: 500px; }
  .editor-float { transform: scale(0.95) !important; } /* Slight scale to fit well */
  
  .steps-grid { flex-direction: column; gap: 16px; }
  .step-arrow { transform: rotate(90deg); margin: 0; padding: 12px 0; }
  
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feat-large { grid-column: span 2; }
  
  .collab-grid { grid-template-columns: 1fr; text-align: center; }
  .collab-sub { margin: 0 auto 32px; }
  .collab-features { align-items: center; }
  .collab-actions { flex-direction: column; }
  .room-create-cta { align-items: center; }
  
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; padding: 0 24px; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* Mobile (max 480px) */
/* Phones (max 520px) */
@media (max-width: 520px) {
  .features-grid, .usecases-grid { grid-template-columns: 1fr; }
  .feat-large { grid-column: auto; }

  .hero-actions { flex-direction: column; width: 100%; gap: 12px; }
  .hero-actions a { width: 100%; justify-content: center; padding: 16px; }

  .hero-stats { flex-wrap: wrap; justify-content: space-around; gap: 12px; }
  .stat { padding: 0 5px; }
  .stat-divider { display: none; }
  .stat-num { font-size: 18px; }

  .editor-float { 
    transform: scale(0.85) !important; 
    margin-left: -5%; 
    width: 110%; 
  }
  .badge-top-right { right: 0; top: -10px; font-size: 9px; }
  .badge-bottom-left { left: 0; bottom: 10px; font-size: 9px; }

  .cta-title { font-size: 32px; }
  .btn-large { width: 100%; justify-content: center; }
}
