/*
 * LeadPro — product site (leadpro.com.pl), design v3 (Figma: "LeadPro — Landing page v3").
 * Colours follow the application's tokens (frontend/src/styles.scss): brand primary #0068e8, ink #0a1735, the
 * graphite shell of the dark theme and the status palette. Light and dark follow the system, or the visitor's
 * explicit choice in [data-theme], exactly like the app. "Ink" surfaces (hero, security, CTA, footer) stay dark in
 * both themes. No framework and no external requests.
 */

/* Roboto, self-hosted (SIL OFL 1.1, assets/fonts/OFL.txt): no request to Google, latin + latin-ext for Polish. */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/roboto-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/roboto-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Animatable angle for the rotating conic borders (CSS Houdini; browsers without it keep a static border). */
@property --spin {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Tokens
 * ------------------------------------------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  --font-sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --brand: #0068e8;
  --brand-hover: #0b76f6;
  --brand-cyan: #00b8f5;
  --brand-gradient: linear-gradient(120deg, #0a3cff 0%, #0068e8 45%, #00b8f5 100%);
  --brand-gradient-bright: linear-gradient(110deg, #3c7bff 0%, #2a8cff 40%, #22d3ff 75%, #3c7bff 100%);
  --accent: #0068e8;
  --accent-soft: rgba(0, 104, 232, 0.1);

  --bg: #f6f8fc;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --surface-3: #e5eaf2;
  --border: rgba(10, 23, 53, 0.09);
  --border-strong: rgba(10, 23, 53, 0.16);
  --text: #0a1735;
  --text-muted: #46536b;
  --text-subtle: #67748d;

  /* Ink: the always-dark brand surfaces. */
  --ink-950: #060d1f;
  --ink-900: #0a1735;
  --ink-800: #12224a;
  --ink-text: #e8edf6;
  --ink-muted: #a5b0c3;
  --ink-border: rgba(255, 255, 255, 0.1);
  --ink-surface: rgba(255, 255, 255, 0.05);

  --shadow-sm: 0 1px 2px rgba(10, 23, 53, 0.06), 0 6px 16px -8px rgba(10, 23, 53, 0.14);
  --shadow-md: 0 2px 4px rgba(10, 23, 53, 0.04), 0 22px 44px -20px rgba(10, 23, 53, 0.28);
  --shadow-lg: 0 40px 90px -36px rgba(10, 23, 53, 0.45);
  --glow-brand: 0 18px 40px -12px rgba(0, 104, 232, 0.55);

  --success: #2e7d32;
  --info: #1565c0;
  --warning: #b26a00;
  --danger: #c5221f;
  --success-bg: rgba(46, 125, 50, 0.12);
  --info-bg: rgba(21, 101, 192, 0.11);
  --warning-bg: rgba(178, 106, 0, 0.13);
  --danger-bg: rgba(197, 34, 31, 0.1);
  --seg-muted: #c3ccda;

  --mock-frame: #ffffff;
  --mock-bar: #edf1f7;
  --mock-side: #f1f4f9;
  --mock-main: #f6f8fc;
  --mock-card: #ffffff;

  --header-h: 64px;
  --radius: 16px;
  --radius-lg: 24px;
  --gutter: clamp(16px, 4vw, 32px);
  --container: 1200px;
  --section-pad: clamp(72px, 10vw, 128px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* A gentle spring (CSS linear() easing): reveals land with a hint of overshoot. */
  --ease-spring: linear(
    0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077,
    1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%,
    1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%,
    0.997 69.8%, 1.003 76.9%, 1
  );
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --accent: #5ea2ff;
    --accent-soft: rgba(94, 162, 255, 0.14);
    --bg: #0b111b;
    --bg-alt: #0e151f;
    --surface: #131a25;
    --surface-2: #19212e;
    --surface-3: #232c3a;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --text: #e8edf6;
    --text-muted: #a5b0c3;
    --text-subtle: #7d8aa1;
    --ink-950: #05080f;
    --ink-900: #0a1226;
    --ink-800: #131d36;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px -8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 22px 44px -20px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 40px 90px -36px rgba(0, 0, 0, 0.85);
    --success: #81c995;
    --info: #8ab4f8;
    --warning: #fdd663;
    --danger: #f28b82;
    --success-bg: rgba(129, 201, 149, 0.14);
    --info-bg: rgba(138, 180, 248, 0.14);
    --warning-bg: rgba(253, 214, 99, 0.14);
    --danger-bg: rgba(242, 139, 130, 0.14);
    --seg-muted: #3a4558;
    --mock-frame: #111419;
    --mock-bar: #191e26;
    --mock-side: #171b22;
    --mock-main: #111419;
    --mock-card: #1a1f28;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --accent: #5ea2ff;
  --accent-soft: rgba(94, 162, 255, 0.14);
  --bg: #0b111b;
  --bg-alt: #0e151f;
  --surface: #131a25;
  --surface-2: #19212e;
  --surface-3: #232c3a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #e8edf6;
  --text-muted: #a5b0c3;
  --text-subtle: #7d8aa1;
  --ink-950: #05080f;
  --ink-900: #0a1226;
  --ink-800: #131d36;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px -8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.3), 0 22px 44px -20px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 40px 90px -36px rgba(0, 0, 0, 0.85);
  --success: #81c995;
  --info: #8ab4f8;
  --warning: #fdd663;
  --danger: #f28b82;
  --success-bg: rgba(129, 201, 149, 0.14);
  --info-bg: rgba(138, 180, 248, 0.14);
  --warning-bg: rgba(253, 214, 99, 0.14);
  --danger-bg: rgba(242, 139, 130, 0.14);
  --seg-muted: #3a4558;
  --mock-frame: #111419;
  --mock-bar: #191e26;
  --mock-side: #171b22;
  --mock-main: #111419;
  --mock-card: #1a1f28;
}

/* Ink surfaces re-map the generic tokens, so buttons, chips and text inside them read correctly in both themes. */
.surface-dark {
  color-scheme: dark;
  --text: var(--ink-text);
  --text-muted: var(--ink-muted);
  --text-subtle: #7d8aa1;
  --border: var(--ink-border);
  --border-strong: rgba(255, 255, 255, 0.18);
  --surface: var(--ink-surface);
  --accent: #5ea2ff;
  --accent-soft: rgba(94, 162, 255, 0.14);
  color: var(--ink-text);
}

/* ---------------------------------------------------------------------------------------------------------------
 * 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) + 32px);
  /* Lets <details> animate to its natural height where supported. */
  interpolate-size: allow-keywords;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: none;
}

.link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.gradient-text {
  background: var(--brand-gradient-bright);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.surface-dark .eyebrow {
  color: #22d3ff;
}

.eyebrow-muted {
  color: var(--text-subtle);
}

/* ---------------------------------------------------------------------------------------------------------------
 * Buttons, chips
 * ------------------------------------------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s, transform 0.25s var(--ease-out);
}

.btn-lg {
  height: 54px;
  padding: 0 1.5rem;
  font-size: 0.95rem;
}

.btn .arrow {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.3s var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--glow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 22px 46px -12px rgba(0, 104, 232, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* A light sheen sweeps across primary buttons on hover. */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border-strong));
  transform: translateY(-1px);
}

