/* Axiomatics AI demos portal.
   Follows axiomatics.com's design system: Lynea Sans throughout, the blue and gray scales
   (blue-500 primary, blue-900 navy, gray-200 page), pill buttons and 20px-rounded cards.
   The brand red appears only in the logo and one small mark in the hero. */

/* Connext Sans is kept available for future use; nothing references it today, so browsers
   never download it. */
@font-face { font-family: "Connext Sans"; src: url("fonts/ConnextSans-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Connext Sans"; src: url("fonts/ConnextSans-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lynea Sans"; src: url("fonts/LyneaSans-Light.woff") format("woff"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Lynea Sans"; src: url("fonts/LyneaSans-Book.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lynea Sans"; src: url("fonts/LyneaSans-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }

:root {
  /* axiomatics.com scales */
  --blue-100: #D7E2FE;
  --blue-300: #7789FD;
  --blue-500: #2620F9;
  --blue-600: #0B06D6;
  --blue-900: #05024F;
  --gray-100: #F9FAFA;
  --gray-200: #F0F3F4;
  --gray-300: #D3D9DE;
  --gray-500: #7B8E9E;
  --gray-600: #576875;
  --gray-700: #37424A;
  --brand-red: #E4002B;

  --radius-card: 20px;
  --font: "Lynea Sans", Arial, sans-serif;
  --shadow-rest: 0 1px 2px rgb(5 2 79 / .04);
  --shadow-lift: 0 12px 32px -12px rgb(5 2 79 / .22), 0 2px 6px rgb(5 2 79 / .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--gray-200);
  color: var(--gray-700);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: var(--font); color: var(--blue-900); margin: 0; }
strong { font-weight: 500; }
a { color: var(--blue-500); }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--gray-500); font-size: 14px; }
.icon { width: 1em; height: 1em; flex: none; }

/* ---- top bar ---- */
.topbar { background: #fff; border-bottom: 1px solid var(--gray-300); }
.topbar-inner { display: flex; align-items: center; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { display: block; height: 30px; width: auto; }
.brand-divider { width: 1px; height: 26px; background: var(--gray-300); }
.brand-product { font-weight: 400; font-size: 18px; color: var(--blue-900); white-space: nowrap; }

/* ---- hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--blue-900);
  padding: 44px 0 46px;
}
.hero-burst {
  position: absolute;
  right: -90px;
  top: 50%;
  width: 420px;
  height: 420px;
  transform: translateY(-50%);
  fill: #fff;
  opacity: .07;
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-mark { display: block; width: 32px; height: 3px; border-radius: 2px; background: var(--brand-red); margin-bottom: 16px; }
.hero h1 {
  color: #fff;
  font-weight: 300;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.2;
  letter-spacing: -.01em;
  max-width: 980px;
  text-wrap: balance;
}

/* ---- buttons ---- */
.btn-ghost {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px;
  border-radius: 9999px; border: 1px solid var(--gray-300); background: #fff;
  color: var(--blue-900); font-family: var(--font); font-weight: 400; font-size: 15px;
  text-decoration: none; white-space: nowrap;
  transition: border-color 150ms ease;
}
.btn-ghost:hover { border-color: var(--blue-900); }

/* Google's light "Sign in with Google" button: white, 1px #747775 outline, pill shape,
   18px logo, 10px gap, medium 14px label. */
.btn-google {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px 0 12px; border-radius: 20px;
  background: #fff; color: #1F1F1F; border: 1px solid #747775;
  font-family: Roboto, "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: .25px; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}
.btn-google:hover { background: #F8FAFF; box-shadow: 0 1px 2px rgb(60 64 67 / .3), 0 1px 3px 1px rgb(60 64 67 / .15); }
.btn-google:active { background: #EEF2FC; }
.btn-google-icon { display: flex; }
.btn-ghost:focus-visible, .btn-google:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--blue-500); outline-offset: 3px;
}

/* ---- the internal-demos panel ---- */
.access-panel {
  margin-top: -26px;           /* overlaps the hero's lower edge */
  position: relative;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: #fff; border-radius: var(--radius-card);
  box-shadow: 0 10px 30px -18px rgb(5 2 79 / .35), 0 1px 2px rgb(5 2 79 / .05);
  padding: 18px 22px;
}
/* Sign-in state at a glance: soft amber while locked, soft green once signed in. */
.access-icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%; font-size: 15px;
}
.access-icon-locked { background: #FFF3DC; color: #A15C07; }
.access-icon-open { background: #E3F4EA; color: #17804C; }
.access-text { flex: 1 1 320px; }
.access-text h2 { font-size: 18px; font-weight: 500; line-height: 1.3; }
.access-text p { margin: 2px 0 0; }
.access-text .badge-internal { vertical-align: 1px; }

/* ---- demos ---- */
main { padding-bottom: 64px; }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 18px; }
.section-head h2 { font-size: 28px; font-weight: 300; line-height: 1.2; display: flex; align-items: baseline; gap: 10px; }
.count { font-size: 15px; font-weight: 400; color: var(--gray-500); }
.legend { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--gray-600); font-size: 14px; }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }
.legend .chip { background: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid transparent; border-radius: var(--radius-card);
  box-shadow: var(--shadow-rest);
  padding: 22px 24px 20px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.card:hover, .card:focus-within { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--blue-100); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
.kind {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--gray-600);
}
.kind .icon { font-size: 15px; color: var(--blue-500); }
.card h3 { font-size: 20px; font-weight: 500; line-height: 1.3; margin-top: 14px; }
.card-text { margin: 8px 0 0; }

.on-demand {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--gray-600);
}
.on-demand .icon { font-size: 15px; margin-top: 2px; color: var(--gray-500); }
.on-demand strong { color: var(--gray-700); }

.card-foot {
  margin-top: auto; padding-top: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-foot::before { content: ""; flex-basis: 100%; height: 1px; background: var(--gray-200); margin-bottom: 4px; }
.themes { display: flex; flex-wrap: wrap; gap: 6px; }

/* Theme chips: one neutral style; the icon tells them apart. */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  padding: 6px 10px 6px 8px; border-radius: 9999px;
  background: var(--gray-200); color: var(--gray-700);
}
.chip .icon { font-size: 13px; color: var(--blue-500); }

.badge-internal {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  padding: 6px 10px 6px 8px; border-radius: 9999px;
  background: var(--blue-900); color: #fff;
}
.badge-internal .icon { font-size: 12px; }
.badges { display: inline-flex; align-items: center; gap: 8px; }
/* Restricted: the same shape as Internal, outlined, so it adds no new colour. */
.badge-restricted {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  padding: 5px 9px 5px 7px; border-radius: 9999px;
  border: 1px solid var(--blue-900); color: var(--blue-900); background: #fff;
}
.badge-restricted .icon { font-size: 13px; }

/* The card's call to action; `.stretched` makes the whole card its click target. */
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 9999px; border: 0;
  background: var(--blue-500); color: #fff;
  font-family: var(--font); font-size: 14px; font-weight: 500; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms ease, gap 150ms ease;
}
.cta .icon { font-size: 15px; }
.card:hover .cta { background: var(--blue-600); gap: 11px; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); }

