/* CareCircle — public pages.
   The palette is the app's own "Garden" (Theme+Palette.swift). The app sets its type in
   Outfit; these pages use the reader's system face instead of shipping a
   110 KB variable TTF for two pages of text. On the iPhones and Macs most
   readers arrive from, that is SF Pro — drawn for exactly this kind of
   reading, and already on the device. No font CDN is involved, so a privacy
   policy does not hand every reader's address to a third party it never
   names. */

:root {
  --paper:      #F3F1EA;
  --card:       #FFFEFA;
  --card2:      #EBE8DD;
  --ink:        #1F2620;
  --ink2:       #4F5A51;
  --ink3:       #5E6960;
  --accent:     #4E7D59;
  --accent-ink: #3B6646;
  --warm-ink:   #9A4B23;
  --warm:       #D98C5F;
  --line:       rgba(31, 38, 32, 0.10);

  --measure: 36rem;
  --gutter: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #141814;
    --card:       #1C221D;
    --card2:      #252C26;
    --ink:        #EEF2EC;
    --ink2:       #B3BDB4;
    --ink3:       #94A096;
    --accent-ink: #A5D0AC;
    --warm-ink:   #F0AE86;
    --line:       rgba(235, 245, 235, 0.10);
    --accent:     #86B48F;
    --warm:       #E09A70;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
               "Segoe UI", Roboto, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.masthead__inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

/* The mark is the app icon: five people in a ring around one heart. */
.wordmark::before {
  content: "";
  width: 1.75rem;
  height: 1.75rem;
  background: url("/assets/logo.svg") center / contain no-repeat;
  flex: none;
}

.masthead nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.masthead nav a {
  color: var(--ink2);
  text-decoration: none;
}

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

.masthead nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

/* ------------------------------------------------------------------ page */

.page {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2.75rem var(--gutter) 4rem;
}

.lede { max-width: var(--measure); }

h1 {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 0.6rem;
}

.standfirst {
  font-size: 1.1875rem;
  color: var(--ink2);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.dateline {
  font-size: 0.9375rem;
  color: var(--ink3);
  margin: 0;
}

/* The one warm note on a page: the promise worth reading before the rest. */
.headline-box {
  margin: 2rem 0 0;
  max-width: var(--measure);
  background: var(--card2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warm);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.35rem;
}

.headline-box h2 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  padding: 0;
  border: 0;
}

.headline-box h2::before { display: none; }

.headline-box ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink2);
}

.headline-box li { margin-bottom: 0.35rem; }
.headline-box li:last-child { margin-bottom: 0; }

/* ---------------------------------------------------- contents + columns */

.layout { margin-top: 2.75rem; }

.contents__heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.contents ol {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.contents li { margin-bottom: 0.55rem; }

.contents a {
  color: var(--ink2);
  text-decoration: none;
  display: block;
  padding-left: 0.75rem;
  border-left: 2px solid var(--line);
}

.contents a:hover {
  color: var(--accent-ink);
  border-left-color: var(--accent);
}

/* On a phone the index is a disclosure, opened on purpose, not a wall. */
.contents--mobile {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: 0.35rem 1rem;
  margin-bottom: 2.25rem;
}

.contents--mobile > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.7rem 0;
  list-style: none;
}

.contents--mobile > summary::-webkit-details-marker { display: none; }

.contents--mobile > summary::after {
  content: "+";
  float: right;
  color: var(--accent-ink);
  font-weight: 400;
}

.contents--mobile[open] > summary::after { content: "\2013"; }
.contents--mobile ol { padding-bottom: 0.85rem; }

.contents--rail { display: none; }

@media (min-width: 62rem) {
  .layout {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
  }
  .contents--mobile { display: none; }
  .contents--rail {
    display: block;
    position: sticky;
    top: 2rem;
  }
}

/* --------------------------------------------------------------- prose */

.prose { max-width: var(--measure); }

.prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 3rem 0 0.9rem;
  padding-top: 1.1rem;
  position: relative;
  scroll-margin-top: 1.5rem;
}

/* Sage appears as structure, never as a fill. */
.prose h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2rem;
  height: 2px;
  background: var(--accent);
}

.prose > h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin: 2rem 0 0.4rem;
  line-height: 1.35;
  scroll-margin-top: 1.5rem;
}

.prose p { margin: 0 0 1rem; }

.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
}

.prose li { margin-bottom: 0.55rem; }

.prose strong { font-weight: 600; }

.prose a,
.footer a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

.note {
  color: var(--ink2);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1.75rem;
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------ front door */

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.home h2 {
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.7rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}

.home section + section { margin-top: 4.5rem; }

.hero,
.feature {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero__text,
.feature__text { max-width: var(--measure); }

.feature__text p,
.band p { color: var(--ink2); margin: 0; }

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.75rem 0 0;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.button:hover { background: var(--accent-ink); }

/* Before the app is in the App Store: the same shape, nothing to press. */
.button--soon,
.button--soon:hover { background: var(--accent); cursor: default; }

@media (prefers-color-scheme: dark) {
  .button { color: #102014; }
  .button:hover { background: var(--accent-ink); }
}

.cta__note { font-size: 0.9375rem; color: var(--ink3); }

/* Screenshots in a phone-shaped frame. Each image already carries the
   status bar, so the frame is only the rounded edge and a soft shadow. */
.phone {
  margin: 0 auto;
  width: min(100%, 14rem);
  border-radius: 2rem;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1.5rem 3rem -1.5rem rgba(31, 38, 32, 0.35);
}

.phone img { display: block; width: 100%; height: auto; }

.band {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
}

.trio {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  color: var(--ink2);
}

.trio strong { color: var(--ink); font-weight: 600; display: block; }

.split { max-width: none; display: grid; gap: 0 3rem; }
.split > div > h2 { margin-top: 0; }

.closer { text-align: center; }
.closer .cta { justify-content: center; }

.fineprint {
  margin: 2rem auto 0;
  max-width: var(--measure);
  font-size: 0.875rem;
  color: var(--ink3);
}

@media (min-width: 48rem) {
  .hero    { grid-template-columns: 1.35fr 1fr; }
  .feature { grid-template-columns: 1fr 1.35fr; gap: 4rem; }
  .feature--flip .phone { order: 2; }
  .trio    { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .split   { grid-template-columns: 1fr 1fr; }
  .band    { padding: 2.5rem; }
  .phone   { width: min(100%, 17rem); border-radius: 2.25rem; }
}

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

.footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
}

.footer__inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  font-size: 0.9375rem;
  color: var(--ink2);
}

.footer p { margin: 0; }

.footer nav {
  display: flex;
  gap: 1.25rem;
}

/* ----------------------------------------------------------------- misc */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* A family that files this next to the insurance letters should get a
   readable sheet of paper, not a screenshot of a website. */
@media print {
  :root {
    --paper: #fff; --card: #fff; --card2: #fff;
    --ink: #000; --ink2: #222; --ink3: #444;
    --accent-ink: #000; --line: #bbb;
  }
  body { font-size: 11pt; line-height: 1.5; }
  .masthead nav, .contents, .footer nav, .phone, .cta { display: none !important; }
  .prose, .lede, .headline-box { max-width: none; }
  .layout { display: block; }
  .prose h2 { page-break-after: avoid; }
  .prose a { text-decoration: none; color: #000; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
