/* ============================================================
   Vonic — landing page (access-control occupancy product)
   Fonts self-hosted: fonts/inter-variable.woff2,
   fonts/space-grotesk-variable.woff2, fonts/ibm-plex-mono-*.woff2
   ============================================================ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/space-grotesk-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
}

:root {
  --navy: #0B1220;
  --navy-muted: #A9B4C2;
  --navy-faint: #6B7688;
  --teal: #17C3B2;
  --teal-deep: #109E90;
  --teal-soft: #E4F7F5;
  --cloud: #E8EDF2;
  --paper: #F7F9FB;
  --white: #FFFFFF;
  --line: rgba(11, 18, 32, 0.1);
  --line-on-dark: rgba(255, 255, 255, 0.12);
  --ink-soft: #4B5768;
  --ink-faint: #7C8797;
  --warn: #B45309;
  --warn-soft: #FDF1E0;
  --warn-line: #F0D9B5;

  /* Status accents for dark dashboard-style cards (occupancy/risk badges) */
  --teal-300: #5EEAD4;
  --amber-300: #FCD34D;
  --amber-bg-on-dark: rgba(242, 169, 59, 0.18);
  --red-300: #FCA5A5;
  --red-bg-on-dark: rgba(229, 72, 77, 0.18);

  --font-display: 'Space Grotesk', Inter, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --radius-s: 6px;
  --radius-m: 8px;
  --radius-l: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(11, 18, 20, 0.04), 0 10px 28px -14px rgba(11, 18, 32, 0.16);
  --shadow-hover: 0 4px 10px rgba(11, 18, 32, 0.06), 0 18px 36px -16px rgba(11, 18, 32, 0.2);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 240ms;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}
@media (min-width: 768px) {
  .wrap { padding: 0 var(--space-4); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line-on-dark);
  box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.5);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--space-3);
}
.site-header__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--teal);
  text-decoration: none;
  flex-shrink: 0;
}
.site-header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.site-header__logo img { height: 38px; width: auto; display: block; border-radius: var(--radius-s); }
.site-header__nav {
  display: none;
  align-items: center;
  gap: var(--space-4);
}
@media (min-width: 900px) {
  .site-header__nav { display: flex; }
}
.site-header__nav a {
  font-size: 14.5px;
  color: var(--navy-muted);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-header__nav a:hover { color: var(--white); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-header__login {
  display: none;
  font-size: 14.5px;
  color: var(--navy-muted);
  text-decoration: none;
}
@media (min-width: 640px) {
  .site-header__login { display: inline-block; }
}
.site-header__login:hover { color: var(--white); }

.site-header__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-s);
  background: transparent;
  border: 1px solid var(--line-on-dark);
  color: var(--white);
  cursor: pointer;
}
@media (min-width: 900px) {
  .site-header__menu-btn { display: none; }
}

.mobile-nav {
  display: none;
  background: var(--navy);
  border-bottom: 1px solid var(--line-on-dark);
  padding: var(--space-2) 0 var(--space-3);
}
.mobile-nav.is-open { display: block; }
@media (min-width: 900px) {
  .mobile-nav { display: none !important; }
}
.mobile-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.mobile-nav__list a {
  color: var(--navy-muted);
  text-decoration: none;
  font-size: 15px;
}
.mobile-nav__list a:hover { color: var(--white); }

/* Light header variant — homepage only; auth/dashboard pages keep the
   default dark header above. */
