/* Baseline CMD public site. Static, no scripts; the server's CSP allows only
   same-origin styles, images and fonts. The look follows the portal's
   default "Baseline Blue" theme (admin/src/styles.css): the same font stack,
   tokens, eyebrow and buttons, laid out as a product site. */

:root {
  --ink: #14213a;
  --muted: #66738a;
  --canvas: #f3f6fa;
  --surface: #ffffff;
  --surface-muted: #f7f9fc;
  --border: #dfe5ee;
  --border-strong: #c8d1df;
  --brand: #1769e0;
  --brand-text: #1769e0;
  --brand-dark: #0d4fa8;
  --gold: #f2a72e;
  --gold-text: #8a5300;
  --skeleton: #e3eaf3;
  --skeleton-strong: #cfd9e6;
  --device: #0b1a2e;
  --hero-glow: rgb(23 105 224 / 14%);
  --shadow: 0 14px 38px rgb(13 36 68 / 8%);
  --primary-shadow: rgb(13 79 168 / 18%);
  --secondary-ink: #25344f;
  --secondary-hover-border: #91a2b8;
  --focus-shadow: rgb(23 105 224 / 12%);
  /* The brand panel is navy in both appearances, as on the portal. */
  --auth-foreground: #edf3fb;
  --auth-muted: #b7c4d6;
  --auth-glow: rgb(23 105 224 / 32%);
  --auth-gradient-start: #0a2b54;
  --auth-gradient-end: #061427;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #edf3fb;
    --muted: #aab6ca;
    --canvas: #07111f;
    --surface: #0d1c30;
    --surface-muted: #13243a;
    --border: #243953;
    --border-strong: #39516d;
    --brand-text: #6aa3f5;
    --secondary-ink: #edf3fb;
    --secondary-hover-border: #4d6785;
    --shadow: 0 14px 38px rgb(0 0 0 / 28%);
    --gold-text: #f2b54e;
    --skeleton: #1a2d45;
    --skeleton-strong: #24405f;
    --device: #020812;
    --hero-glow: rgb(23 105 224 / 22%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --gold-text: #f2b54e;
  --skeleton: #1a2d45;
  --skeleton-strong: #24405f;
  --device: #020812;
  --hero-glow: rgb(23 105 224 / 22%);
  --ink: #edf3fb;
  --muted: #aab6ca;
  --canvas: #07111f;
  --surface: #0d1c30;
  --surface-muted: #13243a;
  --border: #243953;
  --border-strong: #39516d;
  --brand-text: #6aa3f5;
  --secondary-ink: #edf3fb;
  --secondary-hover-border: #4d6785;
  --shadow: 0 14px 38px rgb(0 0 0 / 28%);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* A column, so the footer sits at the bottom of short pages. */
body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  font-size: 1rem;
  line-height: 1.55;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--ink);
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  text-wrap: balance;
}

h2 {
  margin-bottom: 0.55rem;
  font-size: 1.35rem;
  text-wrap: balance;
}

a {
  color: var(--brand-text);
  font-weight: 650;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-shadow), 0 0 0 1px var(--brand);
  border-radius: 0.4rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -5rem;
  left: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  color: #fff;
  background: var(--brand);
  font-weight: 750;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  margin-bottom: 0.45rem;
  color: var(--brand-text);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

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

/* Buttons, as on the portal */

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.62rem;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.primary-button {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
  box-shadow: 0 7px 16px var(--primary-shadow);
}

.primary-button:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.secondary-button {
  border-color: var(--border-strong);
  color: var(--secondary-ink);
  background: var(--surface);
}

.secondary-button:hover {
  border-color: var(--secondary-hover-border);
  background: var(--surface-muted);
}

/* Layout */

.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Brand lockup and stage capsule */

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 22.5%;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-lockup strong {
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgb(242 167 46 / 45%);
  border-radius: 999px;
  color: var(--gold-text);
  background: rgb(242 167 46 / 10%);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.stage-badge::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
}

/* Header */

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-nav > a:not(.primary-button) {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.header-nav > a:not(.primary-button):hover {
  color: var(--ink);
}

.header-nav .primary-button {
  min-height: 38px;
  padding-block: 0.5rem;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .header-nav {
    gap: 0.9rem;
  }

  .header-nav .nav-wide {
    display: none;
  }
}

/* Home: hero */

.hero {
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 85% 30%, var(--hero-glow), transparent 70%),
    var(--canvas);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(3rem, 8vw, 6.5rem);
}

.hero-copy .stage-badge {
  margin-bottom: 1.4rem;
}

