/* ================================================================
   LENNOX INTAKE — BOTANICAL PAPER
   A warm, light-mode interpretation of the reference intake card.
   ================================================================ */

:root {
  color-scheme: light;
  --canvas: #f1efe7;
  --paper: #fbfaf5;
  --paper-deep: #f5f3eb;
  --ink: #092019;
  --ink-soft: #30463d;
  --muted: #737d75;
  --line: #d9dcd2;
  --line-strong: #aab3a7;
  --sage: #afc4aa;
  --sage-dark: #708b70;
  --sage-wash: #e6ece1;
  --error: #9f463c;
  --mono: "Azeret Mono", monospace;
  --sans: "Manrope", sans-serif;
  --header-height: 82px;
  --card-radius: 34px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.94), transparent 25%),
    radial-gradient(circle at 86% 84%, rgba(175,196,170,.18), transparent 30%),
    var(--canvas);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* Header */
.intake-header {
  position: relative;
  z-index: 10;
  height: var(--header-height);
  padding: 0 clamp(20px,4vw,58px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(9,32,25,.1);
  background: rgba(251,250,245,.76);
  backdrop-filter: blur(18px);
}
.intake-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.intake-brand img { width: 31px; height: 27px; object-fit: contain; }
.intake-brand span { font-size: 25px; font-weight: 650; letter-spacing: -.06em; }
.intake-header-note,
.intake-exit {
  color: #69746c;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.intake-header-note { display: inline-flex; align-items: center; gap: 10px; }
.intake-header-note i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage-dark);
  box-shadow: 0 0 0 5px rgba(112,139,112,.12);
}
.intake-exit {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 13px;
}
.intake-exit span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(9,32,25,.2);
  border-radius: 50%;
  color: var(--ink);
  font-size: 17px;
  transition: transform 180ms ease, background 180ms ease;
}
.intake-exit:hover span { transform: rotate(8deg); background: white; }

/* Page composition */
.intake-main {
  width: min(100% - 48px, 1210px);
  margin-inline: auto;
  padding: clamp(38px,6vw,78px) 0 80px;
  display: grid;
  grid-template-columns: 220px minmax(0,790px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(44px,7vw,104px);
}
.step-rail {
  position: sticky;
  top: 38px;
  height: fit-content;
  padding-top: 28px;
}
.step-rail > p {
  margin: 0 0 26px;
  color: var(--sage-dark);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.step-rail ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(9,32,25,.14);
}
.step-rail li {
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  color: rgba(9,32,25,.36);
  border-bottom: 1px solid rgba(9,32,25,.14);
  transition: color 220ms ease, padding 220ms ease, border-color 220ms ease;
}
.step-rail li span { font-family: var(--mono); font-size: 8px; }
.step-rail li b { font-size: 12px; font-weight: 550; }
.step-rail li.is-active {
  padding-left: 10px;
  color: var(--ink);
  border-left: 2px solid var(--sage-dark);
}
.step-rail li.is-complete { color: #648069; }
.privacy-note {
  margin-top: 24px;
  padding: 17px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  border: 1px solid rgba(9,32,25,.14);
  background: rgba(251,250,245,.52);
}
.privacy-note span { color: var(--sage-dark); font-family: var(--mono); }
.privacy-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

/* The form card */
.intake-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(9,32,25,.12);
  border-radius: var(--card-radius);
  background:
    linear-gradient(145deg, rgba(255,255,255,.72), transparent 42%),
    var(--paper);
  box-shadow:
    0 28px 80px rgba(35,54,44,.11),
    0 2px 4px rgba(35,54,44,.04);
}
.card-mark {
  height: 112px;
  display: grid;
  place-items: center;
}
.card-mark img {
  width: 39px;
  height: 34px;
  object-fit: contain;
  opacity: .9;
}
.intake-progress {
  height: 6px;
  margin: 0 34px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e6df;
}
.intake-progress span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
  transform-origin: left;
  transition: width 480ms cubic-bezier(.2,.75,.2,1);
}
.intake-form { width: 100%; min-width: 0; padding: 38px clamp(34px,7vw,62px) 8px; }
.step-meta {
  margin-bottom: 34px;
  display: flex;
  justify-content: space-between;
  color: #879087;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.form-step { animation: step-in 420ms cubic-bezier(.2,.75,.2,1) both; }
.form-step[hidden] { display: none; }
@keyframes step-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
}
.step-heading { margin-bottom: 34px; }
.step-heading > p {
  margin: 0 0 14px;
  color: var(--sage-dark);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.step-heading h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(46px,5.2vw,68px);
  font-weight: 500;
  letter-spacing: -.066em;
  line-height: .96;
  text-wrap: balance;
}
.step-heading > span {
  display: block;
  max-width: 600px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.choice-list,
.detail-group { margin: 0; padding: 0; border: 0; }
.choice-list { display: grid; gap: 10px; }
.form-alert {
  min-height: 20px;
  margin: 20px 0 0;
  color: var(--error);
  font-size: 11px;
  line-height: 1.5;
}

/* Choice rows */
.choice-card {
  position: relative;
  min-height: 88px;
  display: grid;
  grid-template-columns: 92px minmax(0,1fr) 32px;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.46);
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}
.choice-card:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: white;
  box-shadow: 0 12px 28px rgba(35,54,44,.07);
  transform: translateX(3px);
}
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card > img,
.treatment-thumb { width: 92px; height: 88px; object-fit: cover; }
.choice-card > img {
  border-right: 1px solid var(--line);
  filter: grayscale(.35) saturate(.72) sepia(.06);
}
.choice-card > span:not(.treatment-thumb) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.choice-card b { font-size: 16px; font-weight: 600; letter-spacing: -.025em; }
.choice-card small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.choice-card > i {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid #87958a;
  border-radius: 50%;
}
.choice-card > i::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--sage-dark);
  opacity: 0;
  transform: scale(.4);
  transition: opacity 180ms ease, transform 180ms ease;
}
.choice-card:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.choice-card:has(input:checked),
.choice-card.is-selected {
  color: var(--ink);
  border-color: #80977e;
  background: linear-gradient(90deg, var(--sage-wash), rgba(255,255,255,.72));
}
.choice-card:has(input:checked) > img { filter: grayscale(.05) saturate(.88); }
.choice-card:has(input:checked) > i { border-color: var(--sage-dark); }
.choice-card:has(input:checked) > i::after { opacity: 1; transform: scale(1); }

