:root {
  --ink: #15201e;
  --ink-soft: #24302e;
  --muted: #5c6865;
  --faint: #eef3f0;
  --paper: #ffffff;
  --line: #d8e1dd;
  --line-dark: rgba(255, 255, 255, 0.16);
  --teal: #176f66;
  --teal-dark: #0e504a;
  --coral: #c9654f;
  --amber: #bd8d43;
  --shadow: 0 24px 70px rgba(21, 32, 30, 0.16);
  --max: 1200px;
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) auto minmax(120px, 0.72fr);
  align-items: center;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 54px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(216, 225, 221, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-size: 15px;
  font-weight: 720;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--teal);
  color: var(--teal-dark);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 2.2vw, 34px);
  color: var(--muted);
  font-size: 13px;
}

.nav-links a,
.header-cta {
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.header-cta {
  justify-self: end;
  padding: 10px 15px;
  border: 1px solid rgba(23, 111, 102, 0.32);
  border-radius: 6px;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 700;
}

.header-cta:hover {
  border-color: var(--teal);
  background: rgba(23, 111, 102, 0.06);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(430px, 0.78fr);
  align-items: center;
  gap: clamp(28px, 6vw, 96px);
  overflow: hidden;
  padding: 122px clamp(20px, 5vw, 72px) 106px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 35%, rgba(255, 255, 255, 0.3) 68%),
    url("./assets/clinic-operations-hero.png") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.hero-content,
.hero-board {
  position: relative;
  z-index: 1;
}

.hero-content {
  width: min(620px, 100%);
}

.hero-brand,
.section-index {
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 750;
}

.hero-brand {
  margin: 0 0 28px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: clamp(58px, 6.8vw, 92px);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 590px;
  margin-bottom: 34px;
  color: #35413f;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.46;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 19px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 730;
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 12px 32px rgba(23, 111, 102, 0.22);
}

.button.primary:hover {
  background: var(--teal-dark);
  box-shadow: 0 14px 36px rgba(23, 111, 102, 0.28);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(21, 32, 30, 0.18);
  color: var(--ink);
}

.button.secondary:hover {
  background: #fff;
  border-color: rgba(21, 32, 30, 0.32);
}

.source-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: min(620px, 100%);
  margin-top: 42px;
  border: 1px solid rgba(216, 225, 221, 0.82);
  background: rgba(216, 225, 221, 0.8);
}

.source-rail span {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  text-align: center;
}

.hero-board {
  justify-self: end;
  width: min(610px, 100%);
  padding: 22px;
  border: 1px solid rgba(216, 225, 221, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.board-top,
.board-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 740;
}

.board-top {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.status-dot {
  position: relative;
  padding-left: 14px;
  color: var(--teal-dark);
  font-size: 13px;
}

.status-dot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(23, 111, 102, 0.28);
  animation: pulse 2.2s ease-out infinite;
}

.pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 26px 0 24px;
}

.pipeline::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  top: 51px;
  height: 1px;
  background: var(--line);
}

.pipeline-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.board-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(23, 111, 102, 0.28);
  border-radius: 50%;
  background: #fff;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 780;
  transition:
    background 240ms ease,
    color 240ms ease,
    border-color 240ms ease,
    transform 240ms ease;
}

.pipeline-step.is-active .board-icon {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  transform: translateY(-2px);
}

.pipeline-step strong {
  font-size: 12px;
  text-transform: uppercase;
}

.pipeline-step small {
  color: var(--muted);
  font-size: 11px;
}

.activity-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.activity-list div {
  display: grid;
  grid-template-columns: 1fr 1fr 0.74fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  transition:
    color 200ms ease,
    background 200ms ease,
    padding 200ms ease;
}

.activity-list div.is-active {
  color: var(--ink);
  background: rgba(23, 111, 102, 0.04);
  padding-left: 8px;
  padding-right: 8px;
}

.activity-list strong {
  color: var(--teal-dark);
  text-align: right;
}

.board-foot {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.board-foot span:last-child {
  color: var(--ink);
  text-align: right;
}

.section {
  padding: clamp(66px, 8vw, 108px) clamp(20px, 5vw, 72px);
}

.section-inner {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.intro-band {
  padding: 58px clamp(20px, 5vw, 72px);
  background: var(--ink);
  color: #fff;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(30px, 6vw, 92px);
  align-items: start;
}

.intro-title,
.section-heading {
  display: grid;
  gap: 16px;
}

.intro-grid h2,
.section-heading h2,
.contact h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: 0;
}

.intro-copy p {
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(18px, 2vw, 22px);
}

.diagnostic-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.06);
}

.diagnostic-strip span {
  min-height: 54px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 730;
}

.diagnostic-strip span:last-child {
  border-right: 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 40px;
}

.section-heading.compact {
  max-width: 640px;
  margin-bottom: 0;
}

