:root {
  --ink: #171717;
  --paper: #fbf6ed;
  --white: #ffffff;
  --lavender: #dcd0ff;
  --mint: #c8f47f;
  --peach: #ffb48f;
  --blue: #c9e7ff;
  --yellow: #fff2a6;
  --muted: #625d54;
  --line: 2px solid var(--ink);
  --radius: 8px;
  --shadow: 5px 5px 0 var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  background-image: linear-gradient(rgba(23, 23, 23, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  width: min(1160px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 9px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: var(--line);
  border-radius: 999px;
  background: rgba(251, 246, 237, 0.9);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.nav-cta,
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 10px;
  padding-right: 12px;
  font-weight: 900;
}

.brand-mark {
  width: 34px;
  height: 34px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: var(--line);
  border-radius: 50%;
  background: var(--mint);
  font-size: 11px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-links {
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
}

.nav-links a,
.nav-cta {
  padding: 11px 13px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: var(--lavender);
}

.nav-cta {
  justify-content: center;
  border: var(--line);
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 36px auto 0;
}

section[id] {
  scroll-margin-top: 112px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(40px, 5.1vw, 62px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(29px, 3.7vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(21px, 2.3vw, 28px);
  line-height: 1;
  letter-spacing: 0;
}

p {
  line-height: 1.55;
}

.template-panel {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.pill {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 13px;
  border: var(--line);
  border-radius: 999px;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero {
  min-height: clamp(500px, 64vh, 640px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
}

.hero-copy {
  padding: clamp(28px, 4.2vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-lede {
  max-width: 600px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.45vw, 18px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-media {
  display: grid;
  place-items: center;
  border-left: var(--line);
  background: var(--lavender);
}

.automation-hero .hero-media {
  background: var(--mint);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#clinicflow .about-image img {
  padding: 28px;
  object-fit: contain;
}

.automation-hero .hero-media img {
  padding: 0;
  object-fit: cover;
  object-position: center;
}

#clinicflow .about-image {
  min-height: 540px;
  padding: clamp(20px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 2vw, 20px);
}

#clinicflow .about-image img {
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  padding: 0;
  object-fit: cover;
  object-position: top center;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}

#clinicflow .experience-badge {
  position: static;
  padding: clamp(14px, 2vw, 22px);
  border-radius: 999px;
  font-size: clamp(22px, 2.35vw, 30px);
  line-height: 1.1;
}

.button {
  justify-content: center;
  gap: 12px;
  padding: 12px 15px;
  border: var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.button span:last-child {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  line-height: 1;
}

.button-dark {
  background: var(--ink);
  color: var(--white);
}

.button-light {
  background: var(--white);
  color: var(--ink);
}

.marquee-band {
  margin: 26px auto 78px;
  width: 100%;
  overflow: hidden;
  border: var(--line);
  border-radius: 999px;
  background: var(--mint);
}

.marquee-track {
  width: max-content;
  display: flex;
  gap: 22px;
  padding: 10px 0;
  animation: scrollText 30s linear infinite;
  font-size: clamp(15px, 1.8vw, 24px);
  font-weight: 900;
  white-space: nowrap;
}

.services-section,
.about-section,
.experience-section,
.portfolio-section,
.process-section,
.tools-section,
.pricing-section,
.faq-section,
.contact-section {
  margin-bottom: clamp(76px, 10vw, 118px);
}

.section-heading {
  margin-bottom: 34px;
}

.center-heading {
  display: grid;
  justify-items: center;
  text-align: center;
}

.center-heading h2 {
  max-width: 900px;
}

.split-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.split-heading h2 {
  max-width: 800px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.process-grid article,
.pricing-grid article,
.automation-flow-grid article {
  min-height: 205px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--lavender);
}

.service-card:nth-child(1),
.process-grid article:nth-child(1),
.pricing-grid article:nth-child(1),
.automation-flow-grid article:nth-child(1) {
  background: var(--lavender);
}

.mint {
  background: var(--mint);
}

.peach {
  background: var(--peach);
}

.blue {
  background: var(--blue);
}

.card-icon,
.process-grid span,
.automation-flow-grid span,
.pricing-grid span {
  font-size: 14px;
  font-weight: 900;
}

.service-card h3,
.process-grid h3,
.automation-flow-grid h3 {
  margin-top: 14px;
}

.step-icon {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-top: 16px;
  border: var(--line);
  border-radius: 50%;
  background: var(--white);
  font-size: 13px;
  font-weight: 900;
}

.step-icon::before,
.step-icon::after {
  content: "";
  position: absolute;
}

.icon-search::before,
.icon-lead::before {
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  left: 9px;
  top: 8px;
}

.icon-search::after,
.icon-lead::after {
  width: 10px;
  height: 2px;
  background: var(--ink);
  rotate: 45deg;
  right: 8px;
  bottom: 10px;
}

.icon-flow::before {
  width: 18px;
  height: 11px;
  border: 2px solid var(--ink);
  border-left: 0;
  border-bottom: 0;
  right: 8px;
  top: 10px;
}

.icon-flow::after {
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  rotate: 45deg;
  right: 8px;
  top: 17px;
}

.icon-build::before,
.icon-calendar::before {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 3px;
}

.icon-build::after,
.icon-calendar::after {
  width: 18px;
  height: 2px;
  background: var(--ink);
  top: 14px;
}

.icon-launch::before,
.icon-repeat::before {
  width: 17px;
  height: 17px;
  border: 2px solid var(--ink);
  border-left-color: transparent;
  border-radius: 50%;
}

.icon-launch::after,
.icon-repeat::after {
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  right: 8px;
  top: 10px;
}

.icon-ai::before {
  content: "AI";
  font-size: 12px;
  font-weight: 900;
}

.icon-bell::before {
  width: 16px;
  height: 15px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 10px 10px 4px 4px;
  top: 9px;
}

.icon-bell::after {
  width: 18px;
  height: 2px;
  background: var(--ink);
  top: 24px;
}

.icon-review::before {
  width: 18px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  top: 10px;
}

.icon-review::after {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  rotate: 45deg;
  top: 13px;
}

.icon-link::before,
.icon-link::after {
  width: 15px;
  height: 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.icon-link::before {
  left: 7px;
  top: 13px;
  rotate: -28deg;
}

.icon-link::after {
  right: 7px;
  top: 13px;
  rotate: -28deg;
}

.icon-check::before {
  width: 18px;
  height: 10px;
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  rotate: -45deg;
  top: 11px;
}

.service-card p,
.process-grid p,
.portfolio-card p,
.experience-list p,
.pricing-grid p,
.faq-section p,
.automation-flow-grid p,
.about-copy p,
.contact-copy p {
  color: var(--muted);
}

.section-action {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  align-items: stretch;
}

.about-image {
  position: relative;
  min-height: 540px;
  border-right: var(--line);
  background: var(--lavender);
  
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute; /* add this */
  inset: 0;  
}

.experience-badge {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 18px;
  border: var(--line);
  border-radius: 999px;
  background: var(--mint);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 900;
  text-align: center;
}

.about-copy {
  padding: clamp(34px, 6vw, 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-copy h2 {
  margin-bottom: 24px;
}

.about-copy .button {
  width: fit-content;
  margin-top: 16px;
}

.about-copy .hero-actions {
  margin-top: 16px;
}

.about-copy .hero-actions .button {
  margin-top: 0;
}

.experience-list {
  display: grid;
  gap: 0;
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.experience-list article {
  display: grid;
  grid-template-columns: 220px 1fr minmax(260px, 0.95fr);
  gap: 24px;
  padding: 28px;
  border-bottom: var(--line);
  align-items: start;
}

.experience-list article:last-child {
  border-bottom: 0;
}

.experience-list time {
  font-size: 13px;
  font-weight: 900;
}

.experience-list h3 {
  margin-bottom: 0;
}

.experience-list p {
  margin-bottom: 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.portfolio-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mini-work-card {
  min-height: 210px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--lavender);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.mini-work-card.is-changing {
  opacity: 0.2;
  transform: translateY(4px);
}

.mini-work-card span {
  font-size: 13px;
  font-weight: 900;
}

.mini-work-card h3 {
  margin-bottom: 10px;
  font-size: clamp(22px, 2.4vw, 30px);
}

.mini-work-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.portfolio-card {
  overflow: hidden;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.portfolio-card.wide-card {
  grid-row: span 2;
}

.portfolio-card img,
.mock-browser,
.dashboard-preview {
  width: 100%;
  aspect-ratio: 1.18;
  border-bottom: var(--line);
}

.portfolio-card img {
  object-fit: cover;
}

.portfolio-card > div:last-child {
  padding: 24px;
}

.portfolio-card a {
  display: inline-flex;
  margin-top: 8px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mock-browser {
  padding: 22px;
  background: var(--peach);
}

.browser-top {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--white);
}

.browser-top span {
  width: 12px;
  height: 12px;
  border: var(--line);
  border-radius: 50%;
}

.mock-hero,
.mock-lines,
.mock-blocks {
  border-left: var(--line);
  border-right: var(--line);
  background: var(--white);
}

.mock-hero {
  height: 110px;
  background: linear-gradient(90deg, var(--lavender) 0 48%, var(--mint) 48% 100%);
}

.mock-lines {
  padding: 20px;
}

.mock-lines i {
  display: block;
  height: 14px;
  margin-bottom: 10px;
  background: var(--ink);
}

.mock-lines i:nth-child(2) {
  width: 75%;
}

.mock-lines i:nth-child(3) {
  width: 48%;
  margin-bottom: 0;
}

.mock-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 20px 20px;
  border-bottom: var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}

.mock-blocks b {
  height: 48px;
  border: var(--line);
  background: var(--blue);
}

.dashboard-preview {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 16px;
  padding: 22px;
  background: var(--blue);
}

.dash-side,
.dash-main {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.dash-side {
  background: linear-gradient(var(--ink) 0 28px, var(--white) 28px);
}

.dash-main {
  padding: 20px;
}

.dash-main span {
  display: inline-block;
  width: 31%;
  height: 52px;
  margin-right: 2%;
  border: var(--line);
  background: var(--mint);
}

.dash-main div {
  height: 122px;
  margin-top: 18px;
  border: var(--line);
  background: var(--lavender);
}

.stats-strip {
  margin-bottom: clamp(76px, 10vw, 118px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.stats-strip article {
  min-height: 170px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: var(--line);
}

.stats-strip article:last-child {
  border-right: 0;
}

.stats-strip strong {
  margin-bottom: 8px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.9;
}

.stats-strip span {
  max-width: 150px;
  color: var(--muted);
  font-weight: 900;
}

.process-grid article:nth-child(2),
.automation-flow-grid article:nth-child(2) {
  background: var(--mint);
}

.process-grid article:nth-child(3),
.automation-flow-grid article:nth-child(3) {
  background: var(--yellow);
}

.process-grid article:nth-child(4),
.automation-flow-grid article:nth-child(4) {
  background: var(--blue);
}

.tools-section {
  padding: 26px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
}

.tools-section p {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.tools-section div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tools-section span {
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.pricing-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-grid article {
  min-height: 470px;
  background: var(--white);
}

.pricing-grid .featured-plan {
  background: var(--mint);
}

.pricing-grid h3 {
  margin: 28px 0 18px;
  font-size: clamp(44px, 5vw, 68px);
}

.pricing-grid ul {
  margin: auto 0 24px;
  padding: 0;
  list-style: none;
}

.pricing-grid li {
  padding: 12px 0;
  border-top: 1px solid rgba(23, 23, 23, 0.26);
  font-weight: 900;
}

.pricing-grid .button {
  width: fit-content;
}

.faq-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 32px;
}

.faq-copy {
  padding: 30px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--yellow);
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 900;
}

details p {
  margin: 0;
  padding: 0 20px 20px;
}

.automation-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.automation-flow-grid article {
  min-height: 200px;
}

.automation-flow-grid article:nth-child(5) {
  background: var(--peach);
}

.automation-flow-grid article:nth-child(6) {
  background: var(--lavender);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.85fr);
  gap: 38px;
  padding: clamp(30px, 6vw, 64px);
  background: var(--lavender);
}

.contact-copy h2 {
  margin-bottom: 22px;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}
  .contact-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.contact-icon-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: var(--line);
  border-radius: 50%;
  background: var(--white);
  transition: background 0.15s;
}

.contact-icon-btn:hover {
  background: var(--mint);
}
input,
textarea {
  width: 100%;
  padding: 14px 15px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  resize: vertical;
}

input:focus,
textarea:focus,
.button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--peach);
  outline-offset: 3px;
}

.contact-form .button {
  width: fit-content;
}

.site-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer p {
  margin-bottom: 0;
}

.works-page {
  display: grid;
  gap: 28px;
}

.works-hero {
  padding: clamp(30px, 6vw, 70px);
  background: var(--lavender);
}

.works-hero h1 {
  margin-bottom: 16px;
}

.works-hero p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.works-list {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(76px, 10vw, 118px);
}

.works-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: clamp(76px, 10vw, 118px);
}

.project-tile {
  overflow: hidden;
  display: grid;
  grid-template-rows: 200px 200px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--lavender);
}

.project-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-bottom: var(--line);
  background: var(--white);
}

.project-tile div {
  min-height: 0;
  padding: 16px 20px 14px;
  display: flex;
  flex-direction: column;
}

.project-tile span,
.project-tile b {
  font-weight: 900;
}

.project-tile h2 {
  margin: 10px 0 8px;
  min-height: 45px;
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.02;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-tile p {
  margin-bottom: 10px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.36;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.project-tile b {
  margin-top: auto;
  display: inline-flex;
  width: fit-content;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-tile:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}

.work-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 22px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.work-row span,
.work-row b {
  font-weight: 900;
}

.work-row h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 3.4vw, 44px);
}

.work-row p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.work-row:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}

@keyframes scrollText {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1024px) {
  .site-header {
    width: min(920px, calc(100% - 28px));
    grid-template-columns: auto auto;
    border-radius: var(--radius);
  }

  .nav-links {
    grid-column: 1 / -1;
    order: 3;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  main,
  .site-footer {
    width: min(920px, calc(100% - 28px));
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }

  .hero-media {
    min-height: 340px;
    border-left: 0;
    border-top: var(--line);
  }

  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-preview-grid {
    grid-template-columns: 1fr;
  }

  .works-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card,
  .process-grid article {
    min-height: 205px;
  }

  .about-section,
  .faq-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .about-image {
    min-height: 520px;
    border-right: 0;
    border-bottom: var(--line);
  }

  .experience-list article {
    grid-template-columns: 180px 1fr;
  }

  .experience-list p {
    grid-column: 2;
  }

  .automation-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    top: 10px;
    width: min(100% - 20px, 1160px);
    padding: 8px;
  }

  .brand {
    font-size: 13px;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    font-size: 12px;
  }

  .nav-links a {
    padding: 10px 11px;
  }

  main,
  .site-footer {
    width: min(100% - 20px, 1160px);
  }

  h1 {
    font-size: clamp(34px, 10vw, 46px);
    line-height: 0.95;
  }

  h2 {
    font-size: clamp(28px, 8vw, 38px);
  }

  h3 {
    font-size: 25px;
  }

  .template-panel {
    box-shadow: 4px 4px 0 var(--ink);
  }

  .hero-copy {
    min-height: auto;
    padding: 28px 20px 34px;
  }

  .hero-media {
    min-height: 230px;
  }

  .automation-hero .hero-media {
    display: none;
  }

  .hero-actions,
  .button,
  .contact-form .button {
    width: 100%;
  }

  .marquee-band {
    margin-bottom: 66px;
  }

  .services-section,
  .about-section,
  .experience-section,
  .portfolio-section,
  .process-section,
  .tools-section,
  .pricing-section,
  .faq-section,
  .contact-section {
    margin-bottom: 66px;
  }

  .template-grid,
  .portfolio-grid,
  .portfolio-preview-grid,
  .stats-strip,
  .pricing-grid,
  .automation-flow-grid {
    grid-template-columns: 1fr;
  }

  .split-heading {
    align-items: start;
    flex-direction: column;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .service-card,
  .process-grid article,
  .pricing-grid article,
  .automation-flow-grid article {
    min-height: 185px;
  }

  .about-image {
    min-height: 360px;
  }

  #clinicflow .about-image {
    min-height: auto;
    padding: 20px;
    gap: 14px;
  }

  #clinicflow .experience-badge {
    font-size: clamp(20px, 6vw, 24px);
  }

  .experience-badge {
    font-size: 18px;
  }

  .about-copy,
  .contact-section {
    padding: 24px 20px;
  }

  .experience-list article {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px;
  }

  .experience-list p {
    grid-column: auto;
  }

  .portfolio-card.wide-card {
    grid-row: auto;
  }

  .stats-strip article {
    min-height: 128px;
    border-right: 0;
    border-bottom: var(--line);
  }

  .stats-strip article:last-child {
    border-bottom: 0;
  }

  .pricing-grid .button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }

  .work-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .works-tile-grid {
    grid-template-columns: 1fr;
  }

  .project-tile {
    grid-template-rows: 190px auto;
  }

  .project-tile div {
    min-height: 185px;
  }
}
