:root {
  --ink:       #0E1218;
  --ink-soft:  #161C25;
  --bone:      #F2EEE6;
  --bone-dim:  rgba(242, 238, 230, 0.66);
  --paper:     #FAF8F3;
  --brand:     #0B71B8;
  --brand-deep:#085A93;
  --brand-bar: #FFFFFF;
  --tint:      rgba(0, 0, 0, 0.30);
  --rule:      rgba(14, 18, 24, 0.14);
  --rule-dark: rgba(242, 238, 230, 0.16);

  --f-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --f-body:    "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

section[id] { scroll-margin-top: 96px; }

.wrap {
  width: min(1100px, 100% - 48px);
  margin-inline: auto;
}

/* ─── Top bar ─── */
.topbar {
  background-color: var(--brand-bar);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 48px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand { display: inline-block; line-height: 0; }

.brand img {
  display: block;
  height: auto;
  width: clamp(170px, 20vw, 260px);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}

.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav a:not(.nav-cta):hover::after,
.nav a:not(.nav-cta):focus-visible::after { transform: scaleX(1); }

.nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 10px 18px !important;
  transition: background 0.2s ease;
}

.nav-cta:hover, .nav-cta:focus-visible { background: var(--brand-deep); }

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  isolation: isolate;
  display: flex;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/ct-scanner.jpg");
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  animation: hero-zoom 12s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-zoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

.hero-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.26) 0%,
    rgba(0, 0, 0, 0.34) 60%,
    rgba(14, 18, 24, 0.62) 100%
  );
}

.hero-text {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 10vh, 120px) 24px;
}

.hero-text h1 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 5.2vw, 60px);
  line-height: 1.2;
  color: var(--bone);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

.hero-text h1 span {
  display: block;
  white-space: nowrap;
  opacity: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-text h1 span:nth-child(2) { animation-delay: 0.18s; }

.hero-sub {
  margin: 22px 0 0;
  font-size: clamp(15px, 1.8vw, 19px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-dim);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.36s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
  opacity: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.52s forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Buttons ─── */
.btn {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover, .btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(14, 18, 24, 0.5);
}

.btn-solid {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.btn-solid:hover, .btn-solid:focus-visible {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--bone);
  border-color: rgba(242, 238, 230, 0.55);
}

.btn-ghost:hover, .btn-ghost:focus-visible {
  background: rgba(242, 238, 230, 0.12);
  border-color: var(--bone);
}

/* ─── Section scaffolding ─── */
.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  color: var(--ink);
}

.lede {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(14, 18, 24, 0.72);
}

/* ─── Services ─── */
.services {
  background:
    linear-gradient(to bottom, rgba(11, 113, 184, 0.045), transparent 320px),
    var(--paper);
  color: var(--ink);
  padding: clamp(64px, 9vw, 110px) 0 clamp(56px, 8vw, 96px);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 56px);
}

.service {
  border-top: 1px solid var(--rule);
  padding-top: 26px;
  position: relative;
}

.service::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--brand);
}

.service h3 {
  margin: 0 0 14px;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.25;
  color: var(--ink);
}

.service-where {
  font-weight: 400;
  color: var(--brand);
}

.service-grid .service:nth-child(2) { transition-delay: 0.12s; }

.service p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(14, 18, 24, 0.72);
}

.final-reads {
  margin-top: clamp(44px, 6vw, 72px);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brand);
  background: #fff;
  padding: clamp(24px, 3.5vw, 36px) clamp(24px, 4vw, 44px);
  box-shadow: 0 18px 40px -28px rgba(14, 18, 24, 0.35);
}

.final-reads-title {
  margin: 0 0 8px;
  font-family: var(--f-display);
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 600;
  color: var(--ink);
}

.final-reads p:last-child {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(14, 18, 24, 0.72);
}

/* ─── Coverage ─── */
.coverage {
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(11, 113, 184, 0.08), transparent 65%),
    #FFFFFF;
  color: var(--ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(64px, 9vw, 110px) 0;
}