.surface-dark .btn-secondary,
.hero .btn-secondary,
.site-header.is-on-dark .btn-secondary {
  border-color: var(--ink-border);
  background: var(--ink-surface);
  color: var(--ink-text);
  box-shadow: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.surface-dark .btn-secondary:hover,
.hero .btn-secondary:hover,
.site-header.is-on-dark .btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.chip .icon {
  width: 14px;
  height: 14px;
}

.chip-brand {
  background: var(--accent-soft);
  color: var(--accent);
}

.chip-info {
  background: var(--info-bg);
  color: var(--info);
}

.chip-success {
  background: var(--success-bg);
  color: var(--success);
}

.chip-warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.chip-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

.av-2 {
  background: #2e7d32;
}

.av-3 {
  background: #0a3cff;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------------------------------------------- */

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 3px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* site.js watches this marker to know when the page has scrolled, without listening to scroll events. */
.scroll-marker {
  position: absolute;
  top: 8px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter) 0;
  pointer-events: none;
}

.header-pill {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--container);
  height: var(--header-h);
  margin-inline: auto;
  padding: 0 10px 0 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg-alt) 78%, transparent);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  pointer-events: auto;
  transition: background-color 0.35s, border-color 0.35s, box-shadow 0.35s, max-width 0.5s var(--ease-out);
}

/* Over the ink surfaces the header turns into dark glass. */
.site-header.is-on-dark .header-pill {
  border-color: var(--ink-border);
  background: rgba(10, 18, 40, 0.55);
  box-shadow: none;
  color: var(--ink-text);
  --text: var(--ink-text);
  --text-muted: var(--ink-muted);
  --border: var(--ink-border);
  --surface-2: rgba(255, 255, 255, 0.08);
}

.site-header.is-scrolled .header-pill {
  max-width: 1120px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 32px;
  height: 32px;
}

.brand-name {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--accent);
}

.is-on-dark .brand-name span,
.surface-dark .brand-name span {
  color: #5ea2ff;
}

.site-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.site-nav ul {
  display: flex;
  gap: 4px;
}

.site-nav a:not(.btn) {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current='true'] {
  color: var(--text);
  background: var(--surface-2);
}

.nav-actions {
  display: none;
}

.header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.theme-icon-light,
.menu-icon-close,
.menu-btn {
  display: none;
}

:root[data-theme='dark'] .theme-icon-dark {
  display: none;
}

:root[data-theme='dark'] .theme-icon-light {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-icon-dark {
    display: none;
  }

  :root:not([data-theme='light']) .theme-icon-light {
    display: block;
  }
}

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

.hero {
  position: relative;
  padding: calc(var(--header-h) + 96px) 0 clamp(80px, 10vw, 128px);
  background: var(--ink-950);
  /* clip, not hidden: a hidden overflow would become the scroll container of the view() timelines inside. */
  overflow: clip;
  isolation: isolate;
}

.hero-backdrop,
.cta-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.hero .glow-a {
  top: -32%;
  left: 50%;
  width: min(1100px, 120vw);
  height: 640px;
  background: radial-gradient(closest-side, rgba(0, 104, 232, 0.75), rgba(0, 104, 232, 0));
  translate: -50% 0;
  animation: drift-a 18s ease-in-out infinite alternate;
}

.hero .glow-b {
  top: 46%;
  right: -12%;
  width: 640px;
  height: 520px;
  background: radial-gradient(closest-side, rgba(0, 184, 245, 0.35), rgba(0, 184, 245, 0));
  animation: drift-b 22s ease-in-out infinite alternate;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 30%, transparent 75%);
}

/* Light beams travel along the grid lines. */
.beam {
  position: absolute;
  width: 1px;
  height: 160px;
  background: linear-gradient(to bottom, transparent, rgba(34, 211, 255, 0.9), transparent);
  opacity: 0;
  animation: beam 7s linear infinite;
}

/* Beams run on grid lines outside the text column (the grid is centred, 80px apart). */
.beam-1 {
  left: calc(50% - 560px);
}

.beam-2 {
  left: calc(50% + 560px);
  animation-delay: 3.5s;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.announcement {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--ink-border);
  border-radius: 999px;
  background: var(--ink-surface);
  color: var(--ink-text);
  font-size: 0.84rem;
  font-weight: 500;
  transition: border-color 0.25s, background-color 0.25s;
}

.announcement:hover {
  border-color: rgba(94, 162, 255, 0.5);
  background: rgba(94, 162, 255, 0.1);
}

.announcement .icon {
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
  transition: transform 0.3s var(--ease-out);
}

.announcement:hover .icon {
  transform: translateX(3px);
}

.announcement-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.78rem;
}

