/* ============ Base ============ */
:root {
  --ink: #17140f;
  --ink-soft: #58524a;
  --paper: #ffffff;
  --tint: #f6f3ee;
  --accent: #b4552d;      /* brick terracotta pulled from the watercolor */
  --accent-soft: #d9a68f;
  --dark: #1d1a15;
  --max: 1200px;
  --font-display: "Inter Tight", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* ============ Type ============ */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.display {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.body-lg {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-soft);
  max-width: 62ch;
}

.display em { font-style: normal; color: var(--accent); }

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 48px);
  z-index: 10;
  transition: background-color .3s ease, padding .3s ease, box-shadow .3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding-top: 14px;
  padding-bottom: 14px;
  box-shadow: 0 1px 0 rgba(23, 20, 15, 0.07);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:not(.nav-cta) { color: var(--ink-soft); transition: color .2s; }
.nav-links a:not(.nav-cta):hover { color: var(--ink); }

.nav-cta {
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--ink);
  color: #fff !important;
  transition: background .2s;
}
.nav-cta:hover { background: var(--accent); }

/* ============ Hero ============ */
.hero-wrap {
  position: relative;
  overflow-x: clip;  /* the arch circle is wider than the viewport; clip the overhang */
}

.hero-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 3;              /* text sits ABOVE the image */
  pointer-events: none;    /* let clicks pass through to the image layer… */
}

.hero-pin .nav,
.hero-pin .hero-copy { pointer-events: auto; }  /* …except on the actual UI */

.hero-copy {
  text-align: center;
  padding: 0 24px;
  transform: translateY(-14vh); /* keep the copy in the white area above the peeking image */
  will-change: opacity, transform;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 92px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

.hero-sub {
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto;
}

.hero-cta {
  margin-top: 36px;
}

/* ============ Intro: above-the-fold content animates in on load ============
   Only `from` is declared, so each element animates to its natural computed
   state — no fill-mode residue to fight the hover transitions or the JS that
   drives the hero on scroll. `backwards` keeps elements hidden during their
   stagger delay. */
@keyframes intro-rise {
  from { opacity: 0; transform: translateY(26px); }
}

@keyframes intro-fade {
  from { opacity: 0; }
}

.hero-copy .eyebrow  { animation: intro-rise .8s cubic-bezier(0.16, 1, 0.3, 1) .05s backwards; }
.hero-copy h1        { animation: intro-rise .9s cubic-bezier(0.16, 1, 0.3, 1) .18s backwards; }
.hero-copy .hero-sub { animation: intro-rise .9s cubic-bezier(0.16, 1, 0.3, 1) .34s backwards; }
.hero-copy .hero-cta { animation: intro-rise .9s cubic-bezier(0.16, 1, 0.3, 1) .50s backwards; }
.hero-image          { animation: intro-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) .55s backwards; }
.nav                 { animation: intro-fade .7s ease .9s backwards; }

@media (prefers-reduced-motion: reduce) {
  .hero-copy .eyebrow,
  .hero-copy h1,
  .hero-copy .hero-sub,
  .hero-copy .hero-cta,
  .hero-image,
  .nav { animation: none; }
}

/* floating objects that ride 1:1 with the image (this layer occupies the
   image's exact document position inside hero-wrap) but sit ABOVE the pinned
   text (z-index 4 > hero-pin's 3) and are NOT clipped by the arch — so they
   can peek past the image's top edge. */
.hero-floats {
  position: absolute;
  top: 67vh;          /* pin height (100vh) + image's -33vh peek margin */
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 4;
}

.float-item {
  position: absolute;
  opacity: 0;
  transform: rotate(var(--rot));
  will-change: opacity;
}

/* vertical positions in vw so they stay glued to the same spot of the
   artwork (the image scales with viewport width); top: 0 = image top line */
.float-mask {
  --rot: -14deg;
  width: clamp(130px, 16vw, 250px);
  left: 17%;
  top: -1vw;          /* peeks just past the arch edge at this x */
}

