/* ==========================================================================
   Mettsenia website — design system and page styles
   Colours are taken from the logo: navy #214082 / #1C3770, green #008C1D,
   ice #C4FAFF. Type is IBM Plex Sans, with Plex Mono for readings and labels.
   ========================================================================== */

:root {
  /* Brand */
  --navy: #214082;
  --navy-700: #1c3770;
  --navy-800: #142a57;
  --navy-900: #0c1a36;
  --navy-950: #081226;
  --navy-50: #eef2fa;
  --green: #008c1d;
  --green-700: #00731a;
  --green-50: #e7f5ea;
  --ice: #c4faff;

  /* Neutrals */
  --ink: #0e1b33;
  --ink-2: #3d4a60;
  --ink-3: #5f6b80;
  --line: #e2e7ef;
  --line-strong: #cdd5e1;
  --bg: #ffffff;
  --bg-subtle: #f4f6fa;

  /* States */
  --success: #00731a;
  --success-bg: #e7f5ea;
  --warning: #9a4a06;
  --warning-bg: #fff6e5;
  --danger: #b42318;
  --danger-bg: #fdf0ef;
  --info: #214082;
  --info-bg: #eef2fa;

  /* Type */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --fs-display: clamp(2.25rem, 1.55rem + 2.6vw, 3.5rem);
  --fs-h1: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  --fs-h2: clamp(1.625rem, 1.35rem + 1.1vw, 2.25rem);
  --fs-h3: 1.1875rem;
  --fs-lead: 1.1875rem;
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;

  /* Space and shape */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 9vw, 128px);
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --header-h: 68px;

  --shadow-sm: 0 1px 2px rgba(14, 27, 51, 0.06);
  --shadow-md: 0 1px 2px rgba(14, 27, 51, 0.05), 0 8px 24px -8px rgba(14, 27, 51, 0.14);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-700); }

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

ul, ol { margin: 0; padding: 0; }

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

::selection { background: var(--ice); color: var(--ink); }

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

.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section) 0; }
.section--subtle { background: var(--bg-subtle); }
.section + .section:not(.section--subtle):not(.section--dark) { border-top: 1px solid var(--line); }

/* Utilities used by the legal documents */
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1.25rem; }

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--green-700);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.eyebrow--plain::before { display: none; }

.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--ink-3); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { margin-top: 16px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 500 var(--fs-sm)/1.2 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn .bi { font-size: 1.05em; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-700); color: #fff; }
.btn--secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--ink-3); color: var(--ink); }
.btn--ghost-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.btn--ghost-dark:hover { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.btn--light { background: #fff; color: var(--navy-900); }
.btn--light:hover { background: var(--ice); color: var(--navy-900); }
.btn--sm { min-height: 38px; padding: 8px 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  text-decoration: none;
}
.link-arrow .bi { transition: transform 0.15s var(--ease); }
.link-arrow:hover .bi { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, 0.88); backdrop-filter: saturate(160%) blur(10px); }
}
.site-header.is-scrolled,
.site-header.is-static { border-bottom-color: var(--line); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav__link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--bg-subtle); }
.nav__link[aria-current="page"],
.nav__link.is-active { color: var(--navy); }
.nav__cta { margin-left: 12px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--bg-subtle); }

@media (max-width: 959.98px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: block;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -16px rgba(14, 27, 51, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0s linear 0.18s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li + li { border-top: 1px solid var(--line); }
  .nav__link { padding: 14px 4px; border-radius: 0; font-size: 1rem; }
  .nav__link:hover { background: transparent; }
  .nav__cta { display: flex; width: 100%; margin: 16px 0 0; }
  body.nav-open { overflow: hidden; }
}

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 88px);
  overflow: hidden;
  background:
    linear-gradient(to bottom, #fff 0%, var(--bg-subtle) 100%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.hero h1 {
  font-size: var(--fs-display);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.hero h1 span { display: block; }
.hero .lead { max-width: 52ch; margin: 24px 0 32px; }
.hero__note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  color: var(--ink-3);
  font-size: var(--fs-sm);
  list-style: none;
}
.hero__note li { display: inline-flex; align-items: center; gap: 8px; }
.hero__note .bi { color: var(--green); }

/* Product shot sits on a measured grid, the one decorative device on the site */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 3vw, 32px);
}
/* Grid behind the phones, faded out at the edges so there is no visible box */
.hero__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 85%);
          mask-image: radial-gradient(ellipse at center, #000 45%, transparent 85%);
  pointer-events: none;
}
.hero__visual img {
  position: relative;
  width: min(100%, 420px);
  filter: drop-shadow(0 20px 32px rgba(14, 27, 51, 0.16));
}

.btn__meta { font-weight: 400; opacity: 0.72; }
.btn__meta::before { content: "·"; margin-right: 6px; }

