@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin-variable.woff2") format("woff2");
}

/* Palette follows the mobile app's tokens in
   CareSyncReady/02_App/mobile/src/lib/theme.ts — ink, deep CareSync red, and
   white reading surfaces. The app ships light-only, so the dark scheme is a
   derived counterpart holding the same black/red/white relationship. */

:root {
  color-scheme: light dark;
  --page: #f7f7f6;
  --surface: #ffffff;
  --ink: #191617;
  --muted: #625c5e;
  --line: #e2dedf;
  --accent: #b4233c;
  --accent-hover: #8e1c30;
  --accent-ink: #ffffff;
  --danger: #941f32;
  --header: rgba(247, 247, 246, 0.82);
  --shadow: rgba(25, 22, 23, 0.14);
  --radius: 10px;
  --content: 1220px;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #121011;
    --surface: #1b1819;
    --ink: #f4f2f2;
    --muted: #a49da0;
    --line: rgba(244, 242, 242, 0.14);
    --accent: #e8536b;
    --accent-hover: #f27183;
    --accent-ink: #1a0d11;
    --danger: #f0808f;
    --header: rgba(18, 16, 17, 0.82);
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --page: #f7f7f6;
  --surface: #ffffff;
  --ink: #191617;
  --muted: #625c5e;
  --line: #e2dedf;
  --accent: #b4233c;
  --accent-hover: #8e1c30;
  --accent-ink: #ffffff;
  --danger: #941f32;
  --header: rgba(247, 247, 246, 0.82);
  --shadow: rgba(25, 22, 23, 0.14);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #121011;
  --surface: #1b1819;
  --ink: #f4f2f2;
  --muted: #a49da0;
  --line: rgba(244, 242, 242, 0.14);
  --accent: #e8536b;
  --accent-hover: #f27183;
  --accent-ink: #1a0d11;
  --danger: #f0808f;
  --header: rgba(18, 16, 17, 0.82);
  --shadow: rgba(0, 0, 0, 0.5);
}

html {
  background: var(--page);
  color: var(--ink);
  scroll-padding-top: 96px;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a,
button,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 62%, transparent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--page);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img,
.footer-brand img {
  border-radius: 7px;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 34px);
  font-size: 14px;
  font-weight: 560;
}

.site-header nav > a:not(.button) {
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms var(--ease);
}

.site-header nav > a:not(.button):hover {
  color: var(--ink);
}

/* ------------------------------------------------------------------ *
 * Controls
 * ------------------------------------------------------------------ */

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  box-shadow: 0 10px 24px -16px var(--shadow);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 660;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(0.985);
}

.button-small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 13.5px;
}

.text-link {
  color: var(--ink);
  font-size: 15px;
  font-weight: 620;
  text-decoration-color: var(--line);
  text-underline-offset: 6px;
  transition: text-decoration-color 160ms var(--ease);
}

.text-link:hover {
  text-decoration-color: var(--accent);
}

.actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 38px;
}

/* ------------------------------------------------------------------ *
 * Shared rhythm
 * ------------------------------------------------------------------ */

