/*
 * IntelliSys - Main Stylesheet
 *
 * Mobile first: every component is styled for the narrowest screen, then enhanced at wider
 * breakpoints, and each component keeps its responsive rules right next to it. Type and spacing
 * are fluid tokens, so most components need no breakpoints at all; the few that change layout use
 * these, in em so they also follow the visitor's own font-size setting and browser zoom:
 *
 *   36em  ( 576px)  small tablets and large phones in landscape
 *   48em  ( 768px)  tablets
 *   62em  ( 992px)  laptops: full navigation, side-by-side layouts
 *   75em  (1200px)  wide screens
 *
 * Above a 1440x900 laptop the root font size grows with the screen, so a 4K monitor or a
 * zoomed-out window shows the same layout as the laptop, only larger.
 *
 * Sections: 1 fonts and tokens, 2 base, 3 layout, 4 components (in page order), 5 utilities, 6 motion.
 */

/* ==========================================================================
   1. Fonts and tokens
   ========================================================================== */

/* Self-hosted latin subsets of the variable fonts */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/montserrat-latin-9322ad4f.woff2") format("woff2");
}

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/roboto-latin-e71a8ea2.woff2") format("woff2");
}

:root {
  /* Colour */
  --color-primary: #1e40af;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-primary-tint: rgba(59, 130, 246, 0.1);
  --color-accent: #00bcd4;
  --color-accent-hover: #26c6da;
  --color-dark: #001f3d;
  --color-dark-end: #0a2540;
  --color-surface: #ffffff;
  --color-tinted: #f9fafb;
  --color-border: #e5e7eb;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-on-dark: #ffffff;
  --color-on-dark-muted: rgba(255, 255, 255, 0.8);
  --color-success: #047857;
  --color-error: #b91c1c;
  --gradient-dark: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-end) 100%);
  --gradient-accent: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  --gradient-voice: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary-light) 100%);

  /* Type: fluid sizes from a 360px phone up to a 1440px laptop */
  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: clamp(1rem, 0.96rem + 0.19vw, 1.125rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --text-h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
  --text-h2: clamp(1.75rem, 1.35rem + 1.75vw, 2.5rem);
  --text-h1: clamp(2rem, 1.35rem + 3vw, 3.5rem);
  --text-page-h1: clamp(2rem, 1.5rem + 2.25vw, 3rem);

  /* Space */
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --section-space: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 2rem);
  --card-padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  --container-max: 75rem;
  --container-narrow: 50rem;
  --header-height: 4.5rem;

  /* Shape */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;
  --shadow-sm: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.05);
  --shadow-md: 0 0.625rem 0.9375rem -0.1875rem rgba(0, 0, 0, 0.1), 0 0.25rem 0.375rem -0.125rem rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.1), 0 0.625rem 0.625rem -0.3125rem rgba(0, 0, 0, 0.04);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.25s ease;

  /* A drawn check mark, used as a mask so it takes the text colour */
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");

  interpolate-size: allow-keywords;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

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

html {
  /* The browser's base size (16px), until the screen is bigger than 1440x900 in both directions; from
     there it grows with the screen, by whichever of width or height is tighter, so every screen shows
     the same 90rem x 56.25rem worth of layout as that laptop (or more, never less) */
  font-size: max(100%, min(100vw / 90, 100vh / 56.25));
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html.menu-open,
html:has(dialog[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  background-color: var(--color-tinted);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

h2 {
  font-size: var(--text-h2);
}

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

p {
  margin: 0 0 var(--space-s);
}

p,
li,
dd,
figcaption {
  text-wrap: pretty;
}

a {
  color: var(--color-primary);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

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

:focus-visible {
  outline: 0.1875rem solid var(--color-accent);
  outline-offset: 0.125rem;
}

section[id] {
  scroll-margin-top: var(--header-height);
}

/* Hidden means hidden, even for elements whose class sets a display */
[hidden] {
  display: none !important;
}

/* Icons from the SVG sprite */
.icon {
  flex: none;
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
}

/* ==========================================================================
   3. Layout
   ========================================================================== */

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

.container--narrow {
  max-width: var(--container-narrow);
}

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

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

.section-header {
  max-width: var(--container-narrow);
  margin: 0 auto clamp(2.5rem, 2rem + 2vw, 4rem);
  text-align: center;
}

.section-header h2 {
  margin-bottom: var(--space-s);
}

.section-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  text-wrap: balance;
}

/* A heading beside its text: stacked on small screens, two columns from 62em */
.split {
  display: grid;
  gap: var(--space-m) var(--space-xl);
  align-items: start;
}

@media (min-width: 62em) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }

  .split--media {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
  }
}

.prose .text-link {
  display: inline;
}

.prose p,
.lead-text {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  line-height: 1.8;
}

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

/* Cards in a grid share its rows, so icons, titles and text line up across a row however long each
   title is. A card may hold up to four children (icon, title, text, extra). The shared rows have no
   gap; each card's bottom margin spaces the rows of cards apart. */
.card-grid {
  --card-gap: clamp(1rem, 0.75rem + 1vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--card-gap);
  margin-bottom: calc(-1 * var(--card-gap));
}

.card-grid > * {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  align-content: start;
  margin-bottom: var(--card-gap);
}

@media (min-width: 48em) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* An odd card out spans the row instead of sitting alone in one column */
  .card-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 62em) {
  .card-grid:not(.card-grid--2) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-grid:not(.card-grid--2) > :last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* ==========================================================================
   4. Components
   ========================================================================== */

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  min-height: 2.75rem;
  padding: 0.625rem 1.5rem;
  border: 0.125rem solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  text-wrap: balance;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn .icon {
  width: 1.25em;
  height: 1.25em;
}

.btn--lg {
  min-height: 3.25rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  font-weight: 700;
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-sm);
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-on-dark);
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

/* For dark backgrounds */
.btn--outline {
  border-color: var(--color-on-dark);
  background-color: transparent;
  color: var(--color-on-dark);
}

.btn--danger {
  background-color: #dc2626;
  color: var(--color-on-dark);
}

/* For light backgrounds */
.btn--ghost {
  border-color: var(--color-primary);
  background-color: transparent;
  color: var(--color-primary);
}

.btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-0.125rem);
    box-shadow: var(--shadow-md);
  }

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

  .btn--accent:hover {
    background-color: var(--color-accent-hover);
  }

  .btn--outline:hover {
    background-color: var(--color-on-dark);
    color: var(--color-primary);
  }

  .btn--ghost:hover {
    background-color: var(--color-primary);
    color: var(--color-on-dark);
  }

  .btn--danger:hover {
    background-color: #b91c1c;
  }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.text-link .icon {
  width: 1.125em;
  height: 1.125em;
  transition: transform var(--transition);
}