.app-name {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.app-name span {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--navy-50);
  color: var(--ink-3);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.store-row { margin: 16px 0 8px; }

/* Readings strip */
.readings {
  position: relative;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.readings__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
}
.reading {
  padding: 28px 24px;
  border-left: 1px solid var(--line);
}
.reading:first-child { border-left: 0; padding-left: 0; }
.reading__value {
  display: block;
  color: var(--ink);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.reading__label {
  display: block;
  margin-top: 6px;
  color: var(--ink-3);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   Platform (about)
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.split__intro h2 { font-size: var(--fs-h2); }
.split__intro p { margin-top: 20px; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 48px);
  list-style: none;
}
.feature {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.feature:nth-child(-n+2) { border-top-color: var(--ink); }
.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--navy-50);
  color: var(--navy);
  font-size: 1.125rem;
}
.feature h3 { font-size: var(--fs-h3); margin-bottom: 8px; }
.feature p { color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.6; }

/* --------------------------------------------------------------------------
   Dark band (utilities / architecture)
   -------------------------------------------------------------------------- */
.section--dark {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.74);
}
.section--dark h2,
.section--dark h3 { color: #fff; }
.section--dark .eyebrow { color: var(--ice); }
.section--dark .lead { color: rgba(255, 255, 255, 0.74); }
.section--dark a:not(.btn) { color: var(--ice); }

.utilities {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.utilities__media {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}
.utilities__media img { width: 100%; }
.utilities__media figcaption,
.figure-dark figcaption {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-xs);
}

.spec-list { list-style: none; margin-top: 32px; }
.spec {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.spec:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.spec dt, .spec__key {
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 3px;
}
.spec__val { margin: 0; color: #fff; }
.utilities h2 { font-size: var(--fs-h2); }
.utilities .lead { margin-top: 16px; }
.spec__val span { display: block; color: rgba(255, 255, 255, 0.6); font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   Tabs (apps)
   -------------------------------------------------------------------------- */
.tabs__list {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: clamp(32px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-subtle);
}
.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-3);
  font: 500 var(--fs-sm)/1.2 var(--font-sans);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.tabs__tab:hover { color: var(--ink); }
.tabs__app { font-weight: 400; color: var(--ink-3); }
.tabs__app::before { content: "·"; margin: 0 6px 0 2px; }
.tabs__tab[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}

.app-panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.app-panel[hidden] { display: none; }
.app-panel h3 { font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem); line-height: 1.25; }
.app-panel__intro { margin: 16px 0 28px; max-width: 60ch; }

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px;
  list-style: none;
}
.check-list--single { grid-template-columns: minmax(0, 1fr); }
.check-list li {
  position: relative;
  padding-left: 28px;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--ink-3);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--green-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%2300731a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.check-list strong { display: block; color: var(--ink); font-weight: 600; }
.section--dark .check-list li { color: rgba(255, 255, 255, 0.7); }
.section--dark .check-list strong { color: #fff; }
.section--dark .check-list li::before { background-color: rgba(196, 250, 255, 0.12); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23c4faff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.app-panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.app-panel__actions .muted { font-size: var(--fs-sm); }

.app-panel__shot {
  display: flex;
  justify-content: center;
  max-height: 600px;
  overflow: hidden;
}
.app-panel__shot img { width: min(100%, 340px); filter: drop-shadow(0 16px 32px rgba(14, 27, 51, 0.14)); }

/* --------------------------------------------------------------------------
   Billing modes
   -------------------------------------------------------------------------- */
.modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  border-top: 1px solid var(--ink);
}
.mode {
  padding: 28px clamp(20px, 3vw, 36px) 8px;
  border-left: 1px solid var(--line);
}
.mode:first-child { border-left: 0; padding-left: 0; }
.mode__index {
  display: block;
  margin-bottom: 20px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
}
.mode h3 { font-size: var(--fs-h3); margin-bottom: 10px; }
.mode p { color: var(--ink-3); font-size: var(--fs-sm); }
.mode__tag {
  display: inline-block;
  margin-top: 16px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  color: var(--info);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   FAQ (native details/summary accordion)
   -------------------------------------------------------------------------- */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.faq__aside { position: sticky; top: calc(var(--header-h) + 32px); }
.faq__aside h2 { font-size: var(--fs-h2); }
.faq__aside p { margin-top: 16px; }
.faq__help {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.faq__help strong { display: block; color: var(--ink); margin-bottom: 6px; }
.faq__help a { display: block; margin-top: 4px; }

.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { color: var(--navy); }
.accordion summary::after {
  content: "";
  flex: none;
  width: 20px; height: 20px;
  margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' stroke='%235f6b80' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  transition: transform 0.2s var(--ease);
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion__body {
  padding: 0 44px 24px 0;
  color: var(--ink-3);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact__intro h2 { font-size: var(--fs-h2); }
.contact__intro > p { margin-top: 16px; }

.contact-details { list-style: none; margin-top: 36px; }
.contact-details li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.contact-details li:last-child { border-bottom: 1px solid var(--line); }
.contact-details > li > .bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: var(--navy-50);
  color: var(--navy);
}
.contact-details__label {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.contact-details address { font-style: normal; color: var(--ink); font-size: var(--fs-sm); line-height: 1.6; }
.contact-details a { color: var(--ink); font-weight: 500; text-decoration: none; }
.contact-details a:hover { color: var(--navy); text-decoration: underline; }
.contact-details .link-arrow { margin-top: 6px; color: var(--navy); font-size: var(--fs-sm); }

/* Form */
.form-card {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.form-card h3 { font-size: var(--fs-h3); }
.form-card > p { margin: 6px 0 28px; color: var(--ink-3); font-size: var(--fs-sm); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { color: var(--ink); font-size: var(--fs-sm); font-weight: 500; }
.field .req { color: var(--danger); margin-left: 2px; }
.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-sans);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input::placeholder { color: #6e788b; }
.input:hover { border-color: #aab4c4; }
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(33, 64, 130, 0.16); }
textarea.input { min-height: 140px; resize: vertical; }
.input.is-invalid,
.input:user-invalid { border-color: var(--danger); }
.input.is-invalid:focus,
.input:user-invalid:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14); }
.field__error { display: none; color: var(--danger); font-size: var(--fs-xs); }
.field.has-error .field__error { display: block; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}
.form-actions .muted { font-size: var(--fs-xs); }

/* Alerts and status (used by the contact form) */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.alert::before { font-family: "bootstrap-icons"; line-height: 1.3; }
.alert--success { background: var(--success-bg); border-color: #b9e2c3; color: var(--success); }
.alert--success::before { content: "\f26a"; }
.alert--error { background: var(--danger-bg); border-color: #f4c7c2; color: var(--danger); }
.alert--error::before { content: "\f332"; }
.alert--info { background: var(--info-bg); border-color: #cfdaf0; color: var(--info); }
.alert[hidden] { display: none; }

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn:not(.is-loading) .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.cta-band h2 { font-size: var(--fs-h2); max-width: 22ch; }
.cta-band p { margin-top: 12px; max-width: 56ch; }

/* --------------------------------------------------------------------------
   Page head (inner pages)
   -------------------------------------------------------------------------- */
.page-head {
  padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, #fff, var(--bg-subtle));
}
.page-head h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; line-height: 1.1; }
.page-head .lead { margin-top: 20px; max-width: 62ch; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  list-style: none;
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); }

/* Solutions page head with an index */
.solutions-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: end;
}
.solutions-head .btn-row { margin-top: 32px; }
.index-list { list-style: none; counter-reset: idx; border-top: 1px solid var(--ink); }
.index-list li { border-bottom: 1px solid var(--line); }
.index-list a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  gap: 8px;
  align-items: baseline;
  padding: 12px 0;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
}
.index-list a::before {
  counter-increment: idx;
  content: counter(idx, decimal-leading-zero);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 400;
}
.index-list a::after { content: "\2193"; color: var(--ink-3); transition: transform 0.15s var(--ease); }
.index-list a:hover { color: var(--navy); }
.index-list a:hover::after { transform: translateY(2px); color: var(--navy); }

/* Solution entries */
.solution {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(56px, 7vw, 96px) 0;
  border-top: 1px solid var(--line);
}
.solution:first-child { border-top: 0; }
.solution__head { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.solution__num {
  display: block;
  margin-bottom: 16px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}
.solution__head h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); line-height: 1.2; }
.solution__tag {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--green-50);
  color: var(--green-700);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.solution__body > p { max-width: 64ch; }
.solution__body > p + .check-list,
.solution__body > .check-list + p { margin-top: 24px; }
.solution__body .check-list + p { color: var(--ink-3); }
.solution__body h3 { font-size: var(--fs-h3); margin: 32px 0 16px; }
.solution__body h3:first-of-type { margin-top: 28px; }
.solution__figure { margin: 40px 0 0; }
.solution__figure.figure-dark { max-width: 400px; }

.figure-dark {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #05070d;
}
.figure-dark img { width: 100%; }
.figure-light {
  margin: 0;
  display: flex;
  justify-content: center;
}
.figure-light img { width: min(100%, 520px); }

/* Architecture */
.arch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Legal documents
   -------------------------------------------------------------------------- */
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 16px;
  color: var(--ink-3);
  font-size: var(--fs-sm);
  list-style: none;
}
.doc-meta li { display: inline-flex; align-items: center; gap: 8px; }

.doc-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: var(--section);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding-right: 8px;
  font-size: var(--fs-xs);
}
.toc summary {
  display: none;
  color: var(--ink);
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.toc__title {
  margin-bottom: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a {
  display: block;
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  border-left: 2px solid transparent;
  color: var(--ink-3);
  line-height: 1.4;
  text-decoration: none;
}
.toc li a:hover { color: var(--ink); }
.toc li a.is-active { color: var(--navy); border-left-color: var(--navy); font-weight: 500; }
.toc li.toc__group { margin-top: 16px; }
.toc li.toc__group:first-child { margin-top: 0; }
.toc li.toc__group a { color: var(--ink); font-weight: 600; }

.legal {
  max-width: 76ch;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.7;
}
.legal > p:first-child,
.legal > h6:first-child { margin-top: 0; }
.legal p { margin: 0 0 1em; }
.legal h6 {
  margin: 2.5em 0 0.75em;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-decoration: none !important;
}
.legal h6[data-toc-group] {
  margin-top: 3.5em;
  padding-top: 1.5em;
  border-top: 1px solid var(--ink);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-transform: none;
}
.legal h6[data-toc-group]:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal > h6[data-toc-group]:first-of-type { margin-top: 2em; }
.legal ul { list-style: none; padding: 0; margin: 0 0 1em; }
.legal ul ul { padding-left: 1.5em; margin: 0.5em 0 0; }
.legal li { margin: 0 0 0.6em; }
.legal li.mt-2, .legal li.mt-3 { margin-top: 0; }
.legal strong, .legal b { color: var(--ink); font-weight: 600; }
.legal a { word-break: break-word; }

/* App WebView mode: ?mobileview=true shows the document only */
html.mobile-view .site-header,
html.mobile-view .page-head,
html.mobile-view .toc,
html.mobile-view .site-footer,
html.mobile-view .skip-link { display: none !important; }
html.mobile-view .doc-layout { display: block; padding-top: 20px; padding-bottom: 32px; }
html.mobile-view .legal { max-width: none; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--fs-sm);
}
.site-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr));
  gap: 40px;
  padding: clamp(56px, 7vw, 80px) 0 48px;
}
.footer-brand .brand { color: #fff; }
.footer-brand p { margin-top: 16px; max-width: 36ch; line-height: 1.6; }
.footer-brand address { margin-top: 20px; font-style: normal; line-height: 1.6; max-width: 40ch; }
.footer-col h2 {
  margin-bottom: 16px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: 10px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 24px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1099.98px) {
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 959.98px) {
  .hero__grid,
  .split,
  .utilities,
  .app-panel,
  .faq,
  .contact,
  .solutions-head,
  .solution { grid-template-columns: minmax(0, 1fr); }

  .hero { padding-top: 40px; }
  .hero__visual img { width: min(100%, 380px); }

  .readings__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading:nth-child(3) { border-left: 0; padding-left: 0; }
  .reading:nth-child(n+3) { border-top: 1px solid var(--line); }

  .faq__aside,
  .solution__head { position: static; }

  .app-panel__shot { order: -1; max-height: 420px; }
  .utilities__media { max-width: 440px; width: 100%; }

  .modes { grid-template-columns: minmax(0, 1fr); }
  .mode { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .mode:first-child { border-top: 0; }

  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-subtle);
  }
  .toc summary { display: block; padding: 14px 16px; }
  .toc__title { display: none; }
  .toc ol { margin: 0 16px 16px; max-height: 50vh; overflow-y: auto; }
}