.section-heading p,
.contact p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.education-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(34px, 7vw, 96px);
  align-items: start;
}

.education-body {
  display: grid;
  gap: 30px;
}

.education-lede {
  margin: 0;
  color: #35413f;
  font-family: var(--serif);
  font-size: clamp(24px, 3.1vw, 38px);
  line-height: 1.12;
}

.mistake-stack {
  display: grid;
  border-top: 1px solid var(--line);
}

.mistake-card {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 54px);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.mistake-card span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.mistake-card h3 {
  margin-bottom: 9px;
  font-size: 23px;
  line-height: 1.18;
  font-weight: 720;
}

.mistake-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.leak-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.leak-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 176px;
  gap: clamp(18px, 4vw, 54px);
  align-items: start;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.row-number {
  color: var(--coral);
  font-size: 14px;
  font-weight: 780;
}

.row-signal {
  justify-self: end;
  padding-top: 6px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 760;
  text-align: right;
  text-transform: uppercase;
}

.leak-row h3,
.process-step h3 {
  margin-bottom: 9px;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 720;
}

.leak-row p,
.process-step p,
.included-panel li {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.process {
  background: var(--faint);
}

.method-layout {
  display: grid;
  grid-template-columns: 0.74fr 1.26fr;
  gap: clamp(34px, 7vw, 92px);
  align-items: start;
}

.timeline {
  display: grid;
  border-top: 1px solid var(--line);
}

.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 34px;
  padding: 28px 0 28px 34px;
  border-bottom: 1px solid var(--line);
}

.process-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 38px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--teal);
  border-radius: 50%;
  background: var(--faint);
}

.process-step span {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 780;
  text-transform: uppercase;
}

.process-step h3,
.process-step p {
  grid-column: 2;
}

.included-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(34px, 7vw, 96px);
  align-items: start;
}

.sticky-heading {
  position: sticky;
  top: 112px;
}

.included-panel {
  border-top: 1px solid var(--line);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  position: relative;
  padding: 18px 0 18px 34px;
  border-bottom: 1px solid var(--line);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(-45deg);
}

.contact {
  background: var(--ink);
  color: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(34px, 7vw, 92px);
  align-items: start;
}

.contact-copy {
  display: grid;
  gap: 18px;
}

.contact p {
  color: rgba(255, 255, 255, 0.74);
}

.audit-output {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0 8px;
  border: 1px solid var(--line-dark);
  background: var(--line-dark);
}

.audit-output span {
  min-height: 56px;
  display: grid;
  place-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  font-weight: 720;
  text-align: center;
}

.email-link {
  width: max-content;
  color: #fff;
  font-weight: 720;
  border-bottom: 1px solid rgba(255, 255, 255, 0.38);
}

.audit-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.audit-form [name="_honey"] {
  display: none;
}

.audit-form label {
  display: grid;
  gap: 7px;
  color: #3d4946;
  font-size: 13px;
  font-weight: 720;
}

.audit-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.audit-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 111, 102, 0.11);
}

.form-submit {
  width: 100%;
  margin-top: 4px;
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-status[data-state="success"] {
  color: var(--green);
}

.form-status[data-state="error"] {
  color: #b54708;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(20px, 5vw, 72px);
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 560ms ease,
    transform 560ms ease;
}

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

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(23, 111, 102, 0.26);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(23, 111, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(23, 111, 102, 0);
  }
}

@media (max-width: 1020px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .nav-links {
    display: none;
  }

  .header-cta {
    grid-column: 2;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 86vh;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 72%, rgba(255, 255, 255, 0.64) 100%),
      url("./assets/clinic-operations-hero.png") center / cover no-repeat;
  }

  .hero-board {
    display: none;
  }

  .intro-grid,
  .education-grid,
  .method-layout,
  .included-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .sticky-heading {
    position: static;
  }
}

@media (max-width: 700px) {
  .site-header {
    padding: 14px 16px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    max-width: 124px;
    line-height: 1.1;
  }

  .header-cta {
    padding: 10px 12px;
  }

  .hero {
    min-height: 760px;
    padding: 104px 18px 74px;
  }

  h1 {
    font-size: clamp(44px, 11.4vw, 54px);
    line-height: 1.02;
  }

  .hero-copy {
    font-size: 18px;
  }

  .button {
    width: 100%;
  }

  .source-rail,
  .diagnostic-strip,
  .audit-output {
    grid-template-columns: 1fr 1fr;
  }

  .diagnostic-strip span:last-child,
  .audit-output span:last-child {
    grid-column: 1 / -1;
  }

  .leak-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mistake-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 0;
  }

  .row-signal {
    justify-self: start;
    text-align: left;
  }

  .process-step {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 28px;
  }

  .process-step h3,
  .process-step p {
    grid-column: auto;
  }

  .audit-form {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
