/* FaceGuard download portal — dark biometric-HUD direction.
   Palette and rhythm keyed off the app icon (shield + face-scan mesh on
   near-black). Two type families only: Space Grotesk for display/body,
   JetBrains Mono for anything that reads as a readout (version, size, hash). */

:root {
  --bg: #05070a;
  --bg-elevated: #0b0f15;
  --surface: #10161f;
  --surface-2: #141b26;
  --border: #202b39;
  --border-bright: #2c3b4e;
  --text: #e9eef4;
  --text-dim: #93a1b3;
  /* #5c6a7d measured 3.66:1 on --bg — under WCAG AA for the small/mono text
     this token is used for (badges, footer, spec labels). Lightened until
     it cleared 4.5:1. */
  --text-faint: #768699;
  --cyan: #29e0ff;
  --cyan-dim: #0e7490;
  --green: #4ade80;
  --amber: #f5b942;

  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --text-base: clamp(1rem, 0.94rem + 0.3vw, 1.1rem);
  --text-lg: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --text-hero: clamp(2.6rem, 2.1rem + 2.4vw, 4.6rem);
  --text-section: clamp(1.7rem, 1.5rem + 1vw, 2.4rem);

  --space-section: clamp(3.5rem, 2.8rem + 3.2vw, 7rem);
  --space-md: clamp(1rem, 0.9rem + 0.5vw, 1.5rem);

  --radius: 14px;
  --radius-sm: 8px;

  --duration-fast: 150ms;
  --duration-normal: 320ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Atmosphere: a faint radial glow + grain sit behind everything, fixed so
   they don't repaint on scroll. */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 78% 8%, rgba(41, 224, 255, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 35% at 12% 85%, rgba(74, 222, 128, 0.08), transparent 60%),
    var(--bg);
}

.atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Header ---------- */

.site-header {
  padding-block: var(--space-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.brand-name {
  font-size: 1.05rem;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(2rem, 4vw, 3rem) var(--space-section);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.1rem;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
}

h1 {
  font-size: var(--text-hero);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  font-weight: 600;
}

h1 em {
  font-style: normal;
  color: var(--cyan);
}

.lede {
  color: var(--text-dim);
  font-size: var(--text-lg);
  max-width: 46ch;
  margin: 0 0 2.1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.btn-download {
  --btn-shadow: 0 0 0 rgba(41, 224, 255, 0);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--cyan);
  color: #041018;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 0.95rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: var(--btn-shadow);
  transition:
    transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    background var(--duration-fast) ease;
}

.btn-download:hover {
  background: #55e9ff;
  transform: translateY(-2px);
  --btn-shadow: 0 10px 30px -8px rgba(41, 224, 255, 0.55);
}

.btn-download:active {
  transform: translateY(0);
}

.btn-download:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.btn-download svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.meta-chip {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  display: inline-flex;
  gap: 0.5rem;
}

.meta-chip b {
  color: var(--text);
  font-weight: 500;
}

.verify-link-row {
  margin-top: 1rem;
}

.side-link {
  font-size: 0.85rem;
  color: var(--text-faint);
  text-decoration: underline;
  text-decoration-color: var(--border-bright);
  text-underline-offset: 3px;
}

.side-link:hover {
  color: var(--text-dim);
}

/* ---------- Scan visual ---------- */

.scan-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin-inline: auto;
}

.scan-stage svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.scan-sweep {
  transform-origin: center;
  animation: sweep 3.6s var(--ease-out-expo) infinite;
}

.scan-node {
  animation: pulse 2.4s ease-in-out infinite;
}

/* Staggered per-node, without inline styles (keeps the CSP's style-src free
   of 'unsafe-inline'). Matches the delays the mesh was designed with. */
.scan-mesh .scan-node:nth-of-type(1) {
  animation-delay: 0.1s;
}
.scan-mesh .scan-node:nth-of-type(2) {
  animation-delay: 0.3s;
}
.scan-mesh .scan-node:nth-of-type(3) {
  animation-delay: 0.5s;
}
.scan-mesh .scan-node:nth-of-type(4) {
  animation-delay: 0.2s;
}
.scan-mesh .scan-node:nth-of-type(5) {
  animation-delay: 0.6s;
}
.scan-mesh .scan-node:nth-of-type(6) {
  animation-delay: 0.4s;
}
.scan-mesh .scan-node:nth-of-type(7) {
  animation-delay: 0.7s;
}
.scan-mesh .scan-node:nth-of-type(8) {
  animation-delay: 0.9s;
}
.scan-mesh .scan-node:nth-of-type(9) {
  animation-delay: 0.5s;
}

@keyframes sweep {
  0% {
    opacity: 0;
    transform: translateY(-34%);
  }
  12% {
    opacity: 0.9;
  }
  55% {
    opacity: 0.15;
    transform: translateY(34%);
  }
  100% {
    opacity: 0;
    transform: translateY(34%);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scan-sweep,
  .scan-node {
    animation: none;
    opacity: 0.55;
  }
}

/* ---------- How it works ---------- */

.section-head {
  max-width: 56ch;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.section-head .eyebrow {
  color: var(--green);
}

.section-head h2 {
  font-size: var(--text-section);
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-dim);
  margin: 0;
}

.how {
  padding-block: var(--space-section);
  border-top: 1px solid var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  transition:
    transform var(--duration-normal) var(--ease-out-expo),
    border-color var(--duration-normal) ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
}

/* Bento break: the middle card carries more weight, on its own row rhythm */
.card--lead {
  grid-row: span 1;
  transform: translateY(-0.6rem);
}

@media (max-width: 860px) {
  .card--lead {
    transform: none;
  }
}

.card-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.card h3 {
  font-size: 1.1rem;
  margin: 0.6rem 0 0.5rem;
  font-weight: 600;
}

.card p {
  color: var(--text-dim);
  margin: 0;
  font-size: 0.93rem;
}

/* ---------- Requirements / verify ---------- */

.details {
  padding-block: var(--space-section);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

@media (max-width: 860px) {
  .details {
    grid-template-columns: 1fr;
  }
}

.details h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.spec-list span:first-child {
  color: var(--text-faint);
}

.spec-list b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  text-align: right;
}

.verify-lede {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

.checksum-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}

.checksum-box p {
  margin: 0 0 0.6rem;
  color: var(--text-faint);
  font-size: 0.82rem;
}

.checksum-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--green);
  word-break: break-all;
  user-select: all;
  display: block;
  line-height: 1.5;
}

.install-steps {
  margin: 1.1rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  display: grid;
  gap: 0.4rem;
}

.note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-faint);
  border-left: 2px solid var(--amber);
  padding-left: 0.8rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: var(--text-faint);
  font-size: 0.82rem;
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--cyan);
}
