/*
 * GCR Sentinel marketing + legal site
 * Dark theme matching the mobile app (lib/theme.ts).
 * No JS framework, no tracking, no cookies needed.
 */

:root {
  --bg: #09090b;
  --bg-raised: #18181b;
  --card: #1a1a1d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --text-faint: #52525b;
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.15);
  --accent-text: #0a3a2c;
  --warn: #fca5a5;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- layout primitives ---------- */

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

.container-narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 20px;
}

header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  background: var(--bg);
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(9, 9, 11, 0.85);
  z-index: 10;
}

.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.2px;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}
nav.site-nav a {
  color: var(--text-muted);
}
nav.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}
nav.site-nav a.nav-app {
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
nav.site-nav a.nav-app:hover {
  background: var(--accent);
  color: #09090b;
}
nav.site-nav a.nav-login {
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}
nav.site-nav a.nav-login:hover {
  border-color: var(--accent);
  color: var(--accent);
}

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 28px 20px;
  color: var(--text-dim);
  font-size: 13px;
}
.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: space-between;
  align-items: center;
}
.site-footer a {
  color: var(--text-muted);
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 72px 20px 76px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
/* ambient brand glow behind the hero */
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}
.hero-copy {
  text-align: left;
}
.hero img.beacon {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 17px;
  filter: drop-shadow(0 0 24px rgba(16, 185, 129, 0.35));
}
.hero .eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  font-size: 46px;
  line-height: 1.06;
  letter-spacing: -1.4px;
  margin: 0 0 16px;
  font-weight: 800;
}
.hero h1 .accent {
  color: var(--accent);
  display: block;
}
.hero p.lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 30px;
  line-height: 1.55;
}