.float-stethoscope {
  --rot: 12deg;
  width: clamp(130px, 17vw, 260px);
  right: 18%;
  top: 8vw;
}

.float-thermometer {
  --rot: 8deg;
  width: clamp(120px, 17vw, 260px);
  left: 30%;
  top: 30vw;
}

@media (max-width: 760px) {
  .hero-floats { top: 78vh; }   /* keep matched to the image's mobile start */

  .float-mask { top: 2vw; left: 6%; width: 104px; }
  .float-stethoscope { top: 30vw; right: 5%; width: 92px; }
  .float-thermometer { top: 74vw; left: 12%; width: 92px; }
}

/* image scrolls in normal flow, sliding up BEHIND the pinned headline */
.hero-image {
  position: relative;
  z-index: 2;
  margin-top: -33vh;   /* bottom third of the first viewport shows the image */
  overflow: hidden;
  /* a true circle much wider than the screen: 170vw diameter, so the visible
     arc is shallow (~16vw deep) and finishes well above the fold */
  width: 170vw;
  margin-left: -35vw;
  border-radius: 85vw 85vw 0 0;
}

.hero-image > img {
  /* sized and placed so BOTH constraints hold: the right edge stays flush
     with the viewport (left + width = 135vw, the container's right edge)
     and the sun (at 55% of the artwork) sits at the viewport center
     (left + 0.55·width = 85vw) → width 111vw, left 24vw */
  width: 111vw;
  max-width: none;
  margin-left: 24vw;
  margin-top: -6vw;    /* crop the top so the sun rides closer to the arch */
  height: auto;
}

/* ============ Sections ============ */
.section { padding: clamp(88px, 12vw, 160px) 0; }

/* ============ Feature sections (numbered, text + circle visual) ============ */
.feature { padding: clamp(72px, 9vw, 130px) 0; }

.feature-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
}

.feature-flip .feature-text { order: 2; }
.feature-flip .feature-visual { order: 1; }

.feature-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  color: #b9b3aa;
  margin-bottom: 16px;
}

.feature-text .heading {
  max-width: 22ch;
  margin-bottom: 20px;
}

.feature-sub {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--ink-soft);
  max-width: 46ch;
}

.feature-list {
  list-style: none;
  margin-top: clamp(36px, 4vw, 64px);
}

.feature-list li {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  border-top: 1px solid rgba(23, 20, 15, 0.1);
}

.feature-list li::before {
  content: "✦";
  color: var(--accent);
  font-size: 15px;
  flex-shrink: 0;
}

.feature-visual {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

/* smaller colored disc, centered — the object overflows ("bleeds") past it */
.feature-visual .feature-bg {
  width: 74%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

.feature-obj {
  position: absolute;
  top: 50%;
  left: 50%;
}

/* UI screenshot rather than a cutout: floats over the disc as a card,
   wider than the disc so it bleeds past both sides */
.feature-obj-payers {
  width: 84%;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(23, 20, 15, 0.22);
}

.feature-obj-orb {
  /* the orb is round and concentric with the disc, so it can't "bleed"
     without hiding the disc entirely — it sits inside with a green ring */
  width: 44%;
  transform: translate(-50%, -50%);
}

.feature-obj-handshake {
  width: 58%;
  transform: translate(-50%, -50%);
}

/* ============ Key numbers (beige stat cards) ============ */
.stats {
  background: #eae3d6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  position: relative;
  background: #f4efe5;
  border-radius: 20px;
  padding: clamp(28px, 3.5vw, 48px);
  min-height: clamp(240px, 30vw, 380px);
}

.stat-card-wide {
  grid-column: 1 / -1;
  min-height: clamp(260px, 32vw, 420px);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 80px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.stat-label {
  margin-top: 12px;
  font-size: clamp(14px, 1.3vw, 17px);
  color: var(--ink-soft);
  max-width: 32ch;
}

.stat-icon {
  position: absolute;
  right: clamp(24px, 3vw, 44px);
  bottom: clamp(24px, 3vw, 44px);
  width: clamp(60px, 6.5vw, 96px);
  height: auto;
  color: rgba(23, 20, 15, 0.5);
}

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 220px; }
  .stat-card-wide { min-height: 240px; }
}

/* CTA + marquee band: one continuous background with an arched top */
.cta-band {
  position: relative;
  overflow-x: clip;
  /* the shoulders around the arched sky match the stats section above */
  background: #eae3d6;
}

.cta-band-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 170vw;
  /* exact same circle as the hero arch: r = 85vw, centered 85vw below the top.
     clip-path instead of border-radius so the short band height can't clamp it */
  clip-path: circle(85vw at 50% 85vw);
  background: url('assets/cta-sky.jpg') center / cover no-repeat;
  z-index: 0;
}

