/*
 * familyonguard.com — the public page.
 *
 * The palette and the type scale come from the Claude Design delivery; the
 * layout is rebuilt in vanilla because the delivery ran on a React runtime we
 * do not ship.
 *
 * Two rules the brief insisted on and that this file keeps:
 *
 *   Dark, like the app. This page is often opened from a link someone sent at
 *   night, on a phone, and the product's whole identity is a screen that does
 *   not light up a face.
 *
 *   Red is the alert and nothing else. The calls to action are blue. A page
 *   that shouts in red about danger is the fear-marketing the brief refused —
 *   people who buy this already know they are afraid.
 */

:root {
  color-scheme: dark;

  --bg: #0b0f17;
  --bg-raised: #121826;
  --bg-sunk: #0e1420;
  --line: #232c40;
  --line-soft: #1a2233;

  --text: #e8ecf3;
  --text-2: #b4bccb;
  --text-dim: #8d97a8;

  --accent: #4d8dff;
  --accent-deep: #152341;
  --ok: #2fbf71;

  --radius: 18px;
  --gutter: clamp(20px, 5vw, 48px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { letter-spacing: -.025em; font-weight: 600; margin: 0 0 16px; }
h1 { font-size: clamp(42px, 8vw, 80px); line-height: 1.03; max-width: 15ch; }
h2 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.15; }
p { margin: 0 0 16px; color: var(--text-2); max-width: 62ch; }
p.dim { color: var(--text-dim); }
a { color: inherit; }

/* --- nav ------------------------------------------------------------------ */

.nav {
  display: flex; align-items: center; gap: 16px;
  padding: 18px var(--gutter);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; text-decoration: none; letter-spacing: -.01em;
  font-size: 16px; white-space: nowrap;
}
@media (min-width: 620px) { .brand { font-size: 17px; } }
.nav-right { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

/*
 * The header's buttons exist only where there is room for them. Below 900 px
 * they move to .thumb-bar, which is both the honest fix for the overflow and
 * the better place on a phone.
 */
.nav-only { display: none; }
@media (min-width: 900px) { .nav-only { display: inline-flex; } }

.thumb-bar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: flex; gap: 10px;
  padding: 12px var(--gutter) calc(12px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
}
.thumb-bar .btn { flex: 1; margin-top: 0; padding: 0 12px; white-space: nowrap; }
@media (min-width: 900px) { .thumb-bar { display: none; } }

/* The bar covers the end of the page; give the page room to end above it. */
@media (max-width: 899px) {
  body { padding-bottom: calc(84px + var(--safe-bottom)); }
}

.langs { display: flex; gap: 4px; margin-inline-end: 6px; }
.lang-chip {
  background: none; border: 1px solid transparent; color: var(--text-dim);
  border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer;
  min-height: 44px;
}
@media (min-width: 620px) { .lang-chip { padding: 6px 12px; font-size: 14px; } }
.lang-chip.is-on { border-color: var(--line); color: var(--text); }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 26px;
  border: 0; border-radius: 14px;
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none;
}
.btn.line { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn:disabled { opacity: .45; }
.btn + .btn { margin-top: 10px; }

/* --- sections ------------------------------------------------------------- */

.hero {
  padding: clamp(40px, 8vw, 96px) var(--gutter) clamp(40px, 8vw, 80px);
  display: grid; gap: clamp(28px, 5vw, 56px);
  grid-template-columns: 1fr; align-items: center;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr .95fr; }
}
.hero-text h1 { margin-top: 0; }
.hero .sub { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-2); max-width: 54ch; }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.zone { color: var(--text-dim); font-size: 15px; }

.band { padding: clamp(48px, 9vw, 96px) var(--gutter); border-top: 1px solid var(--line-soft); }

