/* Safe Average — marketing site. Apple-grade restraint: system type, fluid
   scale, navy + matte-green identity carried from the app. */

:root {
  --navy: #0c1a2c;
  --navy-2: #112a44;
  --ink: #0e1a26;
  --muted: #51606e;
  --line: #e7e9ee;
  --bg: #ffffff;
  --bg-2: #f4f6f8;
  --green: #119067;
  --green-bright: #1aa776;
  --green-soft: #e4f3ec;
  --teal: #14b3a3;
  --amber: #d4883c;
  --rose: #c4564e;
  --on-navy: #eef3f7;
  --on-navy-muted: #9db0c1;

  --maxw: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --radius: 22px;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.55rem, 1.3rem + 1.1vw, 2.4rem);
  --step-3: clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);
  --step-4: clamp(2rem, 0.76rem + 5.76vw, 5.4rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 600; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.02em; }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(4.5rem, 3rem + 8vw, 9rem); }
.eyebrow { color: var(--green); font-weight: 600; font-size: var(--step--1); letter-spacing: 0.02em; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 60ch; line-height: 1.5; font-weight: 400; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.nav__logo { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; letter-spacing: -0.02em; font-size: 1.05rem; }
.nav__logo img { height: 38px; width: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }
.nav__links a { color: var(--muted); font-size: var(--step--1); font-weight: 500; transition: color 0.2s; }
.nav__links a:hover { color: var(--ink); }
.nav .btn.nav__cta { display: none; }
@media (min-width: 720px) { .nav .btn.nav__cta { display: inline-flex; } }
@media (max-width: 600px) { .nav__links .hide-sm { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.72rem 1.35rem; border-radius: 999px; font-weight: 600; font-size: var(--step--1);
  border: 1px solid transparent; cursor: pointer; transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 6px 22px -8px color-mix(in srgb, var(--green) 70%, transparent); }
.btn--primary:hover { background: var(--green-bright); box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--green) 65%, transparent); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--bg-2); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #f0f3f6; }

/* ---------- store badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.62rem 1.05rem; border-radius: 14px; background: #000; color: #fff;
  border: 1px solid #1d1d1f; transition: transform 0.25s var(--ease), opacity 0.2s;
}
.badge:hover { transform: translateY(-2px); }
.badge svg { width: 22px; height: 22px; flex: none; }
.badge small { display: block; font-size: 0.62rem; line-height: 1; opacity: 0.8; font-weight: 500; }
.badge strong { display: block; font-size: 0.98rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.badge--soon { position: relative; }
.badge--soon::after {
  content: "Soon"; position: absolute; top: -8px; right: -6px;
  background: var(--green); color: #fff; font-size: 0.58rem; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; letter-spacing: 0.02em;
}
.on-navy .badge { background: #fff; color: #000; border-color: transparent; }

/* ---------- hero ---------- */
.hero {
  position: relative; background: var(--navy); color: var(--on-navy);
  padding-top: clamp(3rem, 2rem + 6vw, 6rem); padding-bottom: clamp(3rem, 2rem + 5vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 55% at 78% 12%, color-mix(in srgb, var(--teal) 26%, transparent), transparent 60%),
    radial-gradient(60% 50% at 12% 90%, color-mix(in srgb, var(--green) 30%, transparent), transparent 62%);
  opacity: 0.9; pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.5rem, 4vw, 4rem); align-items: center; }
@media (min-width: 920px) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero h1 { color: #fff; }
.hero .lede { color: var(--on-navy-muted); margin-top: 1.4rem; }
.hero__cta { margin-top: 2.1rem; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.hero__note { color: var(--on-navy-muted); font-size: var(--step--1); }
.hero__visual { position: relative; display: flex; justify-content: center; }
.hero__copy, .hero__visual, .feature__copy, .feature__media { min-width: 0; }

/* glow ring behind device */
.hero__visual::before {
  content: ""; position: absolute; width: 116%; aspect-ratio: 1; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--green-bright) 34%, transparent), transparent 58%);
  filter: blur(20px); z-index: 0;
}

/* ---------- device frame ---------- */
.device {
  position: relative; z-index: 1; width: min(300px, 78vw); aspect-ratio: 1206 / 2622;
  background: #0a0f16; border-radius: 46px; padding: 11px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 40px 80px -30px rgba(0,0,0,0.55), inset 0 0 0 2px #20252c;
}
.device img { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; }
.device--lg { width: min(330px, 82vw); }

.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } }

