/* ============================================================================
   NIGHTSTAND -- shared styles
   Palette: near-black base, signal blue, safety green
   Type: Space Grotesk (display) · Inter (body) · JetBrains Mono (data/labels)
============================================================================ */

:root {
  --bg: #0A0E14;
  --panel: #0F1721;
  --panel2: #131C29;
  --border: #1B2A3D;
  --border-light: #243549;
  --text: #E8ECF1;
  --text-dim: #8FA1B8;
  --text-faint: #5C6E84;
  --blue: #3B82F6;
  --blue-dim: #1E3A5F;
  --green: #22D3A8;
  --green-dim: #143B33;
  --amber: #F4B740;
  --red: #EF5B5B;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section-border-top { border-top: 1px solid var(--border); }
.section-border-bottom { border-bottom: 1px solid var(--border); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.grid-cards-wide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,14,20,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text);
}
.nav-brand span {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-link {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.nav-link.active {
  background: var(--panel2);
  color: var(--text);
  border-color: var(--border-light);
}
.nav-link:hover:not(.active) {
  color: var(--text);
}

/* ── Radar background ──────────────────────────────────────────────────── */
.radar-wrap {
  position: relative;
  overflow: hidden;
}
.radar-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
}
@keyframes radar-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.7; }
}
.radar-dot { animation: radar-pulse 16s ease-in-out infinite; }

/* ── Typography ─────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow.blue { color: var(--blue); }
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

h1.display {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 5.5vw, 58px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
h2.display {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3.5vw, 36px);
  margin: 0 0 12px;
}
h3.heading {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 8px;
}
.lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0 0 32px;
}
.muted { color: var(--text-dim); }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 14px 26px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--blue);
  color: #06101F;
}
.btn-primary:disabled {
  background: var(--blue-dim);
  color: var(--text-faint);
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-block { width: 100%; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 16px; }
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}
.input, select.input, textarea.input {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
}
textarea.input { min-height: 80px; resize: vertical; }
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.input::placeholder { color: var(--text-faint); }
select.input { cursor: pointer; }
select.input option { background: var(--panel2); color: var(--text); }
.error-text {
  color: var(--red);
  font-size: 13px;
  margin: 0 0 12px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}
.card-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--panel2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tier-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
}

/* ── Success card / referral ───────────────────────────────────────────── */
.success-card {
  background: var(--panel);
  border: 1px solid var(--green-dim);
  border-radius: 14px;
  padding: 24px;
  max-width: 480px;
}
.success-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.share-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 16px 0;
}
.share-box span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.share-copy-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text);
  font-size: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.badge-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  background: transparent;
}
.badge-pill.unlocked {
  border-color: var(--green-dim);
  color: var(--green);
  background: var(--green-dim);
}

/* ── App store buttons ─────────────────────────────────────────────────── */
.store-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 10px 18px;
}
.store-btn.play {
  background: var(--panel2);
  border: 1px solid var(--border-light);
  color: var(--text);
}
.store-btn.ios {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-faint);
  cursor: default;
}
.store-btn .store-label {
  display: block;
  font-size: 10px;
  line-height: 1.2;
}
.store-btn .store-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

/* ── Phone mockup ───────────────────────────────────────────────────────── */
.phone {
  width: 280px;
  aspect-ratio: 9/19;
  background: var(--panel);
  border: 1px solid var(--border-light);
  border-radius: 32px;
  padding: 14px;
  margin: 0 auto;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.phone-status {
  position: relative;
  padding: 16px 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
}
.phone-card {
  position: relative;
  margin: 26px 16px 0;
  background: rgba(15,23,33,0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  backdrop-filter: blur(6px);
}
.phone-card p { margin: 0; }
.phone-panic-wrap {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}
.phone-panic-outer {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239,91,91,0.25), rgba(239,91,91,0.05));
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-panic-inner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #1A0606;
  text-align: center;
  line-height: 1.2;
}

/* ── Stat rows (advertiser page) ───────────────────────────────────────── */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  gap: 16px;
}
.stat-row .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stat-row .value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  text-align: right;
}
.sector-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.sector-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  color: var(--text-dim);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  padding: 40px 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand span {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dim);
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.footer-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-faint);
}

/* ── Feature icons ──────────────────────────────────────────────────────── */
.feature-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--panel2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

/* ── Hidden state ───────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
