/* cliniweb.co.za - provider marketing site.
   Tokens mirror premiumUI (my.cliniweb + me.cliniweb portal.css) so the site,
   the EHR and the patient portal read as one product. */
@font-face {
  font-family: "Cliniweb Sans";
  src: url("/assets/fonts/OpenSans-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f5f5f1;
  --surface: #ffffff;
  --ink: #233932;
  --muted: #69756f;
  --line: #e5e9e3;
  --soft: #f3f6f1;
  --accent: #245b4b;
  --accent-dark: #194637;
  --accent-soft: #eaf1eb;
  --success: #42633b;
  --warning: #836d42;
  --warning-soft: #f5eddf;
  --danger: #9b3e39;
  --danger-soft: #f8ecea;
  --wa: #25d366;
  --shell: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 57, 50, .05), 0 12px 32px -12px rgba(35, 57, 50, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Cliniweb Sans", "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 22px; height: 22px; flex: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 10px;
  font: inherit; font-weight: 650; font-size: .95rem; text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { border-color: #cfd8cf; transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.02rem; }
.btn svg { width: 16px; height: 16px; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 245, 241, .88);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 1.15rem; letter-spacing: -.02em; }
.brand-logo { width: auto; height: 32px; flex: none; }
.footer .brand-logo { height: 26px; }
.brand-sub { font-weight: 450; font-size: .8rem; color: var(--muted); letter-spacing: 0; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 550; text-decoration: none; }
.nav-links a:hover { color: var(--ink); background: var(--soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-signin { padding: 8px 12px; border-radius: 8px; color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; }
.nav-signin:hover { background: var(--soft); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: .9rem; }

/* ---- Section scaffolding ---- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 750; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---- Hero ---- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 780; letter-spacing: -.035em; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 560px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; }
.trust li { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 550; color: var(--muted); }
.trust svg { width: 18px; height: 18px; color: var(--accent); }

/* Hero product mock: "today" schedule */
.mock {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.mock-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mock-bar strong { font-size: .95rem; }
.mock-bar span { font-size: .8rem; color: var(--muted); }
.mock-dots { display: flex; gap: 6px; }
.mock-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.appt-list { list-style: none; margin: 0; padding: 6px 0; }
.appt { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 11px 18px; }
.appt + .appt { border-top: 1px solid var(--soft); }
.appt time { font-size: .82rem; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.appt b { display: block; font-size: .92rem; font-weight: 650; }
.appt small { display: block; font-size: .78rem; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: .72rem; font-weight: 650; padding: 4px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.tag-ok { background: var(--accent-soft); color: var(--accent); }
.tag-warn { background: var(--warning-soft); color: var(--warning); }
.tag-wa { background: #e7f8ee; color: #1b7a44; }
.mock-foot { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--soft); }
.mock-foot div { padding: 12px 16px; }
.mock-foot div + div { border-left: 1px solid var(--line); }
.mock-foot b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mock-foot small { font-size: .74rem; color: var(--muted); }
.float-card {
  position: absolute; right: -14px; bottom: 92px; width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 14px; font-size: .8rem;
}
.float-card b { display: block; font-size: .85rem; margin: 2px 0; }
.float-card span { color: var(--muted); }
.float-card .tag { margin-bottom: 4px; }
.hero-visual { position: relative; padding-right: 14px; }

/* ---- Proof strip ---- */
.proof { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-grid div { padding: 26px var(--gutter); }
.proof-grid div + div { border-left: 1px solid var(--line); }
.proof-grid b { display: block; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 780; letter-spacing: -.03em; color: var(--accent); }
.proof-grid span { font-size: .88rem; color: var(--muted); }

/* ---- Day-in-the-practice journey ---- */
.journey { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.stage-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.stage-num { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.stage h3 { font-size: 1.15rem; font-weight: 700; }
.stage > p { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: .92rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) center / 11px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23245b4b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3L9.5 3.8'/%3E%3C/svg%3E");
}
.ticks li strong { font-weight: 650; }

/* ---- Feature groups ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: border-color .2s, transform .2s; }
.feature:hover { border-color: #cdd8cf; transform: translateY(-2px); }
.feature-ico { width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.feature h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 8px; }
.feature > p { font-size: .92rem; color: var(--muted); margin-bottom: 14px; }
.feature ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.feature li { font-size: .88rem; padding-left: 16px; position: relative; }
.feature li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .55; }

/* ---- Split sections (patients, AI) ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 750; margin-bottom: 16px; }
.split .lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 26px; }
.split .ticks { margin-bottom: 28px; }
.split .ticks li { font-size: .98rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow svg { width: 15px; height: 15px; }

/* Patient phone mock */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: min(310px, 100%); background: #1d2a25; border-radius: 38px; padding: 12px;
  box-shadow: 0 30px 60px -24px rgba(25, 70, 55, .45);
}
.phone-screen { background: var(--canvas); border-radius: 28px; padding: 44px 14px 18px; display: grid; gap: 10px; position: relative; }
.phone-screen::before { content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 84px; height: 20px; border-radius: 12px; background: #1d2a25; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: .82rem; }
.note-app { display: flex; align-items: center; gap: 6px; font-size: .7rem; color: var(--muted); margin-bottom: 4px; }
.note-app i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.note-app i.wa { background: var(--wa); }
.note b { display: block; font-size: .86rem; margin-bottom: 2px; }
.note span { color: var(--muted); }
.note-btn { display: table; margin-top: 8px; background: var(--accent); color: #fff; border-radius: 8px; padding: 5px 10px; font-weight: 650; font-size: .76rem; }

/* AI note mock */
.ai-mock { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; }
.ai-row { border-radius: 12px; padding: 14px 16px; font-size: .88rem; }
.ai-raw { background: var(--soft); color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.55; }
.ai-out { border: 1px solid var(--line); }
.ai-out h4 { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 10px 0 3px; }
.ai-out h4:first-child { margin-top: 0; }
.ai-label { display: flex; align-items: center; justify-content: space-between; font-size: .76rem; font-weight: 650; color: var(--muted); margin-bottom: 8px; }
.ai-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-actions .tag { font-size: .74rem; }

/* ---- Claims band ---- */
.claims { background: var(--accent); color: #fff; }
.claims .kicker { color: #bfe0d0; }
.claims h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 760; margin-bottom: 16px; }
.claims-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.claims p { color: rgba(255, 255, 255, .8); font-size: 1.05rem; margin-bottom: 22px; }
.schemes { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.schemes li { font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.claims-card { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; padding: 30px; text-align: center; }
.claims-card b { display: block; font-size: clamp(3rem, 7vw, 4.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.claims-card span { display: block; margin-top: 10px; color: rgba(255, 255, 255, .78); font-size: .95rem; }
.claims-card hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .16); margin: 20px 0; }
.claims-card small { color: rgba(255, 255, 255, .7); font-size: .85rem; }

/* ---- Security ---- */
.secure-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.badge { font-size: .8rem; font-weight: 700; letter-spacing: .03em; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.secure-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.secure-item { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.secure-item h3 { font-size: .98rem; font-weight: 700; margin-bottom: 6px; }
.secure-item p { font-size: .88rem; color: var(--muted); }

/* ---- Pricing ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; }
.price.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.price-label { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.price-amount { font-size: 2.8rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.price-amount small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price-amount.free { color: var(--accent); }
.price-amount.usage { font-size: 1.9rem; }
.price-note { font-size: .86rem; color: var(--muted); margin: 8px 0 22px; }
.price .ticks { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); }
.price .ticks li { font-size: .9rem; }
.footnote { color: var(--muted); font-size: .84rem; margin-top: 18px; }
.claims .footnote { color: rgba(255, 255, 255, .7); }
.pricing-foot { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 26px; }

/* ---- Onboarding steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: .92rem; color: var(--muted); }

/* ---- FAQ ---- */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 500; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 20px 18px; color: var(--muted); font-size: .95rem; }

/* ---- Final CTA ---- */
.cta { text-align: center; }
.cta-box { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(40px, 7vw, 72px) var(--gutter); box-shadow: var(--shadow); }
.cta h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 770; margin-bottom: 14px; }
.cta p { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto 28px; }
.cta .hero-actions { justify-content: center; margin-bottom: 18px; }
.cta small { color: var(--muted); font-size: .88rem; }

/* ---- Footer ---- */
.footer { padding: 36px 0 44px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer p { font-size: .84rem; color: var(--muted); }
.footer ul { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; }
.footer ul a { font-size: .86rem; color: var(--muted); text-decoration: none; }
.footer ul a:hover { color: var(--ink); }

/* ---- Reveal ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .feature { transition: none; }
}

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .hero-grid, .split, .claims-grid, .secure-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .journey, .pricing-grid, .steps { grid-template-columns: 1fr; }
  .split-reverse .phone-wrap, .split-reverse .ai-mock { order: 2; }
}
@media (max-width: 640px) {
  .nav-signin { display: none; }
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .proof-grid div:nth-child(3) { border-left: 0; }
  .proof-grid div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .features, .secure-list { grid-template-columns: 1fr; }
  .float-card { display: none; }
  .hero-visual { padding-right: 0; }
  .appt { grid-template-columns: 44px 1fr; }
  .appt .tag { grid-column: 2; justify-self: start; }
  .hero-actions .btn { flex: 1 1 100%; }
}