.hero-copy h1 {
  max-width: 15ch;
  margin-bottom: 1.1rem;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.hero-copy .subhead {
  max-width: 34rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.45;
}

.hero-copy .lede {
  max-width: 34rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.actions .primary-button,
.actions .secondary-button {
  min-height: 46px;
  padding-inline: 1.25rem;
  font-size: 0.95rem;
}

/* Abstract devices: shapes only, no product screens or claims. */

.hero-visual {
  position: relative;
  aspect-ratio: 6 / 5;
}

.device {
  position: absolute;
  padding: 0.6rem;
  border-radius: 1.6rem;
  background: var(--device);
  box-shadow: 0 30px 60px rgb(6 20 39 / 28%), inset 0 0 0 1px rgb(255 255 255 / 8%);
}

.device-screen {
  display: grid;
  height: 100%;
  overflow: hidden;
  border-radius: 1.1rem;
  background: var(--surface);
}

.device-tablet {
  inset: 4% 14% 8% 0;
}

.device-tablet .device-screen {
  grid-template-columns: 26% 1fr;
}

.device-phone {
  right: 0;
  bottom: 0;
  width: 31%;
  aspect-ratio: 9 / 19;
  padding: 0.45rem;
  border-radius: 1.5rem;
}

.device-phone .device-screen {
  align-content: start;
  gap: 0.55rem;
  padding: 1.6rem 0.65rem 0.65rem;
  border-radius: 1.15rem;
}

.screen-side {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 1rem 0.8rem;
  border-right: 1px solid var(--border);
  background: var(--surface-muted);
}

.screen-main {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.8rem;
  padding: 1rem;
}

.screen-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.screen-panel {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
}

.sk {
  display: block;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--skeleton);
}

.sk.mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.45rem;
  background: var(--brand);
}

.sk.title {
  width: 45%;
  height: 0.85rem;
  background: var(--skeleton-strong);
}

.sk.short {
  width: 55%;
}

.sk.mid {
  width: 75%;
}

.sk.accent {
  background: rgb(23 105 224 / 45%);
}

.sk.card {
  height: 3.4rem;
  border-radius: 0.6rem;
}

.sk.card.accent {
  background: rgb(23 105 224 / 18%);
}

.sk.row {
  height: 2.2rem;
  border-radius: 0.55rem;
}

.sk.dot {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--gold);
}

/* Home: modules */

.modules {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

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

.section-head h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head .lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.module {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--surface-muted);
}

.module h3 {
  margin: 0 0 0.2rem;
  color: var(--ink);
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.module p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.fine-print {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Home: where it runs */

.platforms {
  border-block: 1px solid var(--border);
  background: var(--canvas);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}

/* Icons differ in height; a fixed first row keeps the three headings level. */
.platform {
  display: grid;
  grid-template-rows: 2.1rem auto auto;
}

.platform h2 {
  margin: 0.9rem 0 0.3rem;
  font-size: 1.05rem;
}

.platform p {
  margin: 0;
  color: var(--muted);
}

.platform-icon {
  display: block;
  align-self: end;
  border: 2px solid var(--brand-text);
  border-radius: 0.45rem;
}

.platform-icon.phone {
  width: 1.05rem;
  height: 1.75rem;
}

.platform-icon.tablet {
  width: 1.6rem;
  height: 1.95rem;
  border-radius: 0.4rem;
}

.platform-icon.android {
  width: 1.15rem;
  height: 1.75rem;
  border-radius: 0.3rem;
}

.platform-icon.web {
  width: 2.1rem;
  height: 1.5rem;
  border-top-width: 5px;
  border-radius: 0.3rem;
}

/* Text pages share the home page's container and left edge, so moving
   between pages keeps the header, title and text in the same place. */

main {
  flex: 1 0 auto;
}

.doc-main {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.panel {
  max-width: 46rem;
}

.panel > h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.panel h2 {
  margin-top: 2.25rem;
  font-size: 1.2rem;
}

.panel p,
.panel ul,
.panel dl {
  max-width: 65ch;
  margin-bottom: 0.9rem;
}

.panel ul {
  padding-left: 1.2rem;
}

.panel li + li {
  margin-top: 0.35rem;
}

.panel dt {
  margin-top: 0.9rem;
  font-weight: 750;
}

.panel dd {
  margin: 0.15rem 0 0;
}

.callout {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-muted);
}

.callout p {
  margin: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-nav a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 860px) {
  .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    width: min(520px, 100%);
    margin-inline: auto;
  }
}

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

  .header-nav {
    gap: 0.9rem;
  }

  .screen-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .screen-cards .sk:last-child {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
