/* ---------------------------------------------------------------
   Phone Cleaner - site styles
   Design tokens are the app's own tokens (specification section 6.1),
   so the site and the product read as one thing.
   Radius system: cards 18px, small surfaces 12px, interactive pills.
   --------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  --bg:            #F6F9FF;
  --bg-tint:       #ECF2FF;
  --surface:       #FFFFFF;
  --surface-2:     #F2F6FF;
  --ink:           #17233D;
  --ink-soft:      #33436A;
  --muted:         #5C6A85;
  --line:          #DFE7F7;
  --line-strong:   #C9D6F0;
  --accent:        #2153DC;
  --accent-hover:  #1A44BE;
  --accent-soft:   #E7EFFF;
  --on-accent:     #FFFFFF;
  --ok:            #0E6B4D;
  --warn:          #8A5100;

  --shadow-card:   0 8px 24px rgba(38, 85, 170, 0.09);
  --shadow-float:  0 12px 32px rgba(38, 85, 170, 0.16);

  --r-card: 18px;
  --r-small: 12px;
  --r-pill: 999px;

  --pad: clamp(20px, 5vw, 40px);
  --section-gap: clamp(72px, 9vw, 120px);

  --font: "Manrope", ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0C1424;
    --bg-tint:       #101B2F;
    --surface:       #141F35;
    --surface-2:     #182640;
    --ink:           #E8EFFF;
    --ink-soft:      #C6D3EC;
    --muted:         #94A4C4;
    --line:          #22304C;
    --line-strong:   #2E3F60;
    --accent:        #6E9EFF;
    --accent-hover:  #8AB1FF;
    --accent-soft:   #17253F;
    --on-accent:     #0B1322;
    --ok:            #4FCB9C;
    --warn:          #E0A64A;

    --shadow-card:   0 8px 24px rgba(0, 0, 0, 0.32);
    --shadow-float:  0 12px 32px rgba(0, 0, 0, 0.44);
  }
}

/* --- base ---------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px; top: 16px; z-index: 99;
  background: var(--surface); color: var(--ink);
  padding: 12px 18px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-float);
}

/* --- header -------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-head[data-stuck="true"] { border-bottom-color: var(--line); }

.site-head .wrap {
  height: 72px;
  display: flex; align-items: center; gap: 28px;
}

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-weight: 800; font-size: 17px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand img { width: 32px; height: 32px; border-radius: 9px; }

.site-nav {
  margin-left: auto;
  display: flex; align-items: center; gap: 26px;
  white-space: nowrap;
}
.site-nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 15.5px; font-weight: 600;
}
.site-nav a:hover { color: var(--accent); }

@media (max-width: 820px) {
  .site-nav a:not(.btn) { display: none; }
  .site-head .wrap { height: 64px; gap: 16px; }
}
@media (max-width: 620px) {
  .site-head .brand-text { display: none; }
  .doc-page .site-head .brand-text { display: inline; }
  .site-foot .brand-text { display: inline; }
  .site-nav .btn-sm { padding-inline: 18px; font-size: 15px; }
}

/* --- buttons ------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 0 26px; height: 54px;
  border-radius: var(--r-pill);
  font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}
.btn svg { flex: none; }

.btn-primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: var(--surface); color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost:active { transform: translateY(1px); }

.btn-sm { height: 44px; padding: 0 20px; font-size: 15.5px; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* --- section scaffolding ------------------------------------- */

section { padding-block: var(--section-gap); }

.lead {
  max-width: 34ch;
  font-size: clamp(30px, 4.2vw, 46px);
}
.lead-body {
  margin-top: 18px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 18px;
}

.tint { background: var(--bg-tint); }

/* --- hero ---------------------------------------------------- */

.hero { padding-top: clamp(36px, 4.5vw, 64px); padding-bottom: clamp(56px, 7vw, 96px); }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 4.5vw, 53px);
  letter-spacing: -0.035em;
  max-width: 20ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 19px;
  color: var(--muted);
}
.hero-cta {
  margin-top: 34px;
  display: flex; flex-wrap: wrap; gap: 14px;
}

