/* ============================================
   MESHCALL — DESIGN TOKENS
   Signal-mesh theme: infrastructure, not a toy.
   ============================================ */
:root {
  /* Color */
  --bg-base: #0D0F14;
  --bg-raised: #12151C;
  --bg-card: #171B24;
  --bg-card-hover: #1D2230;
  --border-subtle: #262B38;
  --border-strong: #333A4A;

  --text-primary: #EDEFF3;
  --text-secondary: #9AA3B5;
  --text-tertiary: #656E80;

  --signal-blue: #4A9EFF;
  --signal-blue-dim: #2B5A99;
  --signal-blue-glow: rgba(74, 158, 255, 0.35);

  --pro-amber: #F5A623;
  --pro-amber-dim: #7A5312;
  --pro-amber-glow: rgba(245, 166, 35, 0.3);

  --success-green: #3DD68C;
  --danger-red: #FF5C5C;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --max-width: 1180px;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--signal-blue-glow); color: var(--text-primary); }

/* Focus visibility — accessibility floor */
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--signal-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ============================================
   SIGNATURE ELEMENT — the signal mesh background
   ============================================ */
.mesh-canvas-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
}
#meshCanvas { width: 100%; height: 100%; display: block; }

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand-mark { position: relative; width: 26px; height: 26px; flex-shrink: 0; }
.brand-mark .node { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--signal-blue); box-shadow: 0 0 8px var(--signal-blue-glow); }
.brand-mark .n1 { top: 4px; left: 4px; }
.brand-mark .n2 { top: 8px; right: 2px; }
.brand-mark .n3 { bottom: 4px; left: 10px; }
.brand-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.brand-lines line { stroke: var(--signal-blue-dim); stroke-width: 1; }

.topbar-nav { display: flex; gap: 26px; flex: 1; }
.topbar-nav a { color: var(--text-secondary); font-size: 14.5px; font-weight: 500; transition: color 0.15s; }
.topbar-nav a:hover { color: var(--text-primary); }

.topbar-actions { display: flex; gap: 10px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.btn-primary { background: var(--signal-blue); color: #05101F; }
.btn-primary:hover { background: #6BB0FF; transform: translateY(-1px); box-shadow: 0 6px 20px var(--signal-blue-glow); }
.btn-ghost { background: transparent; color: var(--text-primary); }
.btn-ghost:hover { background: var(--bg-card); }
.btn-ghost-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-strong); }
.btn-ghost-outline:hover { border-color: var(--signal-blue); color: var(--signal-blue); }
.btn-lg { padding: 14px 24px; font-size: 15.5px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================
   HERO
   ============================================ */
.hero { position: relative; z-index: 1; padding: 100px 28px 70px; }
.hero-inner { max-width: 780px; margin: 0 auto; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-secondary);
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  padding: 7px 14px; border-radius: 100px; margin-bottom: 28px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success-green); box-shadow: 0 0 8px var(--success-green); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 22px;
}
.hero-sub { font-size: 17px; color: var(--text-secondary); line-height: 1.65; max-width: 600px; margin: 0 auto 44px; }

.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: 46px; }
.create-row { display: flex; gap: 10px; width: 100%; max-width: 560px; }
.room-input {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 0 16px; color: var(--text-primary); font-size: 14.5px;
}
.room-input::placeholder { color: var(--text-tertiary); }
.join-row { display: flex; align-items: center; gap: 10px; color: var(--text-tertiary); font-size: 13.5px; width: 100%; max-width: 560px; }
.join-input {
  flex: 1; background: transparent; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 8px 14px; color: var(--text-secondary); font-size: 13.5px;
}

.hero-proof { display: flex; gap: 40px; justify-content: center; }
.proof-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.proof-item strong { font-family: var(--font-display); font-size: 24px; color: var(--signal-blue); }
.proof-item span { font-size: 12px; color: var(--text-tertiary); }

/* ============================================
   SECTIONS — shared
   ============================================ */
section { position: relative; z-index: 1; padding: 80px 28px; }
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-title { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; text-align: center; }
.section-lede { text-align: center; color: var(--text-secondary); font-size: 15.5px; max-width: 560px; margin: 0 auto 50px; }
.section-kicker { font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-tertiary); text-align: center; margin-bottom: 28px; }

/* Baseline features */
.section-baseline { padding-top: 20px; padding-bottom: 40px; }
.baseline-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 920px; margin: 0 auto; }
.baseline-item {
  background: var(--bg-raised); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13.5px; color: var(--text-secondary);
  text-align: center;
}