.text-link:hover .icon {
  transform: translateX(0.1875rem);
}

/* A button that reads as a link */
.text-link--button {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

/* Small shared pieces --------------------------------------------------------- */

.eyebrow {
  margin: 0 0 var(--space-s);
  color: var(--color-accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow a {
  color: inherit;
  text-decoration: none;
}

.eyebrow a:hover {
  text-decoration: underline;
}

.underlined-heading {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-m);
  padding-bottom: var(--space-s);
  font-size: var(--text-h2);
}

.underlined-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 5rem;
  height: 0.25rem;
  border-radius: 0.125rem;
  background-color: var(--color-accent);
}

h3.underlined-heading {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
}

.check-list {
  display: grid;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--color-text-muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  width: 1.125em;
  height: 1.125em;
  margin-top: calc((1lh - 1.125em) / 2);
  background-color: var(--color-accent);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
}

.check-list--spaced {
  gap: var(--space-s);
  font-size: var(--text-md);
}

.icon-badge {
  display: inline-grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border-radius: 50%;
  background-color: var(--color-primary-tint);
  color: var(--color-primary);
  font-size: 1.75rem;
  transition: transform var(--transition), background-color var(--transition);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  background-color: rgba(59, 130, 246, 0.12);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill--live {
  background-color: rgba(16, 185, 129, 0.14);
  color: var(--color-success);
}

.status-pill--live::before {
  content: "";
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background-color: currentColor;
}

/* Decorative floating shapes, only where there is room for them */
.shape {
  display: none;
  position: absolute;
  z-index: 0;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  opacity: 0.6;
  pointer-events: none;
}

@media (min-width: 62em) {
  .shape {
    display: block;
  }
}

.shape-1 {
  top: 8rem;
  left: 3%;
  width: 3.75rem;
  height: 3.75rem;
  background-color: rgba(59, 130, 246, 0.3);
  animation: float 8s ease-in-out infinite;
}

.shape-2 {
  right: 6%;
  bottom: 3rem;
  width: 5rem;
  height: 5rem;
  background-color: rgba(0, 188, 212, 0.3);
  animation: float 10s ease-in-out infinite reverse;
}

/* Cards --------------------------------------------------------------------- */

.card {
  position: relative;
  overflow: hidden;
  padding: var(--card-padding);
  border: 0.0625rem solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.section:not(.section--tinted) .card {
  background-color: var(--color-tinted);
}

.card .icon-badge {
  margin-bottom: var(--space-m);
}

.card h3 {
  margin-bottom: var(--space-xs);
}

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

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

.card .check-list {
  margin-top: var(--space-2xs);
}

/* A gradient bar along the top */
.card--accent::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.3125rem;
  background: var(--gradient-accent);
}

.card-link {
  align-self: end;
  margin: var(--space-s) 0 0;
}

/* Disclosure: "Learn more" toggles inside cards and steps */
.disclosure {
  margin-top: var(--space-s);
}

.disclosure summary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.75rem;
  color: var(--color-primary);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

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

.disclosure summary::after {
  content: "";
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--icon-chevron) center / contain no-repeat;
  mask: var(--icon-chevron) center / contain no-repeat;
  transition: transform var(--transition);
}

.disclosure[open] summary::after {
  transform: rotate(180deg);
}

.disclosure ul {
  margin: var(--space-2xs) 0 0;
  padding-left: 1.25rem;
  color: var(--color-text-muted);
}

.disclosure li::marker {
  color: var(--color-primary-light);
}

/* Header and navigation ------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  padding-block: var(--space-xs);
  transition: padding var(--transition);
}

/* The blurred background sits on a pseudo-element: a backdrop-filter on the header itself would
   trap the menu panel, which is positioned against the header, inside the bar. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(0, 31, 61, 0.95);
  backdrop-filter: blur(0.625rem);
  transition: box-shadow var(--transition);
}

.site-header.is-scrolled::before {
  box-shadow: var(--shadow-md);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-l);
}

.logo {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
}

.logo img {
  width: auto;
  height: 2rem;
  transition: height var(--transition);
}

.menu-toggle {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  place-items: center;
  border: 0;
  background: none;
  color: var(--color-on-dark);
  font-size: 1.5rem;
  cursor: pointer;
}

.menu-toggle-close,
.site-header.is-open .menu-toggle-open {
  display: none;
}

.site-header.is-open .menu-toggle-close {
  display: block;
}

/* Small screens: the menu drops down below the header as a panel */
.site-nav {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  max-height: calc(100dvh - 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-2xs) var(--gutter) var(--space-l);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.12);
  background-color: var(--color-dark);
  box-shadow: 0 1.5rem 2rem rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.5rem);
  transition: opacity var(--transition), transform var(--transition), visibility 0s linear 0.25s;
}

.site-header.is-open .site-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--transition), transform var(--transition);
}

.nav-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
  color: var(--color-on-dark);
  font-size: var(--text-lg);
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-cta {
  margin-top: var(--space-m);
}

.nav-cta .btn {
  width: 100%;
  min-height: 3rem;
  font-size: var(--text-base);
}

@media (min-width: 62em) {
  .site-header {
    padding-block: var(--space-s);
  }

  .site-header.is-scrolled {
    padding-block: var(--space-2xs);
  }

  .logo img {
    height: 2.25rem;
  }

  .site-header.is-scrolled .logo img {
    height: 2rem;
  }

  .menu-toggle {
    display: none;
  }

  /* The menu panel becomes the inline navigation bar */
  .site-nav {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 0.5rem + 1.5vw, 2rem);
  }

  .nav-links a {
    position: relative;
    min-height: 2.75rem;
    border: 0;
    font-size: var(--text-base);
  }

  .nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0.375rem;
    left: 0;
    width: 0;
    height: 0.125rem;
    background-color: var(--color-accent);
    transition: width var(--transition);
  }

  .nav-links a:hover::after {
    width: 100%;
  }

  .nav-cta {
    margin: 0 0 0 var(--space-2xs);
  }

  .nav-cta .btn {
    width: auto;
    min-height: 2.75rem;
    font-size: var(--text-sm);
  }
}

/* Hero ---------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-height) + clamp(2.5rem, 1rem + 6vw, 7.5rem)) 0 clamp(3.5rem, 2rem + 5vw, 8rem);
  background: var(--gradient-dark);
  color: var(--color-on-dark);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2.5rem, 2rem + 2vw, 3rem);
  align-items: center;
}

.hero-content {
  text-align: center;
}

.hero h1 {
  margin-bottom: var(--space-m);
  color: var(--color-on-dark);
  font-size: var(--text-h1);
  font-weight: 800;
}

.hero-lead {
  max-width: 40rem;
  margin: 0 auto clamp(2rem, 1.5rem + 2vw, 2.5rem);
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-lg);
}

/* Actions stack at a comfortable width on small screens and sit in a row from 48em */
.hero-actions {
  display: grid;
  gap: var(--space-s);
  width: min(100%, 24rem);
  margin-inline: auto;
}

