/* =============================================================================================================
   Zinteli design system
   Tokens first, then base, layout, components and pages. The brand rules behind every value are in
   docs/brand/BRAND-GUIDELINES.md. Product palettes live in products.css.
   ============================================================================================================= */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------------------------------------- tokens */

:root {
  color-scheme: light;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;

  /* Brand constants: the same in both themes. */
  --z-indigo: #5b4bff;
  --z-azure: #3d7bff;
  --z-cyan: #00c2e0;
  --z-spark: #ffb020;
  --z-midnight: #070a1a;
  --grad-brand: linear-gradient(120deg, #5b4bff 0%, #3d7bff 50%, #00c2e0 100%);
  --grad-button: linear-gradient(135deg, #6a4bff 0%, #5b4bff 40%, #4361ee 100%);

  /* Light theme. */
  --bg: #f7f8fc;
  --bg-elev: #ffffff;
  --bg-sunken: #eef0f7;
  --surface: #ffffff;
  --surface-2: #f2f4fa;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --text: #0b1020;
  --text-2: #353c5c;
  --text-3: #5a6182;
  --border: #e2e5f0;
  --border-strong: #cdd2e3;
  --primary: #5b4bff;
  --primary-hover: #4a3af0;
  --primary-soft: rgba(91, 75, 255, 0.09);
  --link: #4a3af0;
  --focus: #5b4bff;
  --grad-text: linear-gradient(110deg, #5b4bff 0%, #3d7bff 45%, #0891b2 100%);
  --aurora-1: rgba(91, 75, 255, 0.2);
  --aurora-2: rgba(0, 194, 224, 0.16);
  --aurora-3: rgba(255, 176, 32, 0.1);
  --grid-line: rgba(11, 16, 32, 0.045);
  --success: #067647;
  --success-soft: #ecfdf3;
  --danger: #c01048;
  --danger-soft: #fff1f3;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --info: #175cd3;
  --info-soft: #eff8ff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 64, 0.06), 0 1px 3px rgba(16, 24, 64, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(16, 24, 64, 0.14), 0 2px 6px rgba(16, 24, 64, 0.05);
  --shadow-lg: 0 32px 64px -24px rgba(16, 24, 64, 0.28), 0 12px 24px -12px rgba(16, 24, 64, 0.12);
  --shadow-glow: 0 18px 48px -16px rgba(91, 75, 255, 0.55);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070a1a;
  --bg-elev: #0c1028;
  --bg-sunken: #05070f;
  --surface: #0e1230;
  --surface-2: #141a3c;
  --surface-glass: rgba(12, 16, 40, 0.7);
  --text: #eef0ff;
  --text-2: #c6cae3;
  --text-3: #9ca2c6;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --primary: #8e80ff;
  --primary-hover: #a69bff;
  --primary-soft: rgba(142, 128, 255, 0.14);
  --link: #a69bff;
  --focus: #a69bff;
  --grad-text: linear-gradient(110deg, #a69bff 0%, #6fa8ff 45%, #22d3ee 100%);
  --aurora-1: rgba(91, 75, 255, 0.34);
  --aurora-2: rgba(0, 194, 224, 0.2);
  --aurora-3: rgba(255, 176, 32, 0.08);
  --grid-line: rgba(255, 255, 255, 0.045);
  --success: #47cd89;
  --success-soft: rgba(71, 205, 137, 0.12);
  --danger: #fd6f8e;
  --danger-soft: rgba(253, 111, 142, 0.12);
  --warning: #fdb022;
  --warning-soft: rgba(253, 176, 34, 0.12);
  --info: #53b1fd;
  --info-soft: rgba(83, 177, 253, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-glow: 0 18px 60px -12px rgba(91, 75, 255, 0.6);
}

/* No script: follow the system. The inline script in the head sets data-theme before first paint otherwise. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #070a1a;
    --bg-elev: #0c1028;
    --surface: #0e1230;
    --surface-2: #141a3c;
    --text: #eef0ff;
    --text-2: #c6cae3;
    --text-3: #9ca2c6;
    --border: rgba(255, 255, 255, 0.08);
  }
}

/* ----------------------------------------------------------------------------------------------- base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

/* Components set display; hidden must still win. */
[hidden] {
  display: none !important;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.75rem);
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3.25rem);
}

h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  letter-spacing: -0.015em;
}

h4 {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(91, 75, 255, 0.24);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.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;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ----------------------------------------------------------------------------------------------- layout */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 820px;
}

.section {
  position: relative;
  padding-block: clamp(72px, 10vw, 136px);
}

.section--tight {
  padding-block: clamp(48px, 6vw, 80px);
}

.section--sunken {
  background: var(--bg-sunken);
}

.section--surface {
  background: var(--bg-elev);
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head p {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  color: var(--text-2);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
}

.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.55;
  color: var(--text-2);
}

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted {
  color: var(--text-3);
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.split {
  display: grid;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: 1.05fr 1fr;
  }

  .split--reverse > :first-child {
    order: 2;
  }
}

/* Background art shared by hero sections: aurora blobs, a fine grid and a soft noise. */
.backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 120%;
  background:
    radial-gradient(40% 50% at 18% 20%, var(--aurora-1), transparent 70%),
    radial-gradient(36% 46% at 82% 18%, var(--aurora-2), transparent 70%),
    radial-gradient(30% 40% at 60% 70%, var(--aurora-3), transparent 70%);
  filter: blur(20px);
  animation: aurora 22s var(--ease) infinite alternate;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}

@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-3%, 2%, 0) scale(1.05); }
  100% { transform: translate3d(3%, -2%, 0) scale(1.02); }
}

