/* Preflight — open-source App Store review scanner
   Dark, terminal-first aesthetic. Dependency-free static site. */

:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #ffffff;
  --muted: #888888;
  --muted-2: #6b6b6b;
  --border: #2a2a2a;
  --border-soft: rgba(255, 255, 255, 0.08);
  --card: #0a0a0a;
  --font-sans: "SF Pro Text", "Helvetica Neue", -apple-system, BlinkMacSystemFont, Arial, system-ui, sans-serif;
  --font-mono: "SF Mono", "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
  --max: 1040px;
}

* { box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.5;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle developer grid background */
.grid-bg {
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 80px);
}

a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); }

::selection { background: #fff; color: #000; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #444; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.brand img { display: block; height: 38px; width: auto; }

.site-header nav { display: flex; align-items: center; gap: 22px; }

.nav-link {
  font-size: 14px;
  color: var(--muted);
  transition: color .2s ease;
}
.nav-link:hover { color: #fff; }

.nav-button {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.nav-button:hover { background: #fff; color: #000; border-color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 128px 0 96px;
  overflow: visible;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: .5;
}
.corner-tl { top: 28px; left: 28px; border-right: none; border-bottom: none; }
.corner-tr { top: 28px; right: 28px; border-left: none; border-bottom: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .02em;
  color: #b3b3b3;
  margin-bottom: 30px;
}

.ping { position: relative; display: inline-flex; width: 8px; height: 8px; }
.ping-dot {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #fff;
  opacity: .75;
  animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
.ping-core { position: relative; width: 8px; height: 8px; border-radius: 999px; background: #fff; }

@keyframes ping {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

.hero-title {
  font-size: 4.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0 0 24px;
}

.gradient-text {
  background: linear-gradient(to bottom, #ffffff 0%, #9a9a9a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  display: inline-block;
  padding: 0 0.04em;
}

.hero-sub {
  max-width: 640px;
  font-size: 1.25rem;
  color: #cfcfcf;
  line-height: 1.6;
  margin: 0 0 38px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 9px;
  transition: opacity .2s ease, background .2s ease, color .2s ease, border-color .2s ease, transform .1s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { opacity: .88; }

.btn-secondary { border: 1px solid var(--border); color: #fff; }
.btn-secondary:hover { background: #fff; color: #000; border-color: #fff; }

.hero-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 48px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.hero-foot svg { color: #fff; flex-shrink: 0; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-bordered { border-top: 1px solid var(--border-soft); }

.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  color: #c9c9c9;
  flex-shrink: 0;
}
.section-head h2 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}
.section-sub {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0 0 48px;
}

/* ---------- Install cards ---------- */
.install-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.install-card {
  flex: 1 1 280px;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
  transition: border-color .3s ease;
}
.install-card:hover { border-color: #555; }

.install-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(42, 42, 42, 0.7);
}
.install-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.copy-btn .ico-check { display: none; color: #4ade80; }
.copy-btn.copied .ico-copy { display: none; }
.copy-btn.copied .ico-check { display: inline; }

.install-card-body {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.install-card-body::-webkit-scrollbar { display: none; }
.dollar { color: var(--muted); font-family: var(--font-mono); font-size: 14px; flex-shrink: 0; user-select: none; }
.install-card-body code { font-size: 14px; color: #e6e6e6; white-space: nowrap; }

/* ---------- Terminal ---------- */
.terminal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.terminal-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(42, 42, 42, 0.7);
}
.dot { width: 12px; height: 12px; border-radius: 999px; }
.dot-red { background: #ff5f57; }
.dot-amber { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-path { margin-left: 10px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted-2); }

.terminal-body { padding: 22px 22px 24px; }
.cmd {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  white-space: nowrap;
}
.cmd:last-child { margin-bottom: 0; }
.chev { color: var(--muted-2); flex-shrink: 0; }
.cmd-text { color: #fff; }
.cmd-note { color: var(--muted-2); }
@media (max-width: 560px) { .cmd-note { display: none; } }

.cursor {
  display: inline-block;
  width: 8px;
  height: 17px;
  background: #fff;
  transform: translateY(2px);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ---------- Feature cards ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: #555; transform: translateY(-2px); }
.card h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 10px; }
.card p { font-size: 0.95rem; color: #b9b9b9; line-height: 1.6; margin: 0; }

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

/* ---------- Responsive type ---------- */
@media (max-width: 700px) {
  .hero { padding: 96px 0 72px; }
  .hero-title { font-size: 2.85rem; }
  .hero-sub { font-size: 1.1rem; }
  .section { padding: 72px 0; }
  .section-head h2 { font-size: 1.85rem; }
  .trust-copy h2 { font-size: 1.7rem; }
  .site-header { padding: 16px 20px; }
  .brand img { height: 32px; }
  .corner { display: none; }
}

/* ---------- Trust ---------- */
.trust-copy { max-width: 680px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin: 0 0 14px;
}
.trust-copy h2 { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 18px; }
.trust-copy p { color: #b9b9b9; font-size: 1.05rem; line-height: 1.7; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-brand { font-size: 14px; color: var(--muted-2); }
.site-footer nav { display: flex; gap: 24px; }
.site-footer nav a { font-size: 14px; color: var(--muted); transition: color .2s ease; }
.site-footer nav a:hover { color: #fff; }

/* ---------- Animations (progressive enhancement — only when JS is present) ---------- */
.js .animate-blur {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(30px);
  animation: blur-in 1s cubic-bezier(0.2, 0.65, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes blur-in {
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.js .reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(28px);
  transition: opacity .8s ease, filter .8s ease, transform .8s ease;
}
.js .reveal.in { opacity: 1; filter: blur(0); transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .js .animate-blur, .js .reveal { animation: none; transition: none; opacity: 1; filter: none; transform: none; }
  .ping-dot, .cursor { animation: none; }
}