@media (min-width: 48em) {
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-media img {
  width: min(100%, 30rem);
  height: auto;
}

/* Text beside the illustration from 75em, where both have room; centred and stacked before that */
@media (min-width: 75em) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    gap: var(--space-2xl);
  }

  .hero-content {
    text-align: left;
  }

  .hero-lead {
    margin-inline: 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-media {
    justify-content: flex-end;
  }
}

/* Highlights strip ---------------------------------------------------------- */

.highlights {
  padding-block: var(--space-l);
  border-bottom: 0.0625rem solid var(--color-border);
  background-color: var(--color-surface);
}

.highlights-list {
  display: grid;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
  list-style: none;
}

.highlight {
  display: flex;
  align-items: flex-start;
  gap: var(--space-s);
}

.highlight-icon {
  display: grid;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 50%;
  background-color: var(--color-primary-tint);
  color: var(--color-primary);
  font-size: 1.375rem;
}

.highlight-text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.highlight-title {
  display: block;
  margin-bottom: 0.125rem;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: var(--text-base);
}

@media (min-width: 36em) {
  .highlights-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 75em) {
  .highlights-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Products ------------------------------------------------------------------ */

.product-grid {
  display: grid;
  gap: var(--space-l);
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0.0625rem solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 0.75rem + 2vw, 2.5rem);
  background: var(--gradient-dark);
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-s);
  padding: var(--card-padding);
}

.product-card-body h3 {
  font-size: clamp(1.375rem, 1.2rem + 0.75vw, 1.625rem);
}

.product-card-body > p {
  margin: 0;
  color: var(--color-text-muted);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs) var(--space-xs);
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: auto;
  padding-top: var(--space-2xs);
}

@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-0.375rem);
    box-shadow: var(--shadow-lg);
  }
}

/* Two cards side by side share their rows, so the panels and the text line up */
@media (min-width: 62em) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0;
  }

  .product-card {
    display: grid;
    grid-row: span 2;
    grid-template-rows: subgrid;
  }
}

/* Dark panels: example call, agent workflow, outreach draft ------------------------- */

.panel {
  container-type: inline-size;
  width: 100%;
  max-width: 32rem;
  margin: 0;
  overflow: hidden;
  border: 0.0625rem solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--color-on-dark);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-s);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.12);
  color: var(--color-on-dark-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 0 0 0 0.25rem rgba(0, 188, 212, 0.2);
}

/* Call panel */
.call-wave {
  display: block;
  width: 100%;
  height: 3.5rem;
  padding: var(--space-2xs) var(--space-s);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.12);
}

.call-wave .is-speaking {
  fill: var(--color-accent);
}

.call-wave .is-quiet {
  fill: rgba(255, 255, 255, 0.25);
}

.call-transcript {
  display: grid;
  gap: var(--space-xs);
  margin: 0;
  padding: var(--space-s);
}

/* Speaker above the line in a narrow panel, beside it once there is room */
.call-line {
  display: grid;
  gap: 0.125rem;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.call-line dt {
  color: var(--color-on-dark-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.call-line--agent dt {
  color: var(--color-accent);
}

.call-line dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}

@container (min-width: 26rem) {
  .call-line {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: var(--space-xs);
    font-size: 0.9375rem;
  }

  .call-line dt {
    padding-top: 0.15rem;
  }

  .panel--compact .call-line {
    font-size: var(--text-sm);
  }
}

/* Agent workflow panel */
.agent-flow {
  display: grid;
  gap: var(--space-xs);
  margin: 0;
  padding: var(--space-s);
  list-style: none;
}

/* Role and task stacked in a narrow panel, side by side once there is room */
.agent-flow-step {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-xs);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.agent-flow-marker {
  display: grid;
  grid-row: span 2;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border: 0.0625rem solid rgba(0, 188, 212, 0.6);
  border-radius: 50%;
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 600;
}

.agent-flow-role {
  color: var(--color-on-dark);
  font-weight: 600;
}

.agent-flow-task {
  color: var(--color-on-dark-muted);
}

.agent-flow-step--approval {
  margin-top: 0.25rem;
  padding-top: var(--space-xs);
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.12);
}

.agent-flow-step--approval .agent-flow-marker {
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.agent-flow-step--approval .agent-flow-role {
  color: var(--color-accent);
}

@container (min-width: 24rem) {
  .agent-flow-step {
    grid-template-columns: 1.5rem 8.5rem minmax(0, 1fr);
  }

  .agent-flow-marker {
    grid-row: auto;
  }

  :not(.panel--compact) > .agent-flow .agent-flow-step {
    font-size: 0.9375rem;
  }
}

/* Outreach draft panel */
.panel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 0.5rem + 2vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--gradient-dark);
  box-shadow: var(--shadow-lg);
}

/* The status drops onto its own line when the panel is narrow */
.approval-panel .panel-header {
  flex-wrap: wrap;
  row-gap: var(--space-2xs);
  white-space: nowrap;
}

.approval-status {
  margin-left: auto;
  padding: 0.1875rem 0.625rem;
  border-radius: var(--radius-pill);
  background-color: rgba(251, 191, 36, 0.14);
  color: #fcd34d;
}

.approval-body {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-s);
}

.approval-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-l);
  margin: 0;
}

.approval-meta dt {
  color: var(--color-on-dark-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.approval-meta dd {
  margin: 0;
  color: var(--color-on-dark);
  font-weight: 600;
}

.approval-subject {
  margin: 0;
  padding-top: var(--space-xs);
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.12);
  color: var(--color-on-dark);
  font-weight: 600;
}

.approval-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.approval-checks {
  display: grid;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.approval-checks li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--color-on-dark-muted);
  font-size: var(--text-sm);
}

.approval-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  width: 1em;
  height: 1em;
  margin-top: calc((1lh - 1em) / 2);
  background-color: var(--color-accent);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
}

.approval-actions {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-s);
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.12);
}

.approval-button {
  padding: 0.375rem 1rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
  color: var(--color-on-dark);
  font-size: 0.8125rem;
  font-weight: 600;
}

.approval-button--primary {
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  color: var(--color-dark);
}

/* Services ------------------------------------------------------------------ */

.service-grid {
  display: grid;
  gap: var(--space-s);
}

/* The icon sits above the text on the narrowest screens, and beside it on phones */
.service-card {
  display: grid;
  align-items: start;
  gap: var(--space-s);
  padding: var(--space-m);
  border: 0.0625rem solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
  background-color: var(--color-tinted);
  box-shadow: var(--shadow-md);
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs);
  margin-bottom: 0.375rem;
}

