:root {
  --ink: #12352f;
  --mute: #4c625b;
  --deep: #0f4a3f;
  --deep-dark: #0a3a31;
  --leaf: #2f9e6b;
  --mint: #def2e7;
  --sand: #f7f3ea;
  --line: #dde6e1;
  --on-deep: #d9ece4;
  --header: 72px;
  --shadow: 0 20px 48px rgba(10, 58, 49, 0.2);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 16px);
  scrollbar-color: var(--deep) #eef2f0;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 400 1.0625rem/1.6 Figtree, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { color: var(--deep-dark); background: #bfe6d1; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .closing :focus-visible { outline-color: #fff; }

.sprite { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--deep-dark);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font: 600 1rem/1.2 Figtree, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.button-dark { color: #fff; background: var(--deep); }
.button-dark:hover { background: var(--deep-dark); }
.button-light { color: var(--deep); background: #fff; }
.button-light:hover { background: var(--mint); }
.button-outline-light { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.75); }
.button-outline-light:hover { color: var(--deep); background: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Header */
.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header);
  padding: 0 max(24px, calc((100% - 1160px) / 2));
  background: #fff;
  transition: box-shadow 0.2s;
}
.site-header.scrolled { box-shadow: 0 6px 20px rgba(10, 58, 49, 0.09); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--deep); font-size: 1.2rem; font-weight: 700; text-decoration: none; }

.site-nav { display: flex; align-items: center; gap: 26px; font-size: 1rem; font-weight: 500; }
.site-nav a:not(.button) { color: var(--mute); text-decoration: none; }
.site-nav a:not(.button):hover, .site-nav a[aria-current] { color: var(--deep); }
.site-nav .button { min-height: 44px; padding: 0 20px; }

.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--deep); cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 24px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.2s; }
.bars { position: relative; margin: auto; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; }
.bars::after { top: 7px; }
[aria-expanded="true"] .bars { background: transparent; }
[aria-expanded="true"] .bars::before { background: var(--deep); transform: translateY(7px) rotate(45deg); }
[aria-expanded="true"] .bars::after { background: var(--deep); transform: translateY(-7px) rotate(-45deg); }

/* Top section */
.hero { padding-top: clamp(48px, 7vw, 84px); color: #fff; background: var(--deep); }
.hero-copy { max-width: 820px; text-align: center; }
.hero-copy > p:not(.demo-note) { max-width: 36em; margin: 20px auto 30px; color: var(--on-deep); font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.5; }
.demo-note { margin-top: 14px; color: var(--on-deep); font-size: 0.95rem; }

.stage { position: relative; z-index: 2; width: min(1060px, 100% - 48px); margin: 52px auto -150px; padding-left: 96px; }

.window { margin: 0; overflow: hidden; border-radius: 14px; background: #f4f6f7; box-shadow: var(--shadow); }
.window-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #e9eeeb; }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #bccac4; }

.phone { position: absolute; left: 0; bottom: -28px; width: clamp(150px, 21%, 216px); filter: drop-shadow(0 16px 26px rgba(10, 58, 49, 0.3)); }

@media (prefers-reduced-motion: no-preference) {
  .stage .window { animation: rise 1s var(--ease) both; }
  .stage .phone { animation: rise 1s 0.14s var(--ease) both; }
  .js .reveal .window { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); }
  .js .reveal.visible .window { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(34px); } }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-sand { background: var(--sand); }
.section-after-stage { padding-top: calc(150px + clamp(84px, 10vw, 124px)); }
.section h2 { max-width: 20em; }

.section-deep { color: #fff; background: var(--deep); }
.section-lede { max-width: 42em; margin-top: 16px; color: var(--on-deep); font-size: 1.15rem; }

/* Sri Lankan healthcare */
.local-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; }
.local-grid > div { padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.3); }
.local-grid p { margin-top: 10px; color: var(--on-deep); }

