:root {
  --ink: #202b28;
  --muted: #68756f;
  --paper: #fffdf8;
  --soft: #f4eee7;
  --sage: #8ba99b;
  --sage-dark: #34584d;
  --clay: #aa6660;
  --plum: #6c4b5b;
  --rose: #f4ddd8;
  --mint: #31c39e;
  --line: rgba(32, 43, 40, 0.12);
  --shadow: 0 18px 48px rgba(43, 54, 50, 0.12);
  --container: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: #f7f3ed;
}

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

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

a:focus-visible {
  outline: 3px solid rgba(52, 88, 77, 0.38);
  outline-offset: 4px;
  border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 72px;
  padding: 12px clamp(20px, 4vw, 48px);
  background: rgba(255, 253, 248, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-logo {
  display: block;
  width: 36px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.92rem;
}

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

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 17px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: min(650px, calc(100vh - 72px));
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
  filter: saturate(1.04) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 32%, rgba(108,75,91,0.2) 0, rgba(108,75,91,0) 30%),
    linear-gradient(90deg, rgba(255,253,248,0.97) 0%, rgba(255,253,248,0.84) 37%, rgba(255,253,248,0.18) 68%),
    linear-gradient(0deg, rgba(32,43,40,0.14), rgba(255,253,248,0));
}

.hero-orbit {
  position: absolute;
  left: clamp(24px, 6vw, 92px);
  bottom: 26px;
  width: 220px;
  height: 128px;
  border: 1px solid rgba(179, 95, 89, 0.32);
  border-radius: 48% 52% 54% 46%;
  transform: rotate(-14deg);
  opacity: 0.72;
}

.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(64, 95, 84, 0.3);
  border-radius: 50%;
}

.hero-orbit::before {
  inset: 26px 78px;
}

.hero-orbit::after {
  width: 34px;
  height: 34px;
  right: 28px;
  top: 28px;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(610px, calc(100% - 40px));
  min-width: 0;
  margin-left: max(clamp(20px, 7vw, 96px), calc((100vw - var(--container)) / 2));
  padding: 66px 0 78px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 610px;
  margin-bottom: 20px;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 4.65vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 520px;
  margin-bottom: 20px;
  color: #4f5b57;
  font-size: 1rem;
  line-height: 1.62;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(64, 95, 84, 0.18);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.76);
  color: var(--sage-dark);
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 12px 34px rgba(40, 50, 48, 0.08);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 19px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: none;
}

.button.primary {
  background: linear-gradient(135deg, var(--sage-dark), var(--plum));
  color: white;
}

.button.secondary {
  background: white;
  color: var(--ink);
  border: 1px solid rgba(40, 50, 48, 0.2);
}

.button.tertiary {
  background: var(--rose);
  color: var(--ink);
}

.notice-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px max(clamp(20px, 7vw, 96px), calc((100vw - var(--container)) / 2));
  background: linear-gradient(90deg, #23302d, #5a4350);
  color: white;
}

.notice-band div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.notice-band span {
  color: rgba(255, 255, 255, 0.78);
}

.notice-band a {
  min-width: max-content;
  font-weight: 800;
  color: #f3cdbf;
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 34px max(clamp(20px, 7vw, 96px), calc((100vw - var(--container)) / 2)) 48px;
  background: #f7f3ed;
  border-bottom: 1px solid var(--line);
}

.quick-panel article {
  position: relative;
  min-height: 230px;
  padding: 24px;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.quick-panel article::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -54px;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(111, 72, 92, 0.17);
  border-radius: 50%;
}

.quick-panel article > * {
  position: relative;
  z-index: 1;
}

.quick-panel article a {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  color: var(--sage-dark);
  font-weight: 900;
}

.quick-panel article a::after {
  content: "->";
  margin-left: 10px;
}

.info-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), #e9f1e9);
  color: var(--plum);
  font-weight: 900;
}

.hero-note {
  position: absolute;
  right: max(clamp(22px, 5vw, 80px), calc((100vw - var(--container)) / 2));
  bottom: 34px;
  z-index: 2;
  display: grid;
  gap: 7px;
  width: min(280px, calc(100% - 44px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 22px 72px rgba(40, 50, 48, 0.22);
  backdrop-filter: blur(16px);
}

.hero-note span {
  color: var(--clay);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-note strong {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.32rem;
  line-height: 1.05;
}

.hero-note small {
  color: var(--muted);
  font-weight: 800;
}

.contact-flow {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 0.85fr);
  gap: clamp(24px, 4vw, 46px);
  align-items: center;
  padding: 56px max(clamp(20px, 7vw, 96px), calc((100vw - var(--container)) / 2));
  background:
    radial-gradient(circle at 90% 8%, rgba(246, 221, 217, 0.95), transparent 30%),
    linear-gradient(135deg, #fbf8f2 0%, #edf4ee 100%);
  color: var(--ink);
}

.patient-flow {
  background:
    radial-gradient(circle at 90% 8%, rgba(246, 221, 217, 0.95), transparent 30%),
    linear-gradient(135deg, #fbf8f2 0%, #edf4ee 100%);
}

.case-copy h2 {
  max-width: 540px;
  margin-bottom: 16px;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 3.8vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.case-copy p {
  max-width: 540px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.case-metrics span {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
}

.case-metrics strong {
  color: var(--plum);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  line-height: 1;
}

.case-stack {
  display: grid;
  gap: 16px;
}

.clickdoc-card,
.medevio-card {
  padding: 28px;
  border-radius: 18px;
  color: #111716;
  box-shadow: var(--shadow);
}

.clickdoc-card {
  border: 1px solid rgba(108, 75, 91, 0.32);
  background: #fff6f3;
}

.medevio-card {
  border: 1px solid rgba(47, 196, 157, 0.58);
  background: #eefaf7;
}

.clickdoc-card h3,
.medevio-card h3 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.13;
}

.clickdoc-card p,
.medevio-card p {
  max-width: 760px;
  color: #111716;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.52;
}

.tool-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}

.tool-bottom a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  color: white;
  font-size: 0.98rem;
  font-weight: 900;
}

.clickdoc-card .tool-bottom a {
  background: var(--plum);
}

.medevio-card .tool-bottom a {
  background: var(--mint);
}

.tool-bottom strong {
  color: #111716;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.routing-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.routing-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.78);
}

.routing-list b {
  color: white;
}

.quick-panel h2,
.service-grid h3,
.team-list h3,
.appointment-copy h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
}

.quick-panel p,
.service-grid p,
.team-list p,
.team-copy p,
.appointment-copy p,
.contact p {
  color: var(--muted);
  line-height: 1.65;
}

.section {
  padding: 58px max(clamp(20px, 7vw, 96px), calc((100vw - var(--container)) / 2));
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.section-heading.narrow {
  display: block;
  max-width: 760px;
}

.section h2 {
  max-width: 600px;
  margin-bottom: 0;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 3.7vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.schedule-section {
  background: var(--soft);
}

.schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: stretch;
}

.schedule-card,
.appointment-copy,
.team-list article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow);
}

.schedule-card {
  overflow: hidden;
}

.day-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.6fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 62px;
  padding: 0 clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
}