.cta-band > *:not(.cta-band-bg) {
  position: relative;
  z-index: 1;
}

.cta {
  padding-top: clamp(120px, 18vw, 220px);  /* clear the arch's curve */
}

.cta-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.btn {
  display: inline-block;
  padding: 18px 40px;
  border-radius: 100px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: background .2s, transform .2s;
}

.btn:hover { background: var(--accent); transform: translateY(-2px); }

/* Footer — scrolling marquee banner over the shared band background */
.footer.marquee {
  background: transparent;
  padding: clamp(24px, 3.5vw, 44px) 0;
  overflow-x: clip;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
  will-change: transform;
}

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee-item {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  padding: 0 clamp(20px, 2.2vw, 40px);
}

.marquee-dot {
  width: clamp(7px, 0.7vw, 10px);
  height: clamp(7px, 0.7vw, 10px);
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ============ Request-a-proposal modal ============ */
.modal-overlay[hidden] { display: none; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 20, 15, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 24px); /* iOS: 100vh overshoots past the URL bar */
  overflow-y: auto;
  overscroll-behavior: contain;    /* don't rubber-band the page behind */
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 24px 80px rgba(23, 20, 15, 0.25);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--tint);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { background: #e8e2d7; }

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  padding-right: 40px;  /* keep clear of the close button */
}

.modal-sub {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 28px;
}

.form-field {
  display: block;
  border: none;
  margin: 0 0 18px;
  padding: 0;
}

.form-field legend,
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* never below 16px: iOS Safari auto-zooms smaller inputs on focus */
  color: var(--ink);
  background: #faf8f4;
  border: 1px solid rgba(23, 20, 15, 0.15);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s;
}

.form-field input:focus {
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill span {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid rgba(23, 20, 15, 0.18);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.radio-pill input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.radio-pill input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-submit {
  width: 100%;
  border: none;
  cursor: pointer;
  margin-top: 6px;
}

.form-submit[disabled] {
  opacity: 0.6;
  cursor: default;
}

.form-error {
  margin-top: 12px;
  font-size: 14px;
  color: #b03a2e;
}

.modal-success {
  text-align: center;
  padding: 24px 0;
}

.modal-success .btn {
  border: none;
  cursor: pointer;
  margin-top: 12px;
}

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(0.16, 1, 0.3, 1), transform .7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ Responsive ============ */
@media (max-width: 760px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .feature-inner { grid-template-columns: 1fr; }
  .feature-flip .feature-text { order: 1; }
  .feature-flip .feature-visual { order: 2; }
  .feature-visual { max-width: 420px; margin: 0 auto; }
  .desktop-br { display: none; }

  /* MOBILE HERO: plain and simple — no pinning, no peek, no floats.
     Header, then headline, then the image, all in normal flow.
     (These overrides must live BELOW the base rules in the cascade.) */
  .hero-floats { display: none; }
  .hero-pin {
    position: static;
    height: auto;
    padding: 130px 0 56px;
  }
  .hero-copy { transform: none; }
  .hero-image { margin-top: 0; }
}
