/* ---------- Tokens ---------- */

:root {
  color-scheme: light;
  --bg-gradient: linear-gradient(180deg, #f2f2f7 0%, #ffffff 100%);
  --bg-end: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #424245;
  --text-tertiary: #86868b;
  --separator: #d2d2d7;
  --accent: #0071e3;
  --shadow-icon:
    6px 6px 18px rgba(0, 0, 0, 0.1),
    22px 23px 32px rgba(0, 0, 0, 0.09),
    50px 51px 43px rgba(0, 0, 0, 0.05);
  --shadow-screenshot:
    12px 12px 37px rgba(0, 0, 0, 0.16),
    47px 47px 67px rgba(0, 0, 0, 0.14),
    106px 106px 90px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg-gradient: linear-gradient(180deg, #1d1d1f 0%, #000000 100%);
  --bg-end: #000000;
  --text-primary: #f5f5f7;
  --text-secondary: #d2d2d7;
  --text-tertiary: #6e6e73;
  --separator: #424245;
  --accent: #2997ff;
  --shadow-icon:
    6px 6px 18px rgba(0, 0, 0, 0.4),
    22px 23px 32px rgba(0, 0, 0, 0.36),
    50px 51px 43px rgba(0, 0, 0, 0.2);
  --shadow-screenshot:
    12px 12px 37px rgba(0, 0, 0, 0.64),
    47px 47px 67px rgba(0, 0, 0, 0.56),
    106px 106px 90px rgba(0, 0, 0, 0.32),
    189px 189px 107px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg-gradient: linear-gradient(180deg, #1d1d1f 0%, #000000 100%);
    --bg-end: #000000;
    --text-primary: #f5f5f7;
    --text-secondary: #d2d2d7;
    --text-tertiary: #6e6e73;
    --separator: #424245;
    --accent: #2997ff;
    --shadow-icon:
      6px 6px 18px rgba(0, 0, 0, 0.4),
      22px 23px 32px rgba(0, 0, 0, 0.36),
      50px 51px 43px rgba(0, 0, 0, 0.2);
    --shadow-screenshot:
      12px 12px 37px rgba(0, 0, 0, 0.64),
      47px 47px 67px rgba(0, 0, 0, 0.56),
      106px 106px 90px rgba(0, 0, 0, 0.32),
      189px 189px 107px rgba(0, 0, 0, 0.08);
  }
}

/* Theme-dependent images: one of each pair is shown per effective theme */
.dark-only { display: none; }
html[data-theme="dark"] .light-only { display: none; }
html[data-theme="dark"] .dark-only { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .light-only { display: none; }
  html:not([data-theme="light"]) .dark-only { display: block; }
}

/* ---------- Base ---------- */

* {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-end);
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  padding: 120px 16px 80px;
  background: var(--bg-gradient) no-repeat;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  text-align: center;
}

main {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1,
p {
  margin: 0;
}

a {
  color: inherit;
}

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

img {
  display: block;
}

@media (max-width: 734px) {
  body {
    padding: 80px 16px 40px;
  }
}

/* ---------- Page header (app icon + headline) ---------- */

.app-icon {
  width: 120px;
  height: 120px;
  /* Radius approximates the icon's squircle so the shadow hugs its silhouette */
  border-radius: 30px;
  box-shadow: var(--shadow-icon);
}

.page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.headline {
  font-size: 48px;
  line-height: 52px;
  font-weight: 600;
  letter-spacing: -0.003em;
}

.headline--hero {
  font-size: 96px;
  line-height: 100px;
  letter-spacing: -0.015em;
}

.subhead {
  font-size: 21px;
  line-height: 29px;
  font-weight: 600;
  letter-spacing: 0.011em;
}

@media (max-width: 734px) {
  .headline {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: 0.004em;
  }

  .headline--hero {
    font-size: 48px;
    line-height: 52px;
    letter-spacing: -0.003em;
  }

  .subhead {
    font-size: 19px;
    line-height: 27px;
    letter-spacing: 0.012em;
  }
}

/* ---------- Home ---------- */

.home-main {
  gap: 80px;
}

.hero .badge {
  margin-top: 40px;
  display: inline-block;
}

.hero .badge img {
  width: 179px;
  height: 60px;
}

.screenshot-frame {
  position: relative;
  width: 392px;
  max-width: 100%;
}

/* The phone body in the asset sits inside the image bounds (~0.7% top/bottom,
   ~1.95% sides to the body edge, not the protruding buttons; corner radius
   ~63px). The shadow layer is inset slightly past the body edge and given a
   slightly larger radius so its edge always hides under the phone */
.screenshot-frame::before {
  content: "";
  position: absolute;
  inset: 0.8% 2%;
  border-radius: 68px;
  box-shadow: var(--shadow-screenshot);
}

.screenshot {
  position: relative;
  width: 100%;
  height: auto;
}

/* ---------- Privacy ---------- */

.privacy-main {
  gap: 40px;
}

.policy-column {
  width: 100%;
  max-width: 370px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  text-align: left;
}

.policy-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.policy-text strong {
  font-weight: 600;
}

.policy-text a {
  color: var(--accent);
  text-decoration: underline;
}

.policy-end {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

.contact-pfp {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.contact-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.23px;
  color: var(--text-secondary);
}

.contact-lines .muted {
  color: var(--text-tertiary);
}

.divider {
  width: 100%;
  height: 1px;
  margin: 0;
  border: none;
  background: var(--separator);
}

/* ---------- 404 ---------- */

.error-main {
  flex: 1;
  justify-content: center;
  gap: 40px;
}

.error-main .headline {
  max-width: 640px;
}

.text-link {
  color: var(--accent);
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -0.43px;
  text-decoration: underline;
}

@media (max-width: 734px) {
  .error-main {
    gap: 16px;
  }
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.23px;
}

.footer--privacy {
  width: 100%;
  justify-content: space-between;
}

.legal {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copyright {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.copyright .year {
  color: var(--text-tertiary);
}

.copyright .name {
  color: var(--text-secondary);
}

.legal-separator {
  width: 1px;
  height: 22px;
  background: var(--separator);
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.contact-lines a {
  color: var(--text-secondary);
  text-decoration: none;
}

.contact-lines a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

@media (max-width: 734px) {
  .footer--stack {
    flex-direction: column;
    gap: 20px;
  }
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--accent);
  border-radius: 999px;
}

.theme-toggle button {
  padding: 1px 6px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.theme-toggle button[aria-checked="true"] {
  background: var(--accent);
  color: #ffffff;
}