.hero,
.statement,
.steps,
.principles,
.waitlist {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

figure {
  margin: 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 60px -40px var(--shadow);
}

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

.hero {
  display: grid;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  padding-block: clamp(56px, 9vh, 108px) clamp(72px, 11vh, 132px);
}

.hero h1 {
  max-width: 13ch;
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero-copy > p {
  max-width: 44ch;
  margin-top: 26px;
  color: var(--muted);
  font-size: clamp(17px, 1.3vw, 19px);
  letter-spacing: -0.012em;
}

/* The page uses one photograph once. A loose crop keeps the domestic context
   visible instead of turning the people into a polished campaign portrait. */
.hero-media img {
  aspect-ratio: 5 / 4;
  object-position: 62% 50%;
}

/* ------------------------------------------------------------------ *
 * Statement
 * ------------------------------------------------------------------ */

.statement {
  padding-block: clamp(72px, 11vw, 150px);
  border-top: 1px solid var(--line);
}

.statement p {
  max-width: 20ch;
  font-size: clamp(34px, 5.4vw, 68px);
  font-weight: 520;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

/* ------------------------------------------------------------------ *
 * Steps
 * ------------------------------------------------------------------ */

.steps {
  display: grid;
  gap: 0;
  padding-bottom: clamp(80px, 12vw, 160px);
}

.step {
  padding-block: clamp(40px, 5vw, 68px);
  border-top: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 1px solid var(--line);
}

.step-copy {
  display: grid;
  grid-template-areas:
    "index heading"
    ". body";
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  column-gap: clamp(32px, 6vw, 96px);
}

.step-index {
  grid-area: index;
  align-self: start;
  margin-top: 8px;
  color: var(--accent);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.02em;
}

.step h2 {
  grid-area: heading;
  max-width: 15ch;
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 550;
  letter-spacing: -0.038em;
  line-height: 1.08;
}

.step-copy > p:last-child {
  grid-area: body;
  max-width: 42ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 17px;
}

/* ------------------------------------------------------------------ *
 * Principles
 * ------------------------------------------------------------------ */

.principles {
  padding-block: clamp(76px, 11vw, 148px);
  border-top: 1px solid var(--line);
}

.principles-head h2 {
  max-width: 18ch;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 550;
  letter-spacing: -0.038em;
  line-height: 1.08;
}

.principles-head > p {
  max-width: 52ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 17px;
}

.principle-list {
  display: grid;
  margin-top: clamp(44px, 6vw, 76px);
  gap: 0;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  padding: 0;
}

.principle-list li {
  padding: 30px clamp(20px, 2.6vw, 38px) 4px 0;
  border-top: 1px solid var(--line);
}

.principle-list span {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.principle-list p {
  max-width: 30ch;
  font-size: 17px;
  letter-spacing: -0.015em;
}

/* ------------------------------------------------------------------ *
 * Waitlist
 * ------------------------------------------------------------------ */

.waitlist {
  display: grid;
  align-items: start;
  gap: clamp(44px, 7vw, 120px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  padding-block: clamp(76px, 11vw, 140px);
  border-top: 1px solid var(--line);
}

.waitlist-copy h2 {
  max-width: 13ch;
  font-size: clamp(32px, 4.2vw, 54px);
  font-weight: 545;
  letter-spacing: -0.042em;
  line-height: 1.05;
}

.waitlist-copy > p {
  max-width: 44ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 17px;
}

.waitlist-form {
  padding: clamp(26px, 3.2vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.form-field + .form-field {
  margin-top: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 620;
}

.form-field label span {
  color: var(--muted);
  font-weight: 440;
}

.form-field input,
.form-field select {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
  outline: 0;
  transition:
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.form-field input:hover,
.form-field select:hover {
  border-color: color-mix(in srgb, var(--ink) 30%, transparent);
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.form-field [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent);
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.submit-button {
  width: 100%;
  margin-top: 26px;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.form-note,
.form-status {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.form-status {
  min-height: 1.45em;
  color: var(--accent);
  font-weight: 600;
}

.form-status.is-error {
  color: var(--danger);
}

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

.site-footer {
  display: flex;
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: 34px var(--gutter) 52px;
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------------------------------------------ *
 * Reveal
 *
 * One quiet fade-and-rise as a block enters. Deliberately understated: it
 * should make the page feel considered, never become the point.
 * ------------------------------------------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 620ms var(--ease),
    transform 620ms var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Without JavaScript everything must still be visible. */
html:not(.is-ready) [data-reveal] {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 940px) {
  html {
    scroll-padding-top: 76px;
  }

  .site-header {
    height: 64px;
  }

  .site-header nav {
    gap: 0;
  }

  .site-header nav > a:not(.button) {
    display: none;
  }

  .hero,
  .waitlist {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 36px;
    padding-block: 40px 64px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(36px, 9.6vw, 52px);
  }

  .actions {
    margin-top: 28px;
    gap: 20px;
  }

  .step-copy {
    grid-template-areas:
      "index"
      "heading"
      "body";
    grid-template-columns: 1fr;
  }

  .step-index {
    margin-top: 0;
  }

  .step h2 {
    max-width: none;
    margin-top: 14px;
    font-size: clamp(27px, 7vw, 38px);
  }

  .statement p {
    max-width: none;
    font-size: clamp(30px, 8.4vw, 46px);
  }

  .principle-list {
    grid-template-columns: 1fr;
  }

  .principle-list li {
    padding: 24px 0 0;
  }

  .principle-list p {
    max-width: none;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 460px) {
  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .actions .button {
    width: 100%;
  }

  .actions .text-link {
    text-align: center;
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
