/* ════════════════════════════════════════════════════════════════════
   OnDemand Psych — homepage

   Follows the design language of the reference the client chose
   (rapidshealth.com): warm off-white page, large rounded panels inset
   from the page edge, light large headings in Host Grotesk, pill
   buttons with an arrow, white icon cards, and organic accent shapes.

   The brand is OnDemand's own, mapped onto the reference's roles:
     reference forest green  →  deep navy      (panels)
     reference burnt orange  →  amber          (primary buttons)
     reference lime          →  sky blue       (shapes, soft panels)
   Sky and cyan come from the OnDemand logo's own gradient.
   ════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f6f1ec;
  --white: #ffffff;
  --navy: #0e2150;
  --navy-2: #1a3470;
  --ink: #0b1633;
  --text: #2a3349;
  --muted: #535e75;
  --line: #e7dfd6;
  --cyan: #00c6fb;
  --sky: #a8e3f7;
  --sky-soft: #dcf1f9;
  --amber: #fdb02f;
  --amber-hover: #f09d10;
  --check: #0b76a8;
  --focus: #2346c8;

  --font: "Host Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 14px;
  --pill: 100px;

  --container: 1300px;
  --gutter: clamp(16px, 3vw, 35px);
  --section: clamp(64px, 8vw, 104px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
figure { margin: 0; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.15em; height: 1.15em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.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 {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Focus colour follows the surface: dark ring on light, light ring on navy. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.hero-panel, .need, .plan-featured, .closing-panel, .footer-panel { --focus: #8fe0ff; }

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 24px; border-radius: var(--pill);
  border: 1.5px solid transparent;
  font: 500 1.0625rem/1.2 var(--font); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn .icon { width: 20px; height: 20px; transition: transform .15s ease; }
.btn:hover .icon { transform: translateX(3px); }
.btn-sm { min-height: 42px; padding: 9px 18px; font-size: .9375rem; }
.btn-amber { background: var(--amber); color: var(--navy); }
.btn-amber:hover { background: var(--amber-hover); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-2); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ── Header: a floating white bar, as in the reference ─────────────── */

.site-header { position: sticky; top: 0; z-index: 100; }
.header-bar {
  position: relative;
  display: flex; align-items: center; gap: 32px;
  min-height: 72px; padding: 0 28px;
  background: var(--white);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 6px 24px rgba(14, 33, 80, 0.07);
}
.brand img { height: 46px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9875rem; }
.nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; }
.nav .nav-cta { display: none; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.login { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.login .icon { width: 26px; height: 26px; stroke-width: 1.5; }
.login:hover span { text-decoration: underline; text-underline-offset: 5px; }

.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.menu-toggle .icon { width: 28px; height: 28px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1080px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 24px 22px;
    background: var(--white); border-radius: var(--r-lg);
    box-shadow: 0 18px 40px rgba(14, 33, 80, 0.14);
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
}
@media (max-width: 640px) {
  .header-bar { padding: 0 14px 0 18px; gap: 12px; min-height: 64px; }
  .brand img { height: 40px; }
  .header-cta { display: none; }
  .header-actions { gap: 6px; }
  .nav .nav-cta { display: flex; margin-top: 18px; }
}

/* ── Hero ──────────────────────────────────────────────────────────── */

.hero { padding-top: 28px; }
.hero-stage { position: relative; padding-block: 48px; }

.hero-panel {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--white);
  border-radius: var(--r-xl);
  min-height: 520px;
  padding: 76px 64px;
  /* The right column is left empty: the photo sits over it. At 50% of the
     content box it always ends short of the photo's left edge (48.5% of
     the panel), so the copy can never run under the photo. */
  display: grid; grid-template-columns: minmax(0, 1fr) 50%; align-items: center;
}
.hero-copy { position: relative; z-index: 1; max-width: 580px; }
.hero h1 {
  color: var(--white);
  font-size: clamp(1.875rem, 1.3rem + 1.7vw, 2.75rem);
  line-height: 1.14; font-weight: 400; letter-spacing: -0.012em;
}
.hero-copy > p { margin-top: 24px; font-size: 1.0625rem; line-height: 1.65; color: rgba(255, 255, 255, 0.88); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 34px; }
.link-light { color: var(--white); font-weight: 500; text-underline-offset: 5px; text-decoration-color: rgba(255, 255, 255, 0.5); }
.link-light:hover { text-decoration-color: var(--white); }
.hero-ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; font-size: .9375rem; color: rgba(255, 255, 255, 0.88); }
.hero-ticks li { display: inline-flex; align-items: center; gap: 8px; }
.hero-ticks .icon { width: 18px; height: 18px; color: var(--cyan); stroke-width: 2.4; }