/* ----------------------------------------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 0.975rem/1.2 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
  border-color: var(--text-3);
}

.btn:active {
  transform: translateY(0);
}

.btn .icon {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.2s var(--ease);
}

.btn:hover .icon--nudge {
  transform: translateX(3px);
}

.btn--primary {
  --btn-fg: #fff;
  border-color: transparent;
  background: var(--grad-button);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn--primary:hover {
  border-color: transparent;
  box-shadow: 0 22px 60px -14px rgba(91, 75, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-border: transparent;
}

.btn--ghost:hover {
  background: var(--primary-soft);
  border-color: transparent;
}

.btn--glass {
  --btn-bg: var(--surface-glass);
  backdrop-filter: blur(12px);
}

.btn--sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn--lg {
  min-height: 56px;
  padding: 16px 28px;
  font-size: 1.05rem;
}

.btn--block {
  width: 100%;
}

.btn[aria-busy="true"] {
  pointer-events: none;
  color: transparent;
}

.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-row--center {
  justify-content: center;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
}

.link-arrow .icon {
  width: 1em;
  height: 1em;
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(4px);
}

/* ----------------------------------------------------------------------------------------------- chips & badges */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-glass);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.chip .icon {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
}

.chip--pulse::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 0 rgba(18, 183, 106, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(18, 183, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0); }
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
}

.tag .icon {
  width: 1rem;
  height: 1rem;
}

/* ----------------------------------------------------------------------------------------------- cards */

