/* CountCare site. Tokens mirror the app's "Deep teal" design system (repo/DESIGN.md). */

:root {
  color-scheme: light dark;

  --canvas: #F6F5F2;
  --surface: #FFFFFF;
  --sunken: #ECEAE5;
  --ink: #14292B;
  --ink-2: #4A5F61;
  --accent-text: #16686A;
  --action: #16686A;
  --action-hover: #0F5254;
  --on-action: #FFFFFF;
  --hairline: #E3E1DC;
  --edge: #7F8C8D;
  --low-text: #7A4E0A;
  --low-bg: #F8E7C3;
  --band: #16686A;
  --band-ink: #FFFFFF;
  --band-ink-2: #CFE6E6;
  --band-rule: rgba(255, 255, 255, 0.28);
  --phone-edge: #14292B;
  --shadow: 0 8px 24px rgba(20, 41, 43, 0.14);

  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --page: 68rem;
  --gutter: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0E1A1B;
    --surface: #172627;
    --sunken: #0A1314;
    --ink: #E9F1F0;
    --ink-2: #AFC2C3;
    --accent-text: #6FCFD2;
    --action: #4DB8BC;
    --action-hover: #3AA3A7;
    --on-action: #072A2C;
    --hairline: #263A3B;
    --edge: #5E7B7D;
    --low-text: #E7B45A;
    --low-bg: #3A2E14;
    --band: #123F41;
    --band-ink: #E9F1F0;
    --band-ink-2: #AFC2C3;
    --band-rule: rgba(233, 241, 240, 0.2);
    --phone-edge: #2B4244;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

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

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

h1, h2, h3 {
  font-family: var(--rounded);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }

p { margin: 0; max-width: 34em; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* Header */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--rounded);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 10px;
}
.site-nav a:hover { background: var(--sunken); }
.site-nav a[aria-current="page"] { color: var(--accent-text); font-weight: 600; }

@media (max-width: 30rem) {
  .site-nav a { padding-inline: 0.5rem; }
  .site-nav .wide-only { display: none; }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 56px;
  padding: 0.5rem 1.5rem;
  background: var(--action);
  color: var(--on-action);
  font-family: var(--rounded);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  border-radius: 14px;
}
.btn:hover { background: var(--action-hover); }
.btn svg { width: 22px; height: 22px; flex: none; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.btn-note { font-size: 1rem; color: var(--ink-2); }

/* Phone frame */

.phone {
  margin: 0;
  width: min(100%, 19rem);
  border: 8px solid var(--phone-edge);
  border-radius: 2.75rem;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.phone img { width: 100%; }

/* Hero */

.hero {
  display: grid;
  gap: 2.5rem;
  padding-block: 2rem 4rem;
  align-items: center;
}
.hero-copy { display: grid; gap: 1.5rem; }
.hero-copy .lede { font-size: 1.3125rem; color: var(--ink-2); max-width: 30em; }
.hero .phone { justify-self: center; }

@media (min-width: 52rem) {
  .hero { grid-template-columns: 1.25fr 0.75fr; gap: 3rem; padding-block: 3.5rem 6rem; }
  .hero .phone { justify-self: end; }
}

/* The sum: the page's one loud element */

.sum {
  background: var(--band);
  color: var(--band-ink);
  padding-block: 4rem;
}
.sum h2 { max-width: 16em; }
.sum-intro { color: var(--band-ink-2); margin-top: 1rem; }

.sum-line {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--band-rule);
}
.sum-line li {
  padding: 1.25rem 1rem 1.25rem 0;
  border-bottom: 1px solid var(--band-rule);
}
.sum-num {
  display: block;
  font-family: var(--rounded);
  font-weight: 700;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sum-num small { font-size: 0.35em; font-weight: 600; margin-left: 0.15em; }
.sum-label { display: block; margin-top: 0.5rem; color: var(--band-ink-2); font-size: 1rem; }
.sum-line .typed .sum-label { color: var(--band-ink); font-weight: 600; }

@media (min-width: 52rem) {
  .sum { padding-block: 6rem; }
  .sum-line { grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--band-rule); }
  .sum-line li { border-bottom: 0; padding: 1.75rem 1rem 1.75rem 0; }
  .sum-line li + li { padding-left: 1.5rem; border-left: 1px solid var(--band-rule); }
}

/* Feature rows */

.features { padding-block: 4rem; display: grid; gap: 4.5rem; }
.feature { display: grid; gap: 2rem; align-items: center; }
.feature .phone { justify-self: center; width: min(100%, 17rem); }
.feature-copy { display: grid; gap: 1rem; }
.feature-copy p { color: var(--ink-2); }

@media (min-width: 52rem) {
  .features { padding-block: 7rem; gap: 7rem; }
  .feature { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .feature.flip .phone { order: 2; }
}

.facts {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.625rem;
}
.facts li { padding-left: 1.75rem; position: relative; color: var(--ink); }
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.875rem;
  height: 0.5rem;
  border-left: 3px solid var(--action);
  border-bottom: 3px solid var(--action);
  transform: rotate(-45deg);
}

/* Privacy block */

.private { background: var(--sunken); padding-block: 4rem; }
.private-copy { display: grid; gap: 1.25rem; }
.private-copy p { color: var(--ink-2); }
@media (min-width: 52rem) {
  .private { padding-block: 6rem; }
  .private-copy .facts { grid-template-columns: 1fr 1fr; gap: 0.875rem 2.5rem; max-width: 52rem; }
}

/* Closing call */

.closing { padding-block: 4.5rem; display: grid; gap: 1.5rem; }
.closing p { color: var(--ink-2); }

.notice {
  border-top: 1px solid var(--hairline);
  padding-top: 1.25rem;
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: 1rem;
  max-width: 40em;
}

/* Footer */

.site-foot { border-top: 1px solid var(--hairline); padding-block: 2rem 3rem; font-size: 1rem; color: var(--ink-2); }
.foot-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; align-items: center; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 0.5rem; margin-left: -0.5rem; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0.5rem; }

/* Document pages: privacy, support, about */

.doc { padding-block: 2.5rem 5rem; max-width: 44rem; }
.doc h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
.doc .updated { color: var(--ink-2); margin-top: 0.75rem; font-size: 1rem; }
.doc h2 { font-size: 1.625rem; margin-top: 3rem; }
.doc h3 { margin-top: 2rem; }
.doc p, .doc ul, .doc ol, .doc dl { margin-top: 1rem; max-width: none; }
.doc ul, .doc ol { padding-left: 1.4rem; }
.doc li + li { margin-top: 0.5rem; }
.doc .summary {
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 1.5rem;
}
.doc .summary h2 { margin-top: 0; font-size: 1.25rem; }
.doc .summary ul { margin-top: 0.75rem; }

.doc details {
  border-bottom: 1px solid var(--hairline);
  padding-block: 0.25rem;
}
.doc details:first-of-type { border-top: 1px solid var(--hairline); margin-top: 1.5rem; }
.doc summary {
  cursor: pointer;
  font-family: var(--rounded);
  font-weight: 600;
  font-size: 1.1875rem;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
}
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2.5px solid var(--ink-2);
  border-bottom: 2.5px solid var(--ink-2);
  transform: rotate(45deg);
  margin-right: 0.4rem;
}
.doc details[open] summary::after { transform: rotate(-135deg); }
.doc details > :not(summary) { margin-top: 0; padding-bottom: 1rem; color: var(--ink-2); }
.doc details > p + p { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
