/* Ellermon Holdings — one stylesheet, no build step, no external requests. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-card: #ffffff;
  --bg-inset: #eef2f7;

  --text: #0f1822;
  --text-soft: #3d4a59;
  --text-muted: #5c6a7a;

  --border: #e1e7ee;
  --border-strong: #cfd8e3;

  --accent: #2f6bc4;
  --accent-2: #23a5c9;
  --accent-text: #235699;
  --accent-soft: #edf3fb;
  --on-accent: #ffffff;

  --ok: #15803d;
  --ok-soft: #e8f6ed;
  --warn: #a45c09;
  --warn-soft: #fdf3e3;

  --shadow-sm: 0 1px 2px rgba(15, 24, 34, 0.06);
  --shadow: 0 1px 2px rgba(15, 24, 34, 0.05), 0 10px 28px -8px rgba(15, 24, 34, 0.12);
  --shadow-lg: 0 2px 4px rgba(15, 24, 34, 0.05), 0 24px 48px -16px rgba(15, 24, 34, 0.2);

  --glow: radial-gradient(60% 70% at 70% 10%, rgba(47, 107, 196, 0.13), transparent 70%),
    radial-gradient(45% 60% at 10% 0%, rgba(35, 165, 201, 0.1), transparent 70%);
  --grid-line: rgba(15, 24, 34, 0.045);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 72rem;
  --measure: 44rem;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1017;
    --bg-soft: #10161f;
    --bg-card: #131b25;
    --bg-inset: #182230;

    --text: #eef3f9;
    --text-soft: #c2cddb;
    --text-muted: #94a3b5;

    --border: #222e3d;
    --border-strong: #33455a;

    --accent: #5b9bf0;
    --accent-2: #3fc5e8;
    --accent-text: #9cc5f7;
    --accent-soft: #15222f;
    --on-accent: #08111c;

    --ok: #5bd48a;
    --ok-soft: #12241a;
    --warn: #e3a857;
    --warn-soft: #241c10;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.6);

    --glow: radial-gradient(60% 70% at 70% 10%, rgba(91, 155, 240, 0.16), transparent 70%),
      radial-gradient(45% 60% at 10% 0%, rgba(63, 197, 232, 0.1), transparent 70%);
    --grid-line: rgba(255, 255, 255, 0.035);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 clamp(1rem, 0.97rem + 0.15vw, 1.0625rem) / 1.65 -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (max-width: 30rem) {
  .wrap {
    padding-inline: 1.15rem;
  }
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip:focus {
  left: 0;
}

/* ---------- header ---------- */

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 660;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

/* A logo should not restyle itself per theme, so the tile keeps a fixed gradient in
   both appearances and the glyph stays white against it. */
.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 7px;
  background: linear-gradient(135deg, #2f6bc4, #23a5c9);
  flex: none;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px -2px rgba(47, 107, 196, 0.55);
}

.brand-mark svg {
  width: 1rem;
  height: 1rem;
  fill: #fff;
  display: block;
}

.site-nav {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-inset);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-text);
  background: var(--accent-soft);
  font-weight: 600;
}

@media (max-width: 50rem) {
  .site-header {
    position: static;
    backdrop-filter: none;
  }

  .header-inner {
    padding-block: 0.7rem;
    gap: 0.4rem;
  }

  .brand {
    margin-right: 0;
    width: 100%;
  }

  .site-nav {
    width: 100%;
    margin-left: -0.75rem;
  }
}

/* ---------- page shell ---------- */

main {
  padding: 0 0 5rem;
}

.page-head {
  position: relative;
  isolation: isolate;
  padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0 clamp(1.5rem, 1rem + 2vw, 2.5rem);
  overflow: hidden;
}

.page-head::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 150%;
  background: var(--glow);
  pointer-events: none;
  z-index: -1;
}

/* A faint engineering grid, so the hero reads as built rather than decorated. */
.page-head.hero-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 3rem 3rem;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.033em;
  margin: 0 0 0.85rem;
  max-width: 18ch;
  font-weight: 680;
}

h1.wide {
  max-width: 24ch;
}

h2 {
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem);
  line-height: 1.22;
  letter-spacing: -0.022em;
  margin: 3rem 0 0.85rem;
  font-weight: 650;
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 1.75rem 0 0.5rem;
  font-weight: 620;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 640;
  color: var(--text);
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 46rem;
  margin-bottom: 1.75rem;
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 680;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 0.85rem;
}

.updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-variant-numeric: tabular-nums;
}

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

small,
.small {
  font-size: 0.875rem;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
}

@media (max-width: 56rem) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.hero-art {
  position: relative;
}

.hero-art svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
}

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* The gradient stops at 90% accent: mixing further toward --accent-2 lifts the
     light end above 4.5:1 against the label. */
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 90%, var(--accent-2)));
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 570;
  font-size: 0.9375rem;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button .arrow {
  transition: transform 0.15s ease;
}

.button:hover .arrow {
  transform: translateX(2px);
}

.button.secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-strong);
}

.button.secondary:hover {
  background: var(--bg-inset);
  filter: none;
}