.site-header--light { background: var(--paper); border-bottom-color: var(--line); }
.site-header--light.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -16px rgba(11, 18, 32, 0.12); }
.site-header--light .site-header__nav a { color: var(--ink-soft); }
.site-header--light .site-header__nav a:hover { color: var(--navy); }
.site-header--light .site-header__login { color: var(--ink-soft); }
.site-header--light .site-header__login:hover { color: var(--navy); }
.site-header--light .site-header__menu-btn { border-color: var(--line); color: var(--navy); }
.mobile-nav--light { background: var(--paper); border-bottom-color: var(--line); }
.mobile-nav--light .mobile-nav__list a { color: var(--ink-soft); }
.mobile-nav--light .mobile-nav__list a:hover { color: var(--navy); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-s);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-body);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--teal);
  color: var(--navy);
}
.btn--primary:hover { background: var(--teal-deep); box-shadow: var(--shadow-hover); }
.btn--outline-dark {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line-on-dark);
}
.btn--outline-dark:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.24); }
.btn--outline {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn--outline:hover { border-color: var(--navy-faint); background: var(--paper); }
.btn--large { height: 48px; padding: 0 var(--space-4); }
.btn__spinner {
  display: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(11, 18, 32, 0.3);
  border-top-color: var(--navy);
}
.btn[data-loading="true"] .btn__spinner { display: inline-block; animation: spin 700ms linear infinite; }
.btn[data-loading="true"] .btn__label { opacity: 0.85; }
.btn[disabled] { cursor: default; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Section scaffolding
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: var(--space-2);
}
.eyebrow--on-dark { color: var(--teal); }

.section-heading {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.02em;
}

/* ============================================================
   Shared "Live" pulse dot (used by dash-card and home sections)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse-dot 2.2s ease-in-out infinite; }
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ============================================================
   Dashboard preview card (also reused by dashboard.html)
   ============================================================ */
.dash-card {
  background: #0F1830;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.6);
}
.dash-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.dash-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--navy-faint);
  margin-bottom: 4px;
}
.dash-card__title { font-size: 14.5px; font-weight: 600; color: var(--white); }
.dash-card__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(23, 195, 178, 0.12);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  flex-shrink: 0;
}
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }

.dash-card__figure { margin-bottom: var(--space-2); }
.dash-card__number {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(56px, 7vw, 80px);
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.02em;
}
.dash-card__figure-meta {
  margin-top: 6px;
  font-size: 13px;
  color: var(--navy-faint);
}
.dash-card__figure-meta strong { color: var(--navy-muted); font-weight: 500; }

.dash-card__bar {
  height: 4px;
  border-radius: var(--radius-pill);
  background: repeating-linear-gradient(to right, var(--line-on-dark) 0 4px, transparent 4px 8px);
  overflow: hidden;
  margin-bottom: var(--space-3);
  position: relative;
}
.dash-card__bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--teal);
  border-radius: inherit;
  transition: width 1.1s var(--ease-out);
}

.dash-card__chart { margin-bottom: var(--space-3); }
.dash-card__chart svg { width: 100%; height: auto; display: block; }
.dash-card__chart-path {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash-card__chart-area { fill: url(#dashChartGradient); opacity: 0.9; }
.dash-card__chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--navy-faint);
}

.dash-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-on-dark);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-bottom: var(--space-2);
}
.dash-card__stat {
  background: #0F1830;
  padding: var(--space-2);
}
.dash-card__stat-label {
  font-size: 11px;
  color: var(--navy-faint);
  margin-bottom: 4px;
}
.dash-card__stat-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 19px;
  color: var(--white);
}

.dash-card__staffing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line-on-dark);
}
.dash-card__staffing-group { display: flex; gap: var(--space-3); }
.dash-card__warn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(180, 83, 9, 0.16);
  border: 1px solid rgba(180, 83, 9, 0.35);
  font-size: 12px;
  color: #F0B15C;
}


/* ============================================================
   CTA band
   ============================================================ */
.cta-band { padding: var(--space-7) 0; }
.cta-band__card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-4);
  display: grid;
  gap: var(--space-4);
  position: relative;
  overflow: clip;
}
@media (min-width: 900px) {
  .cta-band__card { grid-template-columns: 1.1fr 1fr; align-items: center; padding: var(--space-6); }
}
.cta-band__text h2 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 500; margin-bottom: var(--space-2); max-width: 16ch; }
.cta-band__text p { font-size: 16px; line-height: 1.6; color: var(--navy-muted); max-width: 40ch; }

