/* "Emergency stop" look of the app (§7). Fonts are self-hosted (copied by build.mjs): no third-party request. */
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/BarlowCondensed-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/BarlowCondensed-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --background: #1a1a1a;
  --surface: #242424;
  --red: #d7261e;
  --yellow: #ffd100;
  --text: #f2f2f2;
  --muted: #a8a8a8;
  --paper: #f6f2e7;
  --ink: #141414;
  --ink-muted: #55524b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font: 500 1.125rem/1.45 "Barlow Condensed", "Arial Narrow", sans-serif;
}

/* One language at a time once the script picked it; both without JavaScript. */
html[data-lang="fr"] [data-l="en"],
html[data-lang="en"] [data-l="fr"] { display: none; }

a { color: var(--yellow); }

.lang-switch {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
}
.lang-switch button {
  font: 800 0.9rem "Barlow Condensed", sans-serif;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }

/* Landing page: three full-screen pages (hero, procedure, notice + download), snapped while scrolling. */
html:has(.page) { scroll-behavior: smooth; }
@media (min-height: 560px) {
  html:has(.page) { scroll-snap-type: y mandatory; }
  .page { min-height: 100svh; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.page) { scroll-behavior: auto; }
}
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Link to the next page, with a chevron. */
.next {
  margin-top: 24px;
  padding: 8px 12px;
  color: var(--muted);
  font: 500 0.85rem "IBM Plex Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
}
.next::after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: 8px auto 0;
  border: solid var(--yellow);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  animation: nudge 1.6s ease-in-out infinite;
}
.next:hover { color: var(--text); }
@keyframes nudge {
  50% { transform: translateY(5px) rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) {
  .next::after { animation: none; }
}

.hero {
  overflow: hidden;
  padding: 72px 16px 20px;
  text-align: center;
}
.hero-inner {
  position: relative;
  margin: auto 0;
  max-width: 640px;
  padding: 24px 20px;
  /* Keeps the text readable over the rain. */
  background: radial-gradient(closest-side, rgba(26, 26, 26, 0.92), rgba(26, 26, 26, 0.7) 75%, transparent);
}

/* Slanted rain of the app icon: two tiles of streaks, falling at two speeds. */
.rain {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='360'%3E%3Cg stroke='%239fc5e8' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M18 20l20 60M78 200l20 60'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='240'%3E%3Cg stroke='%234d5d6c' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M10 10l12 36M52 130l12 36'/%3E%3C/g%3E%3C/svg%3E");
  animation: rain-fall 1.1s linear infinite;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
@keyframes rain-fall {
  from { background-position: 0 0, 0 0; }
  to { background-position: 120px 360px, 80px 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .rain { animation: none; }
}

.app-icon {
  display: block;
  width: 136px;
  height: 136px;
  margin: 0 auto 28px;
  border-radius: 30px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

h1 {
  margin: 0;
  color: var(--yellow);
  font-size: clamp(2.75rem, 11vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}
.tagline { margin: 14px 0 12px; font-size: clamp(1.35rem, 4.5vw, 1.75rem); }
.pitch { color: var(--muted); margin: 0 auto 32px; max-width: 34em; }
.disclaimer { color: var(--muted); font-size: 0.95rem; margin: 28px 0 0; }

/* Store buttons, shaped like the store badges. */
.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 184px;
  padding: 10px 22px 12px;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.05;
  transition: transform 0.15s ease;
}
.store small { font-size: 0.85rem; font-weight: 500; letter-spacing: 0.02em; }
.store span { font-size: 1.45rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.store:hover { transform: translateY(-2px); }
.store:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.store[aria-disabled="true"] { background: var(--surface); color: var(--muted); pointer-events: none; }

section h2 {
  margin: 0 0 32px;
  text-align: center;
  color: var(--yellow);
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Procedure: three numbered steps, each with its screen. */
.procedure { max-width: 1040px; margin: 0 auto; padding: 40px 16px 20px; }
.procedure h2 { margin-bottom: 24px; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 28px;
  width: 100%;
  counter-reset: step;
}
/* Phones: the steps become a swipeable row, so the page fits one screen. */
@media (max-width: 699px) {
  .steps {
    display: flex;
    gap: 16px;
    width: calc(100% + 32px);
    margin: 0 -16px;
    padding: 0 9% 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 82%; scroll-snap-align: center; }
}
.step { counter-increment: step; text-align: center; }
.screen {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(50svh, 520px);
  margin: 0 auto 16px;
  border-radius: 28px;
  border: 6px solid #2e2e2e;
  background: var(--surface);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}
.step h3 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.03em; }
.step h3::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 4px;
  color: var(--yellow);
  font: 500 0.95rem "IBM Plex Mono", monospace;
  letter-spacing: 0.15em;
}
.step p { margin: 0 auto; max-width: 22em; color: var(--muted); }

/* Notice: the intervention ticket of the app, on paper. */
.last { padding: 48px 16px 0; }
.notice { width: 100%; padding: 8px 0 24px; }
.ticket {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 40px) 36px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  /* Punched top edge, like the ticket of the app. */
  -webkit-mask: radial-gradient(circle 6px at 12px 0, transparent 98%, #000) 0 0 / 24px 100% repeat-x;
  mask: radial-gradient(circle 6px at 12px 0, transparent 98%, #000) 0 0 / 24px 100% repeat-x;
}
.ticket .status {
  margin: 0 calc(-1 * clamp(20px, 5vw, 40px)) 20px;
  padding: 8px clamp(20px, 5vw, 40px);
  background: var(--yellow);
  font: 500 0.95rem "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ticket h2 { margin: 0 0 10px; color: var(--ink); text-align: left; text-transform: none; letter-spacing: 0.02em; }
.ticket p { margin: 0; font-size: 1.2rem; }
.ticket .stamp {
  width: fit-content;
  margin: 20px 0 0 auto;
  padding: 4px 14px;
  border: 4px solid #1f4fa8;
  border-radius: 6px;
  color: #1f4fa8;
  font: 500 1.3rem "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-6deg);
}

.closing { padding: 16px 0 8px; text-align: center; }
.closing-title { margin: 0 0 24px; font-size: clamp(1.6rem, 5vw, 2.1rem); font-weight: 800; letter-spacing: 0.03em; }

footer { padding: 24px 16px 32px; text-align: center; color: var(--muted); font-size: 0.95rem; }

/* Privacy policy: a ticket on paper */
.policy {
  max-width: 760px;
  margin: 72px auto 32px;
  padding: 32px clamp(16px, 5vw, 48px) 40px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  font-size: 1.15rem;
}
.policy h1 { color: var(--ink); font-size: clamp(2rem, 7vw, 2.75rem); letter-spacing: 0.04em; }
.policy .status {
  margin: 16px calc(-1 * clamp(16px, 5vw, 48px)) 24px;
  padding: 8px clamp(16px, 5vw, 48px);
  background: var(--yellow);
  font: 500 0.95rem "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.policy h2 { margin: 32px 0 8px; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.03em; }
.policy a { color: #1f4fa8; }
.policy table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.policy th, .policy td { text-align: left; vertical-align: top; padding: 8px 8px 8px 0; border-bottom: 1px solid #d9d3c3; }
.policy th { font-weight: 800; }
.policy .muted { color: var(--ink-muted); }
@media (max-width: 560px) {
  .policy table, .policy tbody, .policy tr, .policy th, .policy td { display: block; }
  .policy thead { display: none; }
  .policy td { border: 0; padding: 2px 0; }
  .policy tr { padding: 8px 0; border-bottom: 1px solid #d9d3c3; }
  .policy td:first-child { font-weight: 800; }
}