/* ---------- cards ---------- */

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin: 0 0 1.25rem;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

a.card,
.card.linked {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

a.card:hover,
.card.linked:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-bottom: 1.75rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.grid > .card {
  margin-bottom: 0;
}

/* Icon tile on feature cards. */
.icon {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent-text);
  margin-bottom: 0.9rem;
}

.icon svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- product cards ---------- */

.product-row {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  margin-bottom: 2rem;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.product.next::before {
  opacity: 0.45;
}

.product:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.product h3 {
  margin: 0.35rem 0 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.product .audience {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.product p {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
}

.product .product-link {
  margin-top: auto;
  padding-top: 1rem;
  font-weight: 570;
  font-size: 0.9375rem;
}

/* ---------- status pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 560;
  letter-spacing: 0.005em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-inset);
  color: var(--text-soft);
  border: 1px solid var(--border);
  width: fit-content;
}

.pill::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.pill.building {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 25%, transparent);
}

.pill.next {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

.pill.live {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 25%, transparent);
}

/* ---------- callout ---------- */

.callout {
  position: relative;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.15rem 1.35rem;
  margin: 0 0 1.75rem;
}

.callout > :last-child {
  margin-bottom: 0;
}

/* ---------- band ---------- */

.band {
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
  padding: clamp(2.5rem, 1.5rem + 3vw, 4rem) 0;
  margin: clamp(3rem, 2rem + 3vw, 5rem) 0;
}

.band > .wrap > :first-child {
  margin-top: 0;
}

.band h2 {
  margin-top: 0;
}

/* ---------- principles ---------- */

.principles {
  display: grid;
  gap: 1.5rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  margin: 0;
}

.principles h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.principles p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ---------- definition rows ---------- */

dl.details {
  margin: 0 0 1.75rem;
  border-top: 1px solid var(--border);
  container-type: inline-size;
}

/* Stacked is the safe default; the two-column form needs real width, and these
   lists appear both full-width and inside narrow cards. */
.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

@container (min-width: 30rem) {
  .kv {
    grid-template-columns: minmax(9rem, 15rem) 1fr;
    gap: 0.5rem 1.5rem;
  }
}

.kv dt {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.kv dd {
  margin: 0;
}

/* ---------- tables ---------- */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
  min-width: 34rem;
}

caption {
  text-align: left;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: var(--bg-inset);
  font-weight: 620;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- steps ---------- */

ol.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1.1rem;
}

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.05rem;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 640;
  font-variant-numeric: tabular-nums;
}

/* ---------- table of contents ---------- */

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin-bottom: 2.5rem;
}

.toc h2 {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-muted);
  font-weight: 680;
}

.toc ol {
  margin: 0;
  columns: 2;
  column-gap: 2rem;
  font-size: 0.9375rem;
}

@media (max-width: 40rem) {
  .toc ol {
    columns: 1;
  }
}

/* ---------- legal index ---------- */

.doc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  border-top: 1px solid var(--border);
}

.doc-list li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.doc-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1.5rem;
  align-items: center;
  padding: 1rem 0.5rem 1rem 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, padding 0.15s ease;
}

.doc-list a:hover {
  background: var(--bg-soft);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.doc-list .doc-name {
  font-weight: 600;
  color: var(--text);
}

.doc-list .doc-desc {
  grid-column: 1;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.doc-list .doc-go {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--accent-text);
  font-size: 1.1rem;
}

@media (max-width: 34rem) {
  .doc-list .doc-go {
    display: none;
  }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 3.5rem 0 2rem;
  font-size: 0.9375rem;
}

.footer-cols {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  margin-bottom: 2.5rem;
}

@media (max-width: 46rem) {
  .footer-cols {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  }
}

.footer-brand .brand {
  margin-bottom: 0.75rem;
}

.site-footer h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  font-weight: 680;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a {
  color: var(--text-soft);
  text-decoration: none;
}

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

.site-footer .muted {
  font-size: 0.875rem;
  line-height: 1.65;
}

.colophon {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

@media print {
  .site-header,
  .site-nav,
  .toc,
  .page-head::before,
  .page-head::after {
    display: none;
  }

  body {
    font-size: 10.5pt;
  }

  .card,
  .table-scroll {
    box-shadow: none;
  }
}

/* ---------- measure ----------
   Long-form prose is constrained to a readable line length; layout containers and
   anything explicitly marked .full span the whole wrapper. Only .page-body opts in,
   so a custom-layout page can run edge-to-edge by staying out of it. */

.page-body > * {
  max-width: var(--measure);
}

.page-body > .full,
.page-body > .grid,
.page-body > .product-row,
.page-body > .principles,
.page-body > .table-scroll,
.page-body > .doc-list,
.page-body > .hero,
.page-body > h1 {
  max-width: none;
}

.page-body > .lede {
  max-width: 46rem;
}

.lede.tight {
  margin-bottom: 1.25rem;
}

/* A standalone status pill needs its own breathing room; inside a product card the
   flex gap already provides it. */
.page-body > .pill,
.page-head .pill {
  margin-bottom: 1.25rem;
}