/* Feature grid (20 features) */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 22px; transition: all 0.2s ease;
  display: flex; flex-direction: column; gap: 10px;
}
.feature-card:hover { border-color: var(--signal-blue-dim); background: var(--bg-card-hover); transform: translateY(-2px); }
.feature-num { font-family: var(--font-mono); font-size: 12px; color: var(--signal-blue); }
.feature-icon { font-size: 24px; }
.feature-card h4 { font-family: var(--font-display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.feature-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; }
.feature-card.is-pro { border-color: var(--pro-amber-dim); }
.feature-card.is-pro .feature-num { color: var(--pro-amber); }
.pro-tag { display: inline-flex; align-self: flex-start; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; background: var(--pro-amber-glow); color: var(--pro-amber); padding: 3px 8px; border-radius: 5px; margin-top: 2px; }

/* Companies */
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.col-text .section-title { text-align: left; }
.col-text p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 24px; }
.check-list li { position: relative; padding-left: 26px; margin-bottom: 14px; font-size: 14.5px; color: var(--text-secondary); line-height: 1.5; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success-green); font-weight: 700; }
.company-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 24px; }
.company-card-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); font-size: 13.5px; }
.company-card-row:last-child { border-bottom: none; }
.company-card-row span:first-child { color: var(--text-tertiary); }
.mono { font-family: var(--font-mono); color: var(--signal-blue); font-size: 12.5px; }
.pill { padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.pill-live { background: rgba(61, 214, 140, 0.15); color: var(--success-green); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 780px; margin: 0 auto; }
.price-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 32px; position: relative; }
.price-card h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 12px; }
.price-amount { font-family: var(--font-display); font-size: 40px; font-weight: 700; margin-bottom: 8px; }
.price-amount span { font-size: 14px; color: var(--text-tertiary); font-weight: 400; margin-left: 4px; }
.price-tag { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 22px; min-height: 36px; }
.price-list { margin-bottom: 26px; }
.price-list li { font-size: 14px; color: var(--text-secondary); padding: 8px 0 8px 22px; position: relative; border-bottom: 1px solid var(--border-subtle); }
.price-list li:last-child { border-bottom: none; }
.price-list li::before { content: "—"; position: absolute; left: 0; color: var(--text-tertiary); }
.price-card-pro { border-color: var(--pro-amber-dim); background: linear-gradient(180deg, rgba(245,166,35,0.06), var(--bg-card) 40%); }
.price-card-pro .price-list li::before { content: "✓"; color: var(--pro-amber); }
.pro-badge { position: absolute; top: -12px; right: 24px; background: var(--pro-amber); color: #241a06; font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; padding: 4px 12px; border-radius: 100px; }
.price-fine { font-size: 11.5px; color: var(--text-tertiary); text-align: center; margin-top: 12px; }

/* Auth */
.auth-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.auth-card h3 { font-family: var(--font-display); font-size: 16.5px; }
.auth-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.guest-input { background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text-primary); font-size: 14px; }
.google-btn-wrap { display: flex; justify-content: center; min-height: 44px; }
.auth-fineprint { font-size: 11.5px; color: var(--text-tertiary); line-height: 1.4; }

/* Footer */
.footer { padding: 40px 28px; border-top: 1px solid var(--border-subtle); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; font-size: 13px; color: var(--text-tertiary); }
.footer-links a:hover { color: var(--text-secondary); }

/* Recent calls strip */
.recent-strip { position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; background: rgba(23, 27, 36, 0.92); backdrop-filter: blur(10px); border-top: 1px solid var(--border-subtle); }
.recent-strip-inner { max-width: var(--max-width); margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 18px; }
.recent-label { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.recent-rooms { display: flex; gap: 8px; overflow-x: auto; }
.recent-room-chip { font-family: var(--font-mono); font-size: 12.5px; background: var(--bg-raised); border: 1px solid var(--border-strong); padding: 6px 12px; border-radius: 100px; cursor: pointer; white-space: nowrap; transition: border-color 0.15s; }
.recent-room-chip:hover { border-color: var(--signal-blue); color: var(--signal-blue); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .baseline-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .auth-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .topbar-nav { display: none; }
}
@media (max-width: 560px) {
  .baseline-grid, .feature-grid { grid-template-columns: 1fr; }
  .create-row, .join-row { flex-direction: column; }
  .hero-proof { gap: 24px; }
}
