@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url("../fonts/poppins/Poppins-Regular.ttf") format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url("../fonts/poppins/Poppins-Medium.ttf") format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url("../fonts/poppins/Poppins-SemiBold.ttf") format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url("../fonts/poppins/Poppins-Bold.ttf") format('truetype'); }

:root {
  --ink: #0f1f2e;
  --muted: #566676;
  --line: #e2e8ee;
  --bg: #f5f7f9;
  --surface: #ffffff;
  --brand: #0b4f6c;
  --brand-dark: #082f42;
  --sky: #00a1de;
  --sun: #fad201;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 31, 46, .04), 0 8px 24px rgba(15, 31, 46, .06);
  --font-head: 'Poppins', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; }
a { color: inherit; }
.icon { width: 1em; height: 1em; flex: none; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.brand img { display: block; height: 48px; width: auto; }
.brand .divider { width: 1px; height: 36px; background: var(--line); }

.lang { display: flex; gap: 2px; padding: 3px; margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.lang button {
  border: 0; background: transparent; cursor: pointer;
  font: 600 13px/1 var(--font-body); color: var(--muted);
  padding: 8px 12px; border-radius: 999px; letter-spacing: .02em;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-current="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(15, 31, 46, .12); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1000px 420px at 85% -10%, rgba(0, 161, 222, .35), transparent 60%),
    linear-gradient(135deg, var(--brand-dark), var(--brand));
}
/* Imigongo-style chevron band along the bottom of the hero. */
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; opacity: .14;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28'%3E%3Cpath d='M0 26 12 14 24 26 36 14 48 26M0 14 12 2 24 14 36 2 48 14' fill='none' stroke='white' stroke-width='3'/%3E%3C/svg%3E") repeat-x left bottom / 48px 28px;
}
.hero .wrap {
  position: relative; padding-top: 56px; padding-bottom: 96px;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}
.eyebrow::before { content: ''; width: 24px; height: 3px; border-radius: 2px; background: var(--sun); }
.hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 700; max-width: 760px; margin-top: 18px; letter-spacing: -.01em; }
.hero h1 span { color: #7fd6f5; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); max-width: 640px; color: rgba(255, 255, 255, .82); margin: 18px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 15px/1 var(--font-body); text-decoration: none;
  padding: 14px 22px; border-radius: 12px; border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { border-color: #fff; }
/* Right-hand hero panel: a sample certificate plus the trust points. */
.hero-panel {
  padding: 22px; border-radius: 20px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
}
.sample {
  position: relative; padding: 18px; border-radius: 14px; background: #fff; color: var(--ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25); transform: rotate(-1.5deg);
}
.sample-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sample-top img { height: 30px; width: auto; display: block; }
.sample-tag { font: 600 10.5px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--line); padding: 5px 8px; border-radius: 6px; }
.sample-title { font: 600 14px/1.3 var(--font-head); margin-top: 14px; }
.sample-body { display: flex; gap: 14px; align-items: flex-end; margin-top: 12px; }
.sample-lines { flex: 1; display: grid; gap: 8px; }
.sample-lines span { display: block; height: 8px; border-radius: 4px; background: #e8edf2; }
.sample-lines span:nth-child(1) { width: 90%; }
.sample-lines span:nth-child(2) { width: 70%; }
.sample-lines span:nth-child(3) { width: 80%; }
.sample-lines span:nth-child(4) { width: 55%; }
.sample-qr { width: 64px; height: 64px; flex: none; color: var(--ink); }
.verified {
  position: absolute; right: -10px; top: -12px; display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--font-body); color: #fff; background: #13865a;
  padding: 7px 10px; border-radius: 999px; box-shadow: 0 6px 16px rgba(19, 134, 90, .35); transform: rotate(1.5deg);
}
.verified .icon { font-size: 14px; }
.trust { display: grid; gap: 12px; list-style: none; padding: 0; margin: 22px 0 0; color: rgba(255, 255, 255, .88); font-size: 14px; }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust .icon { font-size: 18px; color: var(--sun); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 700; }
.section-head p { color: var(--muted); margin: 10px 0 0; }

/* ---------- Services ---------- */
#services { margin-top: -56px; padding-top: 0; padding-bottom: 0; position: relative; }
#services .section-head { background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; padding: 28px 28px 0; max-width: none; margin: 0; }
.services-panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid {
  display: grid; gap: 20px; padding: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.card {
  --tint: var(--sky);
  position: relative; display: flex; flex-direction: column;
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
a.card:hover, a.card:focus-visible { border-color: var(--tint); box-shadow: var(--shadow); transform: translateY(-2px); outline: none; }
.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  font-size: 26px; color: var(--tint);
  background: color-mix(in srgb, var(--tint) 12%, white);
}
.card h3 { font-size: 19px; font-weight: 600; margin-top: 20px; }
.card p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.needs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 18px 0 0; }
.needs li { font-size: 12.5px; font-weight: 500; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.needs-label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 18px; }
.needs-label + .needs { margin-top: 8px; }
.card-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 22px; font-weight: 600; font-size: 15px; color: var(--tint); }
.card-cta .icon { transition: transform .15s ease; }
a.card:hover .card-cta .icon { transform: translateX(4px); }

