/* Home page (/). Mobile-first, light and dark from the app's own theme
   (src/constants/theme.ts: lightTheme and blackTheme). Standalone: the
   /u/ and legal pages keep landing.css. */

:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --surface-alt: #f1efe8;
  --border: #e7e3d8;
  --text: #1a2e22;
  --muted: #5b6b61;
  --primary: #1e8e5a;
  --primary-text: #1e8e5a;
  --tint: #dcf0e4;
  --hero-top: #dcf0e4;
  --shot-shadow: 0 12px 32px rgba(26, 46, 34, 0.18);
  --radius: 20px;
  --phone-radius: 28px;
  --badge-h: 48px;
  --badge-gap: 12px;
  --soon-opacity: 0.4;
}

/* Dark only when chosen with the theme switch (assets/theme.js sets
   <html data-theme="dark">); light is the default. */
:root[data-theme="dark"] {
  --bg: #0a0a0b;
  --surface: #17171a;
  --surface-alt: #242428;
  --border: #3a3a41;
  --text: #f5f5f7;
  --muted: #bdbdc6;
  --primary: #22c55e;
  --primary-text: #4ade80;
  --tint: #173b25;
  --hero-top: #0f2a1a;
  --shot-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --soon-opacity: 0.45;
}

* {
  box-sizing: border-box;
}

body.home {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

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

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

/* Hero */

.hero {
  padding: 32px 0 40px;
  background: linear-gradient(180deg, var(--hero-top) 0%, var(--bg) 100%);
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.brand-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero h1 {
  margin: 20px 0 12px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0 auto 24px;
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
}

/* Store badges. Google's PNG includes its own clear space (41px of 250,
   so 72px tall = a 48px visible badge); Apple's SVG has none, so it gets
   a quarter of its height as margin. Both badges show at the same height. */

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.badge-play img {
  display: block;
  height: calc(var(--badge-h) * 1.5);
  width: auto;
}

.badge-apple {
  padding: var(--badge-gap);
}

.badge-apple img {
  display: block;
  height: var(--badge-h);
  width: auto;
}

.badge.is-soon img {
  opacity: var(--soon-opacity);
}

.soon-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* Google's PNG already ends in clear space, so its label sits higher to
   line up with the App Store one. */
.badge-play .soon-label {
  margin-top: -6px;
}

/* Phone screenshots */

.shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--phone-radius);
  box-shadow: var(--shot-shadow);
}

.hero-phone {
  width: 100%;
  max-width: 260px;
}

/* Sections */

.section {
  padding-top: 40px;
  padding-bottom: 16px;
}

.section h2 {
  margin: 0 0 20px;
  font-size: 22px;
  line-height: 1.25;
  text-align: center;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.feature-icon {
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 12px;
  background: var(--tint);
  fill: none;
  stroke: var(--primary-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h3 {
  margin: 12px 0 4px;
  font-size: 17px;
}

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

.shots {
  display: flex;
  gap: 16px;
  margin: 0 -16px;
  padding: 4px 16px 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.shots figure {
  flex: 0 0 62%;
  max-width: 260px;
  margin: 0;
  scroll-snap-align: center;
}

.shots figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* Footer */

.site-footer {
  margin-top: 32px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.footer-links a {
  overflow-wrap: anywhere;
}

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

/* Wider screens */

@media (min-width: 600px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .shots {
    justify-content: center;
    margin: 0;
    padding: 4px 0 24px;
    overflow: visible;
  }

  .shots figure {
    flex: 1 1 0;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 56px 0 64px;
  }

  .hero-grid {
    flex-direction: row;
    justify-content: space-between;
    gap: 48px;
    text-align: left;
  }

  .hero-text {
    flex: 1 1 auto;
  }

  .hero h1 {
    font-size: 40px;
  }

  .lead {
    margin-left: 0;
  }

  .badges {
    justify-content: flex-start;
  }

  .hero-phone {
    flex: 0 0 300px;
    max-width: 300px;
  }

  .features {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
