/*
 * Generative platform stylesheet, platform version 1.
 * Copied into every published version. Sites style themselves with theme.css (tokens) and
 * site.css, which may use only the tokens below.
 */

/* 1. Reset */

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

* {
  margin: 0;
}

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

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/*
 * An icon written inside a link, button, label or span sits on the line beside its label, not
 * on a line of its own. The platform's own link icons ([data-link-icon]) keep the block reset.
 * The selector's specificity matches the reset's, so a class in page CSS still restyles it.
 */
:where(a, button, label, span) > svg:where(:not([data-link-icon])) {
  display: inline-block;
  vertical-align: -0.125em;
}

img,
video {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

p,
li,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

table {
  border-collapse: collapse;
}

/* 2. Token defaults. theme.css overrides them. */

:root {
  --color-primary: #1d4ed8;
  --color-primary-contrast: #ffffff;
  --color-accent: #f59e0b;
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --font-heading: ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, sans-serif;
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.85rem + 0.15vw, 0.9375rem);
  --text-md: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --text-xl: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem);
  --text-2xl: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 1.8rem + 2.2vw, 3.75rem);
  --leading-tight: 1.15;
  --leading-normal: 1.6;
  --weight-heading: 700;
  --weight-body: 400;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --section-py: clamp(3rem, 2rem + 5vw, 6rem);
  --gap: 1.5rem;
  --container-max: 72rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow-md: 0 4px 12px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 12px 32px rgb(15 23 42 / 0.12);
  --border-width: 1px;
  --motion-duration: 400ms;
  --motion-distance: 12px;
  --motion-easing: cubic-bezier(0.22, 0.9, 0.3, 1);
}

/* 3. Base elements */

html {
  color-scheme: light;
  scroll-padding-top: var(--space-8);
}

body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--weight-body);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

h5,
h6 {
  font-size: var(--text-md);
}

p {
  text-wrap: pretty;
}

small {
  font-size: var(--text-sm);
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition:
    color 150ms ease,
    text-decoration-color 150ms ease;
}

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

strong,
b {
  font-weight: 700;
}

ul,
ol {
  padding-inline-start: 1.25em;
}

hr {
  border: 0;
  border-top: var(--border-width) solid var(--color-border);
}

blockquote {
  padding-inline-start: var(--space-5);
  border-inline-start: 3px solid var(--color-accent);
  font-size: var(--text-lg);
}

code,
kbd,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

button {
  cursor: pointer;
}

label {
  font-size: var(--text-sm);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.section--primary :focus-visible {
  outline-color: var(--color-primary-contrast);
}

::selection {
  background: color-mix(in srgb, var(--color-primary) 22%, transparent);
}

/* A photo the platform has not placed yet holds its space at the ratio of its width and height. */
:where(img[data-photo]:not([src])) {
  width: 100%;
  background: var(--color-surface);
  color: transparent;
  content: linear-gradient(var(--color-surface) 0 0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 4. Layout primitives */

.container {
  width: min(100% - 2 * var(--space-5), var(--container-max));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-py);
}

.section--surface {
  background: var(--color-surface);
}

.section--primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

.section--primary a:not(.button) {
  color: inherit;
}

/* Vertical flow. The attribute selector preserves designs saved with the former layout system. */
.stack,
[data-layout='stack'] {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, var(--space-4));
}

/* Wrapping flow. The attribute selector preserves designs saved with the former layout system. */
.cluster,
[data-layout='row'] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, var(--space-3));
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 16rem), 100%), 1fr));
  gap: var(--gap);
}

.split {
  display: grid;
  align-items: center;
  gap: calc(var(--gap) * 2);
}

