/*
 * AYUV legal/support site — branded to the AYUV design system.
 * Dependency-free: no JavaScript, no analytics, no trackers, no stored client state.
 *
 * Colours, spacing, radii and type mirror the mobile app's design tokens
 * (apps/mobile/src/theme/tokens.ts) so the site reads as part of the product:
 * warm sage-tinted neutrals, one emerald-teal signature, editorial serif for
 * display headings. Both light and dark are first-class (via prefers-color-scheme),
 * matching the app — dark is deep surfaces + luminous accent, not a naive invert.
 */

:root {
  color-scheme: light dark;

  /* Signature */
  --accent: #0c6e5d;
  --accent-deep: #08483c;
  --accent-soft: #e0efea;
  --on-accent: #ffffff;
  --signal: #a9691f;

  /* Warm sage neutrals */
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface2: #eeede6;
  --line: #e4e2da;
  --line-soft: #eceae3;
  --ink: #14201c;
  --ink-soft: #3a4642;
  --ink-mute: #646f68;

  /* Elevation (soft, warm-tinted in light) */
  --shadow-card: 0 4px 14px rgba(20, 32, 28, 0.07);
  --shadow-hover: 0 6px 20px rgba(20, 32, 28, 0.1);

  /* Radii — the app's role hierarchy */
  --r-tile: 16px;
  --r-card: 20px;

  --max: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #35d6b3;
    --accent-deep: #6fe7ce;
    --accent-soft: rgba(53, 214, 179, 0.14);
    --on-accent: #05211b;
    --signal: #e0a85b;

    --bg: #0b1210;
    --surface: #151d1a;
    --surface2: #1e2824;
    --line: #2b3733;
    --line-soft: #212b27;
    --ink: #ecefea;
    --ink-soft: #b7c0bb;
    --ink-mute: #8a9691;

    /* In dark, depth comes from the lifted surface + hairline, not shadow. */
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Editorial serif for display headings — the app's "human moment" voice. */
h1 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  letter-spacing: -0.2px;
}

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

a:focus-visible,
.skip:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  z-index: 10;
  border-radius: 0 0 10px 0;
}
.skip:focus {
  left: 8px;
  top: 8px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* — Header — */
header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
/* The AYUV wordmark lockup (teal ring + serif "ayuv"); light/dark variants
   swap via <picture> + prefers-color-scheme, matching the app. */
.brand-wordmark {
  height: 30px;
  width: auto;
  display: block;
}

nav.site ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav.site a {
  color: var(--ink-mute);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
nav.site a:hover {
  color: var(--ink);
}
nav.site a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

/* — Main / typography — */
main {
  padding: 32px 0 8px;
}

h1 {
  font-size: 32px;
  line-height: 1.18;
  font-weight: 600;
  margin: 8px 0 4px;
}
h2 {
  font-size: 20px;
  line-height: 1.3;
  margin: 34px 0 8px;
  font-weight: 600;
}
h3 {
  font-size: 17px;
  margin: 22px 0 6px;
  font-weight: 600;
}

.updated {
  color: var(--ink-mute);
  font-size: 14px;
  margin: 0 0 8px;
}

.lede {
  color: var(--ink-soft);
  font-size: 18px;
}

ul.content,
ol.content {
  padding-left: 22px;
}
ul.content li,
ol.content li {
  margin: 6px 0;
}

/* Retained for any residual internal note (not used on public pages). */
.review {
  display: block;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 15px;
  color: var(--ink-soft);
}
.review strong {
  letter-spacing: 0.4px;
}

/* — Cards (rounded, app-consistent) — */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 20px;
  margin: 18px 0;
  box-shadow: var(--shadow-card);
}

/* — Home hero — */
.hero {
  text-align: center;
  padding: 24px 0 8px;
}
.hero h1 {
  margin: 0 0 8px;
}
.hero-wordmark {
  height: 56px;
  width: auto;
  display: block;
  margin: 0 auto;
}
.hero .lede {
  max-width: 560px;
  margin: 0 auto;
}

/* — Home link cards — */
.home-links {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
}
.home-links a {
  display: block;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 44px 18px 20px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-card);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}
.home-links a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
/* Chevron affordance, mirroring the app's list rows. */
.home-links a::after {
  content: "›";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}
.home-links span {
  display: block;
  color: var(--ink-mute);
  font-size: 15px;
  font-weight: 400;
  margin-top: 3px;
}

/* — Footer — */
footer.site {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 28px 0 48px;
  color: var(--ink-mute);
  font-size: 14px;
}
footer.site nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0 0 12px;
}
footer.site a {
  color: var(--ink-mute);
}
footer.site a:hover {
  color: var(--accent);
}

/* — Small screens — */
@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  h1 {
    font-size: 28px;
  }
  .hero-wordmark {
    height: 46px;
  }
}
