/* Klean — sbsoft.studio
 *
 * No JavaScript, no web font, no third-party request, no analytics. The
 * app's whole promise is that nothing leaves your device; a site that
 * loaded a tracker to say so would be contradicting itself in its own
 * <head>. Everything here is one stylesheet and inline SVG.
 *
 * Colours come from the app's own design system (lib/core/theme): its
 * dark theme, which the store visuals show — primary #22C55E on a neutral
 * near-black page — so the site and the app look like the same product.
 * Klean turned green on 2026-10-18; the site followed on 2026-10-20.
 *
 * Light theme since 2026-10-22, following the visitor's system setting
 * (`prefers-color-scheme`), not a switch: a switch would need JavaScript.
 * Every colour is a variable below; the light block redefines them. On a
 * light page the bright green fails as text (#4ADE80 on white is 1.7:1),
 * so text and icons take a deep green, #147A3A: 5.1:1 on the page and
 * still 4.8:1 on the green-tinted callouts, where green 700 (#15803D)
 * fell to 4.4. The green *buttons* keep their gradient, since their text
 * is near-black either way (8.5:1 at worst).
 *
 * Text on the green is near-black, never white: white on #22C55E is
 * 2.28:1, far under AA, which is why the app's own buttons do the same.
 */

:root {
  --bg: #0b0d10;
  --bg-raised: #131519;
  --bg-card: #17191d;
  --fg: #f3f4f6;
  --fg-muted: #b4b9c2;
  --fg-dim: #7b818c;
  --brand: #22c55e;
  --brand-bright: #4ade80;
  --on-brand: #0b0d10;
  --grad-start: #22c55e;
  --grad-end: #4ade80;
  --border: #262a31;
  --numeral-stroke: #262a31;
  --card-numeral-stroke: #4a505a;
  --header-bg: rgba(10, 13, 20, 0.86);
  --glow: rgba(34, 197, 94, 0.26);
  --glow-studio: rgba(34, 197, 94, 0.22);
  --tint: rgba(34, 197, 94, 0.16);
  --tint-soft: rgba(34, 197, 94, 0.09);
  --phone-shadow: 0 34px 80px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(34, 197, 94, 0.16);
  color-scheme: dark light;
  --radius: 20px;
  --maxw: 1180px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fa;
    --bg-raised: #ffffff;
    --bg-card: #ffffff;
    --fg: #111318;
    --fg-muted: #4b5260;
    --fg-dim: #5f6673;
    --brand-bright: #147a3a;
    --border: #e1e4e9;
    --numeral-stroke: #c9ced6;
    --card-numeral-stroke: #c9ced6;
    --header-bg: rgba(247, 248, 250, 0.88);
    --glow: rgba(34, 197, 94, 0.16);
    --glow-studio: rgba(34, 197, 94, 0.14);
    --tint: rgba(34, 197, 94, 0.14);
    --tint-soft: rgba(34, 197, 94, 0.08);
    --phone-shadow: 0 24px 60px rgba(17, 19, 24, 0.18),
      0 0 32px rgba(34, 197, 94, 0.14);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* A single gutter value, so nothing ever touches the edge on a phone. */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--brand-bright);
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

/* Le logotype de SBSoft (2026-10-22) : « SB » en Manrope 800, « Soft » en
   Manrope 300, lettres vectorisées par `scripts/build_logo.py`. Neutre par
   décision : la marque de l'éditeur ne prend pas la couleur d'une de ses
   apps, elle suit celle du texte. Le fil d'Ariane des pages Klean le
   reprend en gris, même tracé, grâce à `currentColor`. */
.brand-logotype {
  height: 22px;
  width: auto;
  flex: none;
  display: block;
}

/* Fil d'Ariane « SBSoft / Klean ». Sans lui, une page Klean n'offre aucun
   retour vers la page de l'éditeur : il faut remonter l'historique page
   par page. Il vit dans l'en-tête plutôt que dans le seul pied de page
   parce que l'en-tête est collant — le retour reste donc atteignable sans
   faire défiler toute la landing.

   Le logotype est un SVG en ligne peint en `currentColor` : il suit la
   couleur du lien, donc il grise au repos et s'éclaire au survol sans
   qu'un second fichier existe. */
.brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-parent {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.brand-parent:hover {
  color: var(--fg);
}

.brand-parent-logotype {
  height: 15px;
  width: auto;
  flex: none;
  display: block;
}

.brand-sep {
  color: var(--fg-muted);
  opacity: 0.45;
}


.header-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.header-links a {
  color: var(--fg-muted);
  text-decoration: none;
}

.header-links a:hover {
  color: var(--fg);
}

/* ---------- Typography ---------- */

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 800;
}

h2 {
  font-size: clamp(27px, 4vw, 40px);
  font-weight: 800;
}

h3 {
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 700;
}

p {
  margin: 0 0 18px;
  color: var(--fg-muted);
}

.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--fg-muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(100deg, var(--grad-start), var(--grad-end));
  color: var(--on-brand);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--fg);
  background: var(--bg-raised);
}

.btn svg {
  flex: none;
}

/* ---------- Badges (the bubbles of the reference design) ---------- */

.bubble {
  display: inline-block;
  position: relative;
  padding: 12px 22px;
  border-radius: 14px;
  background: linear-gradient(100deg, var(--grad-start), var(--grad-end));
  color: var(--on-brand);
  font-weight: 800;
  font-size: clamp(17px, 2.2vw, 24px);
  letter-spacing: -0.01em;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -9px;
  width: 20px;
  height: 10px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 30% 100%);
}

/* ---------- Sections ---------- */

section {
  padding: clamp(56px, 9vw, 104px) 0;
}

.section-alt {
  background: var(--bg-raised);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.split.reverse .split-visual {
  order: -1;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }

  .split.reverse .split-visual {
    order: 0;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(48px, 8vw, 88px);
  background: radial-gradient(
      1100px 520px at 78% -12%,
      var(--glow),
      transparent 62%
    ),
    var(--bg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 18px;
}

.hero-note {
  font-size: 15px;
  color: var(--fg-dim);
  margin: 0;
}

.hero-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 40px;
}

/* ---------- Phone mock ---------- */

.phone {
  width: min(300px, 78vw);
  margin: 0 auto;
  border-radius: 38px;
  padding: 10px;
  background: #000;
  border: 2px solid var(--brand);
  box-shadow: var(--phone-shadow);
}

.phone-screen {
  border-radius: 29px;
  overflow: hidden;
  background: var(--bg-card);
  aspect-ratio: 1080 / 2340;
  display: flex;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-pair {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
}

.phone-pair .phone:last-child {
  margin-top: 44px;
}

@media (max-width: 520px) {
  .phone-pair .phone:last-child {
    display: none;
  }
}

/* Le menu tient sur une ligne en anglais — « Features / Install / Privacy »
   est court — mais pas en français, où « Fonctionnalités » et
   « Confidentialité » à eux seuls dépassent la largeur d'un téléphone.
   Sans cette règle, le nav impose au header une largeur minimale que le
   viewport ne peut pas absorber : « Confidentialité » se coupe, « EN »
   sort de l'écran, et toute la page se met à déborder horizontalement —
   le titre du hero avec elle. Constaté sur un Galaxy S22 (412 px CSS).

   Le nav passe donc sous la marque quand il ne tient plus. Le retour à la
   ligne est conditionnel : il ne se déclenche que si la place manque, si
   bien que l'anglais garde son header sur une seule ligne. */
@media (max-width: 640px) {
  .site-header .wrap {
    flex-wrap: wrap;
    gap: 0 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .header-links {
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 14px;
  }

  /* Cibles tactiles : des liens qui se touchent sur deux lignes sont
     difficiles à viser au pouce. */
  .header-links a {
    padding: 4px 0;
  }

  .brand-group {
    gap: 6px;
  }

  .brand-parent {
    font-size: 14px;
    gap: 6px;
  }

  .brand-parent-logotype {
    height: 13px;
  }
}

/* ---------- Feature list ---------- */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--fg-muted);
}

.feature-list svg {
  flex: none;
  margin-top: 4px;
  color: var(--brand-bright);
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.card p {
  margin: 0;
  font-size: 16px;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--tint);
  color: var(--brand-bright);
  margin-bottom: 18px;
}

/* ---------- Steps ---------- */

.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(28px, 4vw, 44px) 0;
}

