/* Revella Health v2 - shared stylesheet, single source of truth for tokens */

:root {
  --ink: #17162B;
  --indigo: #453C8C;
  --indigo-soft: #6F65B8;
  --signal: #C0195F;
  --mist: #F1EEF9;
  --paper: #FCFBFE;
  --muted: #6C6885;
  --line: #E2DEF0;

  /* derived, used only on dark bands and mist fills */
  --on-dark: #C6C1DE;
  --line-dark: #3A3663;
  --line-mist: #D6CFEC;

  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: clamp(24px, 5vw, 64px);
  --shell: 1320px;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
}

h1, h2, h3, p, ul, li { margin: 0; padding: 0; }
li { list-style: none; }
img { display: block; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--indigo); }
::selection { background: var(--mist); }

a:focus-visible,
button:focus-visible {
  outline: 2.5px solid var(--signal);
  outline-offset: 3px;
  border-radius: 3px;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- type ---------- */

.eyebrow {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--indigo);
  margin-bottom: 26px;
}

.label {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 20px;
}

.label-signal { color: var(--signal); }

.h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.016em;
  text-wrap: pretty;
  max-width: 22ch;
}

.h1 em { font-style: normal; color: var(--signal); }

.h1-approach {
  max-width: none;
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  line-height: 1.08;
}

.col-48 { max-width: 48rem; }
.mt-40 { margin-top: 40px; }

.h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.2vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.014em;
  text-wrap: pretty;
}

.h2-lg {
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.014em;
}

.h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.16;
  letter-spacing: -0.012em;
}

.lede {
  margin-top: 30px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.body { color: var(--muted); font-size: 17.5px; }
.body-ink { color: var(--ink); font-size: 17.5px; }

.measure-46 { max-width: 46ch; }
.measure-52 { max-width: 52ch; }
.measure-56 { max-width: 56ch; }
.measure-58 { max-width: 58ch; }
.measure-62 { max-width: 62ch; }
.measure-66 { max-width: 66ch; }
.measure-70 { max-width: 70ch; }
.measure-18 { max-width: 18ch; }
.measure-24 { max-width: 24ch; }
.measure-28 { max-width: 28ch; }
.measure-30 { max-width: 30ch; }
.measure-34 { max-width: 34ch; }
.measure-44 { max-width: 44ch; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  padding: 16px 32px;
  border-radius: 2px;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--indigo); color: var(--paper); }

.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--indigo); color: var(--ink); }

.btn-invert { background: var(--paper); color: var(--ink); padding: 15px 30px; }
.btn-invert:hover { background: var(--mist); color: var(--ink); }

.btn-sm { font-size: 14.5px; padding: 13px 24px; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 251, 254, 0.9);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 36px; width: auto; }

.nav-right { display: flex; align-items: center; gap: clamp(22px, 3vw, 42px); }

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46%);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.hero-copy-cell {
  padding: clamp(64px, 8vw, 128px) clamp(32px, 5vw, 88px) clamp(64px, 8vw, 132px) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy { max-width: 40rem; margin-left: auto; width: 100%; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 42px; }

.hero-panel {
  background: var(--mist);
  border-left: 1px solid var(--line);
  padding: clamp(48px, 6vw, 96px) var(--gutter) clamp(48px, 6vw, 96px) clamp(32px, 4vw, 60px);
  display: flex;
  align-items: center;
}

/* ---------- record card ---------- */

.record {
  background: #FFFFFF;
  border: 1px solid var(--indigo);
  width: 100%;
  max-width: 480px;
}

.record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 22px;
  background: var(--ink);
}

.record-head span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}

.record-head span + span { letter-spacing: 0.12em; color: var(--mist); }

.record-body { padding: 6px 22px 14px; }

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.record-row:last-child { border-bottom: 0; }