.hero-title {
  max-width: 1000px;
  color: var(--ink-text);
  font-size: clamp(2.6rem, 1.2rem + 5.4vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.hero-line {
  display: block;
}

.hero-title .gradient-text {
  padding-bottom: 0.08em;
  animation: shimmer 8s linear infinite;
}

/* site.js splits the headline into words for a staggered, de-blurring entrance. */
.hero-title .w {
  display: inline-block;
}

.lead {
  max-width: 720px;
  margin-top: 26px;
  color: var(--ink-muted);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 30px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust .icon {
  color: #22d3ff;
}

.hero-stage {
  margin-top: clamp(56px, 7vw, 80px);
  perspective: 1600px;
}

.stage-inner {
  position: relative;
  max-width: 1120px;
  margin-inline: auto;
  /* Perspective for the pointer tilt of the mock (its parent .hero-stage only reaches this element). */
  perspective: 1600px;
}

/* The mock window: the app's own light/dark tokens, so it previews the real theme the visitor uses. */
.mock {
  --tx: 0deg;
  --ty: 0deg;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink-border);
  border-radius: 20px;
  background: var(--mock-frame);
  color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(0, 64, 153, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: rotateX(var(--tx)) rotateY(var(--ty));
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out);
  font-size: 13px;
  line-height: 1.4;
}

/* A soft light ring sweeps around the mock's edge. */
.mock::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--spin), transparent 0 70%, rgba(34, 211, 255, 0.9) 80%, rgba(94, 162, 255, 0.9) 86%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 7s linear infinite;
  pointer-events: none;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 44px;
  padding: 0 16px;
  background: var(--mock-bar);
}

.mock-dots {
  display: flex;
  gap: 7px;
}

.mock-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}

.mock-dots i:nth-child(2) {
  background: #febc2e;
}

.mock-dots i:nth-child(3) {
  background: #28c840;
}

.mock-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: min(300px, 45%);
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--mock-card);
  color: var(--text-muted);
  font-size: 12px;
}

.mock-url .icon {
  width: 12px;
  height: 12px;
  color: var(--success);
}

.mock-app {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.mock-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px;
  background: var(--mock-side);
}

.mock-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 14px;
  font-size: 17px;
  font-weight: 600;
}

.mock-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.mock-nav .icon {
  width: 18px;
  height: 18px;
}

.mock-nav.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.mock-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 18px 24px 24px;
  background: var(--mock-main);
}

.mock-top,
.mock-tools,
.mock-company,
.row-between {
  display: flex;
  align-items: center;
}

.mock-top,
.row-between {
  justify-content: space-between;
  gap: 12px;
}

.mock-company {
  gap: 8px;
  font-weight: 500;
}

/* The company in the mock is illustrative only: blurred, and the markup holds a neutral placeholder, not a real name. */
.redacted {
  filter: blur(4px);
  user-select: none;
}

.mock-company b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
}

.mock-tools {
  gap: 14px;
  color: var(--text-muted);
}

.mock-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--mock-card);
  color: var(--text-subtle);
  font-size: 12px;
}

.mock-search .icon {
  width: 15px;
  height: 15px;
}

.mock-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink-900);
  color: #fff;
  font-size: 12px;
}

.mock-greet strong {
  display: block;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mock-greet span {
  color: var(--text-muted);
  font-size: 14px;
}

.mock-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--mock-card);
}

.kpi-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.kpi-icon .icon {
  width: 18px;
  height: 18px;
}

.kpi b {
  display: block;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.kpi small {
  color: var(--text-muted);
  font-size: 12px;
}

.kpi-danger .kpi-icon {
  background: var(--danger-bg);
  color: var(--danger);
}

.kpi-danger b {
  color: var(--danger);
}

.kpi-warn .kpi-icon {
  background: var(--warning-bg);
  color: var(--warning);
}

.kpi-ok .kpi-icon {
  background: var(--success-bg);
  color: var(--success);
}

.mock-row {
  display: grid;
  grid-template-columns: 270px 1fr 300px;
  gap: 14px;
}

.mock-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--mock-card);
}

.mock-card h4 {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.donut-wrap {
  position: relative;
  float: left;
  width: 104px;
  height: 104px;
  margin-right: 16px;
}

.donut {
  width: 104px;
  height: 104px;
  transform: rotate(-90deg);
}

.donut circle {
  fill: none;
  stroke-width: 6.5;
}

.donut-track {
  stroke: var(--surface-2);
}

/* Circumference is 100 (r = 15.915), so each dash pattern sums to 100 and --offset = 100 - start. */
.donut-seg {
  stroke-dasharray: calc(var(--seg) - 1.2) calc(101.2 - var(--seg));
  stroke-dashoffset: var(--offset);
  transition: stroke-dasharray 1.2s var(--ease-out);
}

.js [data-animate]:not(.is-visible) .donut-seg {
  stroke-dasharray: 0 100;
}

.seg-1 {
  stroke: var(--success);
}

.seg-2 {
  stroke: var(--brand);
  transition-delay: 0.15s;
}

.seg-3 {
  stroke: var(--warning);
  transition-delay: 0.3s;
}

.seg-4 {
  stroke: var(--seg-muted);
  transition-delay: 0.45s;
}

.donut-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.donut-label b {
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
}

.legend {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend b {
  margin-left: auto;
  color: var(--text);
  font-weight: 500;
}

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
}

.dot-1 {
  background: var(--success);
}

.dot-2,
.dot-brand {
  background: var(--brand);
}

.dot-3 {
  background: var(--warning);
}

.dot-4,
.dot-muted {
  background: var(--seg-muted);
}

.progress-list {
  display: grid;
  gap: 14px;
}

.progress-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.progress-list b {
  color: var(--text);
  font-weight: 500;
}

.bar {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-2);
}

.bar i {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--brand-gradient);
  transform-origin: 0 50%;
  transition: transform 1.3s var(--ease-out) 0.2s;
}

.js [data-animate]:not(.is-visible) .bar i {
  transform: scaleX(0);
}