.service-card-arrow {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-primary-light);
  transition: transform var(--transition), opacity var(--transition);
}

.service-card p {
  margin: 0;
  color: var(--color-text-muted);
}

@media (min-width: 22.5em) {
  .service-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

/* From 48em: two columns of centred cards with the icon on top */
@media (min-width: 48em) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-l);
  }

  .service-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: var(--space-m);
    padding: var(--space-l) var(--card-padding) clamp(2rem, 1.5rem + 1vw, 2.5rem);
    text-align: center;
  }

  .service-card .icon-badge {
    width: 5rem;
    height: 5rem;
    font-size: 2.5rem;
  }

  /* The arrow hangs to the right of a centred title, so it never pushes the title onto two lines */
  .service-card-title {
    position: relative;
    justify-content: center;
    width: fit-content;
    margin: 0 auto var(--space-xs);
  }

  .service-card-arrow {
    position: absolute;
    left: 100%;
    margin-left: var(--space-2xs);
  }
}

@media (hover: hover) {
  .service-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: var(--shadow-lg);
  }

  .service-card:hover .icon-badge {
    transform: scale(1.08);
    background-color: rgba(59, 130, 246, 0.2);
  }

  .service-card-arrow {
    opacity: 0;
    transform: translateX(-0.5rem);
  }

  .service-card:hover .service-card-arrow {
    opacity: 1;
    transform: none;
  }
}

/* Industries ---------------------------------------------------------------- */

.industry-grid {
  --card-gap: var(--space-m);
  display: grid;
  gap: var(--card-gap);
}

.industry-card {
  display: flex;
  flex-direction: column;
  padding: var(--card-padding);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.industry-icon {
  margin-bottom: var(--space-s);
  color: var(--color-primary-light);
  font-size: 2.5rem;
  line-height: 1;
}

.industry-card h3 {
  margin-bottom: var(--space-s);
}

.industry-card .check-list li {
  padding-block: var(--space-2xs);
  border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.05);
}

.industry-card .check-list li:last-child {
  border-bottom: 0;
}

.industry-card .check-list {
  gap: 0;
}

.industry-card-action {
  margin-top: auto;
  padding-top: var(--space-m);
}

/* From 48em the cards share their rows (icon, title, list, link), so everything lines up across a
   row of cards; the shared rows have no gap, and each card's bottom margin spaces the rows apart */
@media (min-width: 48em) {
  .industry-grid {
    --card-gap: var(--space-l);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0;
    margin-bottom: calc(-1 * var(--card-gap));
  }

  .industry-card {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    margin-bottom: var(--card-gap);
  }

  .industry-card-action {
    align-self: end;
  }
}

@media (min-width: 75em) {
  .industry-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (hover: hover) {
  .industry-card:hover {
    transform: translateY(-0.375rem);
    box-shadow: var(--shadow-lg);
  }
}

/* About --------------------------------------------------------------------- */

.about-intro {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

.about-text p {
  color: var(--color-text-muted);
  font-size: var(--text-md);
  line-height: 1.8;
}

.about-text .btn {
  margin-top: var(--space-2xs);
}

.about-media {
  width: min(100%, 20rem);
  margin-inline: auto;
}

.approach-heading {
  margin: clamp(3rem, 2.5rem + 2vw, 4.5rem) 0 var(--space-m);
  font-size: var(--text-h3);
  text-align: center;
}

.approach-grid {
  display: grid;
  gap: var(--space-s);
}

/* Stacked on the narrowest screens, a compact row on phones and tablets, a centred card from 62em */
.approach-card {
  display: grid;
  column-gap: var(--space-s);
  padding: var(--space-m);
  border: 0.0625rem solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
  background-color: var(--color-tinted);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.approach-icon {
  margin-bottom: var(--space-xs);
  color: var(--color-primary-light);
  font-size: 2rem;
  line-height: 1;
}

.approach-title {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: 700;
}

.approach-text {
  margin: 0.25rem 0 var(--space-2xs);
  color: var(--color-text-muted);
}

.approach-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--color-primary);
  font-weight: 600;
}

@media (min-width: 22.5em) {
  .approach-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .approach-icon {
    grid-row: span 3;
    margin-bottom: 0;
  }
}

@media (min-width: 62em) {
  .about-intro {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--space-2xl);
  }

  .about-media {
    width: 100%;
    max-width: 26rem;
  }

  .approach-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 var(--space-l);
  }

  .approach-card {
    grid-row: span 4;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    justify-items: center;
    padding: var(--space-l) var(--card-padding);
    text-align: center;
  }

  .approach-icon {
    grid-row: auto;
    margin-bottom: var(--space-s);
    font-size: 2.5rem;
  }
}

@media (hover: hover) {
  .approach-card:hover {
    transform: translateY(-0.375rem);
    box-shadow: var(--shadow-md);
  }
}

/* Technology ---------------------------------------------------------------- */

.tech-item {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}

.tech-item + .tech-item {
  margin-top: clamp(3.5rem, 2.5rem + 3vw, 5rem);
}

.tech-media {
  width: min(100%, 26rem);
  margin-inline: auto;
}

.tech-media--small {
  width: min(100%, 18rem);
}

.tech-content p {
  color: var(--color-text-muted);
  font-size: var(--text-md);
}

.tech-list {
  gap: var(--space-xs) var(--space-l);
}

@media (min-width: 36em) {
  .tech-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62em) {
  .tech-item {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-2xl);
  }

  .tech-item--reverse .tech-media {
    order: 1;
  }

  .tech-media {
    width: 100%;
  }

  .tech-media--small {
    width: 75%;
  }
}

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

/* A vertical timeline on small screens: numbers down the left, joined by a line */
.steps {
  display: grid;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  column-gap: var(--space-m);
  padding-bottom: var(--space-l);
}

.step:last-child {
  padding-bottom: 0;
}

.step > * {
  grid-column: 2;
}

/* Each step draws the line down to the next number, so the line ends at the last step */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 3rem;
  bottom: 0;
  left: 1.4375rem;
  width: 0.125rem;
  background-color: rgba(59, 130, 246, 0.2);
}

.step-number {
  position: relative;
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 0.25rem solid var(--color-surface);
  border-radius: 50%;
  background-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
  color: var(--color-on-dark);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  transition: transform var(--transition), background-color var(--transition);
}

.section--tinted .step-number {
  border-color: var(--color-tinted);
}

.step-title {
  margin: 0.625rem 0 0.375rem;
}

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

.step .disclosure summary {
  justify-content: flex-start;
}