@media (min-width: 48rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.center {
  max-width: var(--measure, 42rem);
  margin-inline: auto;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.prose {
  max-width: 65ch;
}

.prose > * + * {
  margin-top: 1em;
}

.prose > :is(h2, h3) {
  margin-top: 1.6em;
}

/* 5. Components */

.lead {
  color: var(--color-muted);
  font-size: var(--text-lg);
}

.eyebrow {
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: var(--border-width) solid var(--color-primary);
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.button:hover {
  background: color-mix(in srgb, var(--color-primary) 86%, black);
  box-shadow: var(--shadow-md);
}

/*
 * Hover and press movement applies on published pages and in the editor's preview, never while
 * editing, so a hovered element stays under its selection outline. :where() adds no specificity.
 */
:where(:root:not([data-editor]), :root[data-preview]) .button:active {
  transform: translateY(1px);
}

.button--secondary {
  border-color: var(--color-border);
  background: transparent;
  color: var(--color-text);
}

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

.card {
  padding: var(--space-6);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
}

.card:where(a) {
  transition:
    color 150ms ease,
    text-decoration-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.card:where(a):is(:hover, :focus-visible) {
  box-shadow: var(--shadow-md);
}

.card:where(a):active {
  box-shadow: var(--shadow-sm);
}

:where(:root:not([data-editor]), :root[data-preview]) .card:where(a):hover {
  transform: translateY(-2px);
}

:where(:root:not([data-editor]), :root[data-preview]) .card:where(a):active {
  transform: none;
}

.media {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

:where(a) .media {
  transition: opacity 150ms ease;
}

:where(a:hover) .media {
  opacity: 0.9;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--color-accent) 20%, var(--color-bg));
  color: var(--color-text);
  font-size: var(--text-xs);
  font-weight: 600;
}

/*
 * Questions a visitor opens: one <details> per question, its answer in the HTML while closed.
 * Rules and the marker take currentColor, so the list reads on a surface or primary band too.
 */
.faq {
  --faq-rule: color-mix(in srgb, currentColor 18%, transparent);

  border-top: var(--border-width) solid var(--faq-rule);
}

.faq > details {
  border-bottom: var(--border-width) solid var(--faq-rule);
}

.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  flex: none;
  inline-size: 0.5em;
  block-size: 0.5em;
  margin-inline-end: 0.25em;
  border-block-end: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
  content: '';
  transform: translateY(-0.2em) rotate(45deg);
  transition: transform 150ms ease;
}

.faq details[open] > summary::after {
  transform: translateY(0.1em) rotate(-135deg);
}

.faq summary:focus-visible {
  border-radius: var(--radius-sm);
  outline-offset: 2px;
}

.faq details > :not(summary) {
  max-inline-size: 65ch;
  padding-block-end: var(--space-5);
}

:where(.faq) [data-bind] > p + p {
  margin-block-start: var(--space-3);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-block: var(--space-4);
  border-bottom: var(--border-width) solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(8px);
}

/* Wraps and spaces a header container the agent made a flex row; :where() keeps the agent's own gap and layout winning. */
:where(.site-header > .container) {
  flex-wrap: wrap;
  gap: var(--space-4);
}

.site-footer {
  padding-block: var(--space-7);
  border-top: var(--border-width) solid var(--color-border);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/*
 * A bound brand logo is a large image, so the shared header and footer give it a size: without
 * one it fills its container. fit-content rather than auto, because a flex column stretches an
 * auto width. Anywhere, contain keeps its proportion when a rule or a narrow container sets both
 * sides of its box. The img outside :where() matches the reset's weight, so site.css classes can
 * still resize it.
 */
img:where([data-bind^='logo']) {
  object-fit: contain;
}

:where(.site-header, .site-footer) img:where([data-bind^='logo']) {
  width: fit-content;
  height: 3rem;
}

/* The header logo fits a box 280 px wide, 200 px on phones (in the phone rules below), so a wide one leaves room for the menu. */
:where(.site-header) img:where([data-bind^='logo']) {
  max-width: min(100%, 17.5rem);
}

/*
 * Bound socials (data-bind="socials") render icon-only links, one per list item: a bulletless row.
 * Inline, so the surrounding text alignment places it; :where() keeps site.css able to restyle it.
 */
:where([data-bind='socials']) {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: 0;
  list-style: none;
  vertical-align: middle;
}

/*
 * The nav toggle pairs with runtime.js: the button carries data-nav-toggle and the open nav gets data-open.
 * The row wraps so the open phone menu gets a line of its own, and the brand's zero flex basis keeps it
 * from wrapping anything else: the brand takes the room the menu or toggle leaves, up to its own width,
 * and a logo in it shrinks to fit.
 */

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
}

.nav__brand {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-heading);
  text-decoration: none;
}

.nav__brand:hover {
  color: var(--color-primary);
}

/* As strong as the toggle rules below, so site.css cannot make the brand push the menu or toggle off its row. */
.site-header .nav .nav__brand {
  flex: 1 1 0;
  min-width: 0;
  max-width: max-content;
}

/* The auto margins keep the menu, and the toggle on phones, at the end of the row even when site.css changes how .nav justifies. */
.nav__menu {
  display: flex;
  align-items: center;
  margin-inline-start: auto;
  gap: var(--space-5);
  padding: 0;
  list-style: none;
}

.nav__menu a:not(.button) {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
}

.nav__menu a:not(.button):hover {
  color: var(--color-primary);
}

.nav__menu a[aria-current='page']:not(.button) {
  color: var(--color-primary);
}

/* A hamburger icon: the button's "Menu" text stays its accessible name but takes no space. */
.nav__toggle {
  display: none;
  position: relative;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-size: 0;
  cursor: pointer;
}

/* site.css styles the toggle with selectors such as `.site-header .nav__toggle`; this outranks them, so the label never draws over the icon. */
.site-header .nav .nav__toggle[data-nav-toggle] {
  position: relative;
  font-size: 0;
}

.nav__toggle::before {
  content: '';
  position: absolute;
  inset-inline: 0.75rem;
  top: calc(50% - 1px);
  block-size: 2px;
  border-radius: 1px;
  background: currentColor;
  box-shadow:
    0 -0.4rem currentColor,
    0 0.4rem currentColor;
}

@media (max-width: 47.99rem) {
  :where(.site-header) img:where([data-bind^='logo']) {
    max-width: min(100%, 12.5rem);
    height: 2.5rem;
  }

  /* The negative end margin lines the icon, not its tap area, up with the container's edge. */
  .nav__toggle {
    display: inline-flex;
    margin-inline: auto -0.75rem;
  }

  .nav__menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding-block: var(--space-3);
  }

  .site-header .nav:not([data-open]) .nav__menu {
    display: none;
  }

  /* As strong as the rule above: a site.css that hides the toggle must not leave phones with no way to open the menu. */
  .site-header .nav .nav__toggle[data-nav-toggle] {
    display: inline-flex;
  }

  .nav[data-open] .nav__menu {
    display: flex;
  }

  /*
   * A dropdown, a list nested in a menu item or in a <details> there, stacks below its item in the
   * phone menu. site.css positions and hides it for desktop with rules like
   * `.site-header .nav__item:hover .nav__sub`; this outranks them, so it never sits off screen or out
   * of reach of a tap. A closed <details> still hides its list until its summary is tapped.
   */
  .site-header .nav[data-open] .nav__menu li > ul,
  .site-header .nav[data-open] .nav__menu li > details > ul {
    position: static;
    inset: auto;
    display: flex;
    flex-direction: column;
    inline-size: auto;
    min-inline-size: 0;
    max-inline-size: 100%;
    transform: none;
    translate: none;
    visibility: visible;
    opacity: 1;
  }

  :where(.nav__menu li > ul, .nav__menu li > details > ul) {
    gap: var(--space-2);
    margin: 0;
    padding-block: var(--space-2) 0;
    padding-inline: var(--space-4) 0;
    list-style: none;
  }
}

