/* BALM public site — implements docs/visual-identity.md (cold teal on slate). */
:root {
  --primary: #0e7c86;
  --primary-hover: #0b626b;
  --primary-tint: #ecfafb;
  --primary-tint-border: #cff0f2;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #5b6b82;
  --success: #15803d;
  --success-bg: #ecf8f0;
  --danger: #be2f2f;
  --danger-bg: #fdecec;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 8px 24px rgb(15 23 42 / 6%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #22a0ab;
    --primary-hover: #1aa0ac;
    --primary-tint: #0d2a2e;
    --primary-tint-border: #12454b;
    --bg: #0f172a;
    --bg-alt: #0b1222;
    --surface: #1e293b;
    --border: #334155;
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --muted: #94a3b8;
    --success: #37b26b;
    --success-bg: #12301f;
    --danger: #e06b6b;
    --danger-bg: #3a1717;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 750;
}

h3 {
  font-size: 1.08rem;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

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

svg {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.sprite {
  display: none;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 780px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}

.skip:focus {
  left: 8px;
}

:focus-visible {
  outline: 3px solid #1aa0ac;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.25em;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.btn--sm {
  padding: 0.5em 0.95em;
  font-size: 0.92rem;
}

.btn--primary {
  background: #0e7c86;
  color: #fff;
}

.btn--primary:hover {
  background: #0b626b;
}

.btn--ghost {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

.btn--ghost:hover {
  border-color: var(--primary);
}

.btn--light {
  background: #fff;
  color: #0b626b;
}

.btn--light:hover {
  background: #ecfafb;
}

.btn--outline-light {
  color: #fff;
  border-color: rgb(255 255 255 / 55%);
}

.btn--outline-light:hover {
  border-color: #fff;
  background: rgb(255 255 255 / 8%);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

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

.brand__chip {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0e7c86;
  color: #fff;
}

.brand__chip svg {
  width: 20px;
  height: 20px;
}

.brand__name {
  font-weight: 800;
  font-size: 1.2rem;
}

.brand--small .brand__chip {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.brand--small .brand__chip svg {
  width: 16px;
  height: 16px;
}

.topnav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.topnav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.95rem;
}

.topnav a:hover {
  color: var(--primary);
}

@media (max-width: 860px) {
  .topnav {
    display: none;
  }

  .topbar__inner > .btn {
    margin-left: auto;
  }
}

/* ---------- hero ---------- */
.hero {
  padding: 72px 0 80px;
  background:
    radial-gradient(1200px 400px at 85% -10%, var(--primary-tint), transparent 70%),
    var(--bg);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  color: var(--primary);
  font-weight: 650;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75em;
}

.lead {
  font-size: 1.13rem;
  color: var(--text-2);
  max-width: 38em;
}

@media (max-width: 900px) {
  .hero {
    padding: 48px 0 56px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* product illustration: two live-board cards */
.mock {
  margin: 0;
  display: grid;
  gap: 14px;
}

.mock__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.mock__card--critical {
  border-left-color: var(--danger);
}

.mock__card--ok {
  border-left-color: var(--success);
}

.mock__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.2em 0.6em;
  border-radius: 999px;
}

.tag svg {
  width: 1em;
  height: 1em;
}

.tag--danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.tag--success {
  background: var(--success-bg);
  color: var(--success);
}

.mock__issue {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 650;
  padding: 6px 10px;
  border-radius: 8px;
}

.mock__issue span {
  margin-left: auto;
  font-weight: 400;
  font-size: 0.8rem;
}

.mock__line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}

.mock__line span {
  color: var(--muted);
  font-size: 0.82rem;
}

.mock__line svg {
  color: var(--muted);
}

.mock__line--ok,
.mock__line--ok svg {
  color: var(--success);
}

/* ---------- sections ---------- */
.section {
  padding: 88px 0;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 700px) {
  .section {
    padding: 60px 0;
  }
}

.steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: none;
}

.step__n {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-tint);
  border: 1px solid var(--primary-tint-border);
  color: var(--primary);
  font-weight: 750;
  margin-bottom: 14px;
}

.step p,
.feature p,
.pillar p {
  color: var(--text-2);
  font-size: 0.97rem;
}

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

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

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

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

.feature__icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  margin-bottom: 14px;
}

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

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

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-weight: 550;
}

.checklist svg {
  color: var(--success);
  width: 22px;
  height: 22px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.pillar {
  border-left: 3px solid var(--primary);
  padding: 4px 0 4px 20px;
}

.inline-icon {
  vertical-align: -0.18em;
  color: var(--primary);
}

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

/* ---------- FAQ ---------- */
.faq {
  margin-top: 32px;
  display: grid;
  gap: 10px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  color: var(--text-2);
  margin: 0 0 16px;
}

/* ---------- contact ---------- */
.section--contact {
  background: #0e7c86;
  color: #fff;
}

.contact {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.contact p {
  color: rgb(255 255 255 / 88%);
  font-size: 1.08rem;
  margin: 0;
}

.contact__actions {
  display: grid;
  grid-template-columns: minmax(0, 260px);
  gap: 12px;
}

.contact__actions .btn {
  justify-content: center;
}

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

/* ---------- footer ---------- */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer nav a:hover {
  color: var(--primary);
}

.footer p {
  margin: 0 0 0 auto;
}

@media (max-width: 700px) {
  .footer p {
    margin: 0;
    width: 100%;
  }
}

/* ---------- legal pages ---------- */
.doc {
  padding: 56px 0 80px;
}

.doc h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
}

.doc h2 {
  font-size: 1.25rem;
  margin-top: 2em;
}

.doc p,
.doc li {
  color: var(--text-2);
}

.notice {
  background: var(--primary-tint);
  border: 1px solid var(--primary-tint-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 24px 0 8px;
  color: var(--text);
}
