/* Palette follows the patient app design playbook (information/design/patient-app). */
:root {
  --brand: #c2410c; /* app primaryDark: buttons, links, white-text fills */
  --brand-deep: #9a3412;
  --brand-accent: #f97316; /* app primary: decoration only, never text */
  --brand-light: #ffedd5;
  --brand-wash: #fff7ed;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --canvas: #f8fafc;
  --surface: #ffffff;
  --line: #e2e8f0;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
  --gutter: clamp(16px, 5vw, 72px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Noto Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand);
}

.skip-link:focus {
  top: 12px;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(14px);
  transition: box-shadow 160ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  color: var(--brand);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 140ms ease, background 140ms ease;
}

.site-nav a:hover {
  color: var(--brand-deep);
  background: var(--brand-wash);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span[aria-hidden],
.nav-toggle span[aria-hidden]::before,
.nav-toggle span[aria-hidden]::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--ink);
  content: "";
  position: relative;
}

.nav-toggle span[aria-hidden]::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span[aria-hidden]::after {
  position: absolute;
  top: 6px;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  color: #fff;
  background: var(--brand);
}

.button.primary:hover {
  background: var(--brand-deep);
}

.button.secondary {
  color: var(--brand-deep);
  background: var(--surface);
  border: 1px solid var(--line);
}

.button.secondary:hover {
  border-color: var(--brand);
}

/* Shared section layout */

.section {
  padding: clamp(64px, 9vw, 112px) var(--gutter);
}

.section.tinted {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head.left {
  margin: 0;
  text-align: left;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom: 16px;
}

.section-head p:not(.eyebrow) {
  color: var(--ink-2);
  font-size: 1.08rem;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(64px, 9vw, 112px);
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 237, 213, 0.9), transparent 45%),
    radial-gradient(circle at 70% 90%, rgba(219, 234, 254, 0.7), transparent 40%);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  margin-bottom: 20px;
}

.hero .lede {
  max-width: 560px;
  color: var(--ink-2);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-points li::before {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23C2410C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  content: "";
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 24px 0;
}

.phone {
  width: min(300px, 78vw);
  padding: 12px;
  border-radius: 44px;
  background: var(--ink);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
}

.phone-screen {
  display: grid;
  gap: 12px;
  padding: 28px 16px 20px;
  border-radius: 34px;
  background: var(--canvas);
  font-size: 0.8rem;
}

.phone-greeting {
  color: var(--ink-2);
}

.phone-title {
  margin-top: -10px;
  font-size: 1.25rem;
  font-weight: 700;
}

.phone-card {
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.phone-card span {
  color: var(--ink-2);
}

.phone-card strong {
  font-size: 1.05rem;
}

.phone-card small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-2);
}

.phone-card.session {
  border: 0;
  color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-deep));
}

.phone-card.session span {
  color: var(--brand-light);
}

.phone-card .tag {
  justify-self: start;
  padding: 2px 8px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.7rem;
}

.phone-card.session .phone-button {
  justify-self: start;
  margin-top: 10px;
  padding: 7px 14px;
  border-radius: 10px;
  color: var(--brand-deep);
  background: #fff;
  font-weight: 600;
}

.phone-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bar {
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--brand-light);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.float-card {
  position: absolute;
  display: grid;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
}

.float-card span {
  color: var(--ink-2);
}

.float-sync {
  top: 4%;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.float-sync .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

.float-review {
  right: 0;
  bottom: 16%;
}

/* Cards */

.card-grid {
  display: grid;
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card h3 {
  margin: 18px 0 8px;
  font-size: 1.2rem;
}

.card p {
  color: var(--ink-2);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon.large {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.icon.large svg {
  width: 32px;
  height: 32px;
}

.icon.brand {
  color: var(--brand);
  background: var(--brand-light);
}

.icon.blue {
  color: var(--blue);
  background: #dbeafe;
}

.icon.green {
  color: #15803d;
  background: #dcfce7;
}

/* How it works loop */

.loop {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  max-width: 1080px;
  margin: 0 auto;
}

.loop-diagram {
  margin: 0;
}

.loop-diagram svg {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.loop-line {
  fill: none;
  stroke: #f97316;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 9;
}

.loop-node {
  fill: #fff;
  stroke: #f97316;
  stroke-width: 3;
}

.loop-num {
  fill: #c2410c;
  font-size: 18px;
  font-weight: 700;
  text-anchor: middle;
}

.loop-core {
  fill: #c2410c;
}

.loop-core-text {
  fill: #fff;
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
}

.loop-steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loop-steps li {
  display: flex;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--canvas);
}

.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}

.loop-steps h3 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.loop-steps p {
  color: var(--ink-2);
}

/* Study */

.arms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.arm {
  padding: 32px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.arm.featured {
  border: 2px solid var(--brand);
  background: var(--brand-wash);
}

.arm-label {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--canvas);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 600;
}

.arm.featured .arm-label {
  color: var(--brand-deep);
  background: var(--brand-light);
  border-color: transparent;
}

.arm h3 {
  margin: 16px 0 8px;
  font-size: 1.5rem;
}

.arm p {
  color: var(--ink-2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 960px;
  margin: 40px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.stats div {
  padding: 24px;
  background: var(--surface);
}

.stats dt {
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 500;
}

.stats dd {
  margin: 4px 0 2px;
  color: var(--brand-deep);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stats p {
  color: var(--ink-3);
  font-size: 0.85rem;
}

.sites {
  max-width: 960px;
  margin: 40px auto 0;
  text-align: center;
}

.sites-label {
  margin-bottom: 16px;
  color: var(--ink-3);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sites ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sites li {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Participants */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  max-width: 1080px;
  margin: 0 auto;
}

.timeline {
  position: relative;
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0 0 0 44px;
  list-style: none;
  counter-reset: step;
}

.timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 15px;
  width: 2px;
  background: var(--brand-light);
  content: "";
}

.timeline li {
  position: relative;
  counter-increment: step;
}

.timeline li::before {
  position: absolute;
  top: -2px;
  left: -44px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--brand-deep);
  background: var(--brand-light);
  border: 3px solid var(--surface);
  font-size: 0.9rem;
  font-weight: 700;
  content: counter(step);
}

.timeline h3 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.timeline p {
  color: var(--ink-2);
}

/* Privacy */

.privacy {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.privacy h2 {
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.privacy p {
  color: var(--ink-2);
}

/* Footer */

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px 48px;
  padding: 36px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
}

.footer-brand {
  display: grid;
}

.footer-brand strong {
  color: var(--ink);
}

.footer-note {
  max-width: 560px;
}

.footer-copy {
  color: var(--ink-3);
}

/* Responsive */

@media (max-width: 960px) {
  .hero,
  .loop,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero .lede {
    margin: 0 auto;
  }

  .hero-actions,
  .hero-points {
    justify-content: center;
  }

  .card-grid.three {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 16px;
    border-radius: 12px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .arms {
    grid-template-columns: 1fr;
  }

  .float-card {
    display: none;
  }

  .privacy {
    flex-direction: column;
    align-items: flex-start;
  }

  .privacy {
    padding: 24px;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }
}

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