/*
 * 6. Reveal presets. runtime.js sets data-motion-state on an element marked data-motion (fade,
 * rise, zoom, slide; cascade's unmarked children rise in turn) the first time it scrolls into
 * view: 'waiting' holds the start, 'shown' transitions to rest, after which the runtime drops
 * the state. A marked section's unmarked children take its preset and its state, so the section's
 * box stays still. Nothing here matches without that state, so marked content shows at rest
 * without the runtime. Only opacity and transform change, so revealing never moves layout.
 */

[data-motion-state='waiting'] {
  opacity: 0;
}

[data-motion='rise'][data-motion-state='waiting'],
[data-motion='rise'] > [data-motion-state='waiting']:not([data-motion]),
[data-motion='cascade'] > [data-motion-state='waiting']:not([data-motion]) {
  transform: translateY(var(--motion-distance));
}

[data-motion='zoom'][data-motion-state='waiting'],
[data-motion='zoom'] > [data-motion-state='waiting']:not([data-motion]) {
  transform: scale(0.95);
}

[data-motion='slide'][data-motion-state='waiting'],
[data-motion='slide'] > [data-motion-state='waiting']:not([data-motion]) {
  transform: translateX(calc(var(--motion-distance) * -2));
}

/* The runtime sets --motion-delay on a cascade's children. */
[data-motion-state='shown'] {
  transition:
    opacity var(--motion-duration) var(--motion-easing) var(--motion-delay, 0ms),
    transform var(--motion-duration) var(--motion-easing) var(--motion-delay, 0ms);
}

@media print {
  [data-motion-state='waiting'] {
    opacity: 1 !important;
    transform: none !important;
  }
}
