/* ── Font ───────────────────────────────────────── */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────── */

:root {
  --bg: #ffffff;
  --text: #0b0b0c;
  --muted: #6e6e73;
  --line: #e5e5e7;
  --surface: #f5f5f7;
  --focus: #0a66ff;
  --ok: #1f8a4c;
  --err: #c62828;
  --star: #f2a10c;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 72rem;
  --radius: 14px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c;
    --text: #f5f5f7;
    --muted: #98989d;
    --line: #2a2a2d;
    --surface: #161618;
    --focus: #5b9bff;
    --ok: #4cc27f;
    --err: #ff6b6b;
    --star: #ffb733;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --text: #f5f5f7;
  --muted: #98989d;
  --line: #2a2a2d;
  --surface: #161618;
  --focus: #5b9bff;
  --ok: #4cc27f;
  --err: #ff6b6b;
  --star: #ffb733;
  color-scheme: dark;
}

/* ── Base ───────────────────────────────────────── */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

.muted {
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Header ─────────────────────────────────────── */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.75rem);
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

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

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
}

/* Show the icon for the theme you'd switch *to* */
.theme-toggle .icon-sun {
  display: none;
}

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

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

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

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

/* ── Footer ─────────────────────────────────────── */

.site-footer {
  margin-top: clamp(4rem, 10vw, 8rem);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* ── Home ───────────────────────────────────────── */

.home main {
  display: flex;
  align-items: center;
}

.intro {
  padding-top: clamp(3rem, 10vh, 8rem);
  padding-bottom: clamp(3rem, 10vh, 8rem);
}

.intro h1 {
  font-size: clamp(3.25rem, 12vw, 9.5rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.intro p {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  max-width: 28ch;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  font-weight: 450;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--muted);
}

.home .site-footer {
  margin-top: 0;
}

/* ── Product: hero ──────────────────────────────── */

.hero {
  padding-top: clamp(3rem, 9vw, 7rem);
}

/* Title and subtitle on the left, icon on the right; icon moves above on phones */
.hero-top {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero-icon {
  width: 96px;
  border-radius: 22.5%;
  box-shadow: 0 1px 0 var(--line), 0 16px 48px -16px rgb(0 0 0 / 0.4);
}

@media (min-width: 720px) {
  .hero-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
  }

  .hero-icon {
    width: clamp(160px, 20vw, 240px);
    flex-shrink: 0;
  }
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 7.5rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.hero .lede {
  margin-top: 1.25rem;
  max-width: 24ch;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  font-weight: 450;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--muted);
}

.hero .description {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  max-width: 38rem;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.6;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.app-store-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.app-store-btn--secondary {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.app-store-btn--secondary:hover {
  opacity: 1;
  box-shadow: inset 0 0 0 1px var(--muted);
}

.app-store-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* ── Product: screenshots ───────────────────────── */

.screens {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: clamp(0.75rem, 2vw, 1.5rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.screens img {
  width: 100%;
  border-radius: clamp(14px, 2.4vw, 24px);
  border: 1px solid var(--line);
  scroll-snap-align: start;
}

/* Landscape screenshots (iPad, or iPhone apps that run sideways) */
.screens--wide {
  grid-auto-columns: minmax(min(85%, 30rem), 1fr);
}

/* ── Product: sections ──────────────────────────── */

.section {
  padding-top: clamp(4rem, 10vw, 8rem);
}

.section-title {
  font-size: clamp(2rem, 5.5vw, 4rem);
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: block;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.links a:hover {
  border-color: var(--muted);
  background: var(--surface);
}

.links strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.links span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.reviews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

.review {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
}

.stars {
  width: 6rem;
  height: 1.2rem;
  fill: var(--star);
}

.review h3 {
  margin-top: 1rem;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.review blockquote {
  flex: 1;
  margin: 0.5rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
}

/* Google Play reviews have no title */
.stars + blockquote {
  margin-top: 1rem;
}

.review-meta {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.reviews-note {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ── Text pages (support, privacy) ──────────────── */

.page {
  max-width: 46rem;
  padding-top: clamp(3rem, 8vw, 6rem);
}

.page h1 {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  letter-spacing: -0.05em;
}

.page .lede {
  margin-top: 1.25rem;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.4;
  color: var(--muted);
}

.prose {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose ul {
  margin-top: 0.85rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

/* ── Form ───────────────────────────────────────── */

.form {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 550;
}

.field label .muted {
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent);
}

.field textarea {
  min-height: 11rem;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.honeypot {
  display: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.btn {
  padding: 0.85rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.88;
}

.btn:disabled {
  opacity: 0.5;
  cursor: progress;
}

.form-status {
  font-size: 0.95rem;
}

.form-status[data-state="ok"] {
  color: var(--ok);
}

.form-status[data-state="error"] {
  color: var(--err);
}

/* ── Motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