.device {
  justify-self: center;
  height: min(62vh, 600px);
  width: auto;
  max-width: 100%;
  border-radius: 30px;
  box-shadow: var(--shadow-float);
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .device { height: auto; width: min(300px, 76%); }
}

/* --- bento --------------------------------------------------- */

.bento {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 26px;
  display: flex; flex-direction: column;
}
.tile h3 { font-size: 20px; }
.tile p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}

.tile-lead {
  grid-column: span 2;
  grid-row: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 296px);
  gap: clamp(20px, 3vw, 36px);
  align-items: end;
  padding-bottom: 0;
  padding-right: 0;
  overflow: hidden;
  background: linear-gradient(150deg, var(--accent-soft), var(--surface) 66%);
}
.tile-copy { align-self: center; padding-block: 10px 26px; }
.tile-lead h3 { font-size: clamp(23px, 2.5vw, 29px); }
.tile-lead p { max-width: 40ch; font-size: 16.5px; }
.tile-lead img {
  align-self: end;
  width: 100%;
  height: clamp(230px, 27vw, 372px);
  object-fit: cover;
  object-position: top center;
  border-radius: 22px 0 0 0;
  box-shadow: var(--shadow-float);
}

.tile-accent {
  background: linear-gradient(135deg, #2361F4, #3E7BFF 58%, #68A7FF);
  border-color: transparent;
  color: #FFFFFF;
}
.tile-accent h3 { color: #FFFFFF; }
.tile-accent p { color: rgba(255, 255, 255, 0.86); }

.tile-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--r-small);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.tile-accent .tile-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

@media (max-width: 860px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-lead { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .tile-lead {
    grid-column: auto;
    grid-template-columns: 1fr;
    padding-right: 26px;
  }
  .tile-lead img {
    width: min(280px, 84%);
    justify-self: center;
    border-radius: 22px 22px 0 0;
  }
}

/* --- flow (scan / review / confirm) --------------------------- */

.flow .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.flow-steps { margin-top: 34px; }
.flow-step { padding-block: 22px; }
.flow-step + .flow-step { border-top: 1px solid var(--line); }
.flow-step h3 { font-size: 21px; }
.flow-step p { margin-top: 7px; color: var(--muted); font-size: 16px; }

@media (max-width: 900px) {
  .flow .wrap { grid-template-columns: 1fr; }
  .flow .device { order: 2; }
}

/* --- promises ------------------------------------------------ */

.promises .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: start;
}

.promise { padding-block: 26px; }
.promise + .promise { border-top: 1px solid var(--line); }
.promise h3 {
  font-size: clamp(21px, 2.4vw, 26px);
  letter-spacing: -0.025em;
}
.promise p { margin-top: 10px; color: var(--muted); font-size: 16.5px; }

.promise-list { margin-top: 30px; }

/* --- privacy split ------------------------------------------- */

.split {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(24px, 3vw, 34px);
}
.panel h3 { font-size: 20px; }
.panel h3 span { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.panel ul { margin: 20px 0 0; padding: 0; list-style: none; }
.panel li {
  position: relative;
  padding-left: 28px;
  font-size: 16px;
  color: var(--ink-soft);
}
.panel li + li { margin-top: 13px; }
.panel li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
}
.panel-out li::before {
  background: transparent;
  border-color: var(--line-strong);
}

@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; }
}

/* --- money band ---------------------------------------------- */

.money .wrap { max-width: 900px; }
.money h2 { font-size: clamp(27px, 3.5vw, 38px); letter-spacing: -0.028em; max-width: 22ch; }
.money p { margin-top: 22px; color: var(--muted); font-size: 17.5px; max-width: 66ch; }
.money .fineprint {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-small);
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 68ch;
}

/* --- faq ----------------------------------------------------- */

.faq-list { margin-top: 36px; max-width: 860px; }

