/* KL 33 MLA Connect — public static site.
   Deliberately plain CSS, no build step, no framework — this site has no
   JavaScript dependency on anything at all (see nav.js's own comment for
   the one exception: a mobile menu toggle). Colors/spacing match the
   mobile app's own theme (src/constants/theme.ts) so the site reads as the
   same product, not a generic marketing template. */

:root {
  --green: #0f701e;
  --green-dark: #0b5716;
  --text-primary: #131e31;
  --text-secondary: #6a6e75;
  --red: #c0272d;
  --border: #ececec;
  --surface: #f7f8f6;
  --white: #ffffff;
  --radius: 16px;
  --max-width: 1040px;
  --shadow: 0 2px 16px rgba(19, 30, 49, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--green);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 17px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--green);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }

  .site-nav.is-open {
    max-height: 320px;
  }

  .site-nav a {
    width: 100%;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
  }
}

/* ── Hero (home page only) ─────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  background-color: #eef6ef;
  background-image: url("images/hero-bg.webp");
  background-size: cover;
  background-position: center;
}

.hero .container {
  /* Deliberately NOT position: relative — .hero-portrait needs to anchor
     to .hero's own box (the actual background image, full-bleed) via the
     `position: relative` already on .hero above. If this container were
     also positioned, it would become the nearer ancestor instead, and
     `right: 0` / `bottom: 0` would land on its padding/max-width edges —
     inset from the image's real corner, not flush with it. */
  min-height: 460px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(15, 112, 30, 0.12);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-copy h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin: 0 0 12px;
}

.hero-copy p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 44ch;
  margin: 0 0 24px;
}

/* Pinned to the hero's bottom-right corner at every screen size —
   matches the app's own DashboardHeader, which anchors the MLA's portrait
   the same way (right: 0, bottom: -10) rather than repositioning it for
   narrow screens. Sized as a % of the hero so it scales down gracefully
   instead of the fixed max-width this used to have, which forced it to
   drop below the copy (and re-center) once the two could no longer sit
   side by side. */
.hero-portrait {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34%;
  min-width: 140px;
  max-width: 360px;
  pointer-events: none;
}

@media (max-width: 720px) {
  .hero .container {
    padding-top: 32px;
    /* Reserves room below the copy for the portrait, which is pinned to
       the corner rather than taking part in normal flow. */
    padding-bottom: 220px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-portrait {
    width: 52%;
    max-width: 220px;
  }
}

/* ── Store buttons ──────────────────────────────────────────────────── */
/* Standard "app store badge" shape/hierarchy — dark rounded pill, icon on
   the left, a small eyebrow line ("Download on the" / "GET IT ON") over a
   larger store-name line — the same layout convention both Apple's and
   Google's own official badge assets use, since there's no network access
   here to pull in their actual badge images. */

.store-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000000;
  color: var(--white);
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid #000000;
  transition: opacity 0.15s ease;
}

.store-button:hover {
  opacity: 0.85;
}

.store-button svg {
  flex-shrink: 0;
}

.store-button .store-button-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-button .eyebrow {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.store-button .store-name {
  font-size: 17px;
  font-weight: 600;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Not yet published — clickable (see nav.js), but visually distinct from a
   real working link, and its own click shows an inline "coming soon"
   notice rather than navigating anywhere. web-deploy.yml strips this
   attribute automatically once a real store URL is set. */
.store-button[data-unavailable="true"] {
  background: var(--white);
  border-color: var(--border);
  color: var(--text-primary);
}

.store-button[data-unavailable="true"] svg {
  opacity: 0.55;
}

.store-note {
  width: 100%;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 10px;
  min-height: 1.2em;
}

/* ── Generic sections ───────────────────────────────────────────────── */

section {
  padding: 56px 0;
}

.section-title {
  font-size: 26px;
  margin: 0 0 8px;
}

.section-subtitle {
  color: var(--text-secondary);
  margin: 0 0 32px;
  max-width: 60ch;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 780px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 112, 30, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 18px;
}

/* ── Page header (non-home pages) ──────────────────────────────────── */

.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.page-header p {
  margin: 0;
  color: var(--text-secondary);
}

/* ── Content page (privacy) ─────────────────────────────────────────── */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px;
}

.doc h2 {
  font-size: 19px;
  margin: 36px 0 10px;
}

.doc h2:first-of-type {
  margin-top: 0;
}

.doc p,
.doc li {
  color: var(--text-secondary);
  font-size: 15px;
}

.doc-updated {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 32px;
}

/* ── Contact / Emergency list pages ─────────────────────────────────── */

.list-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px;
}

.list-page .lead {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row .icon-circle {
  margin-bottom: 0;
  flex-shrink: 0;
}

.contact-row .details {
  flex: 1;
  min-width: 0;
}

.contact-row .details strong {
  display: block;
  font-size: 15px;
}

.contact-row .details span {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
}

.contact-row a.value {
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.emergency-row a.value {
  color: var(--red);
}

.emergency-row[data-urgent="true"] {
  background: rgba(192, 39, 45, 0.06);
  border-radius: 12px;
  padding: 18px 14px;
  border-bottom: none;
  margin-bottom: 8px;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
}

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

.site-footer .copyright {
  color: var(--text-secondary);
  font-size: 13px;
}