/* ---------- trust strip ---------- */
.trust { background: var(--navy-2); color: var(--on-navy); border-top: 1px solid rgba(255,255,255,0.06); }
.trust__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem 2.4rem; padding-block: 1.4rem; text-align: center; }
.trust__row span { font-size: var(--step--1); color: var(--on-navy-muted); font-weight: 500; display: inline-flex; align-items: center; gap: 0.5rem; }
.trust__row b { color: #fff; font-weight: 600; }
.trust__row .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green-bright); }

/* ---------- steps ---------- */
.steps { display: grid; gap: 1.5rem; margin-top: 3rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); } }
.step__n {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 1.05rem; margin-bottom: 1.1rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--muted); }

/* ---------- feature rows ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (min-width: 880px) { .feature { grid-template-columns: 1fr 1fr; } .feature--rev .feature__media { order: 2; } }
.feature + .feature { margin-top: clamp(4rem, 8vw, 8rem); }
.feature__media { display: flex; justify-content: center; position: relative; }
.feature__media::before {
  content: ""; position: absolute; inset: 8% 12%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--green) 14%, transparent), transparent 65%);
  filter: blur(30px); z-index: 0;
}
.feature h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.feature p { color: var(--muted); max-width: 46ch; }
.feature__list { margin-top: 1.4rem; display: grid; gap: 0.7rem; }
.feature__list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink); list-style: none; }
.feature__list svg { flex: none; width: 21px; height: 21px; margin-top: 2px; color: var(--green); }

/* ---------- privacy band ---------- */
.privacy { background: var(--navy); color: var(--on-navy); text-align: center; position: relative; overflow: hidden; }
.privacy::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--teal) 20%, transparent), transparent 60%);
}
.privacy__in { position: relative; max-width: 760px; margin-inline: auto; }
.privacy h2 { color: #fff; font-size: var(--step-2); }
.privacy p { color: var(--on-navy-muted); margin-top: 1.2rem; font-size: var(--step-1); line-height: 1.55; }
.privacy a.inline { color: #fff; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--teal) 60%, transparent); }
.lock { width: 54px; height: 54px; margin: 0 auto 1.6rem; color: var(--green-bright); }

/* ---------- pricing ---------- */
.pricing { background: var(--bg-2); }
.price-card {
  max-width: 480px; margin: 3rem auto 0; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.8rem, 4vw, 2.8rem); text-align: center;
  box-shadow: 0 30px 60px -40px rgba(12,26,44,0.4);
}
.price-card .amount { font-size: clamp(3rem, 2rem + 5vw, 4.2rem); font-weight: 600; letter-spacing: -0.04em; color: var(--ink); }
.price-card .amount span { font-size: 1.1rem; color: var(--muted); font-weight: 500; vertical-align: super; }
.price-card .once { color: var(--green); font-weight: 600; margin-top: 0.2rem; }
.price-card ul { list-style: none; text-align: left; margin: 1.8rem 0; display: grid; gap: 0.7rem; }
.price-card li { display: flex; gap: 0.7rem; align-items: center; }
.price-card li svg { color: var(--green); flex: none; width: 20px; height: 20px; }
.price-card .btn { width: 100%; }
.price-card .fine { color: var(--muted); font-size: var(--step--1); margin-top: 1rem; }

/* ---------- download cta ---------- */
.cta { text-align: center; }
.cta h2 { font-size: var(--step-3); }
.cta .badges { justify-content: center; margin-top: 2rem; }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: var(--on-navy-muted); padding-block: 3rem; font-size: var(--step--1); }
.footer__in { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.footer__logo { display: flex; align-items: center; gap: 0.5rem; color: #fff; font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer nav a { transition: color 0.2s; }
.footer nav a:hover { color: #fff; }
.footer__legal { width: 100%; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.5rem; margin-top: 0.5rem; line-height: 1.6; }

/* ---------- legal pages ---------- */
.legal { max-width: 760px; margin-inline: auto; padding-block: clamp(3rem, 6vw, 6rem); }
.legal .back { color: var(--green); font-weight: 600; font-size: var(--step--1); display: inline-flex; gap: 0.4rem; margin-bottom: 2rem; }
.legal h1 { font-size: var(--step-3); margin-bottom: 0.4rem; }
.legal .updated { color: var(--muted); font-size: var(--step--1); margin-bottom: 2.5rem; }
.legal h2 { font-size: var(--step-1); margin: 2.4rem 0 0.8rem; letter-spacing: -0.02em; }
.legal p { color: #2c3742; margin-bottom: 1rem; max-width: 70ch; }
.legal .lead { font-size: var(--step-1); color: var(--ink); font-weight: 500; }
.legal a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- reveal motion ---------- */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}