.card {
  position: relative;
  padding: clamp(24px, 2.6vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

/* The spotlight follows the pointer; site.js sets --mx and --my. */
.card--spotlight {
  overflow: hidden;
  isolation: isolate;
}

.card--spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--primary-soft), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card--spotlight:hover::before {
  opacity: 1;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.card__icon .icon {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  margin: 0;
  color: var(--text-2);
}

/* ----------------------------------------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled,
.site-header.is-open {
  border-color: var(--border);
  background: var(--surface-glass);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand__word {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}

.nav__link,
.nav__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-2);
  font: 500 0.95rem var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.nav__link:hover,
.nav__trigger:hover,
.nav__trigger[aria-expanded="true"],
.nav__link[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--text);
  text-decoration: none;
}

.nav__trigger .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}

.nav__trigger[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-actions .btn {
  display: none;
}

.menu-toggle {
  display: inline-grid;
}

@media (min-width: 1040px) {
  .nav {
    display: flex;
  }

  .header-actions {
    margin-left: 0;
  }

  .header-actions .btn {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }
}

.theme-toggle .icon--sun,
:root[data-theme="dark"] .theme-toggle .icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon--sun {
  display: block;
}

/* Mega menu */
.mega {
  position: absolute;
  top: calc(var(--header-h) - 6px);
  left: 50%;
  width: min(1040px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}

.mega.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.mega__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 300px;
  gap: 4px;
}

.mega__item {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s;
}

.mega__item:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.mega__item strong {
  display: block;
  font-size: 0.975rem;
}

.mega__item span {
  display: block;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-3);
}

.mega__aside {
  grid-column: 3;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(91, 75, 255, 0.95), rgba(61, 123, 255, 0.92) 55%, rgba(0, 165, 196, 0.92));
  color: #fff;
}

.mega__aside h3 {
  font-size: 1.25rem;
}

.mega__aside p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.925rem;
}

.mega__aside .btn {
  --btn-bg: #fff;
  --btn-fg: #2c1fb8;
  border-color: transparent;
  align-self: flex-start;
}

.mega__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 12px 14px 4px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 49;
  overflow-y: auto;
  padding: 16px var(--gutter) 40px;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.drawer__link,
.drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
  list-style: none;
  cursor: pointer;
}

.drawer summary::-webkit-details-marker {
  display: none;
}

.drawer details[open] summary .icon {
  transform: rotate(180deg);
}

.drawer__products {
  display: grid;
  gap: 4px;
  padding: 8px 0 12px;
}

.drawer .btn {
  margin-top: 24px;
}

/* Product icon, used in menus, cards and heroes */
.product-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
}

.product-icon--tile {
  padding: 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 64, 0.08);
}

.product-icon--lg {
  width: 72px;
  height: 72px;
  border-radius: 20px;
}

.product-icon--lg.product-icon--tile {
  padding: 10px;
}

/* ----------------------------------------------------------------------------------------------- hero */

.hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(40px, 7vw, 96px));
  padding-bottom: clamp(64px, 8vw, 120px);
  overflow: hidden;
}

.is-locked,
.has-modal {
  overflow: hidden;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.hero__grid {
  display: grid;
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
}

@media (min-width: 1080px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  }
}

.hero h1 {
  margin-block: 22px 24px;
}

.hero .lead {
  max-width: 620px;
  margin-bottom: 36px;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-3);
  font-size: 0.9rem;
  font-weight: 500;
}

.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__trust .icon {
  width: 18px;
  height: 18px;
  color: var(--success);
}

/* ----------------------------------------------------------------------------------------------- device frames */

.device {
  --w: 260px;
  position: relative;
  flex: none;
}

.device--phone {
  width: var(--w);
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.165);
  background: linear-gradient(145deg, #2a2f45, #0b0d16 60%, #1c2033);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.12),
    inset 0 0 0 calc(var(--w) * 0.012) #05060b,
    var(--shadow-lg);
}

.device--phone .device__screen {
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.135);
  background: #000;
}

.device--phone .device__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.device--desktop {
  width: var(--w);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--w) * 0.018);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.device--desktop .device__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: calc(var(--w) * 0.034);
  min-height: 22px;
  padding-inline: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.device--desktop .device__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f57;
}

.device--desktop .device__bar i:nth-child(2) {
  background: #febc2e;
}

.device--desktop .device__bar i:nth-child(3) {
  background: #28c840;
}

.device--desktop .device__bar span {
  flex: 1;
  max-width: 46%;
  height: 60%;
  margin-inline: auto;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.9;
  text-align: center;
  overflow: hidden;
}