[data-service="covid_results"] { --tint: #0a7cc2; }
[data-service="covid_vaccine"] { --tint: #13865a; }
[data-service="immunization"]  { --tint: #c77700; }
[data-service="logbook"]       { --tint: #6b4fc4; }
[data-service="hpv"]           { --tint: #c2416f; }

.card.soon { border-style: dashed; background: #fbfcfd; }
.card.soon .card-cta { color: var(--muted); }
.badge {
  position: absolute; top: 20px; right: 20px;
  font: 600 11.5px/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase;
  color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, white);
  padding: 6px 10px; border-radius: 999px;
}

/* ---------- How it works ---------- */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { position: relative; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step-num {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  font: 700 15px/1 var(--font-head); color: #fff; background: var(--brand);
}
.step h3 { font-size: 17px; font-weight: 600; margin-top: 16px; }
.step p { color: var(--muted); font-size: 15px; margin: 6px 0 0; }

/* ---------- Help ---------- */
.help {
  display: grid; gap: 24px; align-items: center;
  grid-template-columns: 1fr auto;
  padding: 32px; border-radius: var(--radius);
  background: linear-gradient(135deg, #eaf6fc, #f4f9f6); border: 1px solid #d6eaf3;
}
.help h2 { font-size: 24px; font-weight: 700; }
.help p { color: var(--muted); margin: 8px 0 0; }
.contacts { display: flex; flex-wrap: wrap; gap: 12px; }
.contact {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  padding: 12px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
}
.contact .icon { font-size: 20px; color: var(--brand); }
.contact small { display: block; font-size: 12px; color: var(--muted); }
.contact strong { display: block; font-size: 15px; }
.contact:hover { border-color: var(--brand); }

/* ---------- Footer ---------- */
footer { background: var(--brand-dark); color: rgba(255, 255, 255, .75); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 28px; }
footer a { color: #fff; }
footer .addr { margin: 0; }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero-panel { padding: 0; background: none; border: 0; backdrop-filter: none; }
  .sample { display: none; }
  .trust { margin: 0; }
}
@media (max-width: 720px) {
  .topbar .wrap { min-height: 64px; }
  .brand { gap: 10px; }
  .brand img { height: 36px; }
  .brand .divider { height: 28px; }
  .lang button { padding: 7px 9px; }
  .hero .wrap { padding-top: 40px; padding-bottom: 88px; }
  .hero-actions .btn { flex: 1 1 auto; }
  section { padding: 56px 0; }
  #services .section-head { padding: 22px 20px 0; }
  .grid { padding: 20px; gap: 16px; }
  .help { grid-template-columns: 1fr; padding: 24px; }
}
@media (max-width: 380px) {
  .brand .rbc, .brand .divider { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ======================================================================
   Service opening pages (common/_service_page.html)
   ====================================================================== */
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.back-link { font: 600 14px/1 var(--font-body); color: var(--brand); text-decoration: none; white-space: nowrap; }
.back-link:hover { text-decoration: underline; }

.svc-band {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 360px at 85% -20%, rgba(0, 161, 222, .35), transparent 60%),
    linear-gradient(135deg, var(--brand-dark), var(--brand));
}
.svc-band::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; opacity: .14;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='28' viewBox='0 0 48 28'%3E%3Cpath d='M0 26 12 14 24 26 36 14 48 26M0 14 12 2 24 14 36 2 48 14' fill='none' stroke='white' stroke-width='3'/%3E%3C/svg%3E") repeat-x left bottom / 48px 28px;
}
.svc-band .wrap { position: relative; padding-top: 40px; padding-bottom: 120px; }
.svc-band h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; margin-top: 14px; }
.svc-band .lead { font-size: clamp(15px, 1.8vw, 18px); max-width: 640px; color: rgba(255, 255, 255, .82); margin: 12px 0 0; }

.svc-layout {
  position: relative; margin-top: -88px; padding-bottom: 72px;
  display: grid; gap: 24px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  grid-template-areas: "info form";
}
.svc-form { grid-area: form; }
/* The info column starts below the band so only the form overlaps it. */
.svc-info { grid-area: info; display: grid; gap: 0; margin-top: 120px; padding-right: 8px; }

.form-card {
  position: relative; overflow: hidden; padding: 32px 30px 28px;
  background: var(--surface); border-radius: 20px;
  border: 1px solid rgba(11, 79, 108, .08);
  box-shadow: 0 2px 4px rgba(8, 47, 66, .06), 0 24px 56px rgba(8, 47, 66, .18);
}
.form-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: var(--tint, var(--brand)); }
.form-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.form-card-head .card-icon { width: 46px; height: 46px; font-size: 23px; }
.form-card-head h2 { font-size: 19px; font-weight: 600; }
.form-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input {
  width: 100%; height: 48px; padding: 0 14px;
  font: 16px/1 var(--font-body); color: var(--ink); background: var(--surface);
  border: 1.5px solid #cfd8e1; border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #8796a5; }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(11, 79, 108, .14); }
.field .hint { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

.btn-primary {
  width: 100%; margin-top: 6px; cursor: pointer;
  color: #fff; background: var(--brand); border: 0; padding: 16px 22px;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { cursor: progress; opacity: .85; transform: none; }
.btn-primary .spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.btn-primary[aria-busy="true"] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.privacy { display: flex; gap: 8px; margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.privacy .icon { font-size: 16px; margin-top: 1px; }

/* Flash messages */
.alert { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 18px; border-radius: 10px; font-size: 14.5px; border: 1px solid; }
.alert .icon { font-size: 18px; margin-top: 1px; }
.alert--error { color: #8a1c1c; background: #fdf0f0; border-color: #f3c9c9; }
.alert--info { color: #0b4f6c; background: #eef7fc; border-color: #cbe5f3; }

/* ID-type switch on the immunization page. Panels only collapse once JS runs,
   so without JS every input stays visible and usable. */
.seg { display: none; }
.js .seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; margin: 0 0 18px; border: 0; background: var(--bg); border-radius: 12px;
}
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: grid; place-items: center; text-align: center; cursor: pointer;
  min-height: 40px; padding: 6px 8px; border-radius: 9px;
  font: 600 13px/1.2 var(--font-body); color: var(--muted);
}
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 31, 46, .14); }
.seg input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 1px; }
.js .id-panel[hidden] { display: none; }

/* Info column */
.info-card { padding: 22px 0; border-bottom: 1px solid var(--line); }
.info-card:first-child { padding-top: 0; }
.info-card h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.info-card h3 .icon { font-size: 20px; color: var(--tint, var(--brand)); }
.info-card p, .info-card li { color: var(--muted); font-size: 15px; }
.info-card p { margin: 8px 0 0; }
.info-card ul { margin: 8px 0 0; padding-left: 20px; }
.info-card li + li { margin-top: 4px; }
.info-card.help-card { margin-top: 24px; padding: 22px 24px; border: 1px solid #d6eaf3; border-radius: var(--radius); background: linear-gradient(135deg, #eaf6fc, #f4f9f6); }
.help-card .contacts { margin-top: 14px; }

@media (max-width: 900px) {
  .svc-layout { grid-template-columns: 1fr; grid-template-areas: "form" "info"; }
  .svc-info { margin-top: 8px; padding-right: 0; }
}
@media (max-width: 720px) {
  .topbar-actions { gap: 10px; }
  .back-link { font-size: 13px; }
  .svc-band .wrap { padding-top: 28px; padding-bottom: 104px; }
  .form-card { padding: 22px 18px; }
  .svc-layout { padding-bottom: 48px; }
}
@media (max-width: 400px) {
  .back-link { font-size: 20px; }
  .back-link .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