/* From 62em: one row, numbers on top joined by a line behind them */
@media (min-width: 62em) {
  .steps {
    grid-template-rows: repeat(4, auto);
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 0 var(--space-m);
    max-width: none;
  }

  /* Each step shares the row's tracks (number, title, text, details), so they line up across steps */
  .step {
    grid-row: span 4;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    align-content: start;
    justify-items: center;
    padding: 0;
    text-align: center;
  }

  .step > *,
  .step-number {
    grid-column: 1;
    grid-row: auto;
  }

  /* From this step's number to the centre of the next one, passing behind its circle */
  .step:not(:last-child)::before {
    top: 3.0625rem;
    right: calc(-50% - var(--space-m));
    bottom: auto;
    left: 50%;
    width: auto;
    height: 0.125rem;
  }

  .step-number {
    width: 6.25rem;
    height: 6.25rem;
    margin-bottom: var(--space-m);
    border-width: 0.3125rem;
    font-size: 2rem;
  }

  .step-title {
    margin: 0 0 var(--space-xs);
  }

  /* The toggle stays centred whether open or closed, with its list centred as a block below */
  .step .disclosure {
    justify-self: stretch;
  }

  .step .disclosure summary {
    display: flex;
    justify-content: center;
  }

  .step .disclosure ul {
    width: fit-content;
    margin-inline: auto;
    text-align: left;
  }
}

@media (hover: hover) {
  .step:hover .step-number {
    transform: scale(1.06);
    background-color: var(--color-primary);
  }
}

/* Product page facts strip -------------------------------------------------- */

.facts {
  border-bottom: 0.0625rem solid var(--color-border);
  background-color: var(--color-surface);
}

.facts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: var(--space-m);
  margin: 0;
  padding-block: var(--space-l);
}

.facts-list dt {
  margin-bottom: 0.25rem;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts-list dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.35;
}

/* Consent path (AI Voice Agent page) ----------------------------------------- */

.consent-path {
  padding: var(--card-padding);
  border-radius: var(--radius-lg);
  background: var(--gradient-dark);
  box-shadow: var(--shadow-lg);
  color: var(--color-on-dark);
}

.consent-path-title {
  margin-bottom: var(--space-m);
  color: var(--color-on-dark-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.consent-path ol {
  display: grid;
  gap: var(--space-s);
  margin: 0;
  padding: 0;
  list-style: none;
}

.consent-path li {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 600;
}

.consent-path-number {
  display: grid;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 0.0625rem solid rgba(0, 188, 212, 0.6);
  border-radius: 50%;
  color: var(--color-accent);
  font-size: var(--text-sm);
}

/* AI Sales Agents: the agent team ------------------------------------------ */

/* One column, then two, three and finally all five in a row; a short last row stays centred */
.agent-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-card {
  flex: 1 1 100%;
  padding: var(--space-m);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.agent-number {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--space-s);
  place-items: center;
  border-radius: 50%;
  background-color: var(--color-primary-light);
  color: var(--color-on-dark);
  font-family: var(--font-heading);
  font-weight: 700;
}

.agent-card h3 {
  margin-bottom: var(--space-2xs);
}

.agent-card p {
  margin: 0;
  color: var(--color-text-muted);
}

@media (min-width: 48em) {
  .agent-card {
    flex-basis: calc((100% - var(--space-m)) / 2);
    flex-grow: 0;
  }
}

@media (min-width: 62em) {
  .agent-card {
    flex-basis: calc((100% - 2 * var(--space-m)) / 3);
  }
}

@media (min-width: 75em) {
  .agent-list {
    flex-wrap: nowrap;
    gap: var(--space-s);
  }

  .agent-card {
    flex: 1 1 0;
    padding: var(--space-m) var(--space-s);
  }
}

.support-agents {
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.support-agents-title {
  margin-bottom: var(--space-m);
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: 700;
  text-align: center;
}

.support-agents-list {
  display: grid;
  gap: var(--space-m);
}

.support-agent {
  padding: var(--space-m);
  border: 0.0625rem dashed rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
}

.support-agent h3 {
  margin-bottom: var(--space-2xs);
}

.support-agent p {
  margin: 0;
  color: var(--color-text-muted);
}

@media (min-width: 48em) {
  .support-agents-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 52rem;
    margin-inline: auto;
  }
}

/* FAQ ----------------------------------------------------------------------- */

.faq {
  display: grid;
  gap: var(--space-s);
}

.faq-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.faq-item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.3s ease, content-visibility 0.3s ease allow-discrete;
}

.faq-item[open]::details-content {
  block-size: auto;
}

.faq-question {
  display: flex;
  align-items: flex-start;
  gap: var(--space-s);
  padding: var(--space-s);
  color: var(--color-text);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

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

.faq-icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: calc((1lh - 1.25rem) / 2);
  color: var(--color-primary-light);
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 var(--space-s) var(--space-s);
  color: var(--color-text-muted);
}

.faq-answer p {
  margin-bottom: var(--space-xs);
}

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

.faq-answer ul {
  display: grid;
  gap: 0.375rem;
  margin: 0 0 var(--space-xs);
  padding-left: 1.25rem;
}

.faq-answer li::marker {
  color: var(--color-primary-light);
}

.faq-answer a {
  color: var(--color-primary);
  font-weight: 600;
}

/* From 36em the answer lines up with the question text, past the icon */
@media (min-width: 36em) {
  .faq-question {
    padding: var(--space-m);
  }

  .faq-answer {
    padding: 0 var(--space-m) var(--space-m) calc(var(--space-m) + 1.25rem + var(--space-s));
  }
}

/* Below the questions: anything they don't cover goes to the AI assistant */
.faq-more {
  margin: var(--space-l) 0 0;
  color: var(--color-text-muted);
  text-align: center;
}

/* Call to action band ------------------------------------------------------- */

.cta-section {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-space);
  background: linear-gradient(135deg, var(--color-primary) 0%, #2563eb 100%);
  color: var(--color-on-dark);
  text-align: center;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0.0625rem, transparent 0.0625rem);
  background-size: 1.25rem 1.25rem;
  opacity: 0.2;
}

.cta-inner {
  position: relative;
  max-width: var(--container-narrow);
}

.cta-title {
  margin-bottom: var(--space-m);
  color: var(--color-on-dark);
}

.cta-text {
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-size: var(--text-lg);
  opacity: 0.95;
  text-wrap: balance;
}

.cta-actions {
  display: grid;
  gap: var(--space-s);
  width: min(100%, 24rem);
  margin-inline: auto;
}

@media (min-width: 48em) {
  .cta-actions {
    width: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-m);
  }
}

/* Page headers -------------------------------------------------------------- */

.page-header {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-height) + clamp(2.5rem, 1.5rem + 4vw, 5rem)) 0 clamp(3rem, 2rem + 3vw, 5rem);
  background: var(--gradient-dark);
  color: var(--color-on-dark);
}

