/* Chirp Landing Page — Style Sheet */

:root {
  --bg:          #16213e;
  --bg-card:     #1a1a2e;
  --bg-elevated: #0f3460;
  --accent:      #7c3aed;
  --accent-dim:  rgba(124, 58, 237, 0.15);
  --accent-hover:#9161f0;
  --fedi-purple: #563acc;
  --text:        #f0f2ff;
  --text-muted:  #8892b0;
  --text-dim:    #4a5280;
  --border:      rgba(255, 255, 255, 0.08);
  --radius:      12px;
  --radius-lg:   20px;
  --shadow:      0 8px 32px rgba(0, 0, 0, 0.4);
  --transition:  0.2s ease;
  --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:   'SF Mono', 'Fira Code', monospace;
}

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

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

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

/* ── Utility ──────────────────────────────────────────── */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ──────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 33, 62, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-dim); transform: translateY(-1px); }

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 100px; }

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(86, 58, 204, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content { position: relative; z-index: 1; }

.fediverse-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #a78bfa;
  margin-bottom: 28px;
}

.fediverse-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f0f2ff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-note {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 0;
}

/* ── App Mockup ───────────────────────────────────────── */

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-mockup {
  width: 280px;
  height: 560px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.04);
}

.phone-notch {
  width: 100px;
  height: 28px;
  background: var(--bg);
  border-radius: 0 0 18px 18px;
  margin: 0 auto;
}

.phone-screen {
  padding: 0 12px 12px;
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}

.phone-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.phone-lines { flex: 1; }

.phone-line {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  margin-bottom: 5px;
}

.phone-line:last-child { margin-bottom: 0; width: 60%; }

.phone-line-short { width: 45%; }

.phone-actions {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.phone-action {
  width: 14px;
  height: 14px;
  background: var(--bg-elevated);
  border-radius: 3px;
}

.phone-row:nth-child(2) .phone-avatar { background: #7c3aed; }
.phone-row:nth-child(3) .phone-avatar { background: #2563eb; }
.phone-row:nth-child(4) .phone-avatar { background: #059669; }
.phone-row:nth-child(5) .phone-avatar { background: #dc2626; }

.phone-compose {
  margin-top: 10px;
  background: var(--accent-dim);
  border: 1px dashed rgba(124,58,237,0.3);
  border-radius: var(--radius);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ── Features ─────────────────────────────────────────── */

.features {
  padding: 80px 0;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 52px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.4rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ── Fediverse Section ────────────────────────────────── */

.fediverse-section {
  padding: 80px 0;
  background: linear-gradient(180deg, transparent, rgba(15, 52, 96, 0.4), transparent);
}

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

.fediverse-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fed-nodes {
  position: relative;
  width: 280px;
  height: 280px;
}

.fed-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 2;
  box-shadow: 0 0 0 8px var(--accent-dim);
}

.fed-node {
  position: absolute;
  width: 52px;
  height: 52px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.fed-node::after {
  content: '';
  position: absolute;
  width: 2px;
  background: var(--border);
  top: 50%;
  right: 100%;
  transform-origin: right center;
  z-index: 0;
}

.fed-line {
  position: absolute;
  background: linear-gradient(to right, var(--accent-dim), transparent);
  height: 2px;
  top: 50%;
  left: 50%;
  transform-origin: left center;
}

.fed-node:nth-child(2) { top: 0; left: 50%; transform: translateX(-50%); }
.fed-node:nth-child(3) { top: 25%; right: 0; }
.fed-node:nth-child(4) { bottom: 15%; right: 5%; }
.fed-node:nth-child(5) { bottom: 5%; left: 15%; }
.fed-node:nth-child(6) { top: 25%; left: 0; }

.fediverse-text .section-sub { margin-bottom: 28px; }

.fediverse-instances {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.instance-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── PWA Install Banner ───────────────────────────────── */

.install-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  z-index: 200;
  max-width: 440px;
  width: calc(100% - 40px);
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.install-banner-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.install-banner-text { flex: 1; }
.install-banner-text strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.install-banner-text span { font-size: 0.8rem; color: var(--text-muted); }

.install-banner-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────────── */

footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

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

footer .logo { opacity: 0.7; }
footer .logo:hover { opacity: 1; }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text-muted); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 768px) {
  .hero { padding: 48px 0 40px; }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual { order: -1; }

  .phone-mockup {
    width: 200px;
    height: 400px;
  }

  .fediverse-section .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .fediverse-diagram { display: none; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }

  .nav-actions .btn-ghost { display: none; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; }
  .features-grid { grid-template-columns: 1fr; }
}
