:root {
  --bg: #fdf3e4;
  --surface: #ffffff;
  --text: #14183a;
  --muted: #5b6085;
  --border: #eadbc2;
  --accent: #ff7a66;
  --accent-text: #c2412d;
  --on-accent: #14183a;
  --navy: #14183a;
  --cream: #fdf3e4;
  --shadow: 0 18px 40px rgba(20, 24, 58, 0.14);
  color-scheme: light;
}

/* Dark: follows the system unless the visitor picked a theme with the toggle (data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #13162b;
    --surface: #1b1f38;
    --text: #ece6dc;
    --muted: #9aa0c3;
    --border: #262b4a;
    --accent-text: #ff8a76;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #13162b;
  --surface: #1b1f38;
  --text: #ece6dc;
  --muted: #9aa0c3;
  --border: #262b4a;
  --accent-text: #ff8a76;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
.display {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent-text);
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Vertical only: the side padding comes from .wrap. */
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 22px;
}

.brand img {
  width: 40px;
  height: 40px;
}

.top nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
}

.top nav a:hover {
  color: var(--text);
}

.top nav {
  align-items: center;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

/* Show the moon in light mode (tap for dark) and the sun in dark mode. */
.theme-toggle .sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .sun {
    display: block;
  }

  :root:not([data-theme='light']) .theme-toggle .moon {
    display: none;
  }
}

:root[data-theme='dark'] .theme-toggle .sun {
  display: block;
}

:root[data-theme='dark'] .theme-toggle .moon {
  display: none;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 72px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 68px);
  margin: 0 0 18px;
}

.hero p.lead {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 34em;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.note {
  font-size: 14px;
  color: var(--muted);
}

/* Passport illustration */
.passport {
  position: relative;
  justify-self: center;
  width: min(320px, 100%);
  aspect-ratio: 0.7;
  border-radius: 22px;
  background: var(--navy);
  box-shadow: var(--shadow);
  color: #e2be77;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 28px 22px;
  transform: rotate(-4deg);
}

.passport::before {
  content: '';
  position: absolute;
  inset: 14px 14px 14px 22px;
  border: 1px solid rgba(226, 190, 119, 0.35);
  border-radius: 14px;
}

.passport::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  border-radius: 22px 0 0 22px;
  background: #11143a;
}

.passport .p-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.4em;
  font-size: 20px;
}

.passport svg {
  width: 56%;
  height: auto;
}

.stamp {
  position: absolute;
  right: -30px;
  bottom: -22px;
  width: 104px;
  height: 104px;
  border: 4px solid var(--accent-text);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--accent-text);
  background: var(--bg);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.08em;
  transform: rotate(14deg);
  box-shadow:
    inset 0 0 0 6px var(--bg),
    inset 0 0 0 7.5px var(--accent-text);
}

.stamp small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.2em;
  margin-top: 6px;
}

/* Screenshots */
.gallery {
  padding-bottom: 56px;
}

.gallery-head h2 {
  margin: 0 0 20px;
  font-size: clamp(28px, 4vw, 36px);
}

.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 18px;
  margin: 0 -4px;
  scrollbar-width: thin;
}

.shot {
  flex: 0 0 220px;
  margin: 0;
  scroll-snap-align: start;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  border: 6px solid var(--navy);
  box-shadow: var(--shadow);
  background: var(--navy);
}

.shot figcaption {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
}

.shot figcaption strong {
  display: block;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 72px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
}

.feature .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--accent-text);
  margin-bottom: 12px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

/* Privacy band */
.band {
  background: var(--navy);
  color: var(--cream);
  border-radius: 28px;
  padding: 40px;
  margin-bottom: 72px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
}

.band h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.band p {
  margin: 0;
  color: rgba(253, 243, 228, 0.8);
}

.band a {
  color: #ff8a76;
}

.band .big {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: #ff8a76;
}

/* About the ads */
.ads-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 28px;
  padding: 36px 40px;
  margin-bottom: 24px;
}

.ads-note h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.ads-note p {
  margin: 0 0 10px;
  color: var(--muted);
}

.ads-note .note {
  margin: 0 0 18px;
}

.button.coffee {
  background: #ffdd00;
  border-color: #ffdd00;
  color: #14183a;
}

.ads-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--accent-text);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

footer .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

footer a {
  color: var(--muted);
}

/* Legal pages */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 72px;
}

.doc h1 {
  font-size: clamp(34px, 6vw, 46px);
  margin: 16px 0 6px;
}

.doc h2 {
  font-size: 22px;
  margin: 36px 0 10px;
}

.doc .meta {
  color: var(--muted);
  margin: 0 0 24px;
}

.doc ul {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  margin: 8px 0;
}

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

.doc th {
  font-weight: 600;
}

.doc .table-scroll {
  overflow-x: auto;
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .doc {
    padding: 8px 20px 56px;
  }

  .doc h1 {
    font-size: 32px;
  }

  .doc h2 {
    font-size: 20px;
    margin-top: 30px;
  }

  .doc ul {
    padding-left: 18px;
  }

  /* Tables become a list of cards: the first cell is the heading, the rest sits under it. */
  .doc table,
  .doc tbody,
  .doc tr,
  .doc td {
    display: block;
    width: 100%;
  }

  .doc thead {
    display: none;
  }

  .doc tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .doc td {
    padding: 0;
    border: 0;
  }

  .doc td:first-child {
    font-weight: 600;
    margin-bottom: 2px;
  }

  footer .row,
  footer nav {
    gap: 10px 16px;
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }

  .passport {
    width: min(260px, 78%);
    margin-top: 8px;
  }

  .stamp {
    right: -12px;
    bottom: -16px;
    width: 84px;
    height: 84px;
    font-size: 18px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .shot {
    flex-basis: 64%;
  }

  .band,
  .ads-note {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .top nav {
    gap: 14px;
  }
}