.mock-notifications ul {
  display: grid;
  gap: 12px;
}

.mock-notifications li {
  display: flex;
  gap: 10px;
  font-size: 12px;
}

.mock-notifications small {
  display: block;
  color: var(--text-subtle);
}

.mini-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.mini-icon .icon {
  width: 16px;
  height: 16px;
}

.mini-icon.warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.float-card {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  line-height: 1.35;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: bob 6s ease-in-out infinite;
}

.float-card b {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.float-card span:last-child {
  color: var(--text-muted);
}

.float-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.float-icon .icon {
  width: 18px;
  height: 18px;
}

.float-icon.ok {
  background: var(--success-bg);
  color: var(--success);
}

.float-icon.warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.float-done {
  top: 26%;
  right: -48px;
}

.float-reminder {
  bottom: 9%;
  left: -64px;
  animation-delay: -3s;
}

/* ---------------------------------------------------------------------------------------------------------------
 * Disciplines marquee
 * ------------------------------------------------------------------------------------------------------------- */

.disciplines {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.disciplines .eyebrow {
  margin-bottom: 22px;
}

.marquee {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  flex: none;
  gap: 56px;
  padding-right: 56px;
  animation: marquee 34s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}

.marquee-track .icon {
  width: 22px;
  height: 22px;
  color: var(--text-subtle);
}

/* ---------------------------------------------------------------------------------------------------------------
 * Sections
 * ------------------------------------------------------------------------------------------------------------- */

.section {
  position: relative;
  padding-block: var(--section-pad);
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 760px;
}

.section-head.center {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2rem, 1.3rem + 2.4vw, 2.9rem);
  line-height: 1.15;
}

.section-lead {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
}

.section-head.center .section-lead {
  max-width: 720px;
  margin-inline: auto;
}

.section-head + * {
  margin-top: clamp(40px, 5vw, 56px);
}

/* Compare ----------------------------------------------------------------------------------------------------- */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.compare-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.compare-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 1.6rem;
}

.compare-card h3 .icon {
  width: 26px;
  height: 26px;
}

.compare-card li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 0;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}

.compare-before {
  background: var(--surface);
  color: var(--text-muted);
}

.compare-before h3 .icon {
  color: var(--danger);
}

.compare-before li::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--danger) 60%, transparent);
}

.compare-after {
  border-color: transparent;
  background: radial-gradient(420px 300px at 85% -10%, rgba(0, 104, 232, 0.55), transparent 70%), var(--ink-900);
  box-shadow: var(--shadow-lg);
}

.compare-after h3 .icon,
.compare-after li .icon {
  color: #22d3ff;
}

.compare-after li .icon {
  width: 18px;
  height: 18px;
}

/* Bento ------------------------------------------------------------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  grid-column: span 2;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s, border-color 0.4s;
}

.tile-wide {
  grid-column: span 4;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow: var(--shadow-md);
}

/* Pointer-following light on cards and tiles. */
[data-spotlight]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

[data-spotlight]:hover::after {
  opacity: 1;
}

.tile-copy h3 {
  margin-top: 12px;
  font-size: 1.55rem;
}

.tile-copy p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.tile-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
}

.tile-tag-icon,
.card-icon {
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tile-tag-icon {
  width: 30px;
  height: 30px;
}

.tile-tag-icon .icon {
  width: 16px;
  height: 16px;
}

.tile-visual {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.85rem;
  line-height: 1.45;
}

.tile-visual small {
  color: var(--text-subtle);
  font-size: 0.76rem;
}

.tile-visual strong {
  display: block;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cockpit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cockpit-head strong {
  font-size: 1.05rem;
}

.cockpit-tabs {
  display: flex;
  gap: 22px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  /* Tabs that do not fit fade out instead of ending on a cut word. */
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.cockpit-tabs span {
  padding: 4px 0 10px;
}

.cockpit-tabs .is-active {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.activity {
  display: grid;
  gap: 12px;
}

.activity li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.activity strong {
  display: inline;
  color: var(--text);
  font-weight: 500;
}

.activity small {
  display: block;
}

.remark > strong {
  font-size: 1.02rem;
  line-height: 1.35;
}

.remark-foot {
  margin-top: auto;
  padding-top: 6px;
}

.assignee {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.task-button {
  position: relative;
  display: inline-grid;
  height: 32px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  overflow: hidden;
  transition: background-color 0.4s;
}

.task-button > span {
  display: flex;
  grid-area: 1 / 1;
  align-items: center;
  gap: 6px;
  padding: 0 12px 0 10px;
  transition: transform 0.45s var(--ease-out), opacity 0.3s;
}

.task-button .icon {
  width: 15px;
  height: 15px;
}

.task-done {
  opacity: 0;
  transform: translateY(100%);
}

.is-visible .task-button {
  animation: task-bg 6s 1.2s infinite;
}

.is-visible .task-idle {
  animation: task-out 6s 1.2s infinite;
}

.is-visible .task-done {
  animation: task-in 6s 1.2s infinite;
}

.checklist {
  display: grid;
  gap: 10px;
}

.checklist li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
}

.box {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  transition: background-color 0.3s, border-color 0.3s;
  transition-delay: calc(0.5s + var(--i) * 0.45s);
}

.box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.35s var(--ease-spring);
  transition-delay: inherit;
}

.js [data-animate]:not(.is-visible) .checklist li .box {
  border-color: var(--border-strong);
  background: var(--surface);
}

.js [data-animate]:not(.is-visible) .checklist li .box::after {
  transform: rotate(45deg) scale(0);
}

.js [data-animate]:not(.is-visible) .checklist li span {
  color: inherit;
}

.checklist li:nth-child(-n + 2) .box {
  border-color: var(--brand);
  background: var(--brand);
}

.checklist li:nth-child(-n + 2) .box::after {
  transform: rotate(45deg) scale(1);
}

.checklist li:nth-child(-n + 2) span {
  color: var(--text-subtle);
  transition: color 0.3s calc(0.5s + var(--i) * 0.45s);
}

.live {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--success);
  font-weight: 500;
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--success);
  animation: ping 2s ease-out infinite;
}

.doc-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-head > div {
  flex: 1;
  min-width: 0;
}

.doc-head strong {
  font-size: 1rem;
}

.doc-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.versions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 4px;
}

