/* Surface Map website. Tokens mirror SurfaceMap/DesignSystem/Theme.swift. */
:root {
  --bg: #090a0e;
  --surface: #13151b;
  --surface-raised: #1c1f26;
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.66);
  --text-3: rgba(255, 255, 255, 0.42);
  --cyan: #40ebf5;
  --violet: #8c6bff;
  --good: #4cf29e;
  --warn: #ffc747;
  --bad: #ff5c6b;
  --heat: linear-gradient(90deg, #3342f2 0%, #26b8fa 25%, #4cf29e 50%, #ffc747 75%, #ff4d7a 100%);
  --brand: linear-gradient(120deg, var(--cyan), var(--violet));
  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 28px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }
.eyebrow {
  display: inline-block;
  font: 700 12px/1 var(--font);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(42px, 7vw, 76px); line-height: 1.02; font-weight: 800; }
h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; font-weight: 800; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--text-2); max-width: 36ch; }
.muted { color: var(--text-2); }
.gradient-text {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgba(9, 10, 14, 0.72);
  border-bottom: 1px solid var(--stroke);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 800 18px/1 var(--display); }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand span { color: var(--cyan); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { color: var(--text-2); }
.nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } .nav { gap: 18px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 700 16px/1 var(--font); border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #0b0c12; box-shadow: 0 10px 40px -10px rgba(64, 235, 245, .55); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--stroke-strong); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn small { display: block; font: 500 11px/1 var(--font); opacity: .7; margin-bottom: 4px; letter-spacing: .02em; }
.btn .stack { display: flex; flex-direction: column; align-items: flex-start; }

/* Hero */
.hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 8vw, 96px); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-bg canvas { width: 100%; height: 100%; display: block; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(140, 107, 255, .28), transparent 70%),
    radial-gradient(50% 40% at 95% 30%, rgba(64, 235, 245, .14), transparent 70%),
    linear-gradient(90deg, rgba(9, 10, 14, .92) 0%, rgba(9, 10, 14, .7) 40%, transparent 70%),
    linear-gradient(180deg, transparent 78%, var(--bg));
}
.hero-grid > * { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(32px, 6vw, 72px); }
.hero h1 { margin: 18px 0 22px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .note { margin-top: 18px; font-size: 14px; color: var(--text-3); }
@media (max-width: 900px) {
  .hero-bg::after {
    background:
      radial-gradient(60% 50% at 15% 0%, rgba(140, 107, 255, .28), transparent 70%),
      linear-gradient(180deg, transparent 30%, rgba(9, 10, 14, .85) 60%, var(--bg));
  }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-device { order: -1; width: min(62vw, 250px); margin-inline: auto; }
}

/* Device frame */
.device {
  position: relative; border-radius: 48px; padding: 10px;
  background: linear-gradient(160deg, #2a2d36, #0f1015);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 40px 120px -30px rgba(64, 235, 245, .35), 0 30px 80px -20px rgba(0,0,0,.8);
}
.device img { border-radius: 39px; width: 100%; }
.hero-device { width: min(100%, 310px); justify-self: center; transform: rotate(2deg); }
/* Show the top of the screen (heatmap and score) so the hero fits one viewport. */
.hero-device img { aspect-ratio: 660 / 1290; object-fit: cover; object-position: top; }
@media (prefers-reduced-motion: no-preference) {
  .hero-device { animation: float 7s ease-in-out infinite; }
  @keyframes float { 0%, 100% { transform: rotate(2deg) translateY(0); } 50% { transform: rotate(1deg) translateY(-12px); } }
}

/* Heat strip */
.heat-strip { height: 6px; border-radius: 999px; background: var(--heat); }
.legend { display: flex; justify-content: space-between; font: 600 12px/1 var(--font); color: var(--text-3); margin-top: 10px; letter-spacing: .04em; }

/* Sections */
section { padding: clamp(64px, 10vw, 128px) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { margin: 14px 0 16px; }
.section-head p { color: var(--text-2); margin: 0; font-size: 18px; }
.center { text-align: center; margin-inline: auto; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  border: 1px solid var(--stroke);
  border-radius: var(--radius-l);
  padding: clamp(22px, 3vw, 32px);
}
.icon-chip {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(64, 235, 245, .1); color: var(--cyan); margin-bottom: 18px;
  border: 1px solid rgba(64, 235, 245, .2);
}
.icon-chip svg { width: 22px; height: 22px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font: 800 13px/1 var(--display); letter-spacing: .12em; color: var(--text-3); display: block; margin-bottom: 18px;
}
.step p { color: var(--text-2); margin: 10px 0 0; font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Feature split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split + .split { margin-top: clamp(64px, 9vw, 120px); }
.split.reverse .split-media { order: 2; }
.split-media { display: flex; justify-content: center; }
.split-media .device { width: min(100%, 290px); }
.split h2 { margin: 14px 0 18px; }
.split p { color: var(--text-2); font-size: 18px; margin: 0 0 18px; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; color: var(--text-2); font-size: 16px; }
.checks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
  background: rgba(76, 242, 158, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.6' fill='none' stroke='%234cf29e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
}

/* Verdict tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.tier { border-radius: var(--radius-m); padding: 18px; border: 1px solid var(--stroke); background: var(--surface); }
.tier strong { display: block; font: 800 28px/1 var(--display); margin-bottom: 8px; }
.tier span { font-size: 14px; color: var(--text-2); }
.tier.good strong { color: var(--good); } .tier.fair strong { color: var(--warn); } .tier.poor strong { color: var(--bad); }
@media (max-width: 560px) { .tiers { grid-template-columns: 1fr; } }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric { padding: 22px; }
.metric b { display: block; font: 800 22px/1.2 var(--display); margin-bottom: 6px; }
.metric span { color: var(--text-2); font-size: 15px; }
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .metrics { grid-template-columns: 1fr; } }

/* Report */
.report { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.report-sheet {
  border-radius: 14px; overflow: hidden; transform: rotate(-2deg);
  box-shadow: 0 40px 120px -30px rgba(140, 107, 255, .45), 0 0 0 1px rgba(255,255,255,.1);
}
.formats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pill { border: 1px solid var(--stroke-strong); border-radius: 999px; padding: 8px 14px; font: 600 14px/1 var(--font); color: var(--text-2); }
@media (max-width: 860px) { .report { grid-template-columns: 1fr; } .report-sheet { transform: none; } }

/* Gallery */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 22px;
  overflow-x: auto; padding: 8px var(--gutter) 28px; scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1); scrollbar-width: thin;
}
.gallery .device { scroll-snap-align: center; border-radius: 40px; padding: 8px; }
.gallery .device img { border-radius: 33px; }
.gallery figure { margin: 0; }
.gallery figcaption { text-align: center; color: var(--text-3); font-size: 14px; margin-top: 14px; }

/* Privacy band */
.privacy-band {
  position: relative; overflow: hidden; border-radius: var(--radius-l); padding: clamp(32px, 6vw, 64px);
  background: radial-gradient(80% 120% at 0% 0%, rgba(140,107,255,.25), transparent 60%), radial-gradient(60% 100% at 100% 100%, rgba(64,235,245,.18), transparent 60%), var(--surface);
  border: 1px solid var(--stroke);
}
.privacy-band h2 { max-width: 16ch; margin: 14px 0 16px; }
.privacy-band p { color: var(--text-2); max-width: 56ch; font-size: 18px; margin: 0; }
.privacy-band .checks { grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 28px; }
@media (max-width: 760px) { .privacy-band .checks { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; margin-inline: auto; }
.faq details { border: 1px solid var(--stroke); border-radius: var(--radius-m); background: var(--surface); padding: 0 22px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0; font: 700 17px/1.4 var(--font);
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px/1 var(--font); color: var(--text-3); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--text-2); }

/* CTA */
.cta { text-align: center; }
.cta img { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 26px; box-shadow: 0 30px 90px -20px rgba(64,235,245,.5); }
.cta h2 { margin-bottom: 14px; }
.cta p { color: var(--text-2); margin: 0 auto 30px; max-width: 46ch; font-size: 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--stroke); padding: 40px 0 56px; color: var(--text-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--text-2); }

/* Legal / document pages */
.doc { padding: clamp(48px, 8vw, 96px) 0; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin: 14px 0 10px; }
.doc .meta { color: var(--text-3); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 24px; margin: 44px 0 12px; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc ul { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--text); }
.doc .summary { border-radius: var(--radius-m); border: 1px solid rgba(64,235,245,.22); background: rgba(64,235,245,.06); padding: 20px 22px; }
.doc .summary p { margin: 0; color: var(--text); }
.doc .callout { border-left: 3px solid var(--warn); padding: 4px 0 4px 18px; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; }

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
@media (min-width: 1100px) { .gallery { overflow-x: visible; margin-inline: 0; padding-inline: 0; } }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 860px; margin-inline: auto; }
.plan { position: relative; }
.plan h3 { margin-bottom: 10px; }
.plan .price { font: 800 44px/1 var(--display); margin: 8px 0 6px; letter-spacing: -0.02em; }
.plan .price span { font-size: 18px; font-weight: 600; color: var(--text-2); }
.plan .price-alt { color: var(--text-2); font-size: 15px; margin: 0 0 8px; }
.plan-pro { border-color: rgba(64, 235, 245, .35); background: radial-gradient(90% 80% at 100% 0%, rgba(140, 107, 255, .2), transparent 60%), linear-gradient(180deg, rgba(64, 235, 245, .06), rgba(255, 255, 255, .01)); box-shadow: 0 30px 90px -40px rgba(64, 235, 245, .45); }
.plan-badge { position: absolute; top: 20px; right: 20px; background: var(--brand); color: #0b0c12; font: 800 12px/1 var(--font); padding: 7px 10px; border-radius: 999px; }
.fine-print { max-width: 720px; margin: 22px auto 0; text-align: center; font-size: 13px; color: var(--text-3); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } .plan-badge { position: static; display: inline-block; margin-bottom: 14px; } }
