*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--landing-text);
  background: var(--landing-bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--landing-focus-indicator);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 9px 13px;
  color: var(--ink);
  background: var(--gold);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { top: 12px; }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.gold { color: var(--gold); }
h1, h2, h3, .brand-word {
  margin: 0;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -.035em;
}

.site-header {
  border-bottom: 1px solid var(--landing-line);
  background: color-mix(in srgb, var(--landing-bg) 91%, transparent);
}

.header-row {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark { width: 32px; height: 32px; color: currentColor; }
.brand-word { font-size: 19px; line-height: 1; }
.primary-nav, .footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  font-weight: 600;
}

.primary-nav a, .footer-nav a { color: var(--landing-muted); text-decoration: none; }
.primary-nav a:hover, .footer-nav a:hover { color: var(--landing-text); }
.primary-nav a:first-child, .login-link { color: var(--landing-text); }
.nav-profile {
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--landing-line);
  border-radius: 7px;
  color: var(--landing-text);
  background: var(--landing-surface);
  cursor: pointer;
  font-size: 14px;
}

.theme-toggle:hover { border-color: var(--gold); }

.hero {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(38px, 7vw, 92px);
  padding: 36px 0 32px;
  border-bottom: 1px solid var(--landing-line);
}

.hero-brand, .hero-copy { min-width: 0; }
.hero-wordmark { width: min(100%, 410px); }
.wordmark { display: block; width: 100%; height: auto; }
.wordmark-light-theme { display: none; }
html[data-theme="light"] .wordmark-dark-theme { display: none; }
html[data-theme="light"] .wordmark-light-theme { display: block; }

.eyebrow {
  margin: 0 0 9px;
  color: var(--landing-accent-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1.3;
}

.hero-lede {
  max-width: 610px;
  margin: 0;
  color: var(--landing-muted-strong);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.5;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--ink); background: var(--gold); }
.button-primary:hover { background: #ffd33b; }
.button-quiet { border-color: var(--landing-line); color: var(--landing-text); background: transparent; }
.button-quiet:hover { border-color: var(--gold); }
.hero-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 13px 0 0;
  color: var(--landing-muted);
  font-size: 12px;
}

.note-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #007a4d;
  box-shadow: 0 0 0 4px color-mix(in srgb, #007a4d 20%, transparent);
}

.category-section { padding-top: 28px; }
.section-intro { margin-bottom: 20px; }
.category-section .section-intro { max-width: none; }
.category-section .section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 28px;
  align-items: end;
}

.section-intro h2 {
  max-width: none;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}

.section-intro > p:last-child {
  margin: 0;
  color: var(--landing-muted);
  font-size: 14px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  color: var(--tile-ink);
  background: var(--tile-bg);
  border: 1px solid color-mix(in srgb, var(--tile-ink) 24%, transparent);
  border-radius: 11px;
}

.category-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.category-label {
  color: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

.category-icon {
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  color: inherit;
}

.category-card-copy { max-width: 250px; }
.category-card h3 {
  color: inherit;
  font-size: clamp(18px, 1.45vw, 23px);
  line-height: 1.12;
}

.category-card p {
  margin: 8px 0 0;
  color: inherit;
  font-size: 12.5px;
  line-height: 1.42;
  opacity: .88;
}

.category-emergency { --tile-bg: var(--category-emergency); --tile-ink: #fff; }
.category-ppe { --tile-bg: var(--category-ppe); --tile-ink: #fff; }
.category-occupancy { --tile-bg: var(--category-occupancy); --tile-ink: #fff; }
.category-sds { --tile-bg: var(--category-sds); --tile-ink: #24313a; }

.how-section { padding-top: 64px; }
.how-section .section-intro { max-width: none; }
.how-section .section-intro {
  display: flex;
  gap: 24px;
  align-items: baseline;
  justify-content: space-between;
}

.how-section .section-intro .eyebrow { flex: 0 0 auto; }
.how-section .section-intro h2 { width: 100%; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--landing-line);
  border-bottom: 1px solid var(--landing-line);
}

.step-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 19px 22px 20px 0;
}

.step-card + .step-card {
  padding-left: 22px;
  border-left: 1px solid var(--landing-line);
}

.step-number,
.loop-number {
  color: var(--landing-accent-text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.step-card h3 { font-size: 17px; line-height: 1.25; }
.step-card p {
  margin: 6px 0 0;
  color: var(--landing-muted);
  font-size: 13px;
  line-height: 1.45;
}

.freemium-section { padding: 42px 0 64px; }
.freemium-line {
  margin: 0;
  padding: 16px 18px;
  color: var(--landing-muted-strong);
  background: var(--landing-surface);
  border: 1px solid var(--landing-line);
  border-left: 5px solid var(--gold);
  border-radius: 4px 9px 9px 4px;
  font-size: 14px;
}

.freemium-line strong { color: var(--landing-text); }
.freemium-line a {
  display: inline-block;
  min-height: 24px;
  margin-left: 5px;
  color: var(--landing-text);
  font-weight: 800;
  text-underline-offset: 3px;
}

.site-footer { border-top: 1px solid var(--landing-line); }
.footer-row {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand .brand-word { font-size: 16px; }
.footer-mark { width: 27px; height: 27px; }
.footer-note { padding-bottom: 18px; color: var(--landing-muted); font-size: 11.5px; }

@media (max-width: 980px) {
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-card { min-height: 200px; aspect-ratio: auto; }
  .category-icon { width: 84px; height: 84px; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 36px, 600px); }
  .header-row { min-height: 62px; gap: 12px; }
  .primary-nav { min-width: 0; gap: 8px; font-size: 12px; }
  .primary-nav .nav-how { display: inline-flex; white-space: nowrap; }
  .primary-nav > a:first-child { font-size: 12px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-word { font-size: 18px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 30px 0;
  }
  .hero-wordmark { max-width: 380px; }
  .hero-lede { font-size: 16px; }
  .category-section { padding-top: 36px; }
  .category-section .section-intro { display: block; }
  .category-section .section-intro > p:last-child { margin-top: 10px; }
  .how-section { padding-top: 52px; }
  .how-section .section-intro { display: block; }
  .how-section .section-intro h2 { margin-top: 8px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card, .step-card + .step-card { padding: 16px 0; border-left: 0; }
  .step-card + .step-card { border-top: 1px solid var(--landing-line); }
  .freemium-section { padding: 34px 0 52px; }
  .footer-row {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 22px;
  }
  .footer-nav { flex-wrap: wrap; gap: 10px 16px; }
}

@media (max-width: 520px) {
  .shell { width: calc(100% - 32px); }
  .header-row { gap: 10px; }
  .header-row > .brand .brand-word { display: none; }
  .primary-nav { flex: 1 1 auto; justify-content: flex-end; }
  .primary-nav > a:first-child { max-width: 82px; line-height: 1.2; }
  .nav-profile { max-width: 72px; }
  .login-link { font-size: 12px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 190px; }
  .category-icon { width: 72px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