.device--desktop .device__screen {
  aspect-ratio: 1280 / 800;
}

.device--desktop .device__screen img {
  width: 100%;
  height: 100%;
}

.device--paper {
  width: var(--w);
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 28px 60px -24px rgba(16, 24, 64, 0.45);
}

.device--paper .device__screen {
  aspect-ratio: 595 / 842;
}

/* A composed stage of frames: one desktop or paper behind, phones in front. */
.stage {
  position: relative;
  min-height: 360px;
  perspective: 1600px;
}

.stage__inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1.12;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}

.stage .device {
  position: absolute;
  transition: transform 0.6s var(--ease);
}

.stage__back {
  --w: 90%;
  top: 4%;
  right: -2%;
}

.stage__back.device--paper {
  --w: 52%;
  top: 2%;
  right: 8%;
  transform: rotate(4deg);
}

.stage__front {
  --w: 38%;
  bottom: 0;
  left: 2%;
  z-index: 2;
  animation: float 9s ease-in-out infinite;
}

.stage__side {
  --w: 31%;
  bottom: 6%;
  right: 4%;
  z-index: 3;
  animation: float 11s ease-in-out -3s infinite;
}

/* Three phones and no desktop: a fan. */
.stage--phones .stage__back {
  --w: 38%;
  top: 0;
  right: auto;
  left: 31%;
  z-index: 2;
}

.stage--phones .stage__front {
  --w: 33%;
  left: 0;
  bottom: 4%;
  z-index: 1;
  transform: rotate(-6deg);
}

.stage--phones .stage__side {
  --w: 33%;
  right: 0;
  bottom: 4%;
  z-index: 1;
  transform: rotate(6deg);
}

/* A phone width in percent of the stage needs its padding and radius in the same units. */
.stage .device--phone {
  width: var(--w);
  padding: 2.9%;
}

.stage__back.device--phone,
.stage__front.device--phone,
.stage__side.device--phone {
  border-radius: 13% / 6.2%;
}

.stage .device--phone .device__screen {
  border-radius: 11% / 5.2%;
}

.stage .device--desktop {
  border-radius: 10px;
}

.float-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-glass);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  font-size: 0.82rem;
  line-height: 1.3;
  animation: float 8s ease-in-out infinite;
}

.float-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.float-chip span {
  color: var(--text-3);
}

.float-chip__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.float-chip__icon .icon {
  width: 18px;
  height: 18px;
}

.float-chip--a {
  top: 4%;
  left: 2%;
}

.float-chip--b {
  top: 46%;
  right: -2%;
  animation-delay: -4s;
}

.float-chip--c {
  bottom: 2%;
  left: 38%;
  animation-delay: -2s;
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@media (max-width: 640px) {
  .float-chip--b {
    display: none;
  }
}

/* ----------------------------------------------------------------------------------------------- marquee */

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 28px;
  border-block: 1px solid var(--border);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee__track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
}

