/* The Auto Medic — clinical-light design system
   Duotone: medic red + deep teal ink on cool clinical white.
   Soft radii, hairlines, mixed-case Bricolage Grotesque display. */

:root {
  --bg: #F7F9FA;
  --card: #FFFFFF;
  --ink: #16232A;
  --muted: #5B6B74;
  --hairline: #E2E9EC;
  --red: #E5484D;
  --red-deep: #C43438;
  --red-tint: #FDEEEE;
  --teal: #12706B;
  --teal-ink: #0E3D3B;
  --teal-tint: #E7F3F1;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(22,35,42,.05), 0 12px 32px -12px rgba(22,35,42,.14);
  --display: "Bricolage Grotesque", "Inter", sans-serif;
  --body: "Inter", -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.015em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.3rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.15rem; line-height: 1.3; }

.fi {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex: none; vertical-align: -3px;
}

/* ---------- Loader (EKG trace) ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  transition: opacity .45s ease;
}
.loader.done { opacity: 0; pointer-events: none; }
.loader-ekg { width: 220px; height: 56px; }
.loader-ekg polyline {
  stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 460; stroke-dashoffset: 460;
  animation: trace 1.15s ease-out forwards;
}
.loader span { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; }
@keyframes trace { to { stroke-dashoffset: 0; } }

/* ---------- Topbar ---------- */
.topbar { background: var(--teal-ink); color: #DCEBE9; font-size: .82rem; }
.topbar .wrap { display: flex; gap: 22px; align-items: center; padding-top: 7px; padding-bottom: 7px; }
.tb-item { display: inline-flex; align-items: center; gap: 7px; }
.tb-item .fi { width: 14px; height: 14px; }
.tb-phone { margin-left: auto; text-decoration: none; font-weight: 600; color: #fff; }
.tb-phone:hover { color: #FBD1D2; }

/* ---------- Nav ---------- */
.site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav { display: flex; align-items: center; gap: 28px; padding-top: 13px; padding-bottom: 13px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.mark svg, .foot-mark svg { width: 40px; height: 40px; display: block; }
.mark rect, .foot-mark rect { fill: var(--red); }
.pulse { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.brand .name { font-family: var(--display); font-weight: 700; font-size: 1.12rem; line-height: 1.1; display: flex; flex-direction: column; }
.brand .name small { font-family: var(--body); font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .01em; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  border: 0; cursor: pointer; font-family: var(--body);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 18px; font-size: .87rem; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 18px -6px rgba(229,72,77,.55); }
.btn-primary:hover { background: var(--red-deep); }
.btn-outline { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--hairline); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-light { background: #fff; color: var(--teal-ink); }

/* ---------- Chips / section heads ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--red-tint); color: var(--red-deep);
  font-size: .8rem; font-weight: 600; letter-spacing: .01em;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.chip .fi { width: 13px; height: 13px; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.sec-intro { color: var(--muted); margin-top: 14px; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(180deg, rgba(247,249,250,0) 55%, var(--bg) 96%),
    repeating-linear-gradient(0deg, rgba(229,72,77,.055) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(229,72,77,.055) 0 1px, transparent 1px 26px),
    #FDFDFC;
  border-bottom: 1px solid var(--hairline);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px;
  align-items: center; padding-top: 78px; padding-bottom: 86px;
}
.hero-copy .lede { color: var(--muted); font-size: 1.13rem; margin: 22px 0 30px; max-width: 30rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-row {
  display: flex; align-items: center; gap: 12px; margin-top: 30px;
  font-size: .88rem; color: var(--muted); max-width: 30rem;
}
.stars { display: inline-flex; gap: 2px; flex: none; }
.star { width: 15px; height: 15px; fill: #F5A623; stroke: #F5A623; stroke-width: 1; }

/* Patient chart card */
.hero-card-wrap { position: relative; }
.chart-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--hairline); box-shadow: var(--shadow);
  padding: 26px; max-width: 460px; margin-left: auto;
}
.cc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px dashed var(--hairline); }
.cc-mark svg { width: 34px; height: 34px; display: block; }
.cc-mark rect { fill: var(--red); }
.cc-head div { display: flex; flex-direction: column; line-height: 1.25; }
.cc-head strong { font-family: var(--display); font-size: .98rem; }
.cc-head span { font-size: .76rem; color: var(--muted); }
.cc-badge {
  margin-left: auto; background: var(--teal-tint); color: var(--teal);
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.cc-rows div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--hairline); }
.cc-rows dt { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 2px; }
.cc-rows dd { font-size: .9rem; }
.cc-rows em { font-style: normal; color: var(--red-deep); font-weight: 600; }
.cc-ekg { position: relative; margin-top: 14px; background: var(--teal-tint); border-radius: 12px; padding: 6px 10px 2px; }
.cc-ekg svg { width: 100%; height: 40px; }
.cc-ekg .trace-base {
  stroke: var(--teal); opacity: .28; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.cc-ekg .trace {
  stroke: var(--teal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 46 380; stroke-dashoffset: 0;
  animation: ekg 2.6s linear infinite;
}
@keyframes ekg { to { stroke-dashoffset: -426; } }
.cc-vitals {
  position: absolute; top: 8px; right: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700; color: var(--teal);
}
.cc-vitals .fi { width: 12px; height: 12px; }
.cc-note { font-size: .82rem; color: var(--muted); margin-top: 14px; }

/* ---------- Vitals strip ---------- */
.vitals { padding: 34px 0; }
.vitals-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vital {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 3px;
}
.vital strong { font-family: var(--display); font-size: 1.25rem; letter-spacing: -.01em; }
.vital span { font-size: .84rem; color: var(--muted); line-height: 1.45; }

/* ---------- Services ---------- */
.services { padding: 84px 0; }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.svc {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 26px 22px; transition: box-shadow .2s ease, transform .2s ease;
}
.svc:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.svc-ic {
  width: 44px; height: 44px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.svc-ic .fi { width: 21px; height: 21px; }
.tint-red { background: var(--red-tint); color: var(--red-deep); }
.tint-teal { background: var(--teal-tint); color: var(--teal); }
.svc h3 { font-size: 1.02rem; margin-bottom: 8px; }
.svc p { font-size: .87rem; color: var(--muted); }

/* ---------- Process ---------- */
.process { padding: 84px 0; background: var(--card); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.steps li {
  background: var(--bg); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 26px 22px; position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--red); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  margin-bottom: 16px;
}
.steps li:nth-child(even) .step-num { background: var(--teal); }
.steps h3 { font-size: 1.02rem; margin-bottom: 8px; }
.steps p { font-size: .87rem; color: var(--muted); }

/* ---------- Second opinion band ---------- */
.second-opinion { background: var(--teal-ink); color: #fff; }
.so-inner { display: flex; align-items: center; justify-content: space-between; gap: 34px; padding-top: 56px; padding-bottom: 56px; flex-wrap: wrap; }
.so-inner h2 { max-width: 24ch; }
.so-inner p { color: #B9D2CF; margin-top: 12px; max-width: 44ch; }

/* ---------- About ---------- */
.about { padding: 92px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-photos { position: relative; padding-bottom: 34px; }
.ph { border-radius: var(--radius); }
.ph-main { width: 86%; aspect-ratio: 4/3.4; object-fit: cover; box-shadow: var(--shadow); }
.ph-side {
  position: absolute; right: 0; bottom: 0; width: 46%;
  aspect-ratio: 1/1; object-fit: cover;
  border: 6px solid var(--bg); box-shadow: var(--shadow);
}
.ph-badge {
  position: absolute; left: 20px; top: 20px;
  background: var(--red); color: #fff; border-radius: 14px;
  padding: 10px 16px; display: flex; flex-direction: column; line-height: 1.1;
  box-shadow: 0 8px 20px -6px rgba(196,52,56,.5);
}
.ph-badge strong { font-family: var(--display); font-size: 1.6rem; }
.ph-badge span { font-size: .72rem; font-weight: 600; }
.about-copy h2 { margin-bottom: 20px; }
.about-copy p { color: var(--muted); margin-bottom: 16px; }
.check-list { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; align-items: flex-start; gap: 11px; font-weight: 500; font-size: .95rem; }
.check-list .fi { color: var(--teal); margin-top: 4px; }

/* ---------- Reviews ---------- */
.reviews { padding: 84px 0; background: var(--card); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review {
  background: var(--bg); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column; gap: 14px;
}
.review p { font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.45; letter-spacing: -.01em; }
.review cite { font-style: normal; font-size: .8rem; color: var(--muted); margin-top: auto; }

/* ---------- Visit / contact ---------- */
.visit { padding: 84px 0; }
.visit-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; margin-bottom: 16px; }
.visit-card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 30px;
}
.visit-card h3 { font-size: 1.3rem; margin-bottom: 18px; }
.c-list { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.c-list li { display: flex; gap: 13px; font-size: .93rem; }
.c-list .fi { color: var(--red); margin-top: 4px; }
.c-list a { font-weight: 600; text-decoration: none; }
.c-list a:hover { color: var(--red-deep); }
.directions { font-size: .85rem; color: var(--muted); margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--hairline); }
.map { min-height: 340px; border-radius: var(--radius); border: 1px solid var(--hairline); z-index: 1; }

/* Appointment form */
.appt {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 40px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px;
}
.appt-head h3 { font-size: 1.5rem; margin-bottom: 10px; }
.appt-head p { color: var(--muted); font-size: .95rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  font-size: .85rem; font-weight: 500;
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--hairline);
  transition: all .15s ease;
}
.chips input:checked + span { background: var(--red-tint); color: var(--red-deep); box-shadow: inset 0 0 0 1.5px var(--red); font-weight: 600; }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form label { display: flex; flex-direction: column; gap: 6px; font-size: .84rem; font-weight: 600; margin-bottom: 14px; }
form .opt { color: var(--muted); font-weight: 400; }
form input, form textarea {
  font-family: var(--body); font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 12px 14px; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
form input:focus, form textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); }
form textarea { resize: vertical; }
.form-note { font-size: .84rem; color: var(--muted); margin-top: 14px; }
.form-note a { font-weight: 600; }
.form-success { text-align: center; padding: 30px 10px; }
.form-success h3 { margin: 14px 0 8px; }
.form-success p { color: var(--muted); font-size: .93rem; max-width: 40ch; margin: 0 auto; }

/* ---------- Footer ---------- */
footer { background: var(--teal-ink); color: #B9D2CF; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; padding-top: 60px; padding-bottom: 44px; }
.foot-mark svg { width: 36px; height: 36px; margin-bottom: 12px; }
.foot-name { display: block; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: #fff; margin-bottom: 8px; }
.foot-brand p { font-size: .88rem; }
footer h4 { color: #fff; font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px; }
.foot-grid a, .foot-addr { display: block; text-decoration: none; font-size: .9rem; margin-bottom: 9px; }
.foot-grid a:hover { color: #fff; }
.foot-base {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 20px; padding-bottom: 24px; font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,.12);
}
.jak-credit { display: inline-flex; align-items: center; gap: 8px; }
.jak-credit img { height: 34px; width: auto; }

/* ---------- Demo ribbon ---------- */
.demo-ribbon {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 150; background: var(--ink); color: #fff;
  font-size: .8rem; font-weight: 500;
  padding: 9px 12px 9px 18px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 30px -8px rgba(22,35,42,.45);
}
.demo-ribbon button {
  background: rgba(255,255,255,.14); color: #fff; border: 0; cursor: pointer;
  width: 22px; height: 22px; border-radius: 999px; font-size: .72rem; line-height: 1;
}

/* ---------- Reveals ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding-top: 56px; padding-bottom: 60px; }
  .chart-card { margin-left: 0; }
  .vitals-grid, .svc-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .review-grid { grid-template-columns: 1fr; }
  .visit-grid { grid-template-columns: 1fr; }
  .appt { grid-template-columns: 1fr; gap: 26px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--hairline);
    flex-direction: column; gap: 0; padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; border-bottom: 1px solid var(--hairline); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-toggle { display: block; }
  .tb-addr { display: none; }
}
@media (max-width: 560px) {
  .vitals-grid, .svc-grid, .steps { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .cc-rows div { grid-template-columns: 78px 1fr; }
  .appt { padding: 26px 20px; }
  form .row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .nav-cta .btn { display: none; }
}
