/* Public site: header, footer, sections, buttons. Draws only from tokens.css. */

/* ---------- Language switching (content carries both languages) ---------- */
html[data-lang='sw'] body [lang='en'],
html:not([data-lang='sw']) body [lang='sw'] {
  display: none !important;
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 32px;
  }
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--navy);
  color: var(--on-dark);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Emergency strip ---------- */
.emergency-strip {
  background: var(--navy);
  color: var(--on-dark);
  font-size: 0.875rem;
  font-weight: 600;
}

.emergency-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-block: 8px;
  text-align: center;
}

.emergency-strip a {
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.emergency-strip a:hover {
  text-decoration: underline;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5a5a;
  box-shadow: 0 0 0 0 rgba(255, 90, 90, 0.6);
  animation: pulse 2s infinite;
  flex: none;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(255, 90, 90, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 90, 90, 0);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--teal);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.625rem;
  letter-spacing: 0.32em;
  color: var(--gold);
  font-weight: 700;
  margin-top: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .brand-name {
    color: var(--teal-light);
  }
}

.nav {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  transition:
    background 0.2s,
    color 0.2s;
}

.nav a:hover,
.nav a[aria-current='page'] {
  background: var(--teal-soft);
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 960px) {
  .nav {
    display: flex;
  }
  .menu-toggle {
    display: none !important;
  }
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  background: var(--surface);
}

.lang-toggle button {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.lang-toggle button[aria-pressed='true'] {
  background: var(--primary);
  color: var(--on-primary);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.mobile-nav {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mobile-nav a {
  display: block;
  padding: 14px 20px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s,
    box-shadow 0.2s,
    color 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 8px 20px -10px rgba(21, 97, 101, 0.7);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 10px 24px -12px rgba(220, 167, 68, 0.9);
}

.btn-gold:hover {
  background: #e5b55a;
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.06);
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--teal-soft);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--gradient-hero);
  color: var(--on-dark);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 40px;
  padding-block: 56px 64px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    padding-block: 88px 96px;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 700;
  margin: 18px 0 18px;
  letter-spacing: -0.025em;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero .lead {
  font-size: 1.125rem;
  color: var(--on-dark-muted);
  max-width: 36rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-media {
  position: relative;
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-elegant);
}

.hero-card {
  position: absolute;
  left: -12px;
  bottom: -22px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-lift);
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 300px;
}

.hero-card .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex: none;
}

.hero-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
}

.hero-card span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .hero-card {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 30px;
  font-size: 0.875rem;
  color: var(--on-dark-muted);
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-row svg {
  color: var(--gold);
}

/* ---------- Sections ---------- */
.section {
  padding-block: 72px;
}

.section-soft {
  background: var(--gradient-soft);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 40px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  margin: 12px 0 14px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.eyebrow.dark {
  color: var(--teal);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .eyebrow.dark {
    color: var(--gold);
  }
}

.grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.35s,
    box-shadow 0.35s;
}

a.card {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.card .ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--primary);
  margin-bottom: 18px;
}

.card .ico.gold {
  background: var(--gold-soft);
  color: #9a6b12;
}

.card h3 {
  font-size: 1.1875rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.card .more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--primary);
}

/* ---------- Four-step first-aid band ---------- */
.steps {
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
  box-shadow: var(--shadow-card);
}

.step-word {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.step:nth-child(4) .step-word {
  color: #b5841f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .step-word {
    color: var(--teal-light);
  }
  :root:not([data-theme='light']) .step:nth-child(4) .step-word {
    color: var(--gold);
  }
}

.step-num {
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--border-strong);
  font-size: 0.875rem;
}

.step p {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: 0.9375rem;
}

/* ---------- Dark band (CTA) ---------- */
.band {
  background: var(--gradient-hero);
  color: var(--on-dark);
  border-radius: var(--radius-xl);
  padding: 44px 28px;
  display: grid;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-elegant);
}

@media (min-width: 860px) {
  .band {
    grid-template-columns: 1.4fr auto;
    padding: 56px;
  }
}

.band h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  margin: 10px 0 10px;
}

.band p {
  color: var(--on-dark-muted);
}

.band .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Notice / callouts ---------- */
.callout {
  display: flex;
  gap: 14px;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.callout.danger {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}

.callout.gold {
  background: var(--gold-soft);
  border-color: color-mix(in srgb, var(--gold) 50%, transparent);
}

.callout .ico {
  flex: none;
  color: var(--danger);
  margin-top: 2px;
}

.callout.gold .ico {
  color: #9a6b12;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .callout.gold .ico {
    color: var(--gold);
  }
}

.callout h3 {
  font-size: 1.0625rem;
  margin-bottom: 4px;
}

.callout p,
.callout li {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.callout ul {
  padding-left: 18px;
  margin-top: 6px;
}

/* ---------- Prose pages ---------- */
.page-hero {
  background: var(--gradient-hero);
  color: var(--on-dark);
  padding-block: 56px 60px;
}

.page-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  margin: 14px 0 12px;
}

.page-hero p {
  color: var(--on-dark-muted);
  max-width: 42rem;
  font-size: 1.0625rem;
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 40px 0 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.prose ul {
  padding-left: 20px;
}

.prose strong {
  color: var(--text);
}

/* Do / don't lists on the first-aid page */
.do-list,
.dont-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.do-list li,
.dont-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.do-list li::before,
.dont-list li::before {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.875rem;
}

.do-list li::before {
  content: '✓';
  background: var(--teal-soft);
  color: var(--primary);
}

.dont-list li::before {
  content: '✕';
  background: var(--danger-soft);
  color: var(--danger);
}

.do-list li span,
.dont-list li span {
  color: var(--text);
  font-weight: 600;
}

.do-list small,
.dont-list small {
  display: block;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--on-dark-muted);
  padding-top: 56px;
  margin-top: 0;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 32px;
  padding-bottom: 40px;
}

@media (min-width: 860px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  }
}

.site-footer .brand-name {
  color: var(--on-dark);
}

.site-footer h4 {
  color: var(--on-dark);
  font-size: 0.9375rem;
  margin-bottom: 14px;
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: var(--on-dark-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-tag {
  margin-top: 14px;
  max-width: 26rem;
}

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-block: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
}

.footer-bottom em {
  font-style: normal;
  color: var(--gold);
}

/* ---------- Floating chat button ---------- */
.fab-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  box-shadow: var(--shadow-lift);
}

@media print {
  .site-header,
  .site-footer,
  .emergency-strip,
  .fab-chat,
  .no-print {
    display: none !important;
  }
  .page-hero {
    background: none;
    color: #000;
    padding: 0 0 16px;
  }
  .page-hero p {
    color: #333;
  }
  body {
    background: #fff;
  }
}
