/* Check On You — marketing site
   Warm paper aesthetic. Zero third-party requests: no font CDN, no analytics,
   no trackers. The site keeps the promise the product makes. */

:root {
  --coral: #ed785c;
  --coral-deep: #c9553a;
  --purple: #8f70b8;
  --teal: #4ca89e;
  --amber: #e89e47;

  --paper: #fdf7f1;
  --paper-sunk: #f5e9de;
  --surface: #fffcf9;
  --ink: #2b2522;
  --ink-soft: #6d6058;
  --rule: #e6d7c8;

  --radius-sm: 0.6rem;
  --radius: 1.1rem;
  --radius-lg: 1.8rem;

  --shadow-card: 0 1px 2px rgba(80, 52, 38, 0.05), 0 12px 32px -12px rgba(80, 52, 38, 0.16);
  --shadow-phone: 0 2px 4px rgba(80, 52, 38, 0.06), 0 30px 60px -24px rgba(80, 52, 38, 0.32);

  --display: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Quicksand", "Avenir Next", Avenir, "Segoe UI", sans-serif;

  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1614;
    --paper-sunk: #221c19;
    --surface: #241e1b;
    --ink: #f4e9e0;
    --ink-soft: #b3a297;
    --rule: #3b312c;
    --coral: #f29075;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-phone: 0 2px 4px rgba(0, 0, 0, 0.4), 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(52rem 34rem at 12% -8%, rgba(237, 120, 92, 0.16), transparent 65%),
    radial-gradient(44rem 30rem at 92% 6%, rgba(143, 112, 184, 0.13), transparent 62%),
    radial-gradient(38rem 28rem at 50% 108%, rgba(76, 168, 158, 0.1), transparent 60%);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain. An inline SVG so nothing is fetched from anywhere. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  body::before {
    mix-blend-mode: screen;
    opacity: 0.18;
  }
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, 66rem);
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 2.5rem, 44rem);
}

/* The phone rail needs more room than the reading columns. */
.wrap--wide {
  width: min(100% - 2.5rem, 76rem);
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.03;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.005em;
}

p {
  margin: 0 0 1.1em;
  max-width: var(--measure);
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--coral);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 36rem;
}

/* ---------- Header ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 0 0;
}

.masthead {
  flex-wrap: wrap;
}

.wordmark {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark .wave {
  font-size: 1.2rem;
  display: inline-block;
  transform-origin: 70% 80%;
}

.wordmark:hover .wave {
  animation: wave 1.1s ease-in-out;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(16deg); }
  50% { transform: rotate(-8deg); }
  75% { transform: rotate(12deg); }
}

.masthead nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.95rem;
}

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

/* ---------- Hero ---------- */

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2rem, 5vw, 4rem);
}

.hero h1 em {
  font-style: italic;
  color: var(--coral);
}

.hero .lede {
  margin-top: 1.6rem;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
}

.hero-note {
  font-size: 0.95rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0 0;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(76, 168, 158, 0.18);
  flex: none;
}

/* ---------- Welcome screens ---------- */

.screens {
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(3rem, 8vw, 5rem);
}

.screen-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.9rem);
  margin-top: 2.8rem;
  align-items: start;
}

@media (max-width: 62rem) {
  .screen-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem 1.2rem;
  }
}

@media (max-width: 30rem) {
  .screen-rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.6rem;
  }

  /* One phone per row would otherwise be as wide as the screen and twice as
     tall as the caption beside it. */
  .screen {
    max-width: 21rem;
    margin-inline: auto;
  }

  .masthead nav {
    gap: 1.1rem;
    font-size: 0.9rem;
  }
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.screen figcaption {
  padding-inline: 0.2rem;
}

.screen figcaption h3 {
  font-size: 1.08rem;
  margin-top: 0.15rem;
}

.screen figcaption p {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: none;
}

.step {
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--coral);
}

/* The phone */

.phone {
  width: 100%;
  max-width: 16.5rem;
  margin-inline: auto;
  aspect-ratio: 9 / 17.5;
  border-radius: 1.9rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  box-shadow: var(--shadow-phone);
  padding: 1.5rem 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.screen:nth-child(odd) .phone { transform: rotate(-1.4deg); }
.screen:nth-child(even) .phone { transform: rotate(1.4deg); }
.screen:hover .phone { transform: rotate(0deg) translateY(-6px); }

.notch {
  width: 32%;
  height: 0.32rem;
  border-radius: 999px;
  background: var(--rule);
  margin: -0.7rem auto 0.4rem;
}

/* Little UI pieces inside the phones */

.row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--paper-sunk);
}

.avatar {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex: none;
  color: #fff;
  background: var(--coral);
}

.avatar.muted { background: var(--ink-soft); }
.avatar.b { background: var(--purple); }
.avatar.c { background: var(--teal); }
.avatar.d { background: var(--amber); }

.line {
  height: 0.4rem;
  border-radius: 999px;
  background: var(--rule);
}

/* Mock UI text must never wrap — a wrapped label reads as a layout bug
   rather than as a screenshot of the app. */
