/* Pocket Guard landing page. Colours are the app's own (Theme.kt). */
:root {
  --bg: #141414;
  --card: #232325;
  --track: #38383c;
  --purple: #7a5adf;
  --lavender: #aa90ea;
  --text: #f4f3f6;
  --muted: #a09ea6;
  --green: #6edba6;
  --amber: #f5b547;
  --red: #ff5470;
  --line: rgba(255, 255, 255, 0.08);
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--lavender); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(30px, 7vw, 52px); font-weight: 700; max-width: 18ch; }
h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 17px/1 var(--display); color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; }
.nav { display: none; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.nav a:hover { color: var(--text); }
.top .btn-small { margin-left: auto; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .top .btn-small { margin-left: 8px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--purple); color: #fff;
  font: 700 16px/1 var(--body); text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 8px 28px -10px rgba(122, 90, 223, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { background: #8a6ce6; color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 14.5px; }
.btn-big { min-height: 58px; padding: 0 28px; font-size: 17px; }
.play-badge { display: inline-flex; align-items: center; min-height: 58px; padding: 0 22px; border: 1px solid var(--track); border-radius: 14px; color: var(--text); text-decoration: none; font-weight: 700; }
.play-badge[hidden] { display: none; }

/* Hero */
.hero { position: relative; padding: 40px 0 28px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: -20% -30% auto;
  height: 820px;
  background:
    radial-gradient(48% 42% at 62% 34%, rgba(122, 90, 223, 0.34), transparent 70%),
    radial-gradient(30% 30% at 20% 10%, rgba(170, 144, 234, 0.12), transparent 70%);
  pointer-events: none;
}
.hero-in { display: grid; gap: 44px; }
.eyebrow { color: var(--lavender); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.hero h1 { font-size: clamp(44px, 12vw, 72px); font-weight: 750; letter-spacing: -0.025em; margin: 14px 0 18px; }
.lede { color: #d3d1d8; font-size: 18px; line-height: 1.55; max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta .btn-big { width: 100%; }
@media (min-width: 480px) { .cta .btn-big { width: auto; } }
.meta { color: var(--muted); font-size: 14px; margin-top: 14px; }
.meta a { color: var(--muted); }

.hero-art { position: relative; height: 470px; display: grid; place-items: center; }
.phone {
  margin: 0;
  width: 230px;
  border-radius: 34px;
  padding: 7px;
  background: linear-gradient(160deg, #3a3a40, #1b1b1e 40%, #2a2a2e);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.phone img { border-radius: 28px; width: 100%; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; background: #19191b; }
.phone img.tall { aspect-ratio: 9 / 20; }
.phone-front { position: relative; z-index: 2; transform: translateX(-34px); }
.phone-back { position: absolute; z-index: 1; width: 230px; transform: translate(70px, 14px) rotate(6deg); opacity: 0.9; }
.phone-back img { object-position: center; }
.ring {
  position: absolute; width: 440px; height: 440px; border-radius: 50%;
  left: 50%; top: 50%; margin: -220px 0 0 -254px;
  background: radial-gradient(circle, rgba(170, 144, 234, 0.55) 1.2px, transparent 1.8px) 0 0 / 14px 14px;
  -webkit-mask: radial-gradient(circle, transparent 46%, #000 52%, #000 64%, transparent 71%);
  mask: radial-gradient(circle, transparent 46%, #000 52%, #000 64%, transparent 71%);
  opacity: 0.5;
  animation: spin 80s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 40px; }
.facts li { background: rgba(35, 35, 37, 0.7); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.facts b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }

@media (min-width: 900px) {
  .hero { padding: 72px 0 40px; }
  .hero-in { grid-template-columns: 1.05fr 1fr; align-items: center; }
  .hero-art { height: 600px; }
  .phone { width: 280px; }
  .phone-back { width: 280px; transform: translate(110px, 18px) rotate(6deg); }
  .phone-front { transform: translateX(-50px); }
  .ring { width: 560px; height: 560px; margin: -280px 0 0 -330px; }
  .facts { grid-template-columns: repeat(4, 1fr); }
}

/* Sections */
.section { padding: 76px 0; }
@media (min-width: 900px) { .section { padding: 112px 0; } }
.kicker { color: var(--lavender); font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.kicker-red { color: var(--red); }
.kicker-green { color: var(--green); }
.sub { color: var(--muted); font-size: 17px; margin-top: 16px; max-width: 46ch; }
.fine { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* Steps */
.steps { display: grid; gap: 14px; margin-top: 40px; counter-reset: s; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px 24px; overflow: hidden; }
.step::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(122, 90, 223, 0.18), transparent 70%); }
.step-n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(122, 90, 223, 0.18); color: var(--lavender); font: 700 17px/1 var(--display); margin-bottom: 18px; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; } .step { padding: 32px 28px; } }

/* Stories */
.story { position: relative; isolation: isolate; }
.story-sos::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(60% 40% at 80% 30%, rgba(255, 84, 112, 0.09), transparent 70%);
  pointer-events: none;
}
.story-in { display: grid; gap: 48px; }
.story-lead { color: #d3d1d8; font-size: 18px; margin-top: 20px; max-width: 44ch; }
@media (min-width: 900px) {
  .story-in { grid-template-columns: 1.1fr 0.9fr; gap: 72px; align-items: start; }
  .story-flip { grid-template-columns: 0.9fr 1.1fr; }
  .story-flip .story-copy { order: 2; }
  .story-art { position: sticky; top: 96px; }
}

.timeline { margin-top: 36px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--red), var(--amber) 45%, var(--purple) 75%, var(--green)); opacity: 0.6; border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 26px 38px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--red); }
.timeline li:nth-child(2)::before { border-color: var(--amber); }
.timeline li:nth-child(3)::before { border-color: var(--lavender); }
.timeline li:nth-child(4)::before { border-color: var(--green); }
.timeline h3 { margin-bottom: 6px; }
.timeline p { color: var(--muted); max-width: 48ch; }

.callout { margin: 8px 0 18px; padding: 18px 20px; border-radius: 18px; background: rgba(255, 84, 112, 0.08); border: 1px solid rgba(255, 84, 112, 0.25); }
.callout p { color: #e4e2e8; }
.chip-sos { display: inline-block; padding: 1px 10px; border-radius: 999px; background: #fff; color: #c8102e; font-weight: 800; white-space: nowrap; }

.story-art { display: grid; justify-items: center; gap: 22px; }
.sms { margin: 0; width: 100%; max-width: 360px; }
.sms figcaption { color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px; }
.bubble { background: var(--card); border: 1px solid var(--line); border-radius: 20px 20px 20px 6px; padding: 14px 16px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

.features { display: grid; gap: 22px; margin-top: 34px; }
.features li { padding-left: 22px; border-left: 2px solid var(--track); }
.features h3 { margin-bottom: 6px; }
.features p { color: var(--muted); max-width: 46ch; }

.duo { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.duo .phone { width: 100%; max-width: 240px; justify-self: center; }
.duo .phone-lower { margin-top: 48px; }

.extras-h { margin: 72px 0 20px; font-size: 22px; }
.extras { display: grid; gap: 10px; }
.extras li { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.extras svg { grid-row: span 2; width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: rgba(122, 90, 223, 0.16); fill: none; stroke: var(--lavender); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.extras b { font-weight: 700; }
.extras span { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
@media (min-width: 720px) { .extras { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .extras { grid-template-columns: repeat(3, 1fr); } }

/* Privacy */
.privacy-card {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: 36px 22px;
  background: linear-gradient(160deg, rgba(122, 90, 223, 0.22), rgba(35, 35, 37, 0.9) 45%);
  border: 1px solid rgba(170, 144, 234, 0.22);
}
.privacy-card h2 { max-width: 20ch; }
.promises { display: grid; gap: 18px; margin: 32px 0 28px; }
.promises li { padding-left: 34px; position: relative; color: var(--muted); max-width: 60ch; }
.promises li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(110, 219, 166, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%236EDBA6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.promises b { color: var(--text); }
.link-arrow { font-weight: 700; }
.link-arrow::after { content: " →"; }
@media (min-width: 900px) { .privacy-card { padding: 64px; } .promises { grid-template-columns: 1fr 1fr; gap: 26px 48px; } }

/* Install */
.install { display: grid; gap: 32px; }
.install-steps { counter-reset: i; display: grid; gap: 16px; margin: 30px 0 30px; }
.install-steps li { counter-increment: i; position: relative; padding-left: 44px; color: var(--muted); max-width: 52ch; }
.install-steps li::before { content: counter(i); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--track); color: var(--text); font: 700 14px/1 var(--display); }
.install-steps b { color: var(--text); }
.note { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; align-self: start; }
.note h3 { margin-bottom: 10px; }
.note p { color: var(--muted); }
.note ol { list-style: decimal; padding-left: 22px; margin: 14px 0; color: var(--text); }
.note ol li { margin: 6px 0; }
.note .fine { margin-top: 6px; }
@media (min-width: 900px) { .install { grid-template-columns: 1.1fr 0.9fr; gap: 64px; } .note { padding: 32px; margin-top: 30px; } }

/* FAQ */
.faq > * { max-width: 820px; }
.faq h2 { margin-bottom: 28px; }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font: 650 18px/1.35 var(--display); letter-spacing: -0.01em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--lavender); border-bottom: 2px solid var(--lavender); transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
details p { color: var(--muted); padding: 0 0 22px; max-width: 64ch; }

/* Closing */
.closing { text-align: center; position: relative; isolation: isolate; overflow: hidden; }
.closing::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 900px; height: 520px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(122, 90, 223, 0.3), transparent); }
.closing-in { display: grid; justify-items: center; gap: 14px; }
.closing h2 { max-width: none; }
.closing > .wrap > p:first-of-type { color: var(--muted); font-size: 17px; margin-bottom: 14px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); }
.foot-in { display: grid; gap: 14px; }
.brand-foot { font-size: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { color: var(--text); font-size: 15px; overflow-wrap: anywhere; }
@media (min-width: 900px) { .foot-in { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; } .foot nav { justify-content: center; } }

/* Scroll reveal, only when scripts run and motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring { animation: none; }
  .btn { transition: none; }
}