.hero-shape { position: absolute; top: 0; right: 0; height: 100%; width: 17%; fill: var(--sky); }

.hero-photo {
  position: absolute; top: 0; bottom: 0; right: 8.5%;
  width: 40%; max-width: 540px;
  border-radius: 26px; overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(14, 33, 80, 0.45);
}
.hero-photo picture, .hero-photo img { width: 100%; height: 100%; }
.hero-photo img { object-fit: cover; object-position: 50% 40%; }

@media (max-width: 1100px) {
  .hero-panel { padding: 64px 48px; }
}
@media (max-width: 900px) {
  .hero-stage { padding-block: 0; }
  .hero-panel { display: block; min-height: 0; padding: 48px 28px 190px; }
  .hero-copy { max-width: none; }
  /* Only as tall as the panel's bottom padding, so it never sits behind text. */
  .hero-shape { top: auto; bottom: 0; height: 190px; width: 40%; }
  .hero-photo {
    position: relative; top: auto; bottom: auto; right: auto;
    width: calc(100% - 48px); max-width: 520px; margin: -150px auto 0;
    aspect-ratio: 5 / 5.4;
  }
}
@media (max-width: 480px) {
  .hero-panel { padding: 40px 22px 170px; }
  .hero-actions .btn { width: 100%; }
}

/* ── Sections ─────────────────────────────────────────────────────── */

.section { padding-top: var(--section); }
.section-tight { padding-top: clamp(40px, 5vw, 64px); }
.section-last { padding-bottom: clamp(40px, 5vw, 64px); }

.section-title {
  max-width: 760px; margin: 0 auto clamp(32px, 4vw, 52px);
  text-align: center;
  font-size: clamp(1.875rem, 1.3rem + 1.9vw, 2.625rem);
  line-height: 1.2; font-weight: 300; letter-spacing: -0.01em;
}
.section-intro { text-align: center; margin-bottom: clamp(32px, 4vw, 52px); }
.section-intro .section-title { margin-bottom: 14px; }
.section-intro > p { font-size: 1.125rem; color: var(--muted); }
.center-action { text-align: center; margin-top: 36px; }

.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 11px;
  background: var(--navy); color: var(--sky);
}
.icon-tile .icon { width: 24px; height: 24px; }

/* ── Recognition strip ────────────────────────────────────────────── */

.press-strip {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
  background: var(--white); border-radius: var(--r-lg);
  padding: 22px 28px;
}
.press-strip li { display: flex; align-items: center; gap: 14px; }
.press-strip img { height: 76px; width: auto; border-radius: 4px; box-shadow: 0 4px 12px rgba(14, 33, 80, 0.16); flex-shrink: 0; }
.press-strip strong { display: block; color: var(--ink); font-size: .9375rem; font-weight: 600; line-height: 1.3; }
.press-strip span { display: block; margin-top: 4px; color: var(--muted); font-size: .8125rem; line-height: 1.4; }

@media (max-width: 1080px) { .press-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .press-strip { grid-template-columns: 1fr; gap: 18px; padding: 20px; } }

/* ── White icon cards ─────────────────────────────────────────────── */

.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { background: var(--white); border-radius: var(--r-lg); padding: 30px 30px 38px; }
.card h3 { margin-top: 56px; font-size: 1.5rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.005em; }
.card p { margin-top: 18px; color: var(--text); }

@media (max-width: 900px) {
  .cards-3 { grid-template-columns: 1fr; }
  .card h3 { margin-top: 36px; }
}

/* Six-item grid: same cards, shorter gap above the title. */
.cards-6 .card h3 { margin-top: 32px; font-size: 1.375rem; }
.cards-6 .card p { margin-top: 12px; }
@media (min-width: 621px) and (max-width: 900px) { .cards-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .cards-6 .card h3 { margin-top: 24px; } }

