/* encarte.fr: brand palette from the visual identity spec; everything is served from this site (landing page spec §6). */
@font-face {
  font-family: Nunito;
  src: url("fonts/nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #FFF6E8;
  --bg-alt: #FFF0DC;
  --surface: #FFFFFF;
  --text: #1D2440;
  --muted: #4A5170;
  --link: #1F6F5C;
  --rule: #E8DCC7;
  --band: #1D2440;
  --band-surface: #262E4F;
  --band-text: #FFF6E8;
  --band-muted: #C9C3B8;
  --band-link: #7FD1C7;
  --shadow: 0 10px 28px rgba(29, 36, 64, 0.22);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1D2440;
    --bg-alt: #1A2039;
    --surface: #262E4F;
    --text: #FFF6E8;
    --muted: #C9C3B8;
    --link: #7FD1C7;
    --rule: #343C5E;
    --band: #141A33;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 1.0625rem/1.6 Nunito, system-ui, sans-serif;
}

a { color: var(--link); font-weight: 700; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); text-decoration: none; font-weight: 900; font-size: 1.25rem; }
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem 1.25rem; font-size: 0.9375rem; }
.site-nav a { text-decoration: none; }
@media (max-width: 599px) { .site-nav .anchor { display: none; } }

/* Hero */
/* Clip only sideways: the rotated side phones must not cause horizontal scroll, but the phones overflow downward. */
.hero { text-align: center; padding-top: 1.5rem; overflow-x: clip; position: relative; z-index: 1; }
.hero-icon { width: 5.25rem; height: 5.25rem; border-radius: 1.25rem; box-shadow: 0 4px 14px rgba(29, 36, 64, 0.18); }
h1 { overflow-wrap: break-word; font-size: clamp(2.25rem, 6vw, 3.5rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; margin: 1rem 0 0; }
.lead { font-size: clamp(1.0625rem, 2.2vw, 1.25rem); font-weight: 600; color: var(--muted); max-width: 36rem; margin: 1rem auto 1.5rem; }

/* Store area. A badge appears only once its listing is live: remove play-soon / fdroid-soon from <body> then. */
.stores { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem 1rem; }
.stores .badge img { display: block; height: 4rem; width: auto; }
.stores .soon { margin: 0; font-weight: 800; color: var(--muted); padding: 0.4rem 0.9rem; border: 2px solid var(--rule); border-radius: 999px; }
.play-soon .play-badge, .fdroid-soon .fdroid-badge { display: none; }
body:not(.play-soon) .play-soon-text, body:not(.fdroid-soon) .fdroid-soon-text { display: none; }

/* Phone fan: whole phones, sized by viewport width so three always fit (360 px is the common Android width).
   flex-start keeps each phone at its own height (no black frame under the side screenshots). */
.fan { display: flex; justify-content: center; align-items: flex-start; gap: clamp(0.5rem, 2vw, 1.25rem); margin-top: 2.5rem; padding-top: 0.5rem; }
.phone { flex: none; background: #111111; border-radius: clamp(1rem, 2.6vw, 1.75rem); padding: clamp(0.25rem, 0.6vw, 0.4rem); box-shadow: var(--shadow); }
.phone img { display: block; width: 100%; border-radius: clamp(0.8rem, 2.2vw, 1.45rem); }
.phone.side { width: min(25vw, 13rem); margin-top: 1.5rem; }
.phone.left { transform: rotate(-6deg); }
.phone.right { transform: rotate(6deg); }
.phone.center { width: min(29vw, 15rem); position: relative; z-index: 1; }

/* Sections */
main > section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
h2 { overflow-wrap: break-word; font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 900; line-height: 1.15; text-align: center; margin: 0 0 1.5rem; }
.features, .closing { background: var(--bg-alt); }
/* The features background starts behind the phones' lower third, so they stand across the two sections. */
.features {
  --overlap: clamp(6rem, 22vw, 11rem);
  margin-top: calc(var(--overlap) * -1);
  padding-top: calc(var(--overlap) + clamp(2.5rem, 6vw, 4.5rem));
}
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--surface); border-radius: 0.75rem; padding: 1.25rem; }
.card h3 { font-size: 1.125rem; font-weight: 800; line-height: 1.3; margin: 0 0 0.25rem; }
.card p { margin: 0; color: var(--muted); }
.icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.6rem; margin-bottom: 0.75rem; color: #FFFFFF; }
.icon svg { width: 1.375rem; height: 1.375rem; fill: currentColor; }
.icon.teal { background: #2E8C83; }
.icon.mustard { background: #F2A93B; color: #1D2440; }
.icon.navy { background: #1D2440; }
.icon.red { background: #D32F2F; }
@media (prefers-color-scheme: dark) { .icon.navy { background: #FFF6E8; color: #1D2440; } }
.formats { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; padding: 0; margin: 1.5rem 0 0; }
.formats li { border: 2px solid var(--rule); border-radius: 999px; padding: 0.2rem 0.75rem; font-size: 0.875rem; font-weight: 700; }

.privacy { background: var(--band); color: var(--band-text); }
.privacy .intro { text-align: center; color: var(--band-muted); font-weight: 600; max-width: 40rem; margin: -0.75rem auto 1.75rem; }
.privacy .card { background: var(--band-surface); }
.privacy .card p { color: var(--band-muted); }
.privacy a { color: var(--band-link); }
.privacy a:focus-visible { outline-color: var(--band-link); }
.privacy .more { text-align: center; margin: 1.75rem 0 0; }

.faq .wrap { max-width: 48rem; }
details { border-bottom: 2px solid var(--rule); padding: 0.9rem 0; }
summary { display: flex; justify-content: space-between; gap: 1rem; font-weight: 800; font-size: 1.0625rem; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; content: "+" / ""; font-weight: 900; color: var(--link); }
details[open] > summary::after { content: "–"; content: "–" / ""; }
details p { margin: 0.5rem 0 0; color: var(--muted); }

/* Support section: a card with the donation button and free ways to help. */
.support .wrap { max-width: 42rem; }
.support-card { background: var(--surface); border-radius: 1rem; padding: clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
.support-card h2 { margin-bottom: 0.75rem; }
.support-card .intro { color: var(--muted); margin: 0 0 1.5rem; }
.support-card .note { font-size: 0.9375rem; color: var(--muted); margin: 0.75rem 0 0; }
.support-card h3 { font-size: 1.125rem; font-weight: 800; margin: 2rem 0 0.5rem; }
.helps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
/* The page background as text color keeps 5.6:1 (light) and 8.6:1 (dark) on --link. */
.button { display: inline-block; background: var(--link); color: var(--bg); font-weight: 800; text-decoration: none; padding: 0.8rem 1.6rem; border-radius: 999px; }
.button:focus-visible { outline-color: var(--text); }
/* Play-only items appear once the Play listing is live, like the Play badge. */
.play-soon .play-live { display: none; }

.closing { text-align: center; }
.closing h2 { margin-bottom: 1.25rem; }

/* Footer */
.site-footer { border-top: 2px solid var(--rule); color: var(--muted); font-size: 0.9375rem; padding: 1.5rem 0 2rem; }
.site-footer .links { margin: 0 0 0.75rem; }
.site-footer p { margin: 0.25rem 0; }

/* Privacy policy pages */
.policy .wrap { max-width: 42rem; padding-block: 1rem 3rem; }
.policy h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.policy h2 { text-align: left; font-size: 1.375rem; margin: 2rem 0 0.5rem; }
.policy p { margin: 0.5rem 0; }