.marquee__item .icon {
  color: var(--primary);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ----------------------------------------------------------------------------------------------- bento */

.bento {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.bento > * {
  grid-column: span 6;
}

@media (min-width: 760px) {
  .bento > * {
    grid-column: span 3;
  }
}

@media (min-width: 1080px) {
  .bento > * {
    grid-column: span 2;
  }

  .bento > .bento__wide {
    grid-column: span 3;
  }
}

.bento__wide {
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.bento__wide .tag-list {
  margin-top: auto;
  padding-top: 24px;
}

/* ----------------------------------------------------------------------------------------------- product showcase */

.showcase {
  display: grid;
  gap: 24px;
}

@media (min-width: 1080px) {
  .showcase {
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 40px;
  }
}

.showcase__tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

@media (min-width: 1080px) {
  .showcase__tabs {
    flex-direction: column;
    overflow: visible;
  }
}

.showcase__tab {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: max-content;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

@media (min-width: 1080px) {
  .showcase__tab {
    min-width: 0;
  }
}

.showcase__tab:hover {
  background: var(--surface-2);
}

.showcase__tab[aria-selected="true"] {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.showcase__tab strong {
  display: block;
  font-size: 1rem;
}

.showcase__tab span {
  display: block;
  color: var(--text-3);
  font-size: 0.85rem;
}

.showcase__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  isolation: isolate;
}

.showcase__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 70% at 100% 0%, color-mix(in srgb, var(--p-glow) 22%, transparent), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, color-mix(in srgb, var(--p-1) 14%, transparent), transparent 70%);
}

.showcase__panel[hidden] {
  display: none;
}

.showcase__panel.is-entering {
  animation: panel-in 0.5s var(--ease);
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
}

.showcase__body {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 860px) {
  .showcase__body {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

.showcase__body h3 {
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 10px;
  color: var(--text-2);
}

.check-list .icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--p-text, var(--primary));
}

/* ----------------------------------------------------------------------------------------------- stats */

.stats {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--border);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.stat {
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
}

.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat__label {
  display: block;
  margin-top: 10px;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ----------------------------------------------------------------------------------------------- process */

.process {
  display: grid;
  gap: 20px;
  counter-reset: step;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

@media (min-width: 1180px) {
  .process {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.process__step {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  counter-increment: step;
}

.process__step::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.process__step::after {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease);
}

.process__step.is-visible::after {
  transform: scaleX(1);
}

.process__step h3 {
  font-size: 1.2rem;
}

.process__step p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ----------------------------------------------------------------------------------------------- product cards */

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  color: inherit;
  text-decoration: none;
}

.product-card:hover {
  text-decoration: none;
}

.product-card__art {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 260px;
  overflow: hidden;
  padding-top: 28px;
  background: linear-gradient(160deg, var(--p-1), var(--p-2));
}

.product-card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 80% 10%, color-mix(in srgb, var(--p-glow) 45%, transparent), transparent 70%);
}

.product-card__art .device {
  --w: 176px;
  position: relative;
  z-index: 1;
  margin-bottom: -150px;
  transition: transform 0.5s var(--ease);
}

.product-card__art .device--desktop {
  --w: 420px;
  margin-bottom: -40px;
}

.product-card:hover .product-card__art .device {
  transform: translateY(-10px);
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 24px 26px 28px;
}

.product-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-card__head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.product-card__head span {
  color: var(--p-text);
  font-size: 0.82rem;
  font-weight: 600;
}

.product-card p {
  color: var(--text-2);
}

.product-card .link-arrow {
  margin-top: auto;
  color: var(--p-text);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.filter-bar button {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: 500 0.92rem var(--font-sans);
  cursor: pointer;
}

.filter-bar button[aria-pressed="true"] {
  border-color: transparent;
  background: var(--text);
  color: var(--bg);
}

/* ----------------------------------------------------------------------------------------------- product page */

.product-hero {
  color: #fff;
  background: linear-gradient(150deg, var(--p-2) 0%, color-mix(in srgb, var(--p-2) 70%, var(--p-1)) 45%, var(--p-1) 100%);
}

.product-hero .backdrop::before {
  background:
    radial-gradient(40% 50% at 85% 15%, color-mix(in srgb, var(--p-glow) 55%, transparent), transparent 70%),
    radial-gradient(40% 50% at 10% 90%, color-mix(in srgb, var(--p-1) 60%, transparent), transparent 70%);
}

.product-hero .backdrop::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
}

.product-hero .lead,
.product-hero .breadcrumbs,
.product-hero .breadcrumbs a {
  color: rgba(255, 255, 255, 0.86);
}

.product-hero h1 {
  margin-block: 18px 12px;
}

.product-hero .product-card__head {
  margin-top: 24px;
}

.product-hero__tagline {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.product-hero .chip {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.product-hero .chip .icon {
  color: #fff;
}

.product-hero .btn--glass {
  --btn-bg: rgba(255, 255, 255, 0.12);
  --btn-fg: #fff;
  --btn-border: rgba(255, 255, 255, 0.3);
}

.product-hero .btn--primary {
  background: #fff;
  color: var(--p-2);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.5);
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 18px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}

.store-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.store-badge .icon {
  width: 26px;
  height: 26px;
}

.store-badge small {
  display: block;
  font-size: 0.68rem;
  line-height: 1.1;
  opacity: 0.85;
}

.store-badge strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.feature {
  display: flex;
  flex-direction: column;
}

.feature .card__icon {
  background: color-mix(in srgb, var(--p-1, var(--primary)) 12%, transparent);
  color: var(--p-text, var(--primary));
}

.audience-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audience-list li {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.audience-list strong {
  display: block;
  margin-bottom: 4px;
}

.audience-list span {
  color: var(--text-2);
  font-size: 0.95rem;
}

.gallery {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 12px 4px 36px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.gallery__item {
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}

.gallery__item .device--phone {
  --w: 248px;
}

.gallery__item .device--desktop {
  --w: min(720px, 82vw);
}

.gallery__item .device--paper {
  --w: 340px;
}

.gallery__item figcaption {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 500;
}

.gallery-controls {
  display: flex;
  gap: 8px;
}

/* ----------------------------------------------------------------------------------------------- FAQ */

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq details[open] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* The cross icon turned 45 degrees is a plus: plus when closed, cross when open. */
.faq summary .icon {
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary .icon {
  transform: rotate(0deg);
}

.icon.flip {
  transform: scaleX(-1);
}

.faq details p {
  margin: 0;
  padding: 0 22px 22px;
  color: var(--text-2);
}

/* ----------------------------------------------------------------------------------------------- CTA band */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 80px);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #2a1fb3 0%, #4338ff 40%, #2563eb 70%, #0891b2 100%);
  color: #fff;
  isolation: isolate;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 60% at 90% 10%, rgba(0, 194, 224, 0.55), transparent 70%),
    radial-gradient(40% 60% at 0% 100%, rgba(255, 176, 32, 0.25), transparent 70%);
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%);
}

.cta-band h2 {
  max-width: 760px;
}

.cta-band p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.15rem;
}

.cta-band .btn--primary {
  background: #fff;
  color: #2a1fb3;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.45);
}

.cta-band .btn--glass {
  --btn-bg: rgba(255, 255, 255, 0.12);
  --btn-fg: #fff;
  --btn-border: rgba(255, 255, 255, 0.35);
}

[data-product] .cta-band {
  background: linear-gradient(135deg, var(--p-2), var(--p-1));
}

[data-product] .cta-band .btn--primary {
  color: var(--p-2);
}

/* ----------------------------------------------------------------------------------------------- page heroes & breadcrumbs */

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 104px));
  padding-bottom: clamp(48px, 7vw, 96px);
}