/* ---------- get-the-app block (QR + badges) ---------- */
.get {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.qr-card {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 10px;
  line-height: 0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}
.qr-card img {
  display: block;
  width: 132px;
  height: 132px;
  border-radius: 6px;
}
.get-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qr-cap {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 200px;
  line-height: 1.4;
}
.desktop-link {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.desktop-link:hover {
  color: var(--accent);
}

/* Homepage mobile CTA — hidden on desktop (where the QR does the job),
   revealed at phone widths in the 600px media query below. */
.app-cta {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 17px;
  font-weight: 700;
  padding: 15px 26px;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35);
}
.app-cta:hover {
  text-decoration: none;
  filter: brightness(1.05);
}
.cta-sub {
  display: none;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  max-width: 280px;
}

/* ---------- /install page ---------- */
.install {
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 22px 72px;
  text-align: center;
}
.install-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 18px;
}
.install .eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 10px;
}
.install h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 0 0 26px;
}
.install-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-text);
  padding: 14px 40px;
  border-radius: 999px;
  box-shadow: 0 14px 38px rgba(16, 185, 129, 0.4);
}
.install-cta:hover {
  text-decoration: none;
  filter: brightness(1.05);
}
.install-cta-main {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
}
.install-cta-sub {
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.8;
  margin-top: 3px;
}
.install-steps {
  margin-top: 36px;
  text-align: left;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 18px;
  padding: 24px 22px;
}
.install-steps-head {
  text-align: center;
  margin-bottom: 20px;
}
.install-steps-badge {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.install-steps-title {
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}
.install-steps-sub {
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}
.step-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.step-block h2 {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--text);
}
.step-block ol {
  margin: 0;
  padding-left: 20px;
}
.step-block li {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 15px;
}
.step-block .hint {
  color: var(--text-dim);
  font-size: 13px;
}
.install-desktop {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.install-desktop .qr-card img {
  width: 160px;
  height: 160px;
}
.install-desktop .qr-cap {
  max-width: 340px;
  text-align: center;
}
.install-share {
  margin-top: 40px;
  font-size: 13px;
  color: var(--text-dim);
}
.install-share strong {
  color: var(--text-muted);
}
/* JS tags the device so each platform sees only what's relevant.
   With JS off, both the phone steps and the QR show (still correct). */
.is-desktop-device .install-steps {
  display: none;
}
.is-mobile-device .install-desktop {
  display: none;
}
.hero .badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- animated phone mockup ---------- */
.hero-device {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.device-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 60%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}
.phone {
  position: relative;
  z-index: 1;
  width: 300px;
  aspect-ratio: 375 / 812;
  background: #0c0c0e;
  border: 11px solid #16161a;
  border-radius: 48px;
  box-shadow:
    0 2px 2px rgba(255, 255, 255, 0.06) inset,
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.phone-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 26px;
  background: #000;
  border-radius: 16px;
  z-index: 3;
}
.phone-screen {
  position: absolute;
  inset: 0;
  border-radius: 37px;
  overflow: hidden;
  background: #09090b;
}
.app-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.badge-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.badge-store:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.badge-store small {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.2;
}

/* ---------- sections ---------- */

section.feature-grid {
  padding: 60px 20px;
  max-width: 1080px;
  margin: 0 auto;
}
.feature-grid h2 {
  font-size: 28px;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
  font-weight: 700;
}
.feature-grid .section-sub {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 36px;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.2px;
}
.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

section.disclaimer-band {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 36px 20px;
}
.disclaimer-band-inner {
  max-width: 880px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.disclaimer-band-inner strong {
  color: var(--warn);
  display: block;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 11px;
  margin-bottom: 8px;
}

/* ---------- legal / long-form ---------- */

main.legal h1 {
  font-size: 32px;
  letter-spacing: -0.6px;
  margin: 0 0 6px;
  font-weight: 800;
}
main.legal .meta {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 28px;
}
main.legal h2 {
  font-size: 20px;
  letter-spacing: -0.3px;
  margin: 36px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 700;
}
main.legal h3 {
  font-size: 16px;
  margin: 22px 0 8px;
  font-weight: 700;
  color: var(--accent);
}
main.legal p,
main.legal li {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}
main.legal strong {
  color: var(--text);
}
main.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}
main.legal th,
main.legal td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
main.legal th {
  color: var(--text);
  background: var(--card);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
main.legal hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
main.legal code {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
}

/* ---------- callout panels (auth-success, delete-account) ---------- */

.panel {
  max-width: 480px;
  margin: 80px auto 40px;
  padding: 36px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-align: center;
}
.panel img.beacon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 15px;
  filter: drop-shadow(0 0 18px rgba(16, 185, 129, 0.4));
}
.panel h1 {
  font-size: 26px;
  letter-spacing: -0.4px;
  margin: 0 0 12px;
}
.panel p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 14px;
}
.panel .button-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  margin-top: 14px;
  border: 0;
  cursor: pointer;
}
.panel .button-primary:hover {
  text-decoration: none;
  filter: brightness(1.08);
}
.panel .button-secondary {
  display: inline-block;
  color: var(--text-muted);
  padding: 12px 20px;
  font-size: 13px;
  margin-top: 6px;
}
.panel .checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 50%;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
}

/* ---------- responsive ---------- */

/* stack hero copy over the phone on tablet/narrow */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-copy {
    text-align: center;
  }
  .hero img.beacon {
    margin-left: auto;
    margin-right: auto;
  }
  .hero p.lede {
    margin-left: auto;
    margin-right: auto;
  }
  .get {
    justify-content: center;
  }
  .hero-device {
    order: -1;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 48px 20px 48px;
  }
  .hero h1 {
    font-size: 33px;
    letter-spacing: -1px;
  }
  .hero p.lede {
    font-size: 16px;
  }
  .get {
    flex-direction: column;
  }
  .get-actions {
    align-items: center;
  }
  .qr-cap {
    text-align: center;
  }
  /* On phones the QR + "point your camera" copy is nonsense (you're already
     on the phone). Hide it and show a tap-to-install button instead. */
  .hero .qr-card,
  .hero .qr-cap,
  .hero .desktop-link {
    display: none;
  }
  .app-cta {
    display: inline-flex;
  }
  .cta-sub {
    display: block;
    text-align: center;
  }
  .phone {
    width: 252px;
    border-width: 9px;
  }
  nav.site-nav {
    gap: 14px;
    font-size: 13px;
  }
  nav.site-nav a.hide-mobile {
    display: none;
  }
  main.legal h1 {
    font-size: 24px;
  }
  main.legal h2 {
    font-size: 17px;
  }
  .site-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}