.name,
.meta,
.toggle > span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.name {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.meta {
  font-size: 0.58rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pill {
  margin-left: auto;
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  flex: none;
}

.pill.ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
}

.bubble {
  font-size: 0.66rem;
  line-height: 1.4;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--coral);
  color: #fff;
  max-width: 88%;
  align-self: flex-end;
  border-bottom-right-radius: 0.25rem;
}

.bubble.them {
  background: var(--paper-sunk);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-right-radius: var(--radius-sm);
  border-bottom-left-radius: 0.25rem;
}

.banner {
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.6rem;
  background: var(--coral);
  color: #fff;
  font-size: 0.63rem;
  line-height: 1.45;
  box-shadow: 0 8px 18px -8px rgba(201, 85, 58, 0.8);
}

.banner strong {
  display: block;
  font-size: 0.7rem;
}

/* A map drawn in CSS: a river, a couple of roads, a park, and the pin.
   Enough shape to read as a map at thumbnail size without shipping an image. */
.map {
  flex: 1;
  border-radius: var(--radius-sm);
  background:
    radial-gradient(0.62rem 0.62rem at 52% 44%, var(--coral) 46%, transparent 48%),
    linear-gradient(72deg, transparent 46%, rgba(76, 168, 158, 0.35) 46%, rgba(76, 168, 158, 0.35) 53%, transparent 53%),
    linear-gradient(-28deg, transparent 63%, rgba(120, 100, 88, 0.16) 63%, rgba(120, 100, 88, 0.16) 68%, transparent 68%),
    radial-gradient(2.2rem 1.6rem at 18% 78%, rgba(76, 168, 158, 0.28) 60%, transparent 62%),
    repeating-linear-gradient(0deg, rgba(120, 100, 88, 0.14) 0 1.5px, transparent 1.5px 24%),
    repeating-linear-gradient(90deg, rgba(120, 100, 88, 0.14) 0 1.5px, transparent 1.5px 28%);
  background-color: var(--paper-sunk);
  min-height: 4.5rem;
  position: relative;
}

.map::after {
  content: "";
  position: absolute;
  left: 52%;
  top: 44%;
  width: 2.6rem;
  height: 2.6rem;
  margin: -1.3rem 0 0 -1.3rem;
  border-radius: 50%;
  border: 1px solid var(--coral);
  opacity: 0.5;
}

.spacer { flex: 1; }

.toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.64rem;
  padding: 0.42rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--paper-sunk);
}

.switch {
  margin-left: auto;
  width: 1.7rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--teal);
  position: relative;
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 0.13rem;
  right: 0.13rem;
  width: 0.74rem;
  height: 0.74rem;
  border-radius: 50%;
  background: #fff;
}

.switch.off { background: var(--rule); }
.switch.off::after { right: auto; left: 0.13rem; }

/* ---------- Prose sections ---------- */

.band {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  border-top: 1px solid var(--rule);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 52rem) {
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

.promise-intro {
  margin-top: 1.6rem;
  color: var(--ink-soft);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem;
  margin-top: 2.4rem;
}

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

.card p {
  margin: 0.5rem 0 0;
  font-size: 0.97rem;
  color: var(--ink-soft);
  max-width: none;
}

.card .glyph {
  font-size: 1.35rem;
  display: block;
  margin-bottom: 0.7rem;
}

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

.quiet-list li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.quiet-list li::before {
  content: "✓";
  color: var(--teal);
  font-weight: 700;
}

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3.5rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.6rem;
  align-items: baseline;
  justify-content: space-between;
}

.foot nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

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

.policy {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem;
}

.policy h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  margin: 2.8rem 0 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

.policy h3 {
  margin: 1.8rem 0 0.5rem;
}

.policy p,
.policy li {
  max-width: 40rem;
}

.policy ul {
  padding-left: 1.15rem;
  margin: 0 0 1.1em;
}

.policy li {
  margin-bottom: 0.5rem;
}

.policy .stamp {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.8rem;
}

.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--coral);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.3rem 1.5rem;
  margin: 1.8rem 0 2rem;
  box-shadow: var(--shadow-card);
}

.callout ul {
  margin-bottom: 0;
}

.callout-title {
  margin-top: 0;
}

.more {
  margin-top: 2rem;
}

.toc {
  font-size: 0.95rem;
}

.toc ol {
  columns: 2;
  column-gap: 2.5rem;
  padding-left: 1.1rem;
  margin: 0.6rem 0 0;
}

@media (max-width: 40rem) {
  .toc ol { columns: 1; }
}

.toc li {
  margin-bottom: 0.35rem;
  break-inside: avoid;
}

.back {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink-soft);
}

/* ---------- Motion ---------- */

.reveal {
  animation: rise 0.75s cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

.reveal:nth-child(2) { animation-delay: 0.07s; }
.reveal:nth-child(3) { animation-delay: 0.14s; }
.reveal:nth-child(4) { animation-delay: 0.21s; }
.reveal:nth-child(5) { animation-delay: 0.28s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .screen:hover .phone { transform: none; }
}

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