.page-hero > .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  max-width: 980px;
  margin-top: 18px;
}

.page-hero .breadcrumbs + .chip {
  margin-top: 20px;
}

.page-hero .lead {
  max-width: 720px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-3);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  opacity: 0.6;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* ----------------------------------------------------------------------------------------------- prose (legal pages) */

.prose {
  max-width: 760px;
  color: var(--text-2);
  font-size: 1.0625rem;
}

.prose h2 {
  margin-top: 2.2em;
  color: var(--text);
  font-size: 1.6rem;
}

.prose h3 {
  margin-top: 1.6em;
  color: var(--text);
  font-size: 1.2rem;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--text);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

/* ----------------------------------------------------------------------------------------------- forms */

.form {
  display: grid;
  gap: 18px;
}

.form__row {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .form__row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.field legend {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.field .hint {
  margin-top: -4px;
  font-size: 0.85rem;
  color: var(--text-3);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-elev);
  color: var(--text);
  font: 400 1rem/1.4 var(--font-sans);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7194' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--text-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea,
.input.input-validation-error,
.textarea.input-validation-error {
  border-color: var(--danger);
}

.field-error,
.field-validation-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 500;
}

.field-error:empty,
.field-validation-valid {
  display: none;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text-2);
  cursor: pointer;
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin-bottom: 10px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.choice input:checked + span {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
}

.choice input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.choice .icon {
  width: 18px;
  height: 18px;
}

/* The honeypot: off screen for people, present for bots. */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-3);
  font-size: 0.85rem;
}