.cta-band__form { position: relative; z-index: 1; }
.cta-band__form label {
  display: block;
  font-size: 13px;
  color: var(--navy-muted);
  margin-bottom: 6px;
}
.cta-band__row { display: flex; flex-direction: column; gap: var(--space-2); }
@media (min-width: 480px) {
  .cta-band__row { flex-direction: row; }
}
.cta-band__input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-s);
  border: 1.5px solid var(--line-on-dark);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 15px;
  font-family: var(--font-body);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.cta-band__input::placeholder { color: var(--navy-faint); }
.cta-band__input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(23, 195, 178, 0.18);
}
.cta-band__note { margin-top: var(--space-2); font-size: 13px; color: var(--navy-faint); }
.cta-band__status { margin-top: var(--space-2); font-size: 14px; font-weight: 500; min-height: 1.3em; }
.cta-band__status[data-state="success"] { color: var(--teal); }
.cta-band__status[data-state="error"] { color: #F09090; }

/* ============================================================
   Adapter request modal ("Request yours" on the integrations
   strip) — native <dialog>, Netlify AJAX submit.
   ============================================================ */
.adapter-modal {
  position: fixed;
  margin: auto;
  width: calc(100% - var(--space-4));
  max-width: 440px;
  max-height: calc(100dvh - var(--space-5));
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: var(--space-4);
  background: var(--white);
  box-shadow: var(--shadow-hover);
  color: var(--navy);
}
.adapter-modal::backdrop { background: rgba(11, 18, 32, 0.55); }
@media (prefers-reduced-motion: no-preference) {
  .adapter-modal {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), overlay var(--dur-base) var(--ease-out) allow-discrete, display var(--dur-base) var(--ease-out) allow-discrete;
  }
  .adapter-modal[open] { opacity: 1; transform: translateY(0) scale(1); }
  @starting-style {
    .adapter-modal[open] { opacity: 0; transform: translateY(12px) scale(0.98); }
  }
}

.adapter-modal__close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-m);
  background: none;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.adapter-modal__close:hover { color: var(--navy); background: var(--cloud); }

.adapter-modal__title { font-size: 21px; font-weight: 600; margin-bottom: 6px; padding-right: var(--space-4); }
.adapter-modal__intro { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); margin-bottom: var(--space-3); }

.adapter-modal__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-3); }
.adapter-modal__field label { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.adapter-modal__optional { font-weight: 400; color: var(--ink-faint); }
.adapter-modal__field input,
.adapter-modal__field textarea {
  padding: 11px var(--space-2);
  border-radius: var(--radius-s);
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--navy);
  font-size: 15px;
  font-family: var(--font-body);
  resize: vertical;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.adapter-modal__field input::placeholder,
.adapter-modal__field textarea::placeholder { color: var(--ink-faint); }
.adapter-modal__field input:focus,
.adapter-modal__field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}

.adapter-modal .btn { width: 100%; height: 48px; margin-top: var(--space-1); }
.adapter-modal__status { margin-top: var(--space-2); font-size: 13.5px; font-weight: 500; text-align: center; min-height: 1.3em; }
.adapter-modal__status[data-state="success"] { color: var(--teal-deep); }
.adapter-modal__status[data-state="error"] { color: #C0392B; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { padding: var(--space-6) 0 var(--space-5); border-top: 1px solid var(--line); }
.site-footer__grid {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-4); }
}
.site-footer__brand .site-header__wordmark { color: var(--navy); }
.site-footer__brand p { margin-top: var(--space-2); font-size: 14.5px; color: var(--ink-faint); max-width: 32ch; }
.site-footer__col h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--space-2);
}
.site-footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer__col a { font-size: 14.5px; color: var(--ink-soft); text-decoration: none; }
.site-footer__col a:hover { color: var(--teal-deep); }

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
}
@media (min-width: 480px) {
  .site-footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ============================================================
   Scroll reveal (IntersectionObserver-driven, see landing.js)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}
