/*
  Bereet's web pages (privacy.html, support.html). Nothing here loads from
  other servers, not even fonts: the heading font is a copy of the app's
  (fonts/, OFL).
*/

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* The app's dark palette (Assets › Bereet Colors), dark only like the app. */
:root {
  color-scheme: dark;
  --background: #0B0C10;
  --card: #17191F;
  --separator: #262A33;
  --text-primary: #F4F5F7;
  --text-secondary: #8A91A1;
  --text-tertiary: #5C6373;
  --accent: #F7931E;
  --accent-light: #FFB547;
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--background);
  /* The app's film grain, and Home's warm sky at the top. */
  background-image:
    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='0.9' 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 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 420px at 50% -120px, rgba(247, 147, 30, 0.16), transparent 70%);
  background-repeat: repeat, no-repeat;
  color: var(--text-primary);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

/* Header: the logo, and the language switch. */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.4px;
}
.brand img { height: 30px; width: auto; display: block; }

.languages {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--separator);
}
.languages button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  background: transparent;
  color: var(--text-secondary);
  font: 600 14px/1.2 var(--body);
  cursor: pointer;
}
.languages button[aria-pressed="true"] {
  background: var(--text-primary);
  color: var(--background);
}
.languages button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Text */

h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 8vw, 46px);
  line-height: 1.05;
  letter-spacing: -1px;
}

.updated {
  margin: 0 0 24px;
  color: var(--text-tertiary);
  font-size: 15px;
}

.lead {
  margin: 16px 0 28px;
  font-size: 20px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.updated + .lead { margin-top: 0; }
.lead strong { color: var(--text-primary); font-weight: 600; }

h2 {
  margin: 40px 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.3px;
}

p { margin: 0 0 14px; }

section > ul { margin: 0 0 14px; padding-left: 22px; }
section > ul li { margin: 0 0 10px; }
section > ul li::marker { color: var(--accent); }

strong { font-weight: 600; }

/* A path in Files or Settings: it wraps only after a › (the &nbsp; before
   each one), so a menu name never splits over two lines. */
.path {
  color: var(--text-primary);
}
.path span { white-space: nowrap; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-light); }

/* A card: the privacy policy's summary, the support page's contact. */

.card {
  margin: 0 0 40px;
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--separator);
}
.card h2 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li {
  position: relative;
  padding-left: 28px;
  margin: 10px 0 0;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* The app's full-width white button (empty states). */
.button {
  display: block;
  margin-top: 16px;
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--background);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.button:hover { color: var(--background); background: #FFFFFF; }
.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Questions that open (support page). */

.questions { margin: 0 0 8px; }
.questions details { border-top: 1px solid var(--separator); }
.questions details:last-child { border-bottom: 1px solid var(--separator); }
.questions summary {
  position: relative;
  padding: 15px 36px 15px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.questions details[open] > summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}
.questions summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.questions .answer { padding: 0 0 16px; color: var(--text-secondary); }
.questions .answer strong,
.questions .answer .path { color: var(--text-primary); }
.questions .answer ul { margin: 0 0 14px; padding-left: 22px; }
.questions .answer li { margin: 0 0 8px; }
.questions .answer li::marker { color: var(--accent); }
.questions .answer > :last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .questions summary::after { transition: none; }
}

/* Labels outside the two articles (the footer's links) come in both
   languages: only the page's shows. */
html[lang="fr"] [lang="en"]:not(article),
html[lang="en"] [lang="fr"]:not(article) { display: none; }

/* Footer: the other page, and the copyright. */

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--separator);
  color: var(--text-tertiary);
  font-size: 14px;
}
footer nav { display: flex; gap: 16px; }
footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--text-primary); }
footer a[aria-current="page"] { color: var(--text-primary); }

@media (max-width: 420px) {
  body { font-size: 16px; }
  header { margin-bottom: 36px; }
  .lead { font-size: 18px; }
  .card { padding: 18px; border-radius: 18px; }
}