.form-note .icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--success);
}

.form-panel {
  padding: clamp(24px, 3.5vw, 44px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.newsletter {
  display: flex;
  gap: 8px;
  max-width: 440px;
}

.newsletter .input {
  min-height: 46px;
}

.newsletter .btn {
  min-height: 46px;
}

/* ----------------------------------------------------------------------------------------------- contact page */

.contact-grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
}

@media (min-width: 1000px) {
  .contact-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
  }

  .contact-grid > aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

.contact-methods {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}

.contact-method {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

a.contact-method:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.contact-method .card__icon {
  width: 44px;
  height: 44px;
  margin: 0;
}

.contact-method small {
  display: block;
  color: var(--text-3);
}

.timeline {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: t;
}

.timeline li {
  position: relative;
  padding-left: 48px;
  counter-increment: t;
  color: var(--text-2);
}

.timeline li::before {
  content: counter(t);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.timeline strong {
  display: block;
  color: var(--text);
}

/* Project brief builder */
.brief {
  display: grid;
  gap: 22px;
  margin-bottom: 28px;
  padding: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.brief__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brief__head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.15rem;
}

/* ----------------------------------------------------------------------------------------------- footer */

.site-footer {
  position: relative;
  padding-top: clamp(64px, 8vw, 104px);
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

@media (min-width: 1040px) {
  .footer-grid {
    grid-template-columns: 1.6fr repeat(3, 1fr) 1.4fr;
  }
}

.footer-grid h2 {
  margin-bottom: 18px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.footer-grid ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a {
  color: var(--text-2);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-brand p {
  max-width: 320px;
  margin-top: 18px;
  color: var(--text-3);
}

.social {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-block: 28px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.85rem;
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-bottom a,
.footer-bottom button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.footer-bottom a:hover,
.footer-bottom button:hover {
  color: var(--text);
  text-decoration: underline;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: var(--shadow-md);
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ----------------------------------------------------------------------------------------------- toasts, snackbar, modal */

.toast-region {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: 16px;
  z-index: 300;
  display: grid;
  gap: 10px;
  width: min(400px, calc(100vw - 32px));
  pointer-events: none;
}

/* Shown as a popover so toasts sit in the top layer, above an open modal. */
.toast-region[popover] {
  inset: calc(var(--header-h) + 12px) 16px auto auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  overflow: hidden;
  padding: 16px 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 0.35s var(--ease);
}

.toast.is-leaving {
  animation: toast-out 0.25s ease-in forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px) scale(0.98); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(24px); }
}

.toast__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.toast__icon .icon {
  width: 18px;
  height: 18px;
}

.toast--success .toast__icon { background: var(--success-soft); color: var(--success); }
.toast--error .toast__icon { background: var(--danger-soft); color: var(--danger); }
.toast--warning .toast__icon { background: var(--warning-soft); color: var(--warning); }
.toast--info .toast__icon { background: var(--info-soft); color: var(--info); }

.toast strong {
  display: block;
  font-size: 0.95rem;
}

.toast p {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 0.9rem;
}

.toast__close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-3);
  cursor: pointer;
}

.toast__close:hover {
  background: var(--surface-2);
}

.toast__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  transform-origin: left;
  animation: toast-progress linear forwards;
}

.toast--success .toast__progress { color: var(--success); }
.toast--error .toast__progress { color: var(--danger); }
.toast--warning .toast__progress { color: var(--warning); }
.toast--info .toast__progress { color: var(--info); }

.toast:hover .toast__progress {
  animation-play-state: paused;
}

@keyframes toast-progress {
  to { transform: scaleX(0); }
}

.toast__progress.t-3 { animation-duration: 3s; }
.toast__progress.t-5 { animation-duration: 5s; }
.toast__progress.t-7 { animation-duration: 7s; }
.toast__progress.t-10 { animation-duration: 10s; }

.snackbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 310;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  padding: 12px 12px 12px 20px;
  border-radius: 14px;
  background: #11152e;
  color: #f2f3ff;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.45);
  font-size: 0.95rem;
  transform: translate(-50%, 140%);
  transition: transform 0.35s var(--ease);
}

:root[data-theme="dark"] .snackbar {
  background: #eef0ff;
  color: #0b1020;
}

.snackbar.is-visible {
  transform: translate(-50%, 0);
}

.snackbar button {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #a69bff;
  font: 700 0.9rem var(--font-sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

:root[data-theme="dark"] .snackbar button {
  color: #4a3af0;
}

.snackbar button:hover {
  background: rgba(166, 155, 255, 0.14);
}

dialog.modal {
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

dialog.modal--sm {
  width: min(480px, calc(100vw - 24px));
}

dialog.modal[open] {
  animation: modal-in 0.35s var(--ease);
}

dialog.modal::backdrop {
  background: rgba(5, 7, 20, 0.55);
  backdrop-filter: blur(6px);
  animation: fade-in 0.3s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

.modal__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 16px;
  background: var(--bg-elev);
}

.modal__head h2 {
  margin: 0;
  font-size: 1.6rem;
}

.modal__head p {
  margin: 6px 0 0;
  color: var(--text-2);
}

.modal__body {
  padding: 4px 28px 28px;
}

.modal__success:focus {
  outline: none;
}

.modal__success {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 8px 8px;
  text-align: center;
}

.modal__success .card__icon {
  width: 72px;
  height: 72px;
  margin: 0;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}

.modal__success .card__icon .icon {
  width: 36px;
  height: 36px;
}

.reference {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ----------------------------------------------------------------------------------------------- cookie banner */

/* Bottom right, so it never covers the calls to action on the left of the hero. */
.consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  width: min(440px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
  transform: translateY(calc(100% + 32px));
  transition: transform 0.45s var(--ease);
}

.consent.is-visible {
  transform: none;
}

.consent h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
}

.consent p {
  color: var(--text-2);
  font-size: 0.9rem;
}

.consent .btn-row .btn {
  flex: 1;
}

.pref {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.pref p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 0.9rem;
}

.switch {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
}

.switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background-color 0.2s;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease);
}

.switch input:checked + span {
  background: var(--primary);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.switch input:disabled + span {
  opacity: 0.6;
}

.switch input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ----------------------------------------------------------------------------------------------- misc components */

.value-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.value-card .card__icon {
  margin: 0;
}

.standards {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.standards li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.standards .icon {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--primary);
}

.standards strong {
  display: block;
}

.standards span {
  color: var(--text-2);
  font-size: 0.92rem;
}

.error-page {
  min-height: 60vh;
  display: grid;
  align-content: center;
  text-align: center;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 12rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.highlight-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.highlight-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 100% 0%, var(--primary-soft), transparent 70%);
  pointer-events: none;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  color: var(--text-3);
  font-size: 0.9rem;
}

/* ----------------------------------------------------------------------------------------------- motion */

/* Content is only hidden once site.js has started (it adds .reveal-ready), so a failed script never hides it. */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .consent,
  .back-to-top,
  .toast-region,
  .backdrop {
    display: none !important;
  }
}