.page-header .shape-1 {
  top: auto;
  right: 7%;
  bottom: 18%;
  left: auto;
  width: 7.5rem;
  height: 7.5rem;
  opacity: 0.35;
}

.page-header-inner {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  max-width: 50rem;
  margin-bottom: var(--space-s);
  color: var(--color-on-dark);
  font-size: var(--text-page-h1);
  font-weight: 800;
}

.page-lead {
  max-width: 46rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--text-lg);
}

/* Product pages: text beside a panel from 62em */
.page-header--split .page-header-inner {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}

.page-header--split .hero-actions {
  margin: var(--space-l) 0 0;
}

@media (min-width: 48em) {
  .page-header--split .hero-actions {
    justify-content: flex-start;
  }
}

.page-header-media {
  display: flex;
  justify-content: center;
}

@media (min-width: 75em) {
  .page-header--split .page-header-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
    gap: var(--space-2xl);
  }
}

/* Legal pages --------------------------------------------------------------- */

.legal h2 {
  margin: var(--space-xl) 0 var(--space-s);
  font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
}

.legal .legal-updated + h2 {
  margin-top: 0;
}

.legal p,
.legal li {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.8;
}

.legal ul {
  margin: 0 0 var(--space-s);
  padding-left: 1.25rem;
}

.legal li::marker {
  color: var(--color-primary-light);
}

.legal .legal-updated {
  margin-bottom: var(--space-l);
  font-size: var(--text-sm);
}

/* Footer -------------------------------------------------------------------- */

/* The extra bottom space on phones keeps the last line clear of the back-to-top button */
.site-footer {
  padding-block: var(--space-2xl) 5.5rem;
  background-color: var(--color-dark);
  color: var(--color-on-dark);
}

/* Brand and contact span the width on phones, with the two link columns side by side */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl) var(--space-m);
}

.footer-brand,
.footer-col:last-child {
  grid-column: 1 / -1;
}

.footer-logo {
  display: inline-block;
  margin-bottom: var(--space-m);
}

.footer-logo img {
  width: auto;
  height: 2.5rem;
}

.footer-brand p {
  max-width: 26rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
}

.footer-heading {
  margin-bottom: var(--space-xs);
  color: var(--color-on-dark);
  font-size: 1.125rem;
}

.footer-links + .footer-heading {
  margin-top: var(--space-l);
}

.footer-links,
.footer-contact,
.footer-legal {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a,
.footer-contact a,
.footer-contact span {
  display: inline-block;
  padding-block: 0.375rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--color-accent);
}

.footer-contact {
  margin-bottom: var(--space-m);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer-contact .icon {
  color: var(--color-accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs) var(--space-l);
  margin-top: var(--space-2xl);
  padding-top: var(--space-l);
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-sm);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: var(--space-m);
}

.footer-legal a {
  display: inline-block;
  padding-block: 0.375rem;
  color: var(--color-accent);
  text-decoration: none;
}

.footer-legal a:hover {
  text-decoration: underline;
}

@media (min-width: 48em) {
  .site-footer {
    padding-bottom: var(--space-l);
  }

  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-col:last-child {
    grid-column: auto;
  }
}

@media (min-width: 62em) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.4fr);
    gap: var(--space-xl);
  }

  .footer-brand {
    grid-column: auto;
  }
}

/* Dialogs ------------------------------------------------------------------- */

.dialog {
  width: 100%;
  max-width: min(100% - 2rem, 31.25rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--color-text);
}

.dialog--form {
  max-width: min(100% - 2rem, 40rem);
}

.dialog--wide {
  max-width: min(100% - 2rem, 43.75rem);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(0.3125rem);
}

.dialog[open] {
  animation: fadeInUp 0.25s var(--ease-out);
}

.dialog-panel {
  position: relative;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(2.5rem, 2rem + 2vw, 3rem) clamp(1.25rem, 0.75rem + 2.5vw, 3rem) clamp(1.5rem, 1rem + 2vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.dialog-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.3125rem;
  background: var(--gradient-accent);
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.dialog-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--color-text);
}

.dialog-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-m);
  color: var(--color-primary-light);
  font-size: 4rem;
}

.dialog-title {
  margin-bottom: var(--space-2xs);
  padding-inline: var(--space-l);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  text-align: center;
}

.dialog-subtitle {
  margin-bottom: var(--space-l);
  color: var(--color-text-muted);
  text-align: center;
  text-wrap: balance;
}

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

.dialog-body {
  margin-top: var(--space-m);
}

.dialog-body h3 {
  margin: var(--space-l) 0 var(--space-xs);
  color: var(--color-primary);
  font-size: 1.25rem;
}

.dialog-body ul,
.dialog-body ol {
  display: grid;
  gap: var(--space-2xs);
  margin: 0;
  padding-left: 1.5rem;
  color: var(--color-text-muted);
}

.dialog-body li::marker {
  color: var(--color-primary-light);
  font-weight: 600;
}

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

.dialog-body strong {
  color: var(--color-text);
}

.dialog-actions {
  margin-top: var(--space-l);
  text-align: center;
}

/* Contact form -------------------------------------------------------------- */

.contact-form {
  container-type: inline-size;
  display: grid;
  gap: var(--space-m);
}

/* Paired fields sit side by side once the form is wide enough */
.form-row {
  display: grid;
  gap: var(--space-m);
}

@container (min-width: 30rem) {
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-field {
  position: relative;
}

.form-input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.875rem 1rem;
  border: 0.125rem solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-tinted);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

select.form-input {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 1rem center;
  background-repeat: no-repeat;
  background-size: 1.125rem;
  cursor: pointer;
}

textarea.form-input {
  min-height: 7.5rem;
  resize: vertical;
}

.form-input:focus {
  border-color: var(--color-primary-light);
  outline: none;
  background-color: var(--color-surface);
  box-shadow: 0 0 0 0.1875rem rgba(59, 130, 246, 0.15);
}

.form-input[aria-invalid="true"] {
  border-color: #ef4444;
}

/* The label sits on the field's top border: white above the line, the field's own colour below */
.form-label {
  position: absolute;
  top: 0;
  left: 0.75rem;
  max-width: calc(100% - 1.5rem);
  overflow: hidden;
  padding: 0 0.25rem;
  background: linear-gradient(to bottom, var(--color-surface) 50%, var(--color-tinted) 50%);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
  transition: color var(--transition);
}

.form-input:focus + .form-label {
  background: var(--color-surface);
  color: var(--color-primary);
}

.form-error {
  margin: 0.375rem 0 0;
  color: var(--color-error);
  font-size: var(--text-sm);
}

.form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  padding: var(--space-s);
  border-radius: var(--radius-md);
  text-align: center;
  animation: fadeIn 0.3s ease-out;
}