.alert { margin-top: 28px; padding: 14px 18px; border-radius: 14px; background: #FDEBEE; color: #7A0016; }
.access-panel + .alert, .alert + .access-panel { margin-top: 20px; }

.footer { border-top: 1px solid var(--gray-300); background: #fff; padding: 22px 0; color: var(--gray-500); font-size: 14px; }

/* ---- video dialog ---- */
.video-dialog { width: min(1100px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius-card); background: #000; overflow: hidden; }
.video-dialog::backdrop { background: rgb(5 2 79 / .8); }
.video-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 20px; background: var(--blue-900); }
.video-dialog-head h2 { color: #fff; font-size: 17px; font-weight: 400; }
.video-close { background: transparent; border: 0; color: #fff; font-size: 28px; line-height: 1; width: 40px; height: 40px; cursor: pointer; border-radius: 9999px; }
.video-close:hover { background: rgb(255 255 255 / .12); }
.video-dialog video { display: block; width: 100%; max-height: calc(100vh - 120px); background: #000; }

@media (prefers-reduced-motion: reduce) {
  .card, .cta { transition: none; }
  .card:hover, .card:focus-within { transform: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .brand img { height: 24px; }
  .hero { padding: 30px 0 48px; }
  .hero-burst { width: 300px; height: 300px; right: -120px; }
  .access-panel { padding: 16px; }
  .grid { grid-template-columns: 1fr; }
}

/* ===================================================================== docs */
.topbar-inner { justify-content: space-between; }
.topbar-link { color: var(--blue-900); font-size: 15px; text-decoration: none; }
.topbar-link:hover { color: var(--blue-500); }

.docs-body { background: #fff; }
.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 200px;
  gap: 48px;
  align-items: start;
  padding-top: 36px; padding-bottom: 72px;
}
.docs-sidebar, .docs-toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.docs-menu > summary { display: none; }
.docs-nav-section + .docs-nav-section { margin-top: 22px; }
.docs-nav-title {
  margin: 0 0 8px; font-size: 12px; font-weight: 500; letter-spacing: .09em;
  text-transform: uppercase; color: var(--gray-500);
}
.docs-nav ul, .docs-toc ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a {
  display: block; padding: 5px 10px; margin-left: -10px; border-radius: 8px;
  color: var(--gray-700); text-decoration: none; font-size: 15px; line-height: 1.4;
}
.docs-nav a:hover { background: var(--gray-200); color: var(--blue-900); }
.docs-nav a[aria-current="page"] { background: var(--blue-100); color: var(--blue-900); font-weight: 500; }
.docs-toc a { display: block; padding: 4px 0; color: var(--gray-600); text-decoration: none; font-size: 14px; line-height: 1.4; }
.docs-toc a:hover { color: var(--blue-500); }

.docs-article { max-width: 760px; }
.docs-crumb { margin: 0 0 6px; font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-500); }
.docs-article > h1 { font-size: clamp(30px, 3.4vw, 40px); font-weight: 300; line-height: 1.15; letter-spacing: -.01em; }
.docs-lede { margin: 12px 0 0; font-size: 19px; line-height: 1.5; color: var(--gray-600); }
.docs-meta { margin: 10px 0 0; font-size: 13px; color: var(--gray-500); }

/* Rendered Markdown */
.prose { margin-top: 28px; font-size: 16.5px; line-height: 1.7; color: var(--gray-700); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 44px 0 12px; font-size: 26px; font-weight: 400; line-height: 1.25; scroll-margin-top: 24px; }
.prose h3 { margin: 30px 0 8px; font-size: 19px; font-weight: 500; line-height: 1.35; scroll-margin-top: 24px; }
.prose p, .prose ul, .prose ol, .prose table, .prose .highlight, .prose .admonition { margin: 14px 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose a { color: var(--blue-500); text-underline-offset: 2px; }
.prose strong { color: var(--blue-900); }
.prose .headerlink { margin-left: 8px; color: var(--gray-300); text-decoration: none; opacity: 0; transition: opacity 120ms; }
.prose h2:hover .headerlink, .prose h3:hover .headerlink { opacity: 1; }
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em;
  background: var(--gray-200); color: var(--blue-900); padding: 2px 5px; border-radius: 5px;
  overflow-wrap: anywhere;
}
.prose .highlight { background: var(--gray-100); border: 1px solid var(--gray-300); border-radius: 12px; overflow-x: auto; }
.prose .highlight pre { margin: 0; padding: 14px 18px; font-size: 13.5px; line-height: 1.6; }
.prose .highlight code, .prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; display: block; overflow-x: auto; }
.prose th { text-align: left; font-weight: 500; color: var(--blue-900); background: var(--gray-100); }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--gray-300); vertical-align: top; }
.prose .admonition { padding: 12px 16px; border-radius: 12px; border-left: 3px solid var(--blue-500); background: #F3F5FF; }
.prose .admonition-title { margin: 0 0 4px; font-weight: 500; color: var(--blue-900); }
.prose .admonition > :last-child { margin-bottom: 0; }
.prose .admonition.tip { border-left-color: #17804C; background: #F0F8F3; }
.prose .admonition.warning { border-left-color: #C7840B; background: #FFF8EA; }

.docs-index-heading { margin: 40px 0 14px; font-size: 22px; font-weight: 400; }
.docs-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.docs-index-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px;
  border: 1px solid var(--gray-300); border-radius: 14px; text-decoration: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.docs-index-card:hover { border-color: var(--blue-300); box-shadow: var(--shadow-lift); }
.docs-index-title { font-weight: 500; color: var(--blue-900); }
.docs-index-summary { font-size: 14.5px; line-height: 1.5; color: var(--gray-600); }
.docs-index-card .docs-meta { margin-top: auto; padding-top: 4px; }

.docs-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--gray-300); }
.docs-pager a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--blue-900); font-weight: 500; }
.docs-pager a span { font-size: 13px; font-weight: 400; color: var(--gray-500); }
.docs-pager-next { text-align: right; margin-left: auto; }

@media (max-width: 1200px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
  .docs-sidebar { position: static; max-height: none; }
  .docs-menu { border: 1px solid var(--gray-300); border-radius: 12px; padding: 10px 14px; }
  .docs-menu > summary { display: list-item; cursor: pointer; font-weight: 500; color: var(--blue-900); }
  .docs-menu[open] > summary { margin-bottom: 12px; }
}
