/* Inspectro marketing/support/privacy site — shared design system.
   Palette pulled from the app's own Turbo colormap (see the app icon and
   ios/InspectroKit/Sources/InspectroKit/Palette/ColorPalette.swift) so the
   site reads as an extension of the product, not a generic template. */

:root {
  color-scheme: dark;
  --bg: #060608;
  --bg-elevated: #0d0d13;
  --card: #101017;
  --card-hover: #15151d;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --fg: #f5f6f8;
  --muted: #9a9aa6;
  --muted-dim: #6c6c78;

  --turbo-blue: #2f6fed;
  --turbo-cyan: #35e2d8;
  --turbo-green: #8ef04a;
  --turbo-yellow: #f7e94a;
  --turbo-orange: #ff9a2e;
  --turbo-red: #ff3b30;
  --turbo-gradient: linear-gradient(
    90deg,
    var(--turbo-blue) 0%,
    var(--turbo-cyan) 24%,
    var(--turbo-green) 48%,
    var(--turbo-yellow) 66%,
    var(--turbo-orange) 82%,
    var(--turbo-red) 100%
  );
  --accent: var(--turbo-cyan);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 20px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 80px;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;

  --max-width: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  /* Safety net: no single element (however it happens) should ever be able
     to force the whole page to scroll sideways. */
  overflow-x: hidden;
}

body {
  font: 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 900px 600px at 50% -10%, rgba(53, 226, 216, 0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 15%, rgba(255, 154, 46, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

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

.site-header {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.brand:hover { text-decoration: none; }

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: var(--space-4);
  font-size: 15px;
  flex-shrink: 0;
}

.site-nav a {
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: none;
}

@media (max-width: 420px) {
  .brand span { display: none; }
  .site-nav { gap: var(--space-2); font-size: 14px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--fg);
  color: #050506;
}

.btn-primary:hover {
  background: #dfe0e3;
  text-decoration: none;
}

.btn-ghost {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  background: var(--card-hover);
  text-decoration: none;
}

.badge-link {
  display: inline-flex;
  border-radius: 10px;
  transition: transform .15s ease;
}
.badge-link:hover { transform: translateY(-1px); }
.badge-link img { height: 44px; width: auto; display: block; }

/* ---------- Typography helpers ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}

.gradient-text {
  background: var(--turbo-gradient);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .gradient-text { animation: gradient-drift 6s ease-in-out infinite; }
}
@keyframes gradient-drift {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; margin: 0; }

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 var(--space-2);
}

.section-lede {
  color: var(--muted);
  font-size: 18px;
  max-width: 620px;
  margin: 0 0 var(--space-5);
}

/* ---------- Cards / grids ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: var(--space-3);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

@media (max-width: 760px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: var(--space-3);
}

.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: var(--space-2);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.feature-card h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.feature-card p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

/* ---------- Screenshot frames ---------- */

.phone-frame {
  border-radius: 34px;
  border: 1px solid var(--border-strong);
  background: #000;
  padding: 6px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.phone-frame img {
  border-radius: 28px;
  width: 100%;
}

.hero-shot .phone-frame { position: relative; overflow: hidden; }
.hero-shot .phone-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.1) 45%, transparent 55%);
  transform: translateY(-100%);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-shot .phone-frame::after { animation: scan-sweep 5s ease-in-out infinite; }
}
@keyframes scan-sweep {
  0%, 20% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

.tablet-frame {
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: #000;
  padding: 8px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.tablet-frame img {
  border-radius: 13px;
  width: 100%;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-6);
  padding: var(--space-4) 0 var(--space-6);
  color: var(--muted-dim);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: var(--space-3);
}

.footer-links a { color: var(--muted); }

/* ---------- Generic content page (support/privacy) ---------- */

.page-hero {
  padding: var(--space-6) 0 var(--space-4);
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 44px);
  margin-bottom: 6px;
}

.page-hero .subtitle {
  color: var(--muted);
  font-size: 16px;
}

.content-section { margin: var(--space-5) 0; }

.content-section h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

dl { margin: 0; }
dt {
  font-weight: 600;
  margin-top: var(--space-3);
  font-size: 17px;
}
dt:first-child { margin-top: 0; }
dd {
  margin: 6px 0 0;
  color: var(--muted);
}

ul.policy-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

ul.policy-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 16px 18px;
}

ul.policy-list li strong {
  display: block;
  margin-bottom: 3px;
}

ul.policy-list li span { color: var(--muted); }