@media (max-width: 639.98px) {
  :root { --header-h: 60px; }
  body { font-size: 1rem; }
  .feature-list,
  .check-list,
  .form-grid,
  .arch { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-child(2) { border-top-color: var(--line); }
  .reading { padding: 20px 16px; }
  .spec { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .btn-row .btn { flex: 1 1 auto; }
  .tabs__list { display: flex; width: 100%; }
  .tabs__tab { flex: 1; justify-content: center; padding: 8px 10px; min-height: 52px; text-align: left; }
  .tabs__label { display: flex; flex-direction: column; line-height: 1.25; }
  .tabs__app { font-size: var(--fs-xs); }
  .tabs__app::before { display: none; }
  .app-panel__actions .btn { flex: 1 1 140px; }
  .app-name span { white-space: nowrap; }
  .accordion__body { padding-right: 0; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col a { overflow-wrap: anywhere; }
  .form-actions .btn { width: 100%; }
  .contact-details address { overflow-wrap: anywhere; }
}

@media (max-width: 419.98px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .footer-col li + li { margin-top: 12px; }
  .footer-col a { display: inline-block; padding: 2px 0; }
}

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

@media print {
  .site-header, .site-footer, .toc, .skip-link { display: none !important; }
  .doc-layout { display: block; }
  .legal { max-width: none; }
}