.record-key {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.record-val {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

.record-redacted {
  height: 13px;
  flex: 1;
  background: var(--ink);
}

.record-redacted-lg { max-width: 158px; }
.record-redacted-md { max-width: 116px; }
.record-redacted-sm { max-width: 78px; }

.record-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--indigo);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* staggered reveal, once, on first scroll into view */
@keyframes rowIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* rows are only pre-hidden when JS is present to reveal them */
.js .record .record-row { opacity: 0; }
.record.shown .record-row {
  animation: rowIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.record.shown .record-row:nth-child(1) { animation-delay: 0.15s; }
.record.shown .record-row:nth-child(2) { animation-delay: 0.23s; }
.record.shown .record-row:nth-child(3) { animation-delay: 0.31s; }
.record.shown .record-row:nth-child(4) { animation-delay: 0.39s; }
.record.shown .record-row:nth-child(5) { animation-delay: 0.47s; }
.record.shown .record-row:nth-child(6) { animation-delay: 0.55s; }

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

.band-dark { background: var(--ink); color: var(--paper); }
.band-dark .lede { color: var(--on-dark); }
.band-mist { background: var(--mist); }
.ruled { border-bottom: 1px solid var(--line); }

.pad-xl { padding-block: clamp(72px, 9vw, 136px); }
.pad-lg { padding-block: clamp(72px, 9vw, 144px) clamp(48px, 6vw, 96px); }
.pad-md { padding-block: clamp(64px, 8vw, 112px); }
.pad-contact { padding-block: clamp(76px, 9vw, 148px); }
.pad-approach-head { padding-block: clamp(64px, 8vw, 132px) clamp(56px, 7vw, 108px); }

/* numbered rows */

.rows { margin-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--line); }

.row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: clamp(20px, 4vw, 56px);
  padding-block: clamp(36px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.row:last-child { border-bottom: 0; }
.row-wide { grid-template-columns: 5rem minmax(0, 1.1fr) minmax(0, 1.6fr); }

.figure {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1;
  color: var(--indigo-soft);
}

.figure-signal { color: var(--signal); }

/* two column compare */

.cols2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  gap: 0;
  margin-top: clamp(40px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

/* subgrid keeps the heading and all five process rows aligned across both
   columns regardless of how the body copy wraps */
@supports (grid-template-rows: subgrid) {
  .cols2 > * {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    align-content: start;
  }
}

.shell > .cols2:first-child { margin-top: 0; border-top: 0; }

.col-fragmented { padding: clamp(32px, 4vw, 52px) clamp(28px, 3.5vw, 56px) clamp(32px, 4vw, 52px) 0; }

.col-loop {
  background: var(--mist);
  padding: clamp(32px, 4vw, 52px) clamp(28px, 3.5vw, 56px);
}

.col-h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  letter-spacing: -0.012em;
  margin-bottom: 16px;
}

.steplist { display: flex; flex-direction: column; margin-top: 30px; border-top: 1px solid var(--line); }

.steplist li {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.steplist li:last-child { border-bottom: 0; }

.col-loop .steplist,
.col-loop .steplist li { border-color: var(--line-mist); color: var(--ink); }

/* lift */

.lift {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(44px, 5vw, 80px);
}

.lift > * { padding-right: clamp(20px, 3vw, 44px); }

.lift > * + * {
  border-left: 1px solid var(--line);
  padding-left: clamp(20px, 3vw, 44px);
}

.lift h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.lift .label { margin-bottom: 14px; }
.lift .figure { margin-bottom: 14px; }
.lift p { color: var(--muted); font-size: 16.5px; }

/* deadline bar */

.deadline {
  margin-top: clamp(56px, 7vw, 104px);
  padding-top: 40px;
  border-top: 1px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}

.deadline p {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.3;
  max-width: 44ch;
  text-wrap: pretty;
}

/* evidence */

.proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(44px, 7vw, 104px);
  align-items: start;
  padding-block: clamp(72px, 9vw, 128px);
}

.proof-list { border-top: 1px solid var(--ink); }

.proof-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-mist);
}

.proof-item span:first-child { font-family: var(--mono); font-size: 13.5px; color: var(--ink); }

.proof-item span:last-child {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo);
  white-space: nowrap;
}

/* contact */

.contact-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(48px, 6vw, 88px);
  border-top: 1px solid var(--line-dark);
}

.contact-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.contact-col:first-child {
  padding: clamp(32px, 4vw, 52px) clamp(28px, 4vw, 60px) clamp(32px, 4vw, 52px) 0;
  border-right: 1px solid var(--line-dark);
}

.contact-col:last-child { padding: clamp(32px, 4vw, 52px) 0 clamp(32px, 4vw, 52px) clamp(28px, 4vw, 60px); }

.contact-col h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.012em;
  color: var(--paper);
}

.contact-col p { color: var(--on-dark); font-size: 17px; max-width: 44ch; }
.contact-col .btn { margin-top: auto; }

/* footer */

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

.foot-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 52px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  align-items: center;
  justify-content: space-between;
}

.foot-inner img { height: 32px; width: auto; }

.foot-links { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: center; }
.foot-links a { font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.foot-links a:hover { color: var(--ink); }

.foot-legal {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* stop rows, approach page */

.stops { margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); }

.stop {
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  gap: clamp(16px, 3vw, 56px);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.stop-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.stop p { color: var(--muted); font-size: 17px; max-width: 66ch; }

.stop-us {
  padding: 36px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.stop-us .stop-name { font-size: 24px; letter-spacing: -0.012em; color: var(--signal); }
.stop-us p { color: var(--ink); font-size: 18px; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { margin-left: 0; max-width: 44rem; }
  .hero-panel { padding-left: var(--gutter); padding-bottom: 56px; }
}

@media (max-width: 900px) {
  .proof, .cols2, .row, .stop, .lift, .contact-cols { grid-template-columns: minmax(0, 1fr); }

  .row { gap: 14px; padding-block: 40px; }
  .stop { gap: 6px; }
  .figure { font-size: 34px; }

  .lift > * { border-left: 0; padding-left: 0; padding-right: 0; }
  .lift > * + * {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 32px;
    margin-top: 32px;
  }

  .col-fragmented { padding-right: 0; }

  .contact-col:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
    padding-right: 0;
  }
  .contact-col:last-child { padding-left: 0; }
}

@media (max-width: 760px) {
  .nav-link { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .record .record-row { opacity: 1; }
}