/* ── Founder ──────────────────────────────────────────────────────── */

.founder-panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  background: var(--sky-soft); border-radius: var(--r-xl);
  min-height: 540px;
}
.founder-copy { position: relative; z-index: 1; padding: clamp(36px, 5vw, 68px); align-self: center; }
.founder-lead { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem); line-height: 1.45; color: var(--ink); }
.founder-copy .tick-list { margin: 28px 0 34px; }

.founder-media { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 420px; }
.founder-shape { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--sky); }
.founder-media picture { position: relative; width: min(390px, 82%); margin-top: 44px; }
.name-badge { position: absolute; left: 6%; bottom: 40px; display: flex; flex-direction: column; align-items: flex-start; }
.name-badge span { padding: 7px 14px; text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; }
.name-badge-name { background: var(--navy); color: var(--white); font-size: 1.125rem; font-weight: 600; }
.name-badge-role { background: var(--amber); color: var(--navy); font-size: .8125rem; font-weight: 600; }

@media (max-width: 900px) {
  .founder-panel { grid-template-columns: 1fr; }
  .founder-media { min-height: 380px; }
  .name-badge { bottom: 24px; }
}

/* ── Tick lists ───────────────────────────────────────────────────── */

.tick-list { list-style: none; display: grid; gap: 12px; }
.tick-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; line-height: 1.5; }
.tick-list .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--check); stroke-width: 2.2; }
.tick-list strong { font-weight: 600; }

/* ── Needs: navy panels with a preview of an answer ───────────────── */

.needs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.need {
  display: flex; flex-direction: column;
  background: var(--navy); color: var(--white);
  border-radius: var(--r-xl); padding: 26px 28px 34px;
}
.need-label { display: flex; align-items: center; gap: 12px; font-size: .875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.need-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--sky); color: var(--navy); }
.need-icon .icon { width: 22px; height: 22px; }

.preview {
  display: flex; flex-direction: column; gap: 12px;
  margin: 22px 0 30px; padding: 18px 18px 20px;
  background: var(--white); color: var(--ink);
  border-radius: var(--r-md);
  font-size: .875rem; line-height: 1.5;
}
.preview-q {
  align-self: flex-end; max-width: 88%;
  padding: 10px 14px; border-radius: 14px 14px 4px 14px;
  background: #e9eef8; color: var(--ink);
}
.preview-a p { font-weight: 600; }
.preview-a ul { margin-top: 6px; padding-left: 18px; }
.preview-a li { margin: 3px 0; }
.preview-a li::marker { color: var(--check); }

.need h3 { color: var(--white); font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem); line-height: 1.25; font-weight: 500; }
.need > p:not(.need-label) { margin-top: 12px; margin-bottom: 28px; color: rgba(255, 255, 255, 0.85); }
.need > .btn { margin-top: auto; align-self: flex-start; }

@media (max-width: 900px) { .needs { grid-template-columns: 1fr; } }

/* ── Guides ───────────────────────────────────────────────────────── */

.guides { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.guide { display: flex; flex-direction: column; background: var(--sky-soft); border-radius: var(--r-lg); padding: 28px 28px 30px; }
.guide h3 { margin-top: 28px; font-size: 1.25rem; line-height: 1.3; font-weight: 600; }
.guide p { margin-top: 8px; margin-bottom: 20px; color: var(--text); }
.text-link {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  color: var(--navy); font-weight: 600; text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link .icon { width: 18px; height: 18px; }

@media (max-width: 1000px) { .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .guides { grid-template-columns: 1fr; } }

/* ── Pricing ──────────────────────────────────────────────────────── */

.billing {
  display: inline-flex; margin-top: 24px; padding: 5px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--pill);
}
.billing button {
  min-height: 44px; padding: 10px 20px; border: 0; border-radius: var(--pill);
  background: transparent; color: var(--muted);
  font: 500 .9375rem/1 var(--font); cursor: pointer;
}
.billing button[aria-pressed="true"] { background: var(--navy); color: var(--white); }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--white); border-radius: 26px; padding: 34px 30px 36px; }
.plan h3 { font-size: 1.625rem; font-weight: 600; }
.plan-for { margin-top: 6px; min-height: 3.2em; color: var(--muted); }
.price { margin-top: 18px; display: flex; align-items: baseline; gap: 6px; }
.price span { font-size: 3rem; line-height: 1; font-weight: 400; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: 1rem; color: var(--muted); }
.price-note { margin-top: 8px; font-size: .875rem; color: var(--muted); }
.plan > .btn { margin-top: 24px; width: 100%; }
.plan .tick-list { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .9375rem; }