/* Treatment imagery */
.treatment-card { grid-template-columns: 92px minmax(0,1fr) 32px; }
.treatment-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #eef0e8, #bdc9bd);
}
.treatment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 54%;
  transition: transform 260ms cubic-bezier(.2,.75,.2,1), filter 260ms ease;
}
.treatment-card:hover .treatment-thumb img,
.treatment-card:has(input:checked) .treatment-thumb img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.03);
}
.treatment-thumb-spray img { object-position: 50% 48%; }
.treatment-thumb-bpc img { object-position: 50% 52%; }
.treatment-thumb-cream img { object-position: 50% 46%; }
.treatment-card-plain .treatment-thumb { color: var(--ink); background: var(--sage); }
.treatment-card-plain .treatment-thumb b { font-family: var(--mono); font-size: 24px; }

/* Personal details and contact */
.detail-group + .detail-group { margin-top: 34px; }
.detail-group legend,
.text-field > span,
.birth-grid label > span {
  display: block;
  margin-bottom: 11px;
  color: #59685f;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.segment-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.segment-grid label { position: relative; }
.segment-grid input { position: absolute; opacity: 0; }
.segment-grid span {
  min-height: 68px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.44);
  color: var(--ink-soft);
  cursor: pointer;
  transition: 180ms ease;
}
.segment-grid input:checked + span {
  color: var(--ink);
  border-color: #80977e;
  background: var(--sage-wash);
}
.segment-grid input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.birth-grid { display: grid; grid-template-columns: 1.15fr .8fr 1fr; gap: 10px; }
.birth-grid label > span { margin-bottom: 8px; color: #818981; font-size: 7px; }
select,
.text-field input {
  width: 100%;
  height: 64px;
  padding: 0 18px;
  border: 1px solid #bcc3ba;
  border-radius: 0;
  outline: none;
  color: var(--ink);
  background-color: rgba(255,255,255,.55);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--sage-dark) 50%),
    linear-gradient(135deg, var(--sage-dark) 50%, transparent 50%);
  background-position: calc(100% - 19px) 29px, calc(100% - 14px) 29px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
