/*
 * familyminderapp.com: one stylesheet for every page.
 *
 * Colours are the app's own (composeApp/src/commonMain/kotlin/app/familyminder/
 * ui/Theme.kt): Teal #0E7C86 / TealLight #5CC6D2, Ink, Slate and Mist, with
 * the warm figures of the app icon as accents. Text links use a darker teal
 * (#0B6A73) so they clear 4.5:1 on both light backgrounds.
 *
 * No inline styles anywhere and nothing loaded from elsewhere: the site's
 * Content-Security-Policy (website/_headers) allows styles from this file only.
 */

:root {
  color-scheme: light dark;

  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #e6eaef;
  --text: #11161d;
  --muted: #424b57;
  --line: #c3cad3;
  --brand: #0e7c86;
  --brand-ink: #ffffff;
  --brand-soft: #d6f0f2;
  --brand-soft-ink: #00363b;
  --link: #0b6a73;
  --focus: #9a5800;
  --mint: #ddf1ee;
  --coral-soft: #fbe3d9;
  --amber: #f2a04a;
  --warn-bg: #fff4e5;
  --warn-line: #e8b878;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(17 22 29 / 6%), 0 6px 24px rgb(17 22 29 / 7%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #171b22;
    --surface-2: #232a33;
    --text: #e6eaf0;
    --muted: #c3cedb;
    --line: #3c444f;
    --brand: #5cc6d2;
    --brand-ink: #00363b;
    --brand-soft: #0f3a3e;
    --brand-soft-ink: #bfe9ee;
    --link: #6fd0db;
    --focus: #f2b65a;
    --mint: #16302e;
    --coral-soft: #3b241b;
    --amber: #f2b65a;
    --warn-bg: #2e2412;
    --warn-line: #7a5a26;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 24px rgb(0 0 0 / 25%);
  }
}

/* ------------------------------------------------------------------ base */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.85rem);
}

h3 {
  font-size: 1.15rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.35rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 650;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}

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

.small {
  font-size: 0.9rem;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .wrap {
    padding: 0 1.5rem;
  }
}

/* ---------------------------------------------------------------- header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--text);
  font-weight: 550;
  text-decoration: none;
}

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

/* --------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  border: 2px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-ink);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.08);
}

.button-quiet {
  background: transparent;
  color: var(--link);
}

.button-quiet:hover {
  background: var(--brand-soft);
  filter: none;
}

.button-big {
  width: 100%;
  min-height: 3.75rem;
  font-size: 1.15rem;
}

.button svg {
  flex: none;
  width: 1.3em;
  height: 1.3em;
}

/* ------------------------------------------------------------------ home */

.hero {
  padding: 2.5rem 0 2rem;
}

.hero .wrap {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .hero {
    padding: 4.5rem 0 3.5rem;
  }

  .hero .wrap {
    grid-template-columns: 1.35fr 1fr;
  }
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--link);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-art {
  justify-self: center;
  padding: 1.25rem;
  border-radius: 32px;
  background: var(--mint);
}

.hero-art img {
  display: block;
  width: min(15rem, 60vw);
  border-radius: 24px;
}

.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* The footer follows straight on; its own top border separates them. */
main > .section-alt:last-child {
  border-bottom: 0;
}

.section-intro {
  max-width: 40rem;
  color: var(--muted);
}

.features {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.features li + li {
  margin-top: 0;
}

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

@media (min-width: 64rem) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-alt .card {
  background: var(--bg);
  box-shadow: none;
}

.card h3 {
  margin-top: 0.85rem;
}

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

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
}

.icon-badge svg {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-badge.warm {
  background: var(--coral-soft);
  color: var(--text);
}

.points {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.points li + li {
  margin-top: 0;
}

@media (min-width: 48rem) {
  .points {
    grid-template-columns: repeat(2, 1fr);
  }
}

.points li {
  padding-left: 1rem;
  border-left: 4px solid var(--amber);
}

.stores {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 44rem) {
  .stores {
    grid-template-columns: repeat(2, 1fr);
  }
}

.store {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.store h3 {
  margin: 0;
}

.store .button {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.tag {
  display: inline-block;
  align-self: flex-start;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 650;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer p {
  margin: 0;
}

/* --------------------------------------------------------------- privacy */

.doc {
  max-width: 46rem;
  padding-top: 2.25rem;
  padding-bottom: 3rem;
}

.doc h2 {
  margin-top: 2.75rem;
  padding-top: 0.5rem;
  scroll-margin-top: 1rem;
}

.doc h3 {
  margin-top: 1.75rem;
  scroll-margin-top: 1rem;
}

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

.summary {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
}

.summary h2 {
  margin-top: 0;
  padding-top: 0;
  font-size: 1.3rem;
}

.summary ul {
  margin-bottom: 0;
}

.toc {
  margin: 0 0 2rem;
  padding: 1.1rem 1.35rem;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.toc h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  font-size: 1.05rem;
}

.toc ol {
  margin: 0;
  columns: 1;
}

@media (min-width: 40rem) {
  .toc ol {
    columns: 2;
    column-gap: 2.5rem;
  }
}

.toc li {
  break-inside: avoid;
}

.pairs-head {
  display: none;
}

.pairs {
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.95rem;
}

.pairs > div {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
}

.pairs > div:first-child {
  border-top: 0;
}

.pairs dt {
  font-weight: 650;
}

.pairs dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
}

@media (min-width: 44rem) {
  .pairs-head {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 1.5rem;
    margin: 0 0 0.4rem;
    padding: 0 1rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 650;
  }

  .pairs > div {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 1.5rem;
  }

  .pairs dd {
    margin: 0;
  }
}

.note {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
}

.back-to-top {
  margin-top: 2.5rem;
}

/* ------------------------------------------------------------------ join */

.join {
  max-width: 34rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

@media (min-width: 40rem) {
  .join {
    padding-top: 3rem;
  }
}

.join h1 {
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.4rem);
}

.join-card {
  margin: 1.5rem 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.code-label {
  margin: 1.5rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0 0 0.75rem;
}

.code-value {
  display: inline-flex;
  gap: 0.6em;
  padding: 0.45rem 0.9rem;
  border: 2px dashed var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
  font-family: var(--mono);
  font-size: clamp(1.9rem, 1.2rem + 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.status {
  min-height: 1.6em;
  margin: 0;
  font-size: 0.95rem;
}

.steps {
  margin: 1rem 0 0;
}

.join-help {
  margin-top: 1rem;
}

/* --------------------------------------------------------------- 404 */

.not-found {
  max-width: 40rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* ------------------------------------------------------------- print */

@media print {
  .site-header nav,
  .skip-link,
  .toc,
  .back-to-top,
  .site-footer ul {
    display: none;
  }

  body,
  .site-header,
  .site-footer,
  .summary,
  .pairs {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
  }
}
