/*
  The three pages App Store Connect needs a URL for: support, privacy, terms.

  Same palette and the same mark as the app, because a privacy policy on a page that looks
  nothing like the app it belongs to is the oldest phishing tell there is. Values are the
  ones in Sources/Shared/PalisadeColors.swift; change them there first.

  No build step, no framework, no font download, no analytics, no cookies. The pages say the
  app sends nothing anywhere, so they had better not either.
*/

:root {
  --base: #0a0d12;
  --surface: #141922;
  --raised: #1e2530;
  --accent: #f5a524;
  --mark-top: #ffc768;
  --mark-bottom: #c17a12;
  --text: #f2f4f8;
  --text-dim: #9aa4b2;
  --hairline: rgba(255, 255, 255, 0.09);
  --gutter: 20px;
  --measure: 34rem;
}

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

html {
  /* SF Rounded on Apple platforms, which is the app's face, and the platform UI face
     elsewhere. Nothing is downloaded, so there is no render-blocking font and no third
     party is told that someone read this page. */
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI Variable",
    system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  /* Mobile-first: this is read on the phone the app is installed on, most of the time
     because something is not working. */
  padding: 0 var(--gutter) 4rem;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
}

/* Skip link: the pages carry both languages, so the first useful action for a French
   reader is jumping past the English. */
.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  position: static;
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
}

header {
  padding: 2.5rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

header svg {
  width: 2.6rem;
  height: auto;
  flex: none;
}

header .name {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

header .name a {
  color: inherit;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--hairline);
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  /* 44px is Apple's minimum target and the reason for the padding above. */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

nav a[aria-current="page"] {
  color: var(--base);
  background: var(--accent);
  font-weight: 600;
}

nav a:hover,
nav a:focus-visible {
  color: var(--text);
  background: var(--raised);
}

nav a[aria-current="page"]:hover,
nav a[aria-current="page"]:focus-visible {
  color: var(--base);
  background: var(--mark-top);
}

h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.35rem;
}

h2 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.5rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.35rem;
}

p,
li {
  color: var(--text);
}

.lede,
.dim {
  color: var(--text-dim);
}

.lede {
  font-size: 1.125rem;
}

ul {
  padding-left: 1.15rem;
}

li {
  margin-bottom: 0.45rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:focus-visible,
nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* The one thing on the page a reader might need to act on. */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: var(--gutter);
  margin: 1.5rem 0;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card :last-child {
  margin-bottom: 0;
}

.stamp {
  font-size: 0.9375rem;
  color: var(--text-dim);
  margin-top: 0;
}

/* The language divider. Both languages live on one page: one URL to give App Store
   Connect, and no chance of the French copy silently falling out of date behind a
   redirect nobody checks. */
.language-break {
  margin: 4rem 0 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--text-dim);
  font-size: 0.9375rem;
}

@media (min-width: 40rem) {
  h1 {
    font-size: 2.3rem;
  }
}
