/* Colors and type follow the iPhone app (Phone/Theme.swift, docs/specs/palette.md). */

@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ground: #14123a;
  --surface: #221f52;
  --track: #2e2a66;
  --muted: #c4c0f0;
  --white: #ffffff;
  --coral: #ff6b4a;
  --yellow: #ffc83d;
  --blue: #3da5ff;
  --green: #3ddc97;
  --purple: #a77bff;
  --radius: 22px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--white);
  font-family: "Nunito", ui-rounded, system-ui, sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.55;
}

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

a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(1040px, 100% - 32px);
  margin-inline: auto;
}

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
}

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

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

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

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

/* Wordmark: one palette color per letter, alternate letters up and down (SettingsView Header). */

.wordmark {
  display: inline-flex;
  margin: 0;
  font-weight: 900;
  font-size: clamp(56px, 13vw, 112px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.wordmark span:nth-child(5n + 1) { color: var(--coral); }
.wordmark span:nth-child(5n + 2) { color: var(--yellow); }
.wordmark span:nth-child(5n + 3) { color: var(--blue); }
.wordmark span:nth-child(5n + 4) { color: var(--green); }
.wordmark span:nth-child(5n + 5) { color: var(--purple); }
.wordmark span:nth-child(odd) { transform: translateY(-0.05em); }
.wordmark span:nth-child(even) { transform: translateY(0.05em); }
.wordmark span { display: inline-block; }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 40px;
  padding-block: 48px 72px;
}

.tagline {
  margin: 12px 0 0;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  color: var(--white);
}

.lede {
  margin: 14px 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 19px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--white);
  font-weight: 800;
}

.badge::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

/* Watch mock */

.watch {
  justify-self: center;
  width: min(300px, 80vw);
  aspect-ratio: 41 / 49;
  padding: 16px;
  border-radius: 64px;
  background: #2a2750;
  box-shadow: 0 0 0 2px #3a3670, 0 30px 60px rgba(0, 0, 0, 0.35);
}

.watch svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50px;
  background: #000;
}

.bubble {
  transform-box: fill-box;
  transform-origin: center;
  animation: bob 3.2s ease-in-out infinite;
}

.bubble:nth-of-type(2) { animation-delay: -0.6s; }
.bubble:nth-of-type(3) { animation-delay: -1.2s; }
.bubble:nth-of-type(4) { animation-delay: -1.8s; }
.bubble:nth-of-type(5) { animation-delay: -2.4s; }

@keyframes bob {
  50% { transform: translateY(-4%) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none; }
}

/* Sections */

section {
  padding-block: 56px;
}

h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.5vw, 38px);
  font-weight: 900;
  line-height: 1.15;
}

.section-lede {
  margin: 0 0 28px;
  max-width: 56ch;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 {
  margin: 14px 0 6px;
  font-size: 22px;
  font-weight: 900;
}

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

.card .art {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: #000;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
}

.feature .dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.feature h3 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 900;
}

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

/* Privacy page */

.doc {
  max-width: 720px;
  padding-block: 32px 72px;
}

.doc h1 {
  margin: 0 0 6px;
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 900;
  line-height: 1.1;
}

.doc .effective {
  margin: 0 0 32px;
  color: var(--muted);
}

.doc h2 {
  margin: 36px 0 8px;
  font-size: 24px;
}

.doc p,
.doc li {
  color: var(--muted);
}

.doc strong {
  color: var(--white);
}

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

.doc li + li {
  margin-top: 8px;
}

.callout {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: #1c3a3a;
  color: #a6e9cb;
}

.callout p {
  margin: 0;
  color: inherit;
}

/* Footer */

footer {
  margin-top: 24px;
  padding-block: 28px 40px;
  border-top: 2px solid var(--track);
  color: var(--muted);
  font-size: 15px;
}

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

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

/* Narrow screens */

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

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

  section {
    padding-block: 40px;
  }
}
