/* Text pages (/aide/, /confidentialite/): the homepage's night, type and footer
   (same tokens, fonts and marks as home/home.css), the text on the morning's paper.
   Barlow is self-hosted (SIL OFL 1.1, see fonts/OFL.txt). */
@font-face {
  font-family: Barlow;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src:
    url("fonts/Barlow-Medium.woff2") format("woff2"),
    url("fonts/Barlow-Medium.ttf") format("truetype");
}
@font-face {
  font-family: Barlow;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src:
    url("fonts/Barlow-Bold.woff2") format("woff2"),
    url("fonts/Barlow-Bold.ttf") format("truetype");
}
@font-face {
  font-family: Barlow;
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src:
    url("fonts/Barlow-BoldItalic.woff2") format("woff2"),
    url("fonts/Barlow-BoldItalic.ttf") format("truetype");
}

:root {
  --bg: #030612;
  --elevated: #12182d;
  --border: #252a40;
  --text: #f8f3e9;
  --muted: #b0acc0;
  --violet: #770bff;
  --violet-light: #b983ff;
  --pink: #ff006e;
  --orange: #ff8a00;
  --gold: #ffb800;
  --paper: #f8f3e9;
  --ink: #030612;
  --ink-muted: #4a4760;
  --gutter: 20px;
  --wide: 1240px;
  --read: 760px;
  --hand: italic 700 20px/1.15 Barlow, system-ui, sans-serif;
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23030612' d='M12 1.5l2.2 7.6 7.8 2.9-7.8 2.9L12 22.5l-2.2-7.6L2 12l7.8-2.9Z'/%3E%3C/svg%3E");
}

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

html {
  color-scheme: dark;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  font:
    500 18px/1.6 Barlow,
    system-ui,
    sans-serif;
  color: var(--text);
  background: var(--bg) var(--grain-light);
}

img,
svg {
  display: block;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* First stop for the keyboard: straight to the text. */
.skip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}

/* ---------- Header: the logo back home, then the two pages ---------- */
/* Header, intro and text share one reading column; the footer keeps the homepage's width. */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: calc(var(--read) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 22px var(--gutter) 0;
}
.page-home {
  display: block;
  border-radius: 12px;
}
.page-home img {
  width: 132px;
  height: auto;
  transform: rotate(-3deg);
}
.page-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.page-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  font-weight: 700;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
}
.page-nav a:hover {
  color: var(--text);
}
.page-nav a[aria-current="page"] {
  background: var(--elevated);
  color: var(--text);
}

/* ---------- Intro, on the night ---------- */

.page-intro {
  max-width: calc(var(--read) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 44px var(--gutter) 72px;
}

/* Time chip, as on the homepage. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 0;
  padding: 4px 14px 4px 9px;
  border-radius: 16px;
  background: var(--elevated);
  font-size: 15px;
  line-height: 1.2;
  color: var(--muted);
}
.chip time {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.chip-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--violet-light);
}

.page-title {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 26px 0 0;
  font:
    italic 700 clamp(38px, 11vw, 96px) / 0.95 Barlow,
    system-ui,
    sans-serif;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  transform: rotate(-3deg);
  transform-origin: 0 100%;
}
.page-title .accent {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.06em;
  color: var(--pink);
}
.title-wave {
  position: absolute;
  left: 0.08em;
  bottom: -0.18em;
  width: calc(100% - 0.3em);
  height: 0.16em;
  color: var(--violet-light);
  overflow: visible;
}
/* Beside the first line, clear of the chip above. */
.title-stars {
  position: absolute;
  top: -0.15em;
  right: -0.95em;
  width: 0.85em;
  height: 1.02em;
  color: var(--gold);
  overflow: visible;
}

.page-lead {
  max-width: 34ch;
  margin: 40px 0 0;
  font:
    italic 700 clamp(21px, 5.6vw, 26px) / 1.25 Barlow,
    system-ui,
    sans-serif;
}

/* ---------- The text, on paper ---------- */

.sheet {
  position: relative;
  padding: 44px 0 80px;
  background: var(--paper) var(--grain-dark);
  color: var(--ink);
}
.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
}
/* Torn edges, the same cut as the homepage's morning. */
.sheet::before {
  top: -19px;
  background: var(--paper);
  clip-path: polygon(
    0 100%,
    0% 0%,
    2.9% 58%,
    4.9% 50%,
    6.3% 18%,
    8.5% 30%,
    11.5% 69%,
    14.2% 12%,
    15.9% 20%,
    18.8% 27%,
    20.1% 69%,
    22.2% 7%,
    24.5% 71%,
    27.4% 17%,
    30.2% 34%,
    32.1% 6%,
    34.6% 41%,
    38% 23%,
    39.8% 51%,
    42.6% 12%,
    45.9% 72%,
    49.2% 18%,
    52.8% 46%,
    56% 19%,
    58.1% 12%,
    60.4% 27%,
    62.1% 62%,
    64.3% 14%,
    66.5% 60%,
    69.9% 32%,
    72.3% 41%,
    74.3% 39%,
    76.9% 44%,
    79.6% 70%,
    82% 25%,
    84.4% 55%,
    86.6% 38%,
    90.2% 29%,
    92.8% 49%,
    94.9% 53%,
    96.7% 61%,
    100% 10%,
    100% 100%
  );
}
.sheet::after {
  bottom: -1px;
  background: var(--bg);
  clip-path: polygon(
    0 100%,
    0% 47%,
    1.4% 33%,
    3.5% 11%,
    6.5% 47%,
    10.3% 33%,
    11.9% 40%,
    15.1% 42%,
    18.7% 17%,
    20.1% 16%,
    22.2% 6%,
    25.2% 25%,
    27.5% 67%,
    30.7% 64%,
    31.9% 12%,
    34.9% 37%,
    38.1% 56%,
    41.3% 34%,
    42.8% 16%,
    46.1% 5%,
    48.8% 49%,
    51.2% 28%,
    52.4% 5%,
    54% 41%,
    57% 15%,
    60.5% 44%,
    62.9% 20%,
    66% 31%,
    69.6% 70%,
    72.1% 55%,
    75.8% 17%,
    79.4% 58%,
    82.7% 56%,
    86.2% 3%,
    89.3% 62%,
    91.2% 33%,
    93.2% 60%,
    96% 75%,
    98.8% 11%,
    100% 19%,
    100% 100%
  );
}
.sheet-inner {
  max-width: calc(var(--read) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.sheet :focus-visible {
  outline-color: var(--violet);
}
.sheet p,
.sheet li {
  color: var(--ink-muted);
}
.sheet strong {
  font-weight: 700;
  color: var(--ink);
}
.sheet a {
  color: var(--violet);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.sheet a:hover {
  text-decoration-thickness: 3px;
}

.sheet h2 {
  margin: 64px 0 18px;
  font:
    italic 700 clamp(32px, 8vw, 46px) / 1.05 Barlow,
    system-ui,
    sans-serif;
  letter-spacing: -0.01em;
  transform: rotate(-1.5deg);
  transform-origin: 0 100%;
}
.sheet h3 {
  margin: 34px 0 8px;
  font:
    700 21px/1.3 Barlow,
    system-ui,
    sans-serif;
}
.sheet h2 + h3 {
  margin-top: 26px;
}
[id] {
  scroll-margin-top: 24px;
}

/* Lists: the homepage's little star. */
.sheet ul {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}
.sheet ul li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 28px;
}
.sheet ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 14px;
  height: 14px;
  background: var(--star) center / contain no-repeat;
}

/* How it works: numbered stickers. */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  margin: 0 0 16px;
  padding-left: 48px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font:
    italic 700 18px/1 Barlow,
    system-ui,
    sans-serif;
  transform: rotate(-6deg);
}
.steps li:nth-child(even)::before {
  background: var(--violet);
  color: var(--text);
  transform: rotate(5deg);
}