.form-status-success {
  border: 0.0625rem solid rgba(52, 211, 153, 0.3);
  background-color: rgba(52, 211, 153, 0.1);
  color: #065f46;
}

.form-status-error {
  border: 0.0625rem solid rgba(239, 68, 68, 0.3);
  background-color: rgba(239, 68, 68, 0.08);
  color: var(--color-error);
}

/* Once sent, the form gives way to the confirmation and a button to close */
.form-done {
  display: none;
}

.contact-form.is-sent > :not(.form-status, .form-done) {
  display: none;
}

.contact-form.is-sent .form-done {
  display: inline-flex;
}

.contact-form.is-sent .form-status {
  padding: var(--space-l) var(--space-m);
  font-size: var(--text-md);
}

.contact-form.is-sent .form-status::before {
  content: "";
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--space-xs);
  border-radius: 50%;
  background: var(--color-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 1.5rem no-repeat;
}

.dialog-panel:has(.contact-form.is-sent) .dialog-subtitle {
  display: none;
}

/* AI widget: chat and live calls with our AI ------------------------------------ */

/* The button in the corner of every page, below the open menu */
.assistant-launcher {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.125rem 0 0.9375rem;
  border: 0;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary);
  box-shadow: 0 0.75rem 1.75rem rgba(30, 64, 175, 0.35);
  color: var(--color-on-dark);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
}

.assistant-launcher .icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent);
}

/* While the widget is open, the button closes it */
.assistant-launcher[aria-expanded="true"] {
  width: 3rem;
  padding: 0;
  justify-content: center;
}

.assistant-launcher-close,
.assistant-launcher[aria-expanded="true"] :is(.assistant-launcher-open, span) {
  display: none;
}

.assistant-launcher[aria-expanded="true"] .assistant-launcher-close {
  display: block;
  color: var(--color-on-dark);
}

.assistant-launcher:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-0.125rem);
}

/* The back-to-top button moves up above it */
.assistant-launcher ~ .back-to-top {
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 3.75rem);
}

/* A nudge beside the button, once a visit, on screens with room for it */
.assistant-teaser {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 3.75rem);
  z-index: 999;
  display: flex;
  align-items: center;
  max-width: 17rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0.25rem var(--radius-lg);
  background-color: var(--color-surface);
  box-shadow: 0 0.75rem 2rem rgba(0, 31, 61, 0.2);
  animation: fadeInUp 0.3s var(--ease-out);
}

.assistant-teaser-text {
  padding: 0.75rem 0.25rem 0.75rem 1rem;
  border: 0;
  background: none;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.assistant-teaser-close {
  display: grid;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.25rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
}

.assistant-teaser-close:hover {
  background-color: var(--color-tinted);
}

/* While the nudge shows, back-to-top steps aside rather than stacking on it */
.assistant-teaser:not([hidden]) ~ .back-to-top {
  display: none;
}

/* The whole screen on phones, so the conversation has room */
.assistant-panel {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  background-color: var(--color-tinted);
  color: var(--color-text);
  animation: fadeInUp 0.2s var(--ease-out);
}

@media (width < 36em) {
  html.assistant-open {
    overflow: hidden;
  }

  .assistant-open .assistant-launcher,
  .assistant-open .back-to-top {
    display: none;
  }
}

/* A window above the button from 36em, short enough to stay clear of the menu bar */
@media (min-width: 36em) {
  .assistant-panel {
    inset: auto max(1rem, env(safe-area-inset-right)) calc(max(1rem, env(safe-area-inset-bottom)) + 3.75rem) auto;
    width: min(25rem, 100vw - 2rem);
    height: min(38rem, 100dvh - 10.5rem);
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: 0 1.5rem 3rem rgba(0, 31, 61, 0.3);
  }
}

@media (min-width: 62em) {
  .assistant-launcher {
    right: 1.875rem;
    bottom: 1.875rem;
  }

  .assistant-launcher ~ .back-to-top {
    bottom: 5.75rem;
  }

  .assistant-panel,
  .assistant-teaser {
    right: 1.875rem;
    bottom: 5.75rem;
  }
}

.assistant-header {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: max(0.875rem, env(safe-area-inset-top)) 0.5rem 0.875rem 1rem;
  background: var(--gradient-dark);
  color: var(--color-on-dark);
}

.assistant-avatar {
  display: grid;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-voice);
  color: var(--color-dark);
  font-size: 1.25rem;
}

.assistant-heading {
  min-width: 0;
}

.assistant-title {
  color: var(--color-on-dark);
  font-size: 1rem;
}

.assistant-subtitle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  color: var(--color-on-dark-muted);
  font-size: var(--text-xs);
}

.assistant-online {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background-color: #34d399;
}

.assistant-close {
  display: grid;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--color-on-dark);
  font-size: 1.125rem;
  cursor: pointer;
}

.assistant-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Calling the AI Voice Agent, from the header, as a messaging app offers a call */
.assistant-call-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.5rem;
  margin-left: auto;
  padding: 0 1rem 0 0.875rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--gradient-voice);
  color: var(--color-dark);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.assistant-call-button .icon {
  width: 1.0625rem;
  height: 1.0625rem;
}

.assistant-call-button:hover {
  box-shadow: 0 0.375rem 1rem rgba(0, 188, 212, 0.35);
  transform: translateY(-0.0625rem);
}

/* With the Call button beside it, the close button no longer needs pushing to the end */
.assistant-call-button:not([hidden]) + .assistant-close {
  margin-left: 0;
}

@media (min-width: 36em) {
  .assistant-close {
    display: none;
  }
}