.plan-featured { background: var(--navy); color: rgba(255, 255, 255, 0.9); --check: var(--cyan); }
.plan-featured h3, .plan-featured .price span { color: var(--white); }
.plan-featured .plan-for, .plan-featured .price small, .plan-featured .price-note { color: rgba(255, 255, 255, 0.75); }
.plan-featured .tick-list { border-top-color: rgba(255, 255, 255, 0.18); }
.plan-flag {
  position: absolute; top: -14px; left: 30px;
  padding: 5px 14px; border-radius: var(--pill);
  background: var(--amber); color: var(--navy);
  font-size: .8125rem; font-weight: 600;
}

.org-band {
  margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: var(--white); border-radius: 26px; padding: 30px 32px;
}
.org-band h3 { font-size: 1.25rem; font-weight: 600; }
.org-band p { margin-top: 6px; color: var(--muted); max-width: 46em; }

@media (max-width: 1000px) {
  .plans { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .plan-for { min-height: 0; }
  .org-band { flex-direction: column; align-items: flex-start; max-width: 560px; margin-inline: auto; }
}

/* ── FAQ ──────────────────────────────────────────────────────────── */

.faq { max-width: 880px; margin: 0 auto; background: var(--white); border-radius: 26px; padding: 6px 32px; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 22px 44px 22px 0;
  color: var(--ink); font-size: 1.125rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before,
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 16px; height: 2px; margin-top: -1px; border-radius: 2px;
  background: var(--navy); transition: transform .2s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { padding: 0 44px 24px 0; color: var(--text); }
.faq-more { margin-top: 24px; text-align: center; color: var(--muted); }
.faq-more a { color: var(--navy); font-weight: 600; text-underline-offset: 4px; }

@media (max-width: 560px) { .faq { padding: 4px 20px; } }

/* ── Closing panel ────────────────────────────────────────────────── */

.closing-panel {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--white);
  border-radius: var(--r-xl);
  min-height: 380px; padding: clamp(40px, 6vw, 76px) clamp(24px, 5vw, 64px);
  display: flex; align-items: center;
}
.closing-copy { position: relative; z-index: 1; max-width: 560px; }
.closing-panel h2 { color: var(--white); font-size: clamp(2rem, 1.4rem + 2vw, 2.875rem); line-height: 1.15; font-weight: 300; }
.closing-panel p { margin: 18px 0 32px; color: rgba(255, 255, 255, 0.86); font-size: 1.0625rem; }
.closing-shape { position: absolute; right: 0; bottom: 0; width: min(52%, 620px); height: 100%; fill: var(--sky); }
.closing-shape-2 { fill: var(--cyan); opacity: .55; }

/* Below this the shape would run under the copy; move it into a band below. */
@media (max-width: 1100px) {
  .closing-panel { display: block; padding-bottom: 170px; }
  .closing-shape { width: min(100%, 620px); height: 150px; }
}

/* ── Footer ───────────────────────────────────────────────────────── */

.site-footer { padding-bottom: 24px; }
.footer-panel { background: var(--navy); color: rgba(255, 255, 255, 0.82); border-radius: var(--r-xl); padding: clamp(36px, 5vw, 56px) clamp(24px, 5vw, 56px) 30px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-logo { display: inline-block; padding: 10px 16px; background: var(--white); border-radius: var(--r-md); }
.footer-logo img { height: 46px; width: auto; }
.footer-brand p { margin-top: 18px; max-width: 32ch; line-height: 1.55; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h2 { color: var(--white); font-size: .875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.footer-col a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.footer-col a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: .8125rem; color: rgba(255, 255, 255, 0.72);
}
.footer-bottom p:first-child { max-width: 62em; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }

/* ── Reduced motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