details {
  border-top: 1px solid var(--line);
  padding-block: 6px;
}
details:last-of-type { border-bottom: 1px solid var(--line); }

summary {
  list-style: none;
  cursor: pointer;
  padding-block: 20px;
  padding-right: 40px;
  position: relative;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.015em;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  position: absolute; right: 8px; top: 50%;
  width: 11px; height: 11px;
  margin-top: -7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
summary:hover { color: var(--accent); }

details p {
  padding-bottom: 22px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 16.5px;
}

@media (prefers-reduced-motion: reduce) {
  summary::after { transition: none; }
}

/* --- closing cta --------------------------------------------- */

.closer { text-align: center; }
.closer h2 { font-size: clamp(30px, 4.4vw, 48px); max-width: 17ch; margin-inline: auto; letter-spacing: -0.03em; }
.closer p { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 48ch; margin-inline: auto; }
.closer .hero-cta { justify-content: center; }

/* --- footer -------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 52px 40px;
  font-size: 15.5px;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 36px;
}
.foot-grid h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot-grid ul { margin: 16px 0 0; padding: 0; list-style: none; }
.foot-grid li + li { margin-top: 10px; }
.foot-grid a { color: var(--ink-soft); text-decoration: none; }
.foot-grid a:hover { color: var(--accent); }
.foot-about p { margin-top: 14px; color: var(--muted); max-width: 40ch; }
.foot-legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px 22px;
}

@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: span 2; }
}

/* --- scroll reveal ------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s cubic-bezier(.16, 1, .3, 1), transform .55s cubic-bezier(.16, 1, .3, 1);
  }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------
   Legal document pages
   --------------------------------------------------------------- */

.doc { padding-block: clamp(48px, 6vw, 76px) clamp(64px, 8vw, 104px); }
.doc .wrap { max-width: 820px; }

.doc-head { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(32px, 4.6vw, 46px); }
.doc-meta {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15.5px;
  display: flex; flex-wrap: wrap; gap: 6px 20px;
}

.doc-summary {
  margin-top: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-small);
  padding: 24px 26px;
}
.doc-summary h2 { font-size: 17px; letter-spacing: 0; }
.doc-summary p { margin-top: 10px; color: var(--ink-soft); font-size: 16px; }
.doc-summary p + p { margin-top: 10px; }

.doc-toc { margin-top: 34px; }
.doc-toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.doc-toc ol {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 32px;
  font-size: 15.5px;
}
.doc-toc li { counter-increment: toc; margin-bottom: 9px; break-inside: avoid; }
.doc-toc li::before {
  content: counter(toc) ".";
  color: var(--muted);
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}
.doc-toc a { color: var(--ink-soft); text-decoration: none; }
.doc-toc a:hover { color: var(--accent); }

@media (max-width: 620px) { .doc-toc ol { columns: 1; } }

.doc-body { margin-top: 12px; }
.doc-body section { padding-block: 0; margin-top: 44px; scroll-margin-top: 92px; }
.doc-body h2 {
  font-size: clamp(21px, 2.6vw, 26px);
  letter-spacing: -0.02em;
}
.doc-body h3 { margin-top: 26px; font-size: 18px; }
.doc-body p, .doc-body ul, .doc-body ol { margin-top: 14px; color: var(--ink-soft); }
.doc-body ul, .doc-body ol { padding-left: 22px; }
.doc-body li { margin-top: 8px; }
.doc-body li::marker { color: var(--muted); }

.doc-table-wrap { margin-top: 20px; overflow-x: auto; }
.doc-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15.5px;
}
.doc-table th, .doc-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
}
.doc-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
}
.doc-table tbody tr + tr td { border-top: 1px solid var(--line); }
.doc-table td:first-child { font-weight: 700; color: var(--ink); width: 30%; }

.fill {
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  border-bottom: 1px dashed var(--warn);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

.doc-contact {
  margin-top: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(24px, 3vw, 32px);
}
.doc-contact h2 { font-size: 20px; }
.doc-contact p { margin-top: 12px; color: var(--ink-soft); }