.day-row:last-child {
  border-bottom: 0;
}

.day-row.current {
  background: #dfeadd;
}

.day-row.muted {
  color: var(--muted);
}

.day-row small {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
}

.appointment-copy {
  padding: 28px;
}

.appointment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.appointment-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.9rem;
  font-weight: 900;
}

.appointment-actions a:last-child {
  background: var(--mint);
}

.contact-strip {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.contact-strip span {
  color: var(--muted);
}

.contact-strip strong {
  font-size: 1.35rem;
}

.services {
  background: var(--paper);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.service-grid article {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.team {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  background: #edf3ed;
}

.team-copy {
  align-self: center;
}

.team-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.team-list article {
  min-height: 220px;
  padding: 24px;
  box-shadow: none;
}

.team-list span {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--clay);
  font-weight: 900;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: center;
  background: var(--paper);
}

.map-preview {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  padding: 28px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(143, 174, 156, 0.75), rgba(244, 222, 215, 0.58)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.38) 0 12px, transparent 12px 26px);
  border: 1px solid var(--line);
  transition: transform 160ms ease, border-color 160ms ease;
}

.map-preview:hover,
.map-preview:focus-visible {
  border-color: rgba(52, 88, 77, 0.35);
  transform: translateY(-2px);
}

.map-preview span {
  font-weight: 800;
  color: var(--sage-dark);
}

.map-preview strong {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.map-preview small {
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px max(clamp(20px, 7vw, 96px), calc((100vw - var(--container)) / 2));
  background: var(--ink);
  color: rgba(255,255,255,0.76);
}

.mobile-quick-actions {
  display: none;
}

.back-to-top {
  position: fixed;
  right: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 31;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 18px 48px rgba(32, 43, 40, 0.22);
  transition: transform 160ms ease, background-color 160ms ease;
}

.back-to-top[hidden] {
  display: none;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--sage-dark);
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .hero {
    min-height: 640px;
  }

  h1 {
    font-size: 3.95rem;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(255,253,248,0.94) 0%, rgba(255,253,248,0.82) 54%, rgba(255,253,248,0.28) 100%);
  }

  .contact-flow,
  .schedule-layout,
  .team,
  .contact {
    grid-template-columns: 1fr;
  }

  .quick-panel,
  .service-grid,
  .case-metrics,
  .routing-list,
  .team-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section h2 {
    font-size: 3.35rem;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 82px;
  }

  .site-header {
    padding: 12px 16px;
  }

  .brand-logo {
    width: 32px;
    height: 41px;
  }

  .brand small,
  .header-action {
    display: none;
  }

  .hero {
    min-height: 660px;
  }

  .hero img {
    object-position: 64% center;
  }

  .hero-content {
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
    margin-left: 16px;
    padding: 64px 0 56px;
  }

  h1 {
    max-width: 100%;
    font-size: 2.62rem;
    line-height: 0.98;
    overflow-wrap: anywhere;
  }

  .hero-copy {
    font-size: 1rem;
    line-height: 1.62;
  }

  .hero-tags {
    gap: 8px;
    margin-bottom: 26px;
  }

  .hero-tags span {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .button {
    width: 100%;
  }

  .hero-note,
  .hero-orbit {
    display: none;
  }

  .section h2 {
    font-size: 2.55rem;
  }

  .notice-band,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-panel,
  .case-metrics,
  .routing-list,
  .service-grid,
  .team-list {
    grid-template-columns: 1fr;
  }

  .contact-flow {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .case-copy h2 {
    font-size: 2.7rem;
  }

  .clickdoc-card,
  .medevio-card {
    border-radius: 16px;
  }

  .tool-bottom {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 30px;
  }

  .tool-bottom a {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 1rem;
  }

  .day-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .appointment-actions a {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
  }

  .mobile-quick-actions {
    position: fixed;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.92);
    box-shadow: 0 18px 48px rgba(32, 43, 40, 0.18);
    backdrop-filter: blur(16px);
  }

  .mobile-quick-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 12px;
    background: var(--ink);
    color: white;
    font-weight: 900;
  }

  .mobile-quick-actions a:last-child {
    background: var(--mint);
  }

  .back-to-top {
    right: 18px;
    bottom: calc(98px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

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

  .back-to-top,
  .map-preview {
    transition: none;
  }
}