.step:nth-child(even) .step-visual {
  order: -1;
}

@media (max-width: 860px) {
  .step {
    grid-template-columns: 1fr;
  }

  .step:nth-child(even) .step-visual {
    order: 0;
  }
}

.step-number {
  font-size: clamp(44px, 8vw, 78px);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--numeral-stroke);
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 760px;
  padding-top: 56px;
  padding-bottom: 88px;
}

.legal h2 {
  font-size: clamp(22px, 3vw, 28px);
  margin-top: 44px;
}

.legal ul {
  color: var(--fg-muted);
  padding-left: 22px;
}

.legal li {
  margin-bottom: 10px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 16px;
}

.legal th,
.legal td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  vertical-align: top;
}

.legal th {
  background: var(--bg-raised);
  color: var(--fg);
  font-weight: 700;
}

.meta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 36px;
  font-size: 16px;
}

.meta p {
  margin: 0 0 6px;
}

.meta p:last-child {
  margin-bottom: 0;
}

.callout {
  border-left: 3px solid var(--brand);
  background: var(--tint-soft);
  padding: 18px 22px;
  border-radius: 0 12px 12px 0;
  margin: 26px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--fg);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  color: var(--fg-dim);
  font-size: 15px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}

.site-footer a {
  color: var(--fg-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--fg);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* ---------- Root page ---------- */

.root-main {
  min-height: 78vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 72px 24px;
}

.root-main .product {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding: 18px 26px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--fg);
  text-align: left;
}

.root-main .product img {
  width: 46px;
  height: 46px;
  border-radius: 11px;
}

.root-main .product span {
  display: block;
  font-size: 15px;
  color: var(--fg-muted);
  font-weight: 400;
}

.root-main .product strong {
  font-size: 19px;
}

/* Respect the system's reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Studio root page ---------- */

.studio-hero {
  padding-bottom: clamp(48px, 7vw, 88px);
  background: radial-gradient(
      900px 460px at 20% -18%,
      var(--glow-studio),
      transparent 64%
    ),
    var(--bg);
}

.studio-hero h1 {
  max-width: 17ch;
}

/* The second line of the headline is the quieter half of the sentence:
 * the claim first, the twist of the knife after. */
.muted-line {
  color: var(--fg-muted);
}

.studio-lead {
  max-width: 56ch;
}

.feature-list-lg li {
  font-size: 17px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
}

/* The product grid holds one card today. It is a grid, not a single
 * block, because a second app should be a card to add — not a page to
 * redesign. */
.app-cards {
  grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
}

.app-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.app-card img {
  border-radius: 13px;
  margin-bottom: 18px;
}

.app-card-go {
  display: inline-block;
  margin-top: 16px;
  color: var(--brand-bright);
  font-weight: 600;
  font-size: 16px;
}

/* ---------- Studio root page: verify, principles, FAQ (2026-10-22) ---------- */

/* The three checks reuse the outlined numerals of the install steps, at a
   card's scale. On a dark card the page's stroke vanished into the card
   itself, hence a stroke of their own. */
.verify-card .step-number {
  font-size: 56px;
  margin-bottom: 14px;
  -webkit-text-stroke-color: var(--card-numeral-stroke);
}

/* What is coming: a card that is not one yet, so dashed and without the
   raised surface. */
.card-soon {
  background: transparent;
  border-style: dashed;
}

/* Native <details>: opens and closes without a line of JavaScript, and is
   keyboard and screen-reader accessible as is. */
.faq {
  display: grid;
  gap: 12px;
  max-width: 860px;
  margin-top: 36px;
}

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 24px;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--brand-bright);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: 6px;
}

.faq details p {
  margin: 0 0 20px;
  color: var(--fg-muted);
}