/* On this page: dark pills, like the morning chip. */
.toc-label {
  margin: 0 0 10px;
  font: var(--hand);
  color: var(--violet);
}
.sheet .toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.sheet .toc li {
  margin: 0;
  padding: 0;
}
.sheet .toc li::before {
  content: none;
}
.sheet .toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 16px;
  border-radius: 22px;
  background: var(--ink);
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.sheet .toc a:hover {
  background: var(--violet);
}

/* Dashed card, as the homepage's privacy note. */
.card {
  position: relative;
  margin: 56px 0 0;
  padding: 24px 22px 8px;
  border: 1.5px dashed rgba(3, 6, 18, 0.28);
  border-radius: 24px;
}
.card:first-child {
  margin-top: 0;
}
.sheet .card h2 {
  margin: 0 0 14px;
  padding-right: 54px;
}
.card-doodle {
  position: absolute;
  top: -28px;
  right: 12px;
  width: 64px;
  height: 77px;
  color: var(--orange);
  overflow: visible;
}
.sheet .mail {
  margin: 0 0 18px;
  font:
    italic 700 clamp(26px, 7.5vw, 38px) / 1.1 Barlow,
    system-ui,
    sans-serif;
  overflow-wrap: anywhere;
}
.sheet .mail a {
  text-decoration-thickness: 2px;
}
.updated {
  margin: 48px 0 0;
  font-size: 15px;
}

/* ---------- Footer, as on the homepage ---------- */

.foot {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) 30px;
  font-size: 14px;
  color: var(--muted);
}
.foot p {
  margin: 0;
}
.foot-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 26px 0 22px;
  border-top: 1px dashed var(--border);
  border-bottom: 1px solid rgba(248, 243, 233, 0.16);
}
.foot-top img {
  width: 96px;
  height: auto;
  margin-right: 4px;
}
/* Mobile: one centred column. From 600px: links left, credit right. */
.foot-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  text-align: center;
}
.foot-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.foot-by {
  display: flex;
  align-items: center;
  gap: 4px;
}
.genesii {
  display: inline-flex;
  padding: 6px;
  border-radius: 50%;
  color: var(--text);
  transition: color 0.15s ease;
}
.genesii svg {
  width: 20px;
  height: 20px;
}
.genesii:hover {
  color: var(--pink);
}

/* ---------- Wider screens ---------- */

@media (min-width: 600px) {
  :root {
    --gutter: 40px;
  }
  .page-home img {
    width: 160px;
  }
  .card {
    padding: 28px 30px 12px;
  }
  .foot-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .foot-legal {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 0;
  }
  .foot-legal p + p::before {
    content: "|";
    content: "|" / "";
    margin: 0 12px;
    opacity: 0.6;
  }
}

@media (min-width: 960px) {
  :root {
    --gutter: 60px;
  }
  .page-intro {
    padding-top: 64px;
    padding-bottom: 96px;
  }
  .sheet {
    padding-top: 64px;
    padding-bottom: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