.two-col {
  display: grid; gap: clamp(28px, 5vw, 64px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .two-col { grid-template-columns: 1fr 1fr; }
  .two-col.reverse > :first-child { order: 2; }
}

/* --- three steps ---------------------------------------------------------- */

.steps3 {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px; grid-template-columns: 1fr;
  counter-reset: s;
}
@media (min-width: 820px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.steps3 li {
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 24px;
}
.steps3 li::before {
  counter-increment: s; content: counter(s);
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-deep); color: var(--accent);
  font-size: 15px; font-weight: 700; margin-bottom: 14px;
}
.steps3 h3 { font-size: 19px; margin: 0 0 8px; font-weight: 600; }
.steps3 p { margin: 0; font-size: 16px; }

/* --- the ten seconds ------------------------------------------------------ */

.ten { background: var(--bg-sunk); }
.ten-inner { max-width: 760px; }
.ten h2 { color: var(--text); }
.ten p:first-of-type { font-size: clamp(18px, 2vw, 20px); color: var(--text); }

/* --- moments -------------------------------------------------------------- */

.moments { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .moments { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .moments { grid-template-columns: repeat(3, 1fr); } }
.moment {
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden;
}
.moment img {
  display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
}
.moment .body { padding: 22px 24px 26px; }
.moment .t { color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.moment h3 { font-size: 20px; margin: 8px 0; font-weight: 600; }
.moment p { margin: 0; font-size: 16px; }

/* --- photography ---------------------------------------------------------- */
/*
 * Four photographs, chosen against the obvious: people who are fine. A woman
 * walking home, teenagers laughing, a grandmother in an armchair, a family at
 * breakfast with two of the buttons on the table. The brief refused fear
 * imagery and this is what that looks like when it is honoured.
 *
 * Every one carries width and height so the page does not jump while they
 * load, and everything below the fold is lazy. The originals were 1.9 MB
 * PNGs; tools/photos.js turns each into WebP and JPEG at three widths, so a
 * phone fetches roughly 60 KB.
 */

figure { margin: 0; }

.hero-photo, .shot {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-soft); background: var(--bg-raised);
  position: relative;
}
.hero-photo img, .shot img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 4 / 3;
}
/* A quiet vignette: the photographs are warm and the page is not, and the
   join between them should not be a hard edge. */
.hero-photo::after, .shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 55%, transparent), transparent 46%);
}

.shot-narrow img { aspect-ratio: 3 / 2; }
/* The SMS sits on the photograph of the person receiving it. */
.shot-narrow .sms {
  position: absolute; inset: auto 16px 16px 16px; z-index: 1;
  background: color-mix(in srgb, var(--bg-sunk) 92%, transparent);
  backdrop-filter: blur(8px);
  max-width: none;
}
@media (max-width: 560px) {
  .shot-narrow .sms { position: static; inset: auto; margin-top: -1px; border-radius: 0 0 var(--radius) var(--radius); }
  .shot-narrow { display: flex; flex-direction: column; }
  .shot-narrow::after { display: none; }
}

/* --- small pieces of art -------------------------------------------------- */
/*
 * Drawn in CSS rather than photographed. Stock photography of "personal
 * safety" is uniformly the fear imagery the brief refused, and a real photo
 * shoot is not today's problem.
 */

.art {
  border-radius: var(--radius); border: 1px solid var(--line-soft);
  background: var(--bg-raised);
  min-height: 260px; position: relative; overflow: hidden;
}
.art-button .wrist {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: 190px; height: 190px; border-radius: 50%;
  border: 22px solid var(--bg-sunk);
}
.art-button .fob {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 20px;
  background: var(--accent);
  box-shadow: 0 10px 40px color-mix(in srgb, var(--accent) 45%, transparent);
}
.art-family {
  background:
    radial-gradient(circle at 30% 45%, color-mix(in srgb, var(--accent) 22%, transparent) 0 14px, transparent 15px),
    radial-gradient(circle at 48% 62%, color-mix(in srgb, var(--accent) 16%, transparent) 0 11px, transparent 12px),
    radial-gradient(circle at 66% 40%, color-mix(in srgb, var(--accent) 20%, transparent) 0 13px, transparent 14px),
    radial-gradient(circle at 78% 66%, color-mix(in srgb, var(--accent) 12%, transparent) 0 9px, transparent 10px),
    var(--bg-raised);
}

