/* ───────────────────────────────────────────────
   CoAuthorLive — Theme Stylesheet
   Deep navy / purple lofi cyberpunk + amber
─────────────────────────────────────────────── */

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

:root {
  --navy:       #080C24;
  --navy-mid:   #0D103A;
  --navy-light: #1E2450;
  --purple:     #534AB7;
  --purple-lt:  #7F77DD;
  --amber:      #F59E0B;
  --amber-dk:   #B45309;
  --text-hi:    #F0EDFF;
  --text-mid:   #B8B4D8;
  --text-lo:    #6B6890;
  --mono:       'Space Mono', 'Courier New', monospace;
  --display:    'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --sans:       'Barlow Condensed', sans-serif;
  --radius:     3px;
  --transition: 200ms ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--navy);
  color: var(--text-hi);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Shared Typography ── */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}
.eyebrow-line {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--amber);
  flex-shrink: 0;
}
.badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--navy);
  background: var(--amber);
  padding: 2px 6px;
  border-radius: 1px;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--text-hi);
  margin-bottom: 16px;
}
.section-title em {
  font-style: normal;
  color: var(--amber);
  display: block;
}
.section-desc {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.8;
  max-width: 560px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header .eyebrow { justify-content: center; }
.section-header .section-desc { margin: 0 auto; }

/* ── CTA Buttons ── */
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--amber);
  color: var(--navy);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.cta-primary:hover { background: #FBBF24; transform: translateY(-1px); }
.cta-primary:active { transform: translateY(0); }
.cta-primary.large { font-size: 13px; padding: 18px 32px; }
.cta-arrow { flex-shrink: 0; }

.cta-secondary {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mid);
  border-bottom: 1px solid var(--navy-light);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}
.cta-secondary:hover { color: var(--amber); border-color: var(--amber); }

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

/* ── Header / Nav ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8, 12, 36, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-light);
}
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-logo-text {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-hi);
}
.accent { color: var(--amber); }

.nav-links {
  display: flex;
  gap: 28px;
  margin: 0;
  margin-left: auto;
}
.nav-link {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-lo);
  transition: color var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--amber); }

.nav-cta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-mid);
  border: 1px solid var(--navy-light);
  padding: 7px 14px;
  border-radius: var(--radius);
  transition: border-color var(--transition), color var(--transition);
  flex-shrink: 0;
}
.nav-cta:hover { border-color: var(--amber); color: var(--amber); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-mid);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 64px;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(83, 74, 183, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 74, 183, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(8, 12, 36, 0.15) 2px,
    rgba(8, 12, 36, 0.15) 4px
  );
  pointer-events: none;
  opacity: .4;
}

.hero-inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 40px;
  position: relative;
  z-index: 1;
}

.hero-content { max-width: 600px; }

.hero-title {
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.0;
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--text-hi);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: normal;
  color: var(--amber);
  display: block;
}

.hero-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 32px;
}
.br-desktop { display: block; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* ── Feature Strip ── */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-top: 1px solid var(--navy-light);
  padding-top: 24px;
}
.feat {
  padding: 14px 12px;
  border: 1px solid var(--navy-light);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.feat:hover { border-color: var(--purple); }
.feat-icon {
  color: var(--purple-lt);
  margin-bottom: 8px;
}
.feat-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-hi);
  margin-bottom: 4px;
}
.feat-desc {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-lo);
  line-height: 1.6;
}

/* ── Hero Visual ── */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
}
.hero-logo-frame {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
}
.hero-logo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: ringPulse 3s ease-in-out infinite;
}
.ring-1 { width: 220px; height: 220px; border-color: rgba(83,74,183,.4); animation-delay: 0s; }
.ring-2 { width: 250px; height: 250px; border-color: rgba(83,74,183,.2); animation-delay: .6s; }
.ring-3 { width: 280px; height: 280px; border-color: rgba(83,74,183,.1); animation-delay: 1.2s; }

@keyframes ringPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(1.04); }
}

.hero-binary-stream {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hero-binary-stream span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--navy-light);
  letter-spacing: .2em;
  animation: binaryFade 4s ease-in-out infinite;
}
.hero-binary-stream span:nth-child(1) { animation-delay: 0s; }
.hero-binary-stream span:nth-child(2) { animation-delay: .3s; }
.hero-binary-stream span:nth-child(3) { animation-delay: .6s; }
.hero-binary-stream span:nth-child(4) { animation-delay: .9s; }
.hero-binary-stream span:nth-child(5) { animation-delay: 1.2s; }
.hero-binary-stream span:nth-child(6) { animation-delay: 1.5s; }
.hero-binary-stream span:nth-child(7) { animation-delay: 1.8s; }
.hero-binary-stream span:nth-child(8) { animation-delay: 2.1s; }
.hero-binary-stream span:nth-child(9) { animation-delay: 2.4s; }

@keyframes binaryFade {
  0%, 100% { color: var(--navy-light); }
  50% { color: rgba(83,74,183,.6); }
}

/* ── Stats Row ── */
.stats-row {
  background: var(--navy-mid);
  border-top: 1px solid var(--navy-light);
  position: relative;
  z-index: 1;
}
.stats-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 32px 24px;
  flex-wrap: wrap;
  gap: 24px;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-lo);
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--navy-light);
}

/* ── Book Section ── */
.section-book {
  padding: 100px 0;
  background: var(--navy);
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.book-card {
  padding: 28px 24px;
  border: 1px solid var(--navy-light);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}
.book-card:hover { border-color: var(--purple); transform: translateY(-4px); }
.book-card-icon {
  color: var(--purple-lt);
  margin-bottom: 16px;
}
.book-card h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-hi);
  margin-bottom: 10px;
}
.book-card p {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mid);
  line-height: 1.8;
}

/* ── AI Section ── */
.section-ai {
  padding: 100px 0;
  background: var(--navy-mid);
  border-top: 1px solid var(--navy-light);
  border-bottom: 1px solid var(--navy-light);
}
.ai-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.ai-list {
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mid);
}
.list-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

/* ── Terminal ── */
.terminal {
  background: #030612;
  border: 1px solid var(--navy-light);
  border-radius: 6px;
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--navy-mid);
  border-bottom: 1px solid var(--navy-light);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-title {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-lo);
  margin-left: 8px;
  letter-spacing: .04em;
}
.terminal-body {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.terminal-body p {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
}
.t-ts { color: var(--text-lo); }
.t-key { color: var(--purple-lt); font-weight: 700; }
.t-val { color: var(--text-mid); }
.t-cursor { }
.t-blink {
  color: var(--amber);
  animation: blink .8s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Community Section ── */
.section-community {
  padding: 100px 0;
  background: var(--navy);
}

/* ── Footer ── */
.site-footer {
  background: var(--navy-mid);
  border-top: 1px solid var(--navy-light);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.footer-copy {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-lo);
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-lo);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--amber); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-content { max-width: 100%; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(8,12,36,0.98);
    border-bottom: 1px solid var(--navy-light);
    padding: 24px;
    gap: 20px;
  }
  .nav-links.open .nav-link { font-size: 14px; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .book-grid { grid-template-columns: 1fr; }
  .stats-inner { flex-direction: column; gap: 32px; }
  .stat-divider { display: none; }
  .br-desktop { display: none; }
  .hero-sub { font-size: 11px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .ai-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .feature-strip { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ── Counter animation ── */
.stat-num.counted { transition: none; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
