/*
 * Shared styles for the static legal / marketing pages served from
 * Cloudflare Pages. Colour palette mirrors the mobile app's forest +
 * gold theme so users landing here from an app link see a visually
 * continuous product. Intentionally a single plain .css file – no
 * preprocessors, no bundler, no dependencies. Keep it that way; every
 * build step we add to marketing/ is one more thing that can break
 * a Saturday-night Google Play resubmit.
 */

:root {
  --bg: #1a2f1f;
  --surface: #24402c;
  --surface-border: #3a5a42;
  --text: #f5ebd9;
  --text-muted: #d4c7a9;
  --accent: #c9a24a;
  --accent-hover: #e8c571;
  --code-bg: #1a2f1f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Centered reading column. Max-width 720px fits ~75 chars of body text,
   which is the sweet spot for long-form legal reading on desktop while
   staying full-width on phones. */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

header {
  padding: 32px 24px 8px;
  max-width: 720px;
  margin: 0 auto;
}

header .brand {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

h1 {
  color: var(--accent);
  font-size: 28px;
  margin: 12px 0 4px;
}

.effective {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 24px;
}

h2 {
  color: var(--accent);
  font-size: 19px;
  margin: 32px 0 8px;
  border-top: 1px solid var(--surface-border);
  padding-top: 20px;
}

/* First h2 shouldn't have a top border – it sits directly under the
   effective-date line and a border there reads as an accidental gap. */
h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

h3 {
  color: var(--text);
  font-size: 16px;
  margin: 20px 0 4px;
}

p, li {
  color: var(--text-muted);
  margin: 8px 0;
}

ul, ol {
  padding-left: 22px;
}

a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: #fff;
}

code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-hover);
  font-size: 0.92em;
}

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--surface-border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Prefer OS dark preference but don't force light mode – the brand is
   inherently dark-themed and flipping to light would clash. This
   block mostly documents intent for future contributors. */
@media (prefers-color-scheme: light) {
  /* No override: brand stays dark regardless of OS theme. */
}

/* ───────────────────────── Landing page (index.html) ─────────────────
   Scoped under `body.landing` so the legal pages – which deliberately
   read like a serif-free legal document – stay untouched. The landing
   gets a wider column, a hero, a feature grid, and a soft radial glow
   in the background to evoke a steeping cup without being a cliché.
*/

body.landing {
  /* Subtle radial highlight, off-centre so it reads as ambient light
     and not as a vignette. Pure CSS, no images – keeps the page well
     under 50 KB. */
  background:
    radial-gradient(1100px 600px at 75% -10%, rgba(201, 162, 74, 0.10), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(58, 90, 66, 0.45), transparent 65%),
    var(--bg);
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  /* Match the content column width so brand, h1, body, and footer
     all sit on the same vertical edge – nothing reads "shifted". */
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 32px 0;
}

.landing-header .brand {
  /* Brand is an <a> on every page; strip the default underline/color
     used by the legal-page link rule so it reads as a wordmark, not
     a navigation link. */
  text-decoration: none;
}

.landing-nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.landing-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.landing-main {
  /* Single content column at 720px, centred. We tried a wider 1080
     wrapper with capped children, but it left empty space on the
     right and made section dividers visibly mismatch the footer
     border – the page read as "broken" rather than "airy". One
     centred column is what every page needs anyway. */
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 32px 64px;
}

.hero {
  padding: 56px 0 40px;
  max-width: 720px;
}

.hero h1 {
  /* Override the default h1 size from the legal-page rules. The
     landing wants more presence than a policy document title. */
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 20px;
}

.hero .lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 0 28px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cta-primary,
.cta-secondary {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 80ms ease, background 120ms ease;
}

.cta-primary {
  background: var(--accent);
  color: #1a2f1f;
  border: 1px solid var(--accent);
}

.cta-primary:hover {
  background: var(--accent-hover);
  color: #1a2f1f;
  transform: translateY(-1px);
}

.cta-primary[aria-disabled="true"] {
  /* Slightly muted while we don't have a real App Store URL yet,
     but still visibly the primary CTA so the page reads as a
     finished product to reviewers. */
  opacity: 0.7;
  cursor: default;
}

.cta-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.cta-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.philosophy {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--surface-border);
  max-width: 720px;
}

.philosophy h2 {
  border: none;
  padding: 0;
  margin: 0 0 12px;
  font-size: 22px;
}

.philosophy p {
  font-size: 16px;
}

/* Tighten the page padding on phones so the hero doesn't feel cramped
   against the screen edge while still leaving breathing room. */
@media (max-width: 540px) {
  .landing-header { padding: 24px 20px 0; }
  .landing-main   { padding: 16px 20px 48px; }
  .hero           { padding: 32px 0 24px; }
  .hero .lede     { font-size: 16.5px; }
}