.versions li {
  position: relative;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.versions b {
  display: block;
  font-weight: 500;
}

.versions .is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.versions .is-current b {
  color: var(--accent);
}

.docs .chips {
  margin-top: auto;
}

/* A thumbnail of the drawing: terrain and design grade of a longitudinal profile. */
.doc-preview {
  position: relative;
  flex: 1;
  min-height: 130px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 100% 26px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 52px 100%, var(--surface);
}

.doc-preview svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.doc-preview .terrain {
  fill: color-mix(in srgb, var(--success) 10%, transparent);
  stroke: var(--success);
  stroke-width: 1.5;
}

.doc-preview .grade {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 900;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2s var(--ease-out) 0.4s;
}

.js [data-animate]:not(.is-visible) .doc-preview .grade {
  stroke-dashoffset: 900;
}

.doc-preview .marker {
  fill: var(--accent);
}

.doc-preview .chip {
  position: absolute;
  top: 10px;
  left: 10px;
  height: 22px;
  font-size: 0.72rem;
}

.stack {
  justify-content: flex-start;
}

.note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.note > span:not(.chip):not(.mini-icon) {
  flex: 1;
  min-width: 0;
}

.note small {
  display: block;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
  color: var(--accent);
}

.search-field .icon {
  width: 16px;
  height: 16px;
}

.typed {
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  width: 8.5ch;
  animation: caret 1s steps(1) infinite;
}

.is-visible .typed {
  animation: typing 1.4s steps(8) 0.4s backwards, caret 1s steps(1) infinite;
}

.results {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.results li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.results span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results .icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* List items inside animated tiles slide in one after another. */
.js [data-animate] .activity li,
.js [data-animate] .versions li,
.js [data-animate] .note,
.js [data-animate] .results li,
.js .compare-after li {
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-spring);
  transition-delay: calc(var(--stagger-start, 0.25s) + var(--i, 0) * 0.14s);
}

/* Search results appear after the query has been typed. */
.results {
  --stagger-start: 1.6s;
}

.js [data-animate]:not(.is-visible) .activity li,
.js [data-animate]:not(.is-visible) .versions li,
.js [data-animate]:not(.is-visible) .note,
.js [data-animate]:not(.is-visible) .results li,
.js .compare-after:not(.is-visible) li {
  opacity: 0;
  transform: translateY(10px);
}

/* Modules ----------------------------------------------------------------------------------------------------- */

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.legend-row {
  display: flex;
  flex: none;
  gap: 18px;
  padding-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.legend-row li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-row .dot {
  width: 10px;
  height: 10px;
}

.section-head-row + * {
  margin-top: 48px;
}

.module-grid,
.role-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s, border-color 0.4s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  transition: transform 0.4s var(--ease-spring), background-color 0.3s, color 0.3s;
}

.card:hover .card-icon {
  background: var(--brand);
  color: #fff;
  transform: rotate(-6deg) scale(1.06);
}

.card h3 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Modules always included get a slowly rotating brand border. */
.module.is-core {
  border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--spin), color-mix(in srgb, var(--brand) 25%, transparent), var(--brand), #00b8f5, color-mix(in srgb, var(--brand) 25%, transparent)) border-box;
  animation: spin 9s linear infinite;
}

.tailored {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 48px;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  overflow: hidden;
  border-radius: 28px;
  background: radial-gradient(520px 360px at 92% -20%, rgba(0, 104, 232, 0.7), transparent 70%),
    radial-gradient(360px 260px at 0% 120%, rgba(0, 184, 245, 0.22), transparent 70%), var(--ink-900);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.tailored-copy {
  max-width: 720px;
}

.tailored h3 {
  margin-top: 14px;
  font-size: 1.6rem;
}

.tailored p {
  margin-top: 10px;
  color: var(--ink-muted);
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--ink-border);
  border-radius: 999px;
  background: var(--ink-surface);
  font-size: 0.82rem;
  font-weight: 500;
}

.pill-tag .icon {
  width: 16px;
  height: 16px;
  color: #22d3ff;
}

/* Audience ---------------------------------------------------------------------------------------------------- */

.role-grid .card {
  height: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 20px 0 0;
  padding: 36px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.stats div {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  text-align: center;
}

.stats div + div {
  border-left: 1px solid var(--border);
}

.stats dt {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.stats dd {
  margin: 0;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* Security ---------------------------------------------------------------------------------------------------- */

.section-dark {
  background: var(--ink-950);
  overflow: hidden;
  isolation: isolate;
}

.section-dark-glow {
  position: absolute;
  right: -10%;
  bottom: -30%;
  z-index: -1;
  width: 900px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 104, 232, 0.45), transparent);
  filter: blur(60px);
  pointer-events: none;
}

.security {
  display: grid;
  grid-template-columns: 1fr 440px;
  align-items: center;
  gap: 64px;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 28px;
  margin-top: 48px;
}

.feature-list li {
  display: flex;
  gap: 14px;
}

.feature-list .card-icon {
  border: 1px solid var(--ink-border);
  background: var(--ink-surface);
  color: #22d3ff;
}

.feature-list h3 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature-list p {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.security-visual {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  margin-inline: auto;
}

.ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--ink-border);
  border-radius: 50%;
  animation: rotate 40s linear infinite;
}

.ring-1 {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.14);
}

.ring-2 {
  inset: 15%;
  animation-duration: 26s;
  animation-direction: reverse;
}

.ring-3 {
  inset: 30%;
  border-color: rgba(94, 162, 255, 0.3);
  animation: none;
  box-shadow: 0 0 60px rgba(0, 104, 232, 0.25) inset;
}

