/* Public website for hospitals and the SaaS homepage. Colour comes from settings via --brand. */
:root {
  --brand: #0B6E99;
  --ink: #14212B;
  --ink-soft: #4A5A66;
  --paper: #FFFFFF;
  --mist: #F2F6F8;
  --line: #DCE3E8;
  --brand-wash: color-mix(in srgb, var(--brand) 9%, white);
  --radius: 10px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, white); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.tinted { background: var(--mist); border-top: 0; }
.muted { color: var(--ink-soft); }

/* Emergency strip: the one thing a patient may need in a hurry */
.emergency { background: var(--ink); color: #fff; font-size: .95rem; }
.emergency .wrap { display: flex; gap: 1.5rem; justify-content: space-between; align-items: center; padding: .5rem 0; flex-wrap: wrap; }
.emergency a { color: #fff; font-weight: 700; text-decoration: none; }

header.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand img { height: 44px; width: auto; }
.brand strong { font-family: var(--serif); font-size: 1.3rem; }
nav.menu { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
nav.menu a { color: var(--ink); text-decoration: none; font-weight: 500; }
nav.menu a:hover { color: var(--brand); }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: var(--radius); padding: .8rem 1.3rem; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0; background: linear-gradient(180deg, var(--brand-wash), var(--paper)); }
.hero .grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); }
.hero img { border-radius: 18px; aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%; }
.hero .actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Lists instead of identical cards */
.rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
.rows > * { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.stat { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--brand); line-height: 1; }

.doctor { display: grid; grid-template-columns: 88px 1fr; gap: 1.1rem; align-items: center; text-decoration: none; color: var(--ink); }
.doctor img, .doctor .initials { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--brand-wash); display: grid; place-items: center; font: 600 1.6rem var(--serif); color: var(--brand); }
.doctor .spec { color: var(--brand); font-weight: 600; font-size: .95rem; }

.dept { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.dept a { font-weight: 600; text-decoration: none; }

details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
details summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }

blockquote { margin: 0; padding-left: 1.2rem; border-left: 3px solid var(--brand); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.gallery img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* Forms */
form.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.2rem, 3vw, 2rem); }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea { font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
.field .error, .error { color: #B42318; font-size: .9rem; }
.notice { background: var(--brand-wash); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.hp { position: absolute; left: -9999px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; align-items: start; }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem; }
.plan.featured { border: 2px solid var(--brand); }
.plan .price { font-family: var(--serif); font-size: 2.3rem; }
.plan ul { padding-left: 1.1rem; }

footer.bottom { background: var(--ink); color: #D5DEE5; padding: 3rem 0; margin-top: 0; }
footer.bottom a { color: #fff; }
footer.bottom .grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }

.map iframe { width: 100%; height: 340px; border: 0; border-radius: var(--radius); }

@media (max-width: 860px) {
  .hero .grid, .cols-2, .cols-3, footer.bottom .grid { grid-template-columns: 1fr; }
  nav.menu { gap: .9rem; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
