/*
 * The app's palette: app/scripts/icon-source.mjs and app/src/shared/theme/tokens.ts.
 * No web font is loaded: a page about keeping documents off other people's
 * servers does not send every visitor to a font server. Avenir Next is what
 * the store frames are set in; the rest of the stack is what the phone has.
 */
:root {
  --paper: #f6f8fc;
  --surface: #ffffff;
  --ink: #060f1f;
  --navy: #0a1d38;
  --navy-mid: #17417a;
  --text: #0a1d38;
  --muted: #4a5b72;
  --rule: #b9cbe3;
  --gold: #d99433;
  --gold-bright: #f2b252;
  --link: #8a5a12;
  --bezel: #0b1220;
  --cover-text: #f6f8fc;
  --cover-muted: #c9d7ea;
  --action: #0a1d38;
  --action-hover: #17417a;
  --action-text: #f6f8fc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #060f1f;
    --surface: #0a1d38;
    --text: #ffffff;
    --muted: #b9cbe3;
    --rule: #17417a;
    --link: #f2b252;
    --action: #f2b252;
    --action-hover: #d99433;
    --action-text: #060f1f;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font:
    17px/1.6 'Avenir Next',
    Avenir,
    'Segoe UI',
    system-ui,
    -apple-system,
    sans-serif;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(28px, 3.4vw, 36px);
}

p {
  margin: 0 0 1em;
  max-width: 64ch;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and footer, shared by every page (scripts/build-site.mjs). */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

main {
  padding-bottom: 64px;
}

footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 15px;
}

footer p {
  margin: 4px 0;
}

/* The cover: the passport's, navy with its data page's machine-readable lines along the foot. */
.cover {
  position: relative;
  overflow: hidden;
  max-width: 1080px;
  margin: 8px auto 0;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--ink), var(--navy) 55%, var(--navy-mid));
  color: var(--cover-text);
}

@media (max-width: 1120px) {
  .cover {
    margin-left: 20px;
    margin-right: 20px;
  }
}

.cover-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: end;
  padding: 56px 56px 0;
}

.cover h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5.2vw, 60px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.cover .lead {
  max-width: 36ch;
  margin-bottom: 28px;
  font-size: 20px;
  color: var(--cover-muted);
}

.cover .note {
  margin: 16px 0 48px;
  font-size: 15px;
  color: var(--cover-muted);
}

.cover-phone {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  align-self: end;
  height: 540px;
  overflow: hidden;
}

.cover-phone .phone {
  width: 300px;
  flex: 0 0 auto;
}

.mrz {
  margin: 0;
  max-width: none;
  padding: 16px 56px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  white-space: nowrap;
  font-family: 'OCR-B', 'OCR B', 'SF Mono', Menlo, Consolas, monospace;
  font-size: clamp(11px, 1.55vw, 17px);
  line-height: 1.5;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
}

.mrz span {
  display: block;
}

/* Store links: black on paper, paper on the cover, and marked until the listings exist. */
.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.store {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 196px;
  padding: 9px 18px 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #000;
  color: #fff;
  line-height: 1.15;
  text-decoration: none;
}

.store small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

.store strong {
  font-size: 19px;
  font-weight: 600;
}

.store:hover {
  background: #111c33;
}

/* On the navy cover the buttons are light in both colour schemes. */
.cover .store {
  border-color: transparent;
  background: #f6f8fc;
  color: #060f1f;
}

.cover .store:hover {
  background: #ffffff;
}

/* Bezels drawn around the raw captures, so the words stay words. */
.phone {
  aspect-ratio: 1206 / 2622;
  padding: 2.6%;
  border-radius: 12% / 5.5%;
  background: var(--bezel);
  box-shadow:
    0 30px 60px -24px rgba(6, 15, 31, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.phone img,
.tablet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone img {
  border-radius: 9.5% / 4.4%;
}

.tablet {
  aspect-ratio: 2064 / 2752;
  padding: 2.2%;
  border-radius: 4% / 3%;
  background: var(--bezel);
  box-shadow:
    0 30px 60px -24px rgba(6, 15, 31, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.tablet img {
  border-radius: 2.4% / 1.8%;
}

/* The page below the cover. */
.section {
  padding-top: 72px;
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
  margin-top: 36px;
}

.trio figure {
  margin: 0;
}

.trio .phone {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 22px;
}

.trio h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.trio figcaption p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.split .phone {
  width: 260px;
  margin: 0 auto;
}

.devices .tablet {
  max-width: 760px;
  margin: 28px auto 0;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

.facts li::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--gold);
  vertical-align: middle;
}

.languages ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 19px;
}

.languages li {
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
}

.get {
  margin-top: 80px;
  padding: 48px;
  border: 1px solid var(--rule);
  border-radius: 28px;
  background: var(--surface);
  text-align: center;
}

.get p {
  margin-left: auto;
  margin-right: auto;
}

.get .stores {
  justify-content: center;
}

/* The legal pages and the guide, rendered from docs/ by scripts/build-site.mjs. */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px 0;
}

.legal h1 {
  font-size: 34px;
}

.legal h2 {
  margin-top: 40px;
}

.table {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

code {
  font-size: 0.9em;
}

/* The contact form (site/contact.html): plain HTML, no script. */
.form {
  display: grid;
  gap: 8px;
  max-width: 560px;
  margin: 28px 0 32px;
}

.form fieldset {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.form legend,
.form label[for] {
  padding: 0;
  font-weight: 600;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.choice input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 4px 0 0;
  accent-color: var(--action);
}

.choice:has(input:checked) {
  border-color: var(--gold);
}

.choice:has(input:focus-visible),
.form input:focus-visible,
.form textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.choice input:focus-visible {
  outline: none;
}

.form input[type='email'],
.form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.form textarea {
  margin-top: 0;
  resize: vertical;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.form input[type='email'] + label {
  margin-top: 16px;
}

.form button {
  justify-self: start;
  min-height: 48px;
  margin-top: 16px;
  padding: 12px 32px;
  border: 0;
  border-radius: 12px;
  background: var(--action);
  color: var(--action-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.form button:hover {
  background: var(--action-hover);
}

/* Google's reCAPTCHA box, 304 by 78 pixels: scaled down on the narrowest phones. */
.g-recaptcha {
  min-height: 78px;
  margin-top: 16px;
}

@media (max-width: 360px) {
  .g-recaptcha {
    transform: scale(0.9);
    transform-origin: 0 0;
  }
}

/* A field people never see, so only a form-filling script fills it in. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 860px) {
  .cover-grid {
    grid-template-columns: 1fr;
    padding: 40px 28px 0;
  }

  .cover .note {
    margin-bottom: 32px;
  }

  .cover-phone {
    height: 380px;
  }

  .cover-phone .phone {
    width: 250px;
  }

  .mrz {
    padding: 12px 28px 14px;
  }

  .trio,
  .split {
    grid-template-columns: 1fr;
  }

  .split .phone {
    width: 240px;
  }

  .get {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .cover {
    margin-left: 12px;
    margin-right: 12px;
    border-radius: 22px;
  }

  .cover h1 {
    font-size: 34px;
  }

  .cover .lead {
    font-size: 18px;
  }

  .store {
    min-width: 0;
    flex: 1 1 150px;
  }
}