/* The conversation, with the suggestions under the greeting until it starts */
.assistant-thread {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-s);
  min-height: 0;
  padding: var(--space-s);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.assistant-messages {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.assistant-message {
  max-width: 88%;
  padding: 0.625rem 0.875rem;
  border-radius: 1rem;
  font-size: var(--text-sm);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.assistant-message--assistant {
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.assistant-message--user {
  align-self: flex-end;
  border-bottom-right-radius: 0.25rem;
  background-color: var(--color-primary);
  color: var(--color-on-dark);
  white-space: pre-wrap;
}

.assistant-message--error {
  background-color: #fef2f2;
  color: #991b1b;
}

.assistant-message :is(p, ul, ol) {
  margin: 0 0 0.5rem;
}

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

.assistant-message :is(ul, ol) {
  padding-left: 1.125rem;
}

.assistant-message a {
  font-weight: 600;
}

/* Who spoke, on the AI Voice Agent's side of a call */
.assistant-speaker {
  display: block;
  margin-bottom: 0.125rem;
  color: var(--color-primary-light);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* "Call started" and "Call ended", as a rule across the conversation */
.assistant-event {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-block: 0.25rem;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}

.assistant-event::before,
.assistant-event::after {
  content: "";
  flex: 1;
  height: 0.0625rem;
  background-color: var(--color-border);
}

/* Why a call couldn't start or ended early */
.assistant-notice {
  align-self: center;
  max-width: 92%;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-align: center;
  text-wrap: balance;
}

.assistant-notice a {
  font-weight: 600;
}

/* What an answer offers to do: open the consultation form, or start a call */
.assistant-action {
  display: inline-flex;
  margin: 0.125rem 0;
  padding: 0.25rem 0.75rem;
  border: 0.0625rem solid var(--color-primary-light);
  border-radius: var(--radius-pill);
  background-color: var(--color-primary-tint);
  color: var(--color-primary);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
}

.assistant-action:hover {
  background-color: rgba(59, 130, 246, 0.2);
}

/* Until the first words of an answer arrive */
.assistant-typing {
  display: inline-flex;
  gap: 0.25rem;
  padding-block: 0.375rem;
}

.assistant-typing span {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background-color: var(--color-text-muted);
  animation: typing 1.2s ease-in-out infinite;
}

.assistant-typing span:nth-child(2) { animation-delay: 0.15s; }
.assistant-typing span:nth-child(3) { animation-delay: 0.3s; }

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.assistant-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  min-height: 2.25rem;
  padding: 0.375rem 0.75rem;
  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-pill);
  background-color: var(--color-surface);
  color: var(--color-primary);
  font-size: var(--text-sm);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.assistant-suggestion:hover {
  border-color: var(--color-primary-light);
}

.assistant-suggestion .icon {
  width: 1rem;
  height: 1rem;
}

/* The message box, or the call's controls in its place */
.assistant-footer {
  padding: 0.75rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  border-top: 0.0625rem solid var(--color-border);
  background-color: var(--color-surface);
}

.assistant-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

/* 1rem at least, so phones don't zoom in on it */
.assistant-input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  max-height: 8rem;
  padding: 0.625rem 1rem;
  border: 0.0625rem solid var(--color-border);
  border-radius: 1.375rem;
  background-color: var(--color-tinted);
  color: var(--color-text);
  font-size: max(1rem, var(--text-sm));
  line-height: 1.4;
  resize: none;
}

.assistant-input:focus {
  border-color: var(--color-primary-light);
  outline: 0;
  box-shadow: 0 0 0 0.1875rem var(--color-primary-tint);
}

.assistant-send {
  display: grid;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-on-dark);
  font-size: 1.125rem;
  cursor: pointer;
  transition: background-color var(--transition), opacity var(--transition);
}

.assistant-send:hover {
  background-color: var(--color-primary-hover);
}

.assistant-send:disabled {
  opacity: 0.4;
  cursor: default;
}

/* On a call: who's talking, how long is left, and the button to hang up */
.assistant-footer:has(> .assistant-callbar:not([hidden])) {
  background: var(--gradient-dark);
}

.assistant-callbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-on-dark);
}

.assistant-call-info {
  flex: 1;
  min-width: 0;
}

.assistant-call-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
}

.assistant-call-status {
  margin: 0;
  color: var(--color-on-dark-muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.assistant-call-timer:not(:empty)::before {
  content: " · ";
}

.assistant-hangup {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  border-radius: var(--radius-pill);
  background-color: #dc2626;
  color: var(--color-on-dark);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition);
}

.assistant-hangup:hover {
  background-color: #b91c1c;
}

/* The handset, put down */
.assistant-hangup .icon {
  width: 1.125rem;
  height: 1.125rem;
  transform: rotate(135deg);
}

/* The orb: breathing while the call connects, rippling while the agent speaks; its bars follow the visitor's voice */
.assistant-orb {
  position: relative;
  display: grid;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
}

.assistant-orb-core {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gradient-voice);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 188, 212, 0.3);
}

.assistant-orb-core span {
  width: 0.1875rem;
  height: calc(0.25rem + 1rem * var(--mic-level, 0) * var(--bar, 1));
  border-radius: 0.125rem;
  background-color: var(--color-dark);
  transition: height 0.08s linear;
}

.assistant-orb-core span:nth-child(1),
.assistant-orb-core span:nth-child(5) { --bar: 0.45; }
.assistant-orb-core span:nth-child(2),
.assistant-orb-core span:nth-child(4) { --bar: 0.75; }

.assistant-orb-ring {
  position: absolute;
  inset: 0;
  border: 0.125rem solid rgba(0, 188, 212, 0.55);
  border-radius: 50%;
  opacity: 0;
}

.assistant-callbar[data-state="connecting"] .assistant-orb-core {
  animation: breathe 1.2s ease-in-out infinite;
}

.assistant-callbar.is-speaking .assistant-orb-ring {
  animation: ripple 1.6s ease-out infinite;
}

.assistant-callbar.is-speaking .assistant-orb-ring + .assistant-orb-ring {
  animation-delay: 0.8s;
}

/* While the agent speaks, the bars move with its voice instead */
.assistant-callbar.is-speaking .assistant-orb-core span {
  animation: equalize 0.8s ease-in-out infinite alternate;
}

.assistant-callbar.is-speaking .assistant-orb-core span:nth-child(2) { animation-delay: -0.5s; }
.assistant-callbar.is-speaking .assistant-orb-core span:nth-child(3) { animation-delay: -0.2s; }
.assistant-callbar.is-speaking .assistant-orb-core span:nth-child(4) { animation-delay: -0.65s; }
.assistant-callbar.is-speaking .assistant-orb-core span:nth-child(5) { animation-delay: -0.35s; }

/* Trying the AI Voice Agent, on its product page */
.try-it .section-header {
  margin-bottom: var(--space-l);
}

@keyframes ripple {
  from {
    opacity: 0.8;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(1.6);
  }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes equalize {
  from { height: 0.25rem; }
  to { height: calc(0.375rem + 0.875rem * var(--bar, 1)); }
}

@keyframes typing {
  0%, 60%, 100% { opacity: 0.35; transform: none; }
  30% { opacity: 1; transform: translateY(-0.1875rem); }
}

/* Back to top --------------------------------------------------------------- */

.back-to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 99;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  color: var(--color-on-dark);
  font-size: 1.125rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1.25rem);
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), visibility 0s linear 0.25s, background-color var(--transition);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--transition), transform var(--transition), background-color var(--transition);
}

.back-to-top:hover {
  background-color: var(--color-primary-hover);
}

@media (min-width: 62em) {
  .back-to-top {
    right: 1.875rem;
    bottom: 1.875rem;
    width: 3.125rem;
    height: 3.125rem;
  }
}

/* ==========================================================================
   5. Utilities
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

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

/* ==========================================================================
   6. Motion
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.875rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-0.625rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(0.9375rem, -0.9375rem) rotate(180deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