select:focus,
.text-field input:focus {
  border-color: var(--sage-dark);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(112,139,112,.12);
}
.field-help { margin: 11px 0 0; color: var(--muted); font-size: 10px; }
.field-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px 12px; }
.text-field { display: block; }
.text-field > span small { margin-left: 6px; color: #8b928b; font-size: 7px; }
.field-wide { grid-column: 1 / -1; }
.text-field input { font-size: 16px; }
.text-field input[aria-invalid="true"],
select[aria-invalid="true"] { border-color: #b65c52; }

/* Review */
.review-list { border-top: 1px solid var(--line); }
.review-list article {
  min-height: 82px;
  padding: 18px 0;
  display: grid;
  grid-template-columns: 110px minmax(0,1fr) auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.review-list article > span {
  color: #7b857d;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.review-list article b { font-size: 13px; font-weight: 550; line-height: 1.5; }
.review-list button {
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: #58705e;
  background: transparent;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.review-consent {
  margin-top: 26px;
  padding: 19px;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 13px;
  border: 1px solid var(--line);
  color: #59685f;
  background: rgba(255,255,255,.34);
  font-size: 11px;
  line-height: 1.6;
  cursor: pointer;
}
.review-consent input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--sage-dark);
}
.secure-handoff {
  margin-top: 15px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 13px;
  color: var(--ink);
  background: var(--sage-wash);
}
.secure-handoff > span { font-family: var(--mono); font-size: 18px; }
.secure-handoff b { font-size: 12px; }
.secure-handoff p { margin: 5px 0 0; color: #5c6e62; font-size: 10px; line-height: 1.5; }

/* Actions live inside the card, echoing the reference CTA */
.intake-actions { padding: 0 clamp(34px,7vw,62px) 48px; }
.action-shell {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(240px,1fr);
  gap: 10px;
}
.back-button,
.continue-button {
  min-height: 66px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.back-button {
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.back-button:disabled { opacity: 0; pointer-events: none; }
.continue-button {
  color: var(--ink);
  background: var(--sage);
  border-color: var(--sage);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.continue-button:hover,
.back-button:hover { transform: translateY(-2px); }
.continue-button:hover { color: white; background: var(--ink); border-color: var(--ink); }
.continue-button:disabled {
  color: rgba(9,32,25,.38);
  background: #e5e7e0;
  border-color: #e0e2db;
  cursor: not-allowed;
  transform: none;
}

/* Tablet */
@media (max-width: 980px) {
  .intake-main { width: min(100% - 36px,790px); grid-template-columns: 1fr; }
  .step-rail { display: none; }
}

/* Mobile */
@media (max-width: 620px) {
  :root { --header-height: 66px; --card-radius: 24px; }
  .intake-header { padding-inline: 16px; grid-template-columns: 1fr auto; }
  .intake-brand img { width: 28px; height: 24px; }
  .intake-brand span { font-size: 22px; }
  .intake-header-note { display: none; }
  .intake-exit { font-size: 0; }
  .intake-exit span { width: 34px; height: 34px; font-size: 17px; }
  .intake-main { width: calc(100% - 24px); padding: 18px 0 34px; }
  .card-mark { height: 82px; }
  .card-mark img { width: 33px; height: 29px; }
  .intake-progress { height: 5px; margin-inline: 20px; }
  .intake-form { padding: 30px 21px 5px; }
  .step-meta { margin-bottom: 25px; }
  .step-heading { margin-bottom: 28px; }
  .step-heading > p { margin-bottom: 12px; font-size: 8px; }
  .step-heading h1 { font-size: clamp(39px,11.2vw,50px); line-height: .96; }
  .step-heading > span { margin-top: 15px; font-size: 12px; }
  .choice-list { gap: 8px; }
  .choice-card,
  .treatment-card {
    min-height: 78px;
    grid-template-columns: 76px minmax(0,1fr) 24px;
    gap: 14px;
  }
  .choice-card > img,
  .treatment-thumb { width: 76px; height: 78px; }
  .choice-card b { font-size: 14px; }
  .choice-card small { font-size: 9px; }
  .choice-card > i { width: 18px; height: 18px; }
  .segment-grid { grid-template-columns: 1fr; gap: 8px; }
  .segment-grid span { min-height: 60px; }
  .birth-grid { grid-template-columns: 1fr 1fr; }
  .birth-grid label:last-child { grid-column: 1 / -1; }
  .field-grid { grid-template-columns: 1fr; gap: 17px; }
  .field-wide { grid-column: auto; }
  select,
  .text-field input { height: 60px; font-size: 16px; }
  .review-list article { grid-template-columns: 76px minmax(0,1fr) auto; gap: 10px; }
  .review-list article b { font-size: 12px; }
  .review-consent { padding: 16px; }
  .intake-actions { padding: 0 21px 24px; }
  .action-shell { grid-template-columns: 82px minmax(0,1fr); gap: 8px; }
  .back-button,
  .continue-button { min-height: 60px; padding-inline: 14px; }
  .back-button { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================================================
   READABILITY PASS
   Intake guidance is functional information, so it receives a
   larger, high-contrast type scale on every viewport.
   ================================================================ */

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

.intake-header-note,
.intake-exit {
  color: #4f5f55;
  font-size: 12px;
  line-height: 1.45;
}

.step-rail > p {
  font-size: 12px;
  letter-spacing: .08em;
}
.step-rail li { min-height: 64px; }
.step-rail li span { font-size: 11px; }
.step-rail li b { font-size: 14px; line-height: 1.4; }
.privacy-note p {
  color: #59675e;
  font-size: 14px;
  line-height: 1.6;
}

.intake-progress {
  height: 9px;
  background: #d9ddd4;
}
.intake-progress span { background: #91aa8d; }
.step-meta {
  color: #69756c;
  font-size: 12px;
  line-height: 1.45;
}
.step-heading > p {
  font-size: 12px;
  letter-spacing: .075em;
  line-height: 1.5;
}
.step-heading > span {
  color: #59675e;
  font-size: 17px;
  line-height: 1.6;
}
.form-alert { font-size: 14px; line-height: 1.55; }

.choice-card {
  min-height: 96px;
  grid-template-columns: 100px minmax(0,1fr) 32px;
}
.choice-card > img,
.treatment-thumb {
  width: 100px;
  height: 96px;
}
.choice-card b { font-size: 18px; line-height: 1.35; }
.choice-card small {
  color: #59675e;
  font-size: 14px;
  line-height: 1.5;
}

.detail-group legend,
.text-field > span,
.birth-grid label > span {
  color: #46584e;
  font-size: 13px;
  letter-spacing: .05em;
  line-height: 1.45;
}
.birth-grid label > span {
  color: #657168;
  font-size: 12px;
}
.segment-grid span { font-size: 16px; line-height: 1.45; }
.field-help {
  color: #59675e;
  font-size: 14px;
  line-height: 1.55;
}
.text-field > span small {
  color: #69756c;
  font-size: 12px;
}
select,
.text-field input { font-size: 17px; }

.review-list article > span {
  color: #657168;
  font-size: 12px;
  line-height: 1.45;
}
.review-list article b { font-size: 16px; line-height: 1.5; }
.review-list button {
  font-size: 12px;
  line-height: 1.45;
}
.review-consent {
  color: #46584e;
  font-size: 14px;
  line-height: 1.65;
}
.secure-handoff b { font-size: 15px; line-height: 1.4; }
.secure-handoff p {
  color: #4f6256;
  font-size: 14px;
  line-height: 1.55;
}
.back-button,
.continue-button {
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .intake-progress { height: 8px; }
  .step-meta,
  .step-heading > p { font-size: 11px; }
  .step-heading > span { font-size: 16px; }
  .choice-card,
  .treatment-card {
    min-height: 88px;
    grid-template-columns: 82px minmax(0,1fr) 24px;
  }
  .choice-card > img,
  .treatment-thumb {
    width: 82px;
    height: 88px;
  }
  .choice-card b { font-size: 16px; }
  .choice-card small { font-size: 13px; }
  .detail-group legend,
  .text-field > span { font-size: 12px; }
  .birth-grid label > span { font-size: 11px; }
  .review-list article {
    grid-template-columns: 82px minmax(0,1fr) auto;
  }
  .review-list article > span,
  .review-list button { font-size: 11px; }
  .review-list article b { font-size: 15px; }
  .back-button,
  .continue-button { font-size: 12px; }
}
