/* Meadow — shared stylesheet */

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Tokens ─────────────────────────────────────────────────── */
:root {
  --color-text:       #1a1a1a;
  --color-bg:         #fafafa;
  --color-accent:     #6B8F71;
  --color-muted:      #5a5a5a;
  --color-rule:       #e0e0e0;

  --font-system:      -apple-system, system-ui, 'Segoe UI', sans-serif;

  --size-max:         640px;
  --space-page-v:     clamp(3rem, 8vh, 6rem);
  --space-page-h:     1.5rem;
}

/* ─── Base ───────────────────────────────────────────────────── */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family:    var(--font-system);
  background:     var(--color-bg);
  color:          var(--color-text);
  line-height:    1.6;
  min-height:     100dvh;
  display:        flex;
  flex-direction: column;
}

/* ─── Layout shell ───────────────────────────────────────────── */
.page {
  display:        flex;
  flex-direction: column;
  min-height:     100dvh;
}

.page-inner {
  width:     100%;
  max-width: var(--size-max);
  margin:    0 auto;
  padding:   0 var(--space-page-h);
}

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  padding-top: var(--space-page-v);
}

.site-header .page-inner {
  /* on legal pages, the wordmark links back home */
}

.site-wordmark {
  display:         inline-block;
  font-size:       0.875rem;
  font-weight:     500;
  letter-spacing:  0.02em;
  color:           var(--color-text);
  text-decoration: none;
}

.site-wordmark:hover {
  text-decoration: underline;
}

/* ─── Main — landing ─────────────────────────────────────────── */
.site-main {
  flex:           1;
  display:        flex;
  align-items:    center;
}

.site-main .page-inner {
  padding-top:    clamp(2rem, 6vh, 4rem);
  padding-bottom: clamp(2rem, 6vh, 4rem);
}

/* App name */
.hero-name {
  font-size:      clamp(2.5rem, 8vw, 4rem);
  font-weight:    600;
  letter-spacing: -0.02em;
  line-height:    1.1;
  color:          var(--color-text);
  margin-bottom:  0.5rem;
}

/* Tagline */
.hero-tagline {
  font-size:     clamp(1.125rem, 3vw, 1.375rem);
  font-weight:   400;
  color:         var(--color-muted);
  line-height:   1.4;
  margin-bottom: 1.75rem;
}

/* App Store coming-soon text */
.hero-store {
  font-size:   0.9375rem;
  color:       var(--color-muted);
  font-weight: 400;
}

/* ─── Main — legal pages ─────────────────────────────────────── */
.legal-main .page-inner {
  padding-top:    clamp(2.5rem, 6vh, 4rem);
  padding-bottom: clamp(2rem, 6vh, 4rem);
}

.legal-title {
  font-size:      clamp(1.75rem, 5vw, 2.5rem);
  font-weight:    600;
  letter-spacing: -0.015em;
  line-height:    1.2;
  margin-bottom:  0.375rem;
}

.legal-updated {
  font-size:     0.875rem;
  color:         var(--color-muted);
  margin-bottom: 2.5rem;
}

.legal-body {
  font-size:   1rem;
  line-height: 1.7;
  color:       var(--color-text);
}

.legal-body h2 {
  font-size:      1.125rem;
  font-weight:    600;
  letter-spacing: -0.01em;
  margin-top:     2rem;
  margin-bottom:  0.5rem;
}

.legal-body p {
  margin-bottom: 1rem;
}

.legal-body p:last-child {
  margin-bottom: 0;
}

.legal-contact {
  margin-top:    2.5rem;
  padding-top:   2rem;
  border-top:    1px solid var(--color-rule);
  font-size:     0.9375rem;
  color:         var(--color-muted);
}

.legal-contact a {
  color:           var(--color-text);
  text-decoration: underline;
}

.legal-contact a:hover {
  color: var(--color-accent);
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  padding-bottom: clamp(2rem, 5vh, 3rem);
  padding-top:    2rem;
  border-top:     1px solid var(--color-rule);
  margin-top:     auto;
}

.site-footer .page-inner {
  display:        flex;
  flex-direction: column;
  gap:            0.875rem;
}

.footer-nav {
  list-style: none;
  display:    flex;
  flex-wrap:  wrap;
  gap:        1rem;
}

.footer-nav a {
  font-size:       0.875rem;
  color:           var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-disclaimer {
  font-size:   0.8125rem;
  color:       var(--color-muted);
  line-height: 1.55;
  max-width:   52ch;
}

/* ─── 404 page ───────────────────────────────────────────────── */
.not-found-main {
  flex:        1;
  display:     flex;
  align-items: center;
}

.not-found-main .page-inner {
  padding-top:    clamp(2rem, 6vh, 4rem);
  padding-bottom: clamp(2rem, 6vh, 4rem);
}

.not-found-label {
  font-size:     0.875rem;
  color:         var(--color-muted);
  margin-bottom: 0.75rem;
}

.not-found-title {
  font-size:      clamp(1.75rem, 5vw, 2.5rem);
  font-weight:    600;
  letter-spacing: -0.015em;
  line-height:    1.2;
  margin-bottom:  1.25rem;
}

.not-found-link {
  font-size:       1rem;
  color:           var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.not-found-link:hover {
  color: var(--color-accent);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 420px) {
  :root {
    --space-page-h: 1.25rem;
  }
}