.ring i {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px;
  border-radius: 50%;
  background: #22d3ff;
  box-shadow: 0 0 14px #22d3ff;
}

.ring-1 i:nth-child(1) {
  top: 50%;
  left: 0;
}

.ring-1 i:nth-child(2) {
  top: 6.7%;
  left: 75%;
  background: #5ea2ff;
  box-shadow: 0 0 14px #5ea2ff;
}

.ring-1 i:nth-child(3) {
  top: 93.3%;
  left: 75%;
}

.ring-2 i:nth-child(1) {
  top: 0;
  left: 50%;
  background: #5ea2ff;
  box-shadow: 0 0 14px #5ea2ff;
}

.ring-2 i:nth-child(2) {
  top: 100%;
  left: 50%;
}

.shield {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--brand-gradient);
  box-shadow: 0 0 0 10px rgba(0, 104, 232, 0.12), 0 30px 70px -10px rgba(0, 104, 232, 0.75);
  color: #fff;
  translate: -50% -50%;
  animation: breathe 4s ease-in-out infinite;
}

.shield .icon {
  width: 50%;
  height: 50%;
  stroke-width: 1.6;
}

.shield-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--ink-border);
  border-radius: 999px;
  background: rgba(19, 29, 54, 0.85);
  box-shadow: var(--shadow-md);
  color: var(--ink-text);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: bob 6s ease-in-out infinite;
}

.shield-badge .icon {
  width: 16px;
  height: 16px;
  color: #22d3ff;
}

.badge-a {
  top: 14%;
  right: -2%;
}

.badge-b {
  top: 34%;
  left: -4%;
  animation-delay: -2s;
}

.badge-c {
  bottom: 10%;
  right: 6%;
  animation-delay: -4s;
}

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

.flight {
  position: relative;
}

.flight-track {
  position: absolute;
  top: 35px;
  left: 16.6%;
  right: 16.6%;
  height: 2px;
  background: linear-gradient(90deg, var(--border-strong) 50%, transparent 0) 0 0 / 10px 2px repeat-x;
}

.flight-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--brand-gradient);
  transform-origin: 0 50%;
  transition: transform 2.4s var(--ease-out) 0.3s;
}

.js .flight:not(.is-visible) .flight-track::before {
  transform: scaleX(0);
}

.flight-plane {
  position: absolute;
  top: -19px;
  z-index: 1;
  /* Lands between Start and Sukces: the flight is still going. */
  left: 76%;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 8px 14px rgba(0, 104, 232, 0.45));
  translate: -50% 0;
  transition: left 2.4s var(--ease-out) 0.3s;
}

.js .flight:not(.is-visible) .flight-plane {
  left: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 0 0 6px var(--bg), var(--glow-brand);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  transition: transform 0.6s var(--ease-spring), opacity 0.4s;
  transition-delay: calc(0.4s + var(--i) * 0.8s);
}

.js .flight:not(.is-visible) .step-dot {
  transform: scale(0.6);
  opacity: 0.4;
}

.step h3 {
  margin-top: 20px;
  font-size: 1.55rem;
}

.step p {
  max-width: 340px;
  margin-top: 10px;
  color: var(--text-muted);
}

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

.faq-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  align-items: start;
  gap: clamp(40px, 6vw, 80px);
}

.faq-layout .section-head {
  position: sticky;
  top: calc(var(--header-h) + 48px);
}

.faq-layout .section-head + * {
  margin-top: 0;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.faq-item[open] {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

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

.faq-sign {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  transition: background-color 0.3s, transform 0.4s var(--ease-spring);
}

.faq-sign::before,
.faq-sign::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: var(--text-muted);
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}

.faq-sign::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-sign {
  background: var(--brand);
  transform: rotate(180deg);
}

.faq-item[open] .faq-sign::before,
.faq-item[open] .faq-sign::after {
  background: #fff;
}

.faq-item[open] .faq-sign::after {
  transform: rotate(0deg);
}

.faq-item p {
  padding: 0 24px 22px;
  color: var(--text-muted);
}

/* Smooth open/close where ::details-content is supported; elsewhere details toggle instantly. */
.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.45s var(--ease-out), content-visibility 0.45s allow-discrete;
}

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

/* CTA --------------------------------------------------------------------------------------------------------- */

.section-cta {
  padding-top: 0;
}

.cta-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(56px, 8vw, 88px) clamp(20px, 6vw, 80px) clamp(48px, 6vw, 72px);
  overflow: hidden;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--ink-900) 0%, #0a2a7a 60%, var(--brand) 120%);
  box-shadow: var(--shadow-lg);
  text-align: center;
  isolation: isolate;
}

.cta-card .glow-a {
  top: -60%;
  left: 50%;
  width: 700px;
  height: 420px;
  background: radial-gradient(closest-side, rgba(0, 184, 245, 0.45), transparent);
  translate: -50% 0;
  animation: drift-a 16s ease-in-out infinite alternate;
}

.cta-card .grid-lines {
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 20%, transparent 75%);
}

.cta-mark {
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  filter: drop-shadow(0 14px 24px rgba(0, 184, 245, 0.45));
  animation: bob 6s ease-in-out infinite;
}

.cta-card h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
}