/* Problems */
.compare { margin-top: 44px; }
.compare-head, .problem { display: grid; grid-template-columns: 1fr 1fr; }
.compare-head { font-size: 1.05rem; font-weight: 700; color: var(--deep); }
.compare-head span { padding: 18px 28px; }
.compare-head span:first-child { padding-left: 0; }
.compare-head span:last-child { border-radius: 16px 16px 0 0; background: var(--mint); }
.before { padding: 26px 40px 26px 0; border-top: 1px solid #e0d9c9; }
.after { padding: 26px 28px; border-top: 1px solid #c4e3d2; background: var(--mint); }
.problem:last-child .after { border-radius: 0 0 16px 16px; }
.compare h3 { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.compare h3 svg { width: 20px; height: 20px; margin-top: 2px; }
.before h3 svg { color: #a2492f; }
.after h3 svg { color: var(--deep); }
.compare h3 + p { margin-top: 8px; padding-left: 30px; color: var(--mute); }
.after h3 + p { color: #2f4f46; }
.compare-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Features */
.feature { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: center; margin-top: 76px; }
.feature-flip .feature-copy { order: 2; }
.feature-flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.window-small { box-shadow: 0 14px 34px rgba(10, 58, 49, 0.14); border: 1px solid var(--line); }
.feature-copy h3 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; }
.feature-copy > p { margin-top: 12px; color: var(--mute); }
.ticks { display: grid; gap: 10px; margin-top: 20px; }
.ticks li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.ticks svg { width: 20px; height: 20px; margin-top: 4px; color: var(--leaf); }

/* Clinic types and roles */
.clinic-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 44px; }
.clinic-types p { margin-top: 10px; color: var(--mute); }

.roles-title { margin-top: 76px; font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; }
.roles-intro { max-width: 40em; margin-top: 10px; color: var(--mute); }

.table-wrap { margin-top: 26px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 15px 18px; text-align: left; vertical-align: middle; }
thead th { color: var(--deep); background: var(--mint); font-size: 0.95rem; font-weight: 600; line-height: 1.25; }
tbody th { font-weight: 500; }
tbody tr + tr > * { border-top: 1px solid var(--line); }
td.yes { color: var(--deep); font-weight: 600; }
td.no { color: var(--mute); }
.table-hint { display: none; margin-top: 10px; color: var(--mute); font-size: 0.95rem; }

/* Team */
.team { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.team > div:first-child p { max-width: 34em; margin-top: 16px; color: var(--mute); }
.founders { display: grid; gap: 34px; padding-top: 6px; }
.founders > div + div { padding-top: 34px; border-top: 1px solid var(--line); }
.founders h3 { display: flex; align-items: center; gap: 8px; }
.founders h3 img { flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(18, 53, 47, 0.14); }
.role { margin-top: 2px; font-weight: 600; color: var(--deep); }
.founders .role + p { margin-top: 8px; color: var(--mute); }

/* What's next */
.next { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.next p { max-width: 34em; margin-top: 16px; color: var(--mute); }
.next li { padding: 16px 0; border-bottom: 1px solid #e0d9c9; }
.next li:first-child { padding-top: 6px; }
.next li:last-child { border-bottom: 0; }

/* Closing */
.closing { padding-block: clamp(64px, 9vw, 104px); color: #fff; text-align: center; background: var(--deep); }
.closing h2 { max-width: 18em; margin-inline: auto; }
.closing p { max-width: 34em; margin: 14px auto 28px; color: var(--on-deep); }

/* Footer */
.site-footer { padding-block: 34px; color: var(--mute); font-size: 0.97rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }

/* Contact panel */
.contact-dialog {
  width: min(460px, 100% - 32px);
  padding: 30px 28px 26px;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(10, 40, 34, 0.32);
}
.contact-dialog::backdrop { background: rgba(10, 45, 38, 0.55); }
.contact-dialog h2 { font-size: 1.7rem; }
.contact-dialog > p { margin-top: 6px; color: var(--mute); }
.dialog-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--mute); cursor: pointer; }
.dialog-close:hover { color: var(--deep); background: var(--mint); }
.dialog-close svg { width: 20px; height: 20px; }

.contact-list { display: grid; gap: 10px; margin-top: 20px; }
.contact-list a { display: flex; align-items: center; gap: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: background-color 0.2s, border-color 0.2s; }
.contact-list a:hover { border-color: var(--leaf); background: #f0f9f4; }
.contact-list svg { flex: none; width: 24px; height: 24px; color: var(--deep); }
.contact-list strong { display: block; font-weight: 600; line-height: 1.3; }
.contact-list small { display: block; color: var(--mute); font-size: 0.93rem; font-variant-numeric: tabular-nums; }
.contact-list-plain a { justify-content: center; border-color: rgba(255, 255, 255, 0.5); }
.contact-list-plain a:hover { color: var(--deep); }

/* Pricing page */
.page-hero { padding-block: clamp(56px, 8vw, 96px); color: #fff; text-align: center; background: var(--deep); }
.page-hero p { max-width: 34em; margin: 18px auto 28px; color: var(--on-deep); font-size: clamp(1.1rem, 2vw, 1.25rem); line-height: 1.5; }
.included { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 40px; }
.included p { margin-top: 10px; color: var(--mute); }

@media (max-width: 1040px) {
  .site-nav { gap: 18px; font-size: 0.95rem; }
}

@media (max-width: 920px) {
  .js .menu-toggle { display: block; }
  .site-header { flex-wrap: wrap; }
  .site-nav { flex-wrap: wrap; }
  .js .site-nav { display: none; width: 100%; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding-bottom: 16px; }
  .js .site-nav.open { display: flex; }
  .js .site-nav a:not(.button) { padding: 12px 0; border-top: 1px solid var(--line); font-size: 1.05rem; }
  .js .site-nav .button { margin-top: 12px; }

  .stage { margin-bottom: -96px; padding-left: 56px; }
  .section-after-stage { padding-top: calc(96px + 84px); }
  .problem, .feature, .feature-flip, .team, .next { grid-template-columns: minmax(0, 1fr); }
  .compare-head { display: none; }
  .problem + .problem { margin-top: 26px; }
  .before { padding: 18px 20px; border: 1px solid #e0d9c9; border-bottom: 0; border-radius: 16px 16px 0 0; background: #fff; }
  .after, .problem:last-child .after { padding: 18px 20px; border: 0; border-radius: 0 0 16px 16px; }
  .compare-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; margin-bottom: 8px; font-size: 0.9rem; font-weight: 700; color: var(--mute); }
  .after .compare-label { color: var(--deep); }
  .feature { gap: 28px; margin-top: 60px; }
  .feature-flip .feature-copy { order: 0; }
  .team, .next { gap: 32px; }
  .clinic-types, .included, .local-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { padding-inline: 16px; }
  .stage { width: calc(100% - 32px); margin-top: 38px; padding-left: 34px; margin-bottom: -72px; }
  .phone { width: 112px; bottom: -18px; }
  .window-bar { height: 22px; padding: 0 10px; gap: 5px; }
  .window-bar i { width: 7px; height: 7px; }
  .section-after-stage { padding-top: calc(72px + 64px); }
  .actions .button { width: 100%; }
  table { min-width: 620px; font-size: 0.95rem; }
  th, td { padding: 12px; }
  thead th:first-child, tbody th { position: sticky; left: 0; width: 132px; }
  thead th:first-child { background: var(--mint); }
  tbody th { background: #fff; box-shadow: 1px 0 0 var(--line); }
  .table-hint { display: block; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

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