.state-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.state-grid li {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 26px 18px 22px;
  text-align: center;
  transition:
    opacity 0.7s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  transition-delay: var(--d, 0s), var(--d, 0s), 0s, 0s, 0s;
}

.state-grid li:nth-child(2)  { --d: 0.05s; }
.state-grid li:nth-child(3)  { --d: 0.10s; }
.state-grid li:nth-child(4)  { --d: 0.15s; }
.state-grid li:nth-child(5)  { --d: 0.20s; }
.state-grid li:nth-child(6)  { --d: 0.25s; }
.state-grid li:nth-child(7)  { --d: 0.30s; }
.state-grid li:nth-child(8)  { --d: 0.35s; }
.state-grid li:nth-child(9)  { --d: 0.40s; }
.state-grid li:nth-child(10) { --d: 0.45s; }

.state-grid li.in:hover {
  background: rgba(11, 113, 184, 0.07);
  border-color: rgba(11, 113, 184, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -18px rgba(14, 18, 24, 0.4);
  transition-delay: 0s;
}

.state-grid abbr {
  display: block;
  text-decoration: none;
  font-family: var(--f-display);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.state-grid span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(14, 18, 24, 0.58);
}

.state-more {
  background: rgba(11, 113, 184, 0.08) !important;
  border-color: rgba(11, 113, 184, 0.35) !important;
}
.state-more abbr { color: var(--brand); }

.coverage-note {
  margin: 28px 0 0;
  font-size: 15px;
  color: rgba(14, 18, 24, 0.66);
}

.coverage-note a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Contact ─── */
.contact {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(64px, 9vw, 110px) 0 clamp(72px, 10vw, 120px);
}

.intake {
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 4px solid var(--brand);
  padding: clamp(28px, 4.5vw, 52px);
  box-shadow: 0 24px 60px -36px rgba(14, 18, 24, 0.4);
  max-width: 820px;
}

.intake fieldset {
  border: 0;
  margin: 0 0 36px;
  padding: 0;
}

.intake legend {
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  margin-bottom: 18px;
  width: 100%;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}

.intake legend small {
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 400;
  color: rgba(14, 18, 24, 0.55);
}

.fieldset-hint {
  margin: -6px 0 14px;
  font-size: 14px;
  color: rgba(14, 18, 24, 0.6);
}

.fieldset-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--brand-deep);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field-row--thirds { grid-template-columns: 1fr 1fr 1fr; }

.field-row + .field-row { margin-top: 18px; }

.field { display: flex; flex-direction: column; }

.field label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(14, 18, 24, 0.78);
  margin-bottom: 7px;
}

.field label small {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(14, 18, 24, 0.55);
}

.field input {
  font-family: var(--f-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(14, 18, 24, 0.22);
  border-radius: 0;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 113, 184, 0.18);
}

.field--beds { margin-top: 18px; max-width: 280px; }

/* choice chips (radio / checkbox) */
.field-row--choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.choice span {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: rgba(14, 18, 24, 0.78);
  border: 1px solid rgba(14, 18, 24, 0.25);
  background: var(--paper);
  padding: 11px 20px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.choice:hover span { border-color: var(--brand); }

.choice input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.choice input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(11, 113, 184, 0.3);
}

.btn-submit {
  width: 100%;
  font-size: 15px;
  padding: 16px 28px;
}

/* ─── Footer ─── */
.foot {
  background: #FFFFFF;
  color: rgba(14, 18, 24, 0.62);
  text-align: center;
  padding: 22px 24px 26px;
  border-top: 1px solid var(--rule);
}

.foot p {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* ─── Scroll reveals ─── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-text h1 span, .hero-sub, .hero-actions { animation: none; opacity: 1; }
  .hero-bg { animation: none; }
  .btn:hover, .btn:focus-visible { transform: none; }
}

/* ─── Responsive ─── */
@media (max-width: 720px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .topbar { flex-direction: column; gap: 12px; padding-bottom: 12px; }
  .nav { gap: 18px; }
  .nav a { font-size: 13px; }
  section[id] { scroll-margin-top: 140px; }
}

@media (max-width: 520px) {
  .hero-text h1 span { white-space: normal; }
}