.cta-card > p {
  max-width: 640px;
  margin-top: 16px;
  color: var(--ink-muted);
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.cta-login {
  margin-top: 22px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.cta-login a {
  color: var(--ink-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.site-footer {
  position: relative;
  padding: 80px 0 calc(32px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  background: var(--ink-950);
  color: var(--ink-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 48px;
}

.footer-tagline {
  margin-top: 16px;
  color: var(--ink-text);
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-brand p:last-child {
  max-width: 340px;
  margin-top: 8px;
  font-size: 0.9rem;
}

.site-footer h2 {
  margin-bottom: 14px;
  color: var(--ink-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  font-size: 0.92rem;
}

.site-footer nav a,
.site-footer ul a {
  transition: color 0.2s;
}

.site-footer ul a:hover {
  color: var(--ink-text);
}

.footer-watermark {
  margin-top: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(5rem, 19vw, 16rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-align: center;
  user-select: none;
}

.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  font-size: 0.82rem;
}

/* The rule stays inside the content width, not across the container gutters. */
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  right: var(--gutter);
  left: var(--gutter);
  border-top: 1px solid var(--ink-border);
}

/* ---------------------------------------------------------------------------------------------------------------
 * Reveal & motion
 * ------------------------------------------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease-out), transform 0.9s var(--ease-spring), filter 0.8s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Hover transforms on cards must not wait for the reveal delay once revealed. */
.js .card.reveal.is-visible,
.js .tile.reveal.is-visible {
  transition: opacity 0.8s var(--ease-out), transform 0.4s var(--ease-out), filter 0.8s var(--ease-out), box-shadow 0.4s,
    border-color 0.4s;
}

.js .hero-title .w {
  opacity: 0;
  transform: translateY(0.5em) rotate(2deg);
  filter: blur(10px);
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-spring), filter 0.9s var(--ease-out);
  transition-delay: calc(80ms + var(--wi) * 70ms);
}

.js .hero-title.is-visible .w {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Scroll-driven extras where the browser supports them (progress bar, mock settling, section parallax). */
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: progress linear both;
    animation-timeline: scroll(root);
  }

  .hero-backdrop {
    animation: parallax linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 100%;
  }

  /* The mock lies tilted back while it enters the viewport and straightens up as the visitor scrolls. It animates
     the individual rotate/scale properties, so the pointer tilt (transform) still composes on top. */
  .mock {
    animation: mock-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 42%;
  }
}

@keyframes mock-rise {
  from {
    rotate: x 22deg;
    scale: 0.92;
  }
  to {
    rotate: x 0deg;
    scale: 1;
  }
}

@keyframes progress {
  to {
    transform: scaleX(1);
  }
}

@keyframes parallax {
  to {
    transform: translateY(18%);
    opacity: 0.4;
  }
}

@keyframes spin {
  to {
    --spin: 360deg;
  }
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes drift-a {
  to {
    transform: translate(6%, 10%) scale(1.08);
  }
}

@keyframes drift-b {
  to {
    transform: translate(-14%, -8%) scale(1.12);
  }
}

@keyframes beam {
  0% {
    top: -160px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  80%,
  100% {
    top: 70%;
    opacity: 0;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 10px rgba(0, 104, 232, 0.12), 0 30px 70px -10px rgba(0, 104, 232, 0.75);
  }
  50% {
    box-shadow: 0 0 0 22px rgba(0, 104, 232, 0.06), 0 30px 90px -6px rgba(0, 184, 245, 0.75);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-100%);
  }
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

@keyframes typing {
  from {
    width: 0;
  }
}

@keyframes caret {
  50% {
    border-color: transparent;
  }
}

@keyframes task-out {
  0%,
  30% {
    transform: none;
    opacity: 1;
  }
  36%,
  88% {
    transform: translateY(-100%);
    opacity: 0;
  }
  94%,
  100% {
    transform: none;
    opacity: 1;
  }
}

@keyframes task-in {
  0%,
  30% {
    transform: translateY(100%);
    opacity: 0;
  }
  36%,
  88% {
    transform: none;
    opacity: 1;
  }
  94%,
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

@keyframes task-bg {
  0%,
  30%,
  94%,
  100% {
    background: var(--brand);
  }
  36%,
  88% {
    background: #2e7d32;
  }
}

/* Theme switch: the new theme spreads from the toggle (View Transitions API; site.js sets the origin). */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  animation: theme-reveal 0.6s var(--ease-out);
}

@keyframes theme-reveal {
  from {
    clip-path: circle(0 at var(--vt-x, 90%) var(--vt-y, 0%));
  }
  to {
    clip-path: circle(150vmax at var(--vt-x, 90%) var(--vt-y, 0%));
  }
}

/* ---------------------------------------------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------------------------------------------- */

@media (max-width: 1240px) {
  .float-done {
    right: -12px;
  }

  .float-reminder {
    left: -12px;
  }
}

@media (max-width: 1140px) {
  .menu-btn {
    display: inline-grid;
  }

  .hide-on-mobile {
    display: none;
  }

  .header-pill {
    justify-content: space-between;
  }

  .site-nav {
    position: fixed;
    inset: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 24px) var(--gutter) auto;
    z-index: 49;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-height: calc(100dvh - var(--header-h) - 48px);
    padding: 16px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.98);
    transform-origin: 50% 0;
    transition: opacity 0.3s, transform 0.4s var(--ease-out), visibility 0s 0.3s;
  }

  .site-header.is-on-dark .site-nav {
    background: #0d1730;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.3s, transform 0.4s var(--ease-out), visibility 0s;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 2px;
  }

  .site-nav a:not(.btn) {
    padding: 12px 14px;
    font-size: 1rem;
  }

  .nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .menu-open .menu-icon-open {
    display: none;
  }

  .menu-open .menu-icon-close {
    display: block;
  }

  .mock-app {
    grid-template-columns: 190px 1fr;
  }

  .mock-row {
    grid-template-columns: 1fr 1fr;
  }

  .mock-notifications {
    display: none;
  }

  .tile {
    grid-column: span 3;
  }

  /* Wide tiles and the odd last tile take the full row on tablets. */
  .tile-wide,
  .tile:last-child {
    grid-column: span 6;
  }

  .module-grid,
  .role-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .security {
    grid-template-columns: 1fr;
  }

  .security-visual {
    max-width: 380px;
  }
}

@media (max-width: 900px) {
  .mock-side {
    display: none;
  }

  .mock-app {
    grid-template-columns: 1fr;
  }

  .mock-search {
    display: none;
  }

  .compare {
    grid-template-columns: 1fr;
  }

  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .tailored {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
  }

  .stats div:nth-child(3) {
    border-left: 0;
  }

  .faq-layout {
    grid-template-columns: 1fr;
  }

  .faq-layout .section-head {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .float-done {
    top: auto;
    right: 12px;
    bottom: -28px;
  }

  .float-reminder {
    display: none;
  }
}

@media (max-width: 680px) {
  :root {
    --header-h: 58px;
  }

  .header-pill {
    padding: 0 8px 0 14px;
  }

  .hero {
    padding-top: calc(var(--header-h) + 64px);
  }

  .announcement {
    font-size: 0.78rem;
  }

  .hero-cta {
    flex-direction: column;
    align-self: stretch;
  }

  .btn {
    white-space: normal;
    text-align: center;
  }

  .mock {
    font-size: 12px;
  }

  .mock-main {
    padding: 14px;
  }

  .mock-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mock-row {
    grid-template-columns: 1fr;
  }

  .mock-row .mock-card:nth-child(2) {
    display: none;
  }

  .mock-company {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .tile,
  .tile-wide,
  .tile:last-child {
    grid-column: auto;
  }

  .tile {
    padding: 20px;
  }

  .tile-visual {
    padding: 16px;
  }

  .versions {
    grid-template-columns: 1fr;
  }

  .doc-head {
    flex-wrap: wrap;
  }

  /* The title keeps the full row; the version chip drops below it, aligned with the text. */
  .doc-head > div {
    flex-basis: calc(100% - 52px);
  }

  .doc-head .chip {
    margin-left: 52px;
  }

  .cockpit-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .module-grid,
  .role-grid,
  .feature-list,
  .steps {
    grid-template-columns: 1fr;
  }

  .steps {
    gap: 40px;
  }

  .flight-track {
    display: none;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .shield-badge {
    font-size: 0.74rem;
  }

  .badge-b {
    left: 0;
  }

  .badge-a {
    right: 0;
  }

  .cta-actions {
    flex-direction: column;
    align-self: stretch;
  }

  .footer-grid {
    gap: 32px;
  }
}

@media (max-width: 420px) {
  .nav-actions {
    grid-template-columns: 1fr;
  }

  .mock-kpis .kpi {
    padding: 10px;
  }

  .kpi-icon {
    width: 32px;
    height: 32px;
  }

  .trust {
    flex-direction: column;
    align-items: center;
  }
}

/* site.js pauses the decorative loops of a section while it is off screen: no work for what nobody sees. */
/* Only the elements that loop are listed: a universal descendant selector would recalculate the style of a whole
   section each time it enters or leaves the screen. */
.motion-paused :is(.hero-backdrop, .glow, .beam, .gradient-text, .mock, .float-card, .marquee-track, .module, .task-button, .task-idle, .task-done, .typed, .ring, .shield, .shield-badge, .cta-mark),
.motion-paused .mock::before,
.motion-paused .pulse-dot::after {
  animation-play-state: paused !important;
}

/* Phones and tablets: the same design, cheaper to render. On an emulated phone (4x slower CPU) the loops below kept
   the main thread busy all the time — animated custom properties, backgrounds and shadows recalculate style on every
   frame — and live blurs behind fixed or moving elements cost frames while scrolling. Loops that run on the
   compositor (the disciplines marquee, the security orbits) stay. */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  .hero-backdrop .glow,
  .cta-backdrop .glow,
  .section-dark-glow {
    filter: none;
    will-change: auto;
    animation: none;
  }

  .beam {
    display: none;
  }

  .hero-title .gradient-text,
  .mock::before,
  .module.is-core,
  .shield,
  .float-card,
  .shield-badge,
  .cta-mark,
  .typed,
  .is-visible .typed,
  .is-visible .task-button,
  .is-visible .task-idle,
  .is-visible .task-done {
    animation: none;
  }

  /* Blocks fade and rise without blur: an animated filter repaints whole tiles. */
  .js .reveal,
  .js .hero-title .w {
    filter: none;
  }

  /* Solid surfaces instead of a live blur of what scrolls underneath. */
  .header-pill {
    background: color-mix(in srgb, var(--bg-alt) 95%, transparent);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-header.is-on-dark .header-pill {
    background: rgba(10, 18, 40, 0.94);
  }

  .float-card,
  .shield-badge,
  .surface-dark .btn-secondary,
  .hero .btn-secondary,
  .site-header.is-on-dark .btn-secondary {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .float-card {
    background: var(--surface);
  }

  /* The marquee's faded edges: two still overlays in the page colour instead of a mask on a moving layer, which
     would need its own render surface on every frame. */
  .marquee {
    position: relative;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .marquee::before,
  .marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    width: 12%;
    pointer-events: none;
    background: linear-gradient(90deg, var(--bg), transparent);
  }

  .marquee::before {
    left: 0;
  }

  .marquee::after {
    right: 0;
    transform: scaleX(-1);
  }

  /* The reading progress bar updates on every scroll frame; phones go without it. */
  .scroll-progress {
    display: none;
  }

  /* No scroll-linked 3D: the mock stays flat and the backdrop does not move, so scrolling only moves pixels. */
  .stage-inner {
    perspective: none;
  }

  .mock,
  .hero-backdrop {
    animation: none;
  }

  .mock {
    transform: none;
    transform-style: flat;
    transition: none;
    box-shadow: 0 24px 56px -24px rgba(0, 64, 153, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  }

  /* Smaller soft shadows on the large surfaces: at 3x pixel density a 90-120px blur is costly to paint. */
  .compare-after,
  .tailored,
  .cta-card {
    box-shadow: 0 20px 44px -26px rgba(4, 12, 32, 0.6);
  }

  /* Below the hero, content is simply there: site.js shows it at once instead of animating it in while scrolling,
     which would promote, animate and repaint every block as it arrives. */
  .js main > section:not(.hero) .reveal,
  .js .site-footer .reveal {
    transition: none !important;
  }
}

/* With reduced motion everything is shown in its final state and nothing loops. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal,
  .js .hero-title .w {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .beam,
  .scroll-progress {
    display: none;
  }
}