/* --- the SMS a trusted contact receives ----------------------------------- */

.sms {
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 20px; max-width: 420px;
}
.sms-from { color: var(--text-dim); font-size: 13px; margin-bottom: 8px; }
.sms-body { background: var(--bg-sunk); border-radius: 14px; padding: 14px 16px; font-size: 16px; }
.sms-link { color: var(--accent); }

/* --- prices --------------------------------------------------------------- */

.prices { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .prices { grid-template-columns: repeat(3, 1fr); } }
.price {
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column;
}
.price.is-main { border-color: var(--accent); }
.price .who { color: var(--text-dim); font-size: 15px; }
.price .amount {
  font-size: clamp(36px, 5vw, 46px); font-weight: 600; letter-spacing: -.03em;
  line-height: 1; margin: 10px 0 14px;
}
.price .amount span { font-size: 17px; font-weight: 400; color: var(--text-dim); letter-spacing: 0; }
.price p { font-size: 15px; margin: 0; }

/* --- what we do not collect ----------------------------------------------- */

.privacy { background: var(--bg-sunk); }
.priv { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .priv { grid-template-columns: repeat(2, 1fr); } }
.priv li {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-raised); border: 1px solid var(--line-soft);
  border-radius: 14px; padding: 14px 18px; font-size: 16px;
}
.priv li::before {
  content: "—"; color: var(--ok); font-weight: 700; flex: none;
}

/* --- the line that must be visible ---------------------------------------- */

.legal-line {
  max-width: 62ch; color: var(--text-2); font-size: 16px;
  border-inline-start: 3px solid var(--accent); padding-inline-start: 18px; margin: 0;
}

/* --- footer --------------------------------------------------------------- */

.foot {
  display: flex; gap: 22px; flex-wrap: wrap;
  padding: 28px var(--gutter) calc(40px + var(--safe-bottom));
  border-top: 1px solid var(--line-soft);
  color: var(--text-dim); font-size: 15px;
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* --- the sign-in sheet ---------------------------------------------------- */

.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.66);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 50;
}
.sheet {
  width: 100%; max-width: 440px;
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 22px; padding: 28px;
}
.sheet h2 { font-size: 28px; margin-bottom: 6px; }
.sheet .hint { color: var(--text-dim); font-size: 15px; margin: 6px 0 18px; }
.sheet label { display: block; color: var(--text-dim); font-size: 14px; margin: 0 0 8px; }

.sheet input {
  width: 100%; min-height: 60px; padding: 0 18px;
  background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); font: inherit; font-size: 19px;
}
.sheet input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.sheet input.code {
  text-align: center; font-size: 30px; letter-spacing: .4em;
  font-variant-numeric: tabular-nums; direction: ltr;
}
.sheet .btn { width: 100%; margin-top: 16px; }
.sheet .quiet {
  background: none; border: 0; color: var(--text-dim);
  font: inherit; font-size: 15px; cursor: pointer;
  padding: 12px 0 0; width: 100%;
}
.sheet .err { color: #ff6b61; font-size: 15px; margin: 12px 0 0; }
.sheet .done { text-align: center; padding: 8px 0; }
.sheet .done .tick {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  background: color-mix(in srgb, var(--ok) 20%, transparent);
  color: var(--ok); display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* La ligne de consentement. Le texte est long à dessein — c'est ce à quoi la
   personne dit oui — donc il se lit, il ne se survole pas. La case et son
   libellé forment une seule cible : sur un téléphone, viser un carré de 13 px
   est une façon de faire cocher les gens par accident. */
.sheet .consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0;
  padding: 10px;
  min-height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}
.sheet .consent input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent, #d33);
}
