/* Board Lab landing page.
   Follows the landing-page-design skill: Geist only, Tailwind type scale, fixed spacing and radius
   tokens, flat backgrounds, one easing curve, transform + opacity motion only. */

/* ---------- Tokens ---------- */
:root {
  /* Spacing (the only allowed values) */
  --s-0: 0;
  --s-25: 2px;
  --s-50: 4px;
  --s-75: 8px;
  --s-100: 12px;
  --s-200: 16px;
  --s-300: 24px;
  --s-400: 32px;
  --s-500: 40px;
  --s-600: 48px;
  --s-700: 64px;
  --s-800: 80px;
  --s-900: 96px;

  /* Radius (Tailwind) */
  --r-sm: 2px;
  --r: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-3xl: 24px;
  --r-full: 9999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Light theme */
  --bg: #ffffff;
  --surface: #f6f7f8;
  --surface-2: #eceef0;
  --surface-3: #e1e4e8;
  --border: #dfe2e6;
  --text: #0b0b0b;
  --muted: #565d6a;
  --accent: #007a82; /* text and buttons on light */
  --accent-art: #00aeb8; /* illustration and card fills */
  --accent-soft: rgba(0, 174, 184, 0.14);
  --on-accent: #ffffff;
  --danger: #b42318;
  --nav-bg: rgba(246, 247, 248, 0.72);
  --menu-bg: rgba(255, 255, 255, 0.94);
  --hero-from: #000000;
  --hero-to: #666666;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

/* Light is the default. Dark is opt in: add data-theme="dark" to the <html> element. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --surface-3: #272727;
  --border: #313131;
  --text: #f5f5f0;
  --muted: #a8a8a3;
  --accent: #22ccd6;
  --accent-art: #00aeb8;
  --accent-soft: rgba(0, 174, 184, 0.2);
  --on-accent: #000000;
  --danger: #ff8a80;
  --nav-bg: rgba(24, 24, 24, 0.72);
  --menu-bg: rgba(0, 0, 0, 0.94);
  --hero-from: #ffffff;
  --hero-to: #9b9b9b;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  }

/* ---------- Text styles (named, from the Tailwind type scale) ---------- */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-2 { font-size: 16px; line-height: 24px; font-weight: 500; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-5 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.button-lg { font-size: 18px; line-height: 28px; font-weight: 600; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.caption-4 { font-size: 12px; line-height: 16px; font-weight: 500; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--s-800);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
  background: var(--surface); /* one grey for the whole page; cards stay white */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-menu-open] body {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  text-wrap: balance;
}

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

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

a {
  color: inherit;
}

button {
  font-family: inherit;
}

a,
button,
summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

::selection {
  background: var(--accent-soft);
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: currentColor;
}
.icon-sm {
  width: 20px;
  height: 20px;
}

.wrap {
  width: min(1440px, 100% - var(--s-800));
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}

.skip {
  position: fixed;
  inset-inline-start: var(--s-200);
  top: calc(-1 * var(--s-700));
  z-index: 100;
  padding: var(--s-75) var(--s-200);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r-lg);
  text-decoration: none;
}
.skip:focus {
  top: var(--s-200);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-75);
  padding: var(--s-75) var(--s-100);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 300ms var(--ease),
    border-color 300ms var(--ease),
    scale 300ms var(--ease);
}
.btn:hover {
  scale: 1.02;
}
.btn:active {
  scale: 0.98;
  transition-duration: 200ms;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--text));
}
.btn-secondary {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--accent);
}
.btn:disabled,
.btn[aria-disabled='true'] {
  color: var(--muted);
  cursor: not-allowed;
}
.btn:disabled:hover,
.btn[aria-disabled='true']:hover {
  scale: none;
  border-color: var(--border);
}
.btn-ghost {
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface-3);
}
.btn-lg {
  padding: var(--s-100) var(--s-300);
  border-radius: var(--r-xl);
}
.btn .icon {
  transition: translate 300ms var(--ease);
}
.btn:hover .icon {
  translate: var(--s-50) 0;
}

/* ---------- Top bar (same layout as the Board Lab app's top bar) ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  isolation: isolate;
}
/* Soft glass layer behind the bar that fades out toward the bottom, so there is no edge or border */
.nav::before {
  content: '';
  position: absolute;
  inset: 0 0 calc(-1 * var(--s-100)) 0;
  z-index: -1;
  pointer-events: none;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--s-400);
  height: 64px;
  margin-top: max(var(--s-200), env(safe-area-inset-top));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-100);
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--r-md);
}
.brand-mark {
  width: 37px;
  height: 40px;
  color: var(--accent-art);
  flex: none;
}
/* The wordmark is the Board Lab logo artwork (an SVG), not text. */
.brand-wordmark {
  width: 73px;
  height: 46px;
  flex: none;
}

/* Plain text tabs on the right, with a teal underline that slides in under the current one */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-300);
  margin-inline-start: auto;
}
.nav-links a {
  position: relative;
  display: inline-block;
  padding: var(--s-75) 0;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  transition: color 300ms var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: var(--r-sm);
  background: var(--accent-art);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 500ms var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current] {
  color: var(--text);
}
.nav-links a[aria-current]::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--s-100);
  flex-shrink: 0;
}
.nav-actions .btn {
  border-radius: var(--r-full);
  padding: var(--s-75) var(--s-200);
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  position: relative;
  transition: background-color 300ms var(--ease);
}
.menu-btn:hover {
  background: var(--surface-3);
}
.menu-btn span {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: var(--r-full);
  transition: transform 500ms var(--ease);
}
.menu-btn span:nth-child(1) {
  top: 15px;
}
.menu-btn span:nth-child(2) {
  top: 23px;
}
.menu-btn[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.menu-btn[aria-expanded='true'] span:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Full height mobile menu */
.menu {
  overscroll-behavior: contain;
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-300);
  padding: var(--s-900) var(--s-300) var(--s-600);
  background: var(--menu-bg);
  -webkit-backdrop-filter: blur(32px);
  backdrop-filter: blur(32px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 500ms var(--ease),
    visibility 0s linear 500ms;
}
html[data-menu-open] .menu {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.menu a {
  text-decoration: none;
}
.menu li {
  opacity: 0;
  translate: 0 var(--s-300);
  transition:
    opacity 500ms var(--ease),
    translate 500ms var(--ease);
}
html[data-menu-open] .menu li {
  opacity: 1;
  translate: 0 0;
  transition-delay: calc(var(--i) * 60ms);
}
.menu-links a {
  display: block;
  padding: var(--s-75) 0;
  color: var(--text);
}
.menu-links a[aria-current] {
  color: var(--accent);
}

/* ---------- Hero: one dark frame, vortex of references, wide lettering ---------- */
.hero {
  padding: var(--s-100);
}
.hero-frame {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: max(640px, calc(100svh - 2 * var(--s-100)));
  overflow: hidden;
  border: 1px solid #313131;
  border-radius: var(--r-3xl);
  background: #04060b;
  color: #f5f5f0;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 800ms var(--ease);
}
/* Flat dark overlay over the whole section, so the text reads clearly */
.hero-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(4, 6, 11, 0.55);
  pointer-events: none;
}
.hero-canvas.is-ready {
  opacity: 1;
}
.hero-title {
  margin: auto 0 0;
  padding: var(--s-900) var(--s-200) 0;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8);
}
.hero-lead {
  display: block;
  font-size: 18px;
  line-height: 28px;
  font-weight: 500;
  letter-spacing: 0.4em;
}
.hero-word {
  display: block;
  margin-top: var(--s-200);
  padding-inline-start: 0.45em; /* balances the trailing letter space */
  font-size: clamp(24px, 6.6vw, 112px);
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: 0.45em;
  white-space: nowrap;
}
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: var(--s-300);
  padding: var(--s-400);
}
.hero-sub {
  max-width: 960px;
  font-family: var(--font);
  font-size: 20px;
  line-height: 28px;
  font-weight: 400;
  margin: var(--s-300) auto auto;
  padding-inline: var(--s-300);
  color: #e4e7ec;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
}
.hero .btn-primary {
  background: #22ccd6;
  color: #000000;
}
.hero .btn-secondary {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
  color: #f5f5f0;
}
.hero .btn-secondary:hover {
  border-color: #22ccd6;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero .hero-cta {
  justify-content: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--r-full);
  animation: spin 700ms linear infinite;
}
.spinner[hidden] {
  display: none;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-100);
}
.hero-fine {
  margin-top: var(--s-100);
  color: #c9ced8;
}

/* Top bar while it sits over the hero */
.nav.on-hero {
  --text: #f5f5f0;
  --muted: #c9ced8;
  --nav-bg: transparent;
  --surface-3: rgba(255, 255, 255, 0.12);
  --bg: rgba(0, 0, 0, 0.4);
  --border: rgba(255, 255, 255, 0.25);
  color: var(--text);
}
/* Sit lower inside the hero frame; slides back up once the page scrolls past it */
.nav .nav-inner {
  transition: translate 500ms var(--ease);
}
.nav.on-hero .nav-inner {
  translate: 0 var(--s-300);
}
.nav.on-hero::before {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-menu-open] .nav.on-hero {
  --text: inherit;
  --muted: #565d6a;
}

/* Entrance */
@keyframes rise {
  from {
    opacity: 0;
    translate: 0 var(--s-400);
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
.hero-title { animation: rise 800ms var(--ease) both; }
.hero-sub { animation: rise 800ms var(--ease) 60ms both; }
.hero-actions { animation: rise 800ms var(--ease) 120ms both; }

/* ---------- Static halo scene: a portrait with glass cards around the head ---------- */
.scene-wrap {
  --k: 1; /* scale factor, lowered on small screens */
  position: relative;
  width: 100%;
  height: calc(592px * var(--k));
}
.scene {
  position: absolute;
  left: 50%;
  top: 0;
  width: 700px;
  height: 592px;
  margin-left: -350px;
  transform-origin: 50% 0;
  scale: var(--k);
  perspective: 2000px;
  perspective-origin: 50% 40%;
}
.tilt {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
/* The ring is tipped back a little so the orbit reads as an ellipse around the head */
.ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(-6deg);
}
.disc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 500px;
  height: 500px;
  margin: -250px 0 0 -250px;
  border-radius: var(--r-full);
  background: var(--surface); /* the same grey as the About section */
  transform: translateZ(-300px);
}
.portrait {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 400px;
  height: 487px;
  margin-left: -200px;
}

/* Every card sits on the ring: rotate around the center, push out along the radius, then face the viewer (--t) */
.c {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--w);
  height: var(--h);
  margin: calc(var(--h) / -2) 0 0 calc(var(--w) / -2);
  transform: translateY(var(--y)) rotateY(var(--a)) translateZ(var(--r)) rotateY(calc(var(--t) - var(--a)));
  backface-visibility: hidden;
  border-radius: var(--r-2xl);
}
.glass {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--s-100);
  padding: var(--s-200);
  /* No backdrop blur here: inside a 3D scene it draws grey boxes around the cards */
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}
.glass.col {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: var(--s-100);
}
.glass .row {
  display: flex;
  align-items: center;
  gap: var(--s-100);
}
.gi {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-xl);
  background: var(--accent-art);
  color: #000000;
}
.gt {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.gt b {
  color: var(--text);
}
.gt small {
  color: var(--muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-25);
  padding: var(--s-25) var(--s-75);
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.badge-pin {
  position: absolute;
  top: calc(-1 * var(--s-100));
  right: var(--s-200);
  background: var(--bg);
  border: 1px solid var(--border);
}
.icon-xs {
  width: 12px;
  height: 12px;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-75);
}
.thumbs img {
  display: block;
  width: 100%;
  height: 44px;
  object-fit: cover;
  border-radius: var(--r-lg);
  filter: grayscale(1);
}
.sw {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-75);
}
.sw span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-25);
}
.sw i {
  width: 100%;
  height: 34px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}
.sw b {
  font-size: 10.5px;
  line-height: 14px;
  font-weight: 500;
  color: var(--muted);
}
.note {
  display: flex;
  padding: var(--s-100);
  background: #fdf0a6;
  color: #3a300d;
  border-radius: var(--r);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.note p {
  margin: 0;
}



/* ---------- Sections ---------- */
.section {
  padding: var(--s-800) 0;
}
.sec-title {
  margin-bottom: var(--s-600);
  text-align: center;
  letter-spacing: -0.02em;
}

/* Scroll reveals (only hidden when JS is running, so crawlers and no JS users see everything) */
.js .reveal {
  opacity: 0;
  translate: 0 var(--s-400);
  transition:
    opacity 700ms var(--ease),
    translate 700ms var(--ease);
}
.js .reveal.in {
  opacity: 1;
  translate: 0 0;
}

/* ---------- Demo video ---------- */
.demo {
  padding-top: var(--s-500);
  overflow-x: clip; /* the brush strokes may reach past the page edge */
}
.sec-head {
  margin-bottom: var(--s-500);
  text-align: center;
}
.sec-head h2 {
  letter-spacing: -0.02em;
}
.sec-head p {
  max-width: 560px;
  margin: var(--s-100) auto 0;
  color: var(--muted);
}
.video-stage {
  position: relative;
  max-width: 960px;
  margin-inline: auto;
}
.swoosh {
  position: absolute;
  z-index: 0;
  height: 340px;
  pointer-events: none;
  fill: none;
  stroke-linecap: round;
  overflow: visible;
}
.swoosh path {
  vector-effect: non-scaling-stroke; /* the line keeps its thickness while the ribbon stretches to the screen edge */
}
.swoosh .s-main {
  stroke: var(--accent-art);
  stroke-width: 11;
}
.swoosh .s-soft {
  stroke: #8fdde3;
  stroke-width: 6;
}
/* Each ribbon starts 140px inside the player (hidden behind it) and ends at the edge of the screen */
.swoosh-tr {
  top: -62px;
  left: calc(100% - 140px);
  width: calc(50vw - 50% + 140px);
}
.swoosh-bl {
  bottom: -62px;
  right: calc(100% - 140px);
  width: calc(50vw - 50% + 140px);
}
.video {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin-inline: auto;
  /* A thin bezel: outer border + soft layered shadow around the player */
  padding: var(--s-75);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-3xl);
  box-shadow:
    0 1px 2px rgba(15, 15, 15, 0.04),
    0 8px 20px rgba(15, 15, 15, 0.06),
    0 24px 56px rgba(15, 15, 15, 0.08);
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl); /* 24px outer minus 8px bezel */
}
.video-frame video,
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-play {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: var(--r-2xl);
  cursor: pointer;
}
.video-play img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vp-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transition: scale 500ms var(--ease);
}
.vp-btn .icon {
  width: 36px;
  height: 36px;
  margin-left: var(--s-50);
}
.video-play:hover .vp-btn {
  scale: 1.08;
}
.video-play:active .vp-btn {
  scale: 0.96;
}

/* ---------- About (intro + feature cards, first card highlighted) ---------- */
.about-band {
  background: var(--surface);
}
.about {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-600);
  align-items: start;
}
.about-media {
  position: sticky;
  top: calc(var(--s-900) + var(--s-200));
}
.about-caption {
  margin-top: var(--s-200);
  color: var(--muted);
  text-align: center;
}
.about-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-300);
}
.about-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-200);
  width: 100%;
}
.about-intro p {
  color: var(--muted);
}
.about-intro p strong {
  color: var(--text);
  font-weight: 600;
}
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--s-200);
  padding: var(--s-300);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  transition:
    border-color 300ms var(--ease),
    background-color 300ms var(--ease);
}
.feature:hover {
  border-color: var(--accent);
}
.feature-head {
  display: flex;
  align-items: center;
  gap: var(--s-100);
}
.feature .icon {
  color: var(--accent);
}
.feature p {
  color: var(--muted);
}
.feature-hl {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  rotate: -3deg;
}
.feature-hl {
  rotate: 0deg;
}

/* ---------- How it works (cards with mini UI mocks) ---------- */
.how-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-100);
  margin-bottom: var(--s-600);
}
.how-head h2 {
  letter-spacing: -0.02em;
}
.how-head p {
  max-width: 480px;
  color: var(--muted);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-300);
  align-items: start;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-100);
  padding: var(--s-200) var(--s-200) var(--s-400);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-3xl);
  box-shadow: var(--shadow);
  text-align: center;
}
.step:nth-child(3) {
  rotate: 3deg;
  margin-top: var(--s-200);
}
.step h3 {
  margin-top: var(--s-100);
}
.step p {
  padding-inline: var(--s-100);
  color: var(--muted);
}
.step-art {
  width: 100%;
  padding: var(--s-400) var(--s-300);
  background: var(--accent-soft);
  border-radius: var(--r-xl);
}
.mini {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-100);
  padding: var(--s-200);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  text-align: start;
}
.mini-title {
  display: flex;
  align-items: center;
  gap: var(--s-75);
  padding-bottom: var(--s-100);
  border-bottom: 1px solid var(--border);
}
.mini-title .icon,
.mini-row .icon {
  color: var(--accent);
}
.drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-75);
  padding: var(--s-200);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  color: var(--muted);
}
.mini-row {
  display: flex;
  align-items: center;
  gap: var(--s-75);
}
.mini-row span {
  flex: 1;
}
.tick {
  width: 16px;
  height: 16px;
  border-radius: var(--r-full);
  background: var(--accent-art);
}
.swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-75);
}
.swatches span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-50);
}
.swatches i {
  width: 100%;
  height: 32px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.swatches b {
  font-weight: 500;
  color: var(--muted);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-50);
}
.chips span {
  padding: var(--s-25) var(--s-75);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--muted);
}
.mini-btn {
  display: grid;
  place-items: center;
  padding: var(--s-75) var(--s-100);
  border-radius: var(--r-lg);
  background: var(--accent);
  color: var(--on-accent);
}
.mini-cursor {
  position: absolute;
  right: var(--s-300);
  bottom: calc(-1 * var(--s-100));
  width: 24px;
  height: 24px;
  color: var(--text);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.note {
  display: flex;
  align-items: center;
  gap: var(--s-75);
  padding: var(--s-75);
  background: var(--surface);
  border-radius: var(--r-lg);
}
.av {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--accent-art);
}
.av-2 {
  background: #d9825b;
}
.steps-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--s-600);
}

/* ---------- FAQ ---------- */
.faq-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-900);
  align-items: start;
  max-width: 1240px;
}
.faq-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-200);
}
.faq-tag {
  padding: var(--s-50) var(--s-100);
  border: 1px solid var(--accent);
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
}
.faq-intro h2 {
  max-width: 400px;
  letter-spacing: -0.02em;
}
.faq-intro p {
  max-width: 400px;
  color: var(--muted);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-200);
  padding: var(--s-300) 0;
  list-style: none;
  cursor: pointer;
  transition: color 300ms var(--ease);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex: none;
  width: 24px;
  font-size: 24px;
  line-height: 24px;
  font-weight: 400;
  text-align: center;
}
.faq details[open] > summary::after {
  content: '\2212';
}
.faq summary:hover {
  color: var(--accent);
}
.faq details p {
  padding: 0 var(--s-600) var(--s-300) 0;
  color: var(--muted);
}
html[dir='rtl'] .faq details p {
  padding: 0 0 var(--s-300) var(--s-600);
}

/* ---------- Contact form ---------- */
.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-300) var(--s-200);
  max-width: 1040px;
  margin-inline: auto;
  padding: var(--s-400);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-3xl);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-75);
  min-width: 0;
}
.field-wide {
  grid-column: 1 / -1;
}
.field label {
  color: var(--text);
}
.optional {
  color: var(--muted);
  font-weight: 400;
}
.field input,
.field textarea {
  width: 100%;
  padding: var(--s-100) var(--s-200);
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  line-height: 24px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color 300ms var(--ease);
}
.field textarea {
  resize: vertical;
  min-height: 140px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.field input:hover,
.field textarea:hover {
  border-color: var(--muted);
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.field input[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-color: var(--danger);
}
.field-error {
  color: var(--danger);
}
/* Visually hidden without being pushed off-screen (an off-screen offset makes the page scroll sideways in right to left) */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-200);
}
.form-actions .btn:disabled {
  color: var(--on-accent);
  background: var(--accent);
  opacity: 0.7;
}
.form-status {
  flex: 1;
  min-width: 200px;
}
.form-status[data-state='success'] {
  color: var(--accent);
}
.form-status[data-state='error'] {
  color: var(--danger);
}

/* ---------- A message from us: letter on the left, what is next on the right ---------- */
.msg-band {
  background: var(--surface);
}
.msg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-900);
  align-items: start;
  max-width: 1240px;
}
.msg-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-200);
}
.msg-who {
  display: flex;
  align-items: center;
  gap: var(--s-200);
  margin: 0 0 var(--s-200);
}
.msg-who img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: var(--r-full);
}
.msg-who figcaption {
  color: var(--muted);
}
.msg h2 {
  color: var(--accent);
  letter-spacing: -0.02em;
}
.msg-col > p {
  font-size: 18px;
  line-height: 28px;
  color: var(--text);
}
.msg-eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.roadmap {
  display: flex;
  flex-direction: column;
  gap: var(--s-200);
  width: 100%;
  margin-top: var(--s-200);
}
.roadmap li {
  display: flex;
  flex-direction: column;
  gap: var(--s-75);
  padding: var(--s-300);
  background: var(--bg);
  border-radius: var(--r-3xl);
}
.roadmap h4 {
  margin: 0;
}
.roadmap p {
  color: var(--muted);
}
.msg .btn-primary {
  margin-top: var(--s-200);
  padding: var(--s-100) var(--s-300);
  border-radius: var(--r-full);
}

/* ---------- Floating message button (follows the visitor, jumps to the message) ---------- */
.msg-fab {
  position: fixed;
  inset-inline-end: max(var(--s-300), env(safe-area-inset-right));
  bottom: max(var(--s-300), env(safe-area-inset-bottom));
  z-index: 40;
  width: 64px;
  height: 64px;
  border-radius: var(--r-full);
  background: var(--bg);
  border: 3px solid var(--bg);
  box-shadow: var(--shadow);
  transition:
    scale 300ms var(--ease),
    opacity 500ms var(--ease),
    visibility 0s linear 0s;
}
.msg-fab img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--r-full);
}
.msg-fab:hover {
  scale: 1.08;
}
.msg-fab:active {
  scale: 0.96;
}
/* Hidden while the message itself is on screen */
.msg-fab.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    scale 300ms var(--ease),
    opacity 500ms var(--ease),
    visibility 0s linear 500ms;
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--s-300) 0 0;
}
/* Full width: the grey panel runs edge to edge, the content inside stays on the page grid */
.footer-card {
  padding: var(--s-700) 0;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-400);
  align-items: end;
}
.big-brand {
  display: flex;
  align-items: center;
  gap: var(--s-300);
  color: var(--text);
  text-decoration: none;
}
.big-brand svg {
  width: 73px;
  height: 80px;
  color: var(--accent-art);
  flex: none;
}
.big-brand .wordmark {
  width: 145px;
  height: 92px;
  color: var(--text);
}
.footer-tag {
  margin-top: var(--s-200);
  color: var(--muted);
}
.footer-links {
  display: grid;
  gap: var(--s-75);
  text-align: end;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 300ms var(--ease);
}
.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}
.footer-copy {
  margin-top: var(--s-200);
  color: var(--muted);
}

/* ---------- Simple pages (privacy, terms, 404) ---------- */
.doc {
  max-width: 680px;
  margin-inline: auto;
  padding: calc(var(--s-900) + var(--s-700)) 0 var(--s-900);
}
.doc h1 {
  letter-spacing: -0.02em;
}
.doc p {
  margin-top: var(--s-200);
  color: var(--muted);
}
.doc .btn {
  margin-top: var(--s-400);
}
.doc-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .heading-1 { font-size: 48px; line-height: 48px; }
}

@media (max-width: 1024px) {
  .heading-1 { font-size: 48px; line-height: 48px; }
  .heading-2 { font-size: 36px; line-height: 40px; }

  .steps {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }


  .scene-wrap {
    --k: 0.9;
  }


  .about {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-media {
    position: static;
  }
  .contact {
    grid-template-columns: 1fr;
    gap: var(--s-400);
  }
}

@media (max-width: 900px) {
  .faq-split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-400);
  }
  .msg {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-600);
  }
  .nav-links,
  .nav-actions .btn-ghost {
    display: none;
  }
  .menu {
    display: flex;
  }
  html.js .menu-btn {
    display: block;
  }
  .nav-inner {
    gap: var(--s-200);
  }
  .nav-actions {
    margin-inline-start: auto;
  }
}

@media (max-width: 720px) {
  .hero-sub {
    font-size: 16px;
    line-height: 24px;
  }
  .heading-1 { font-size: 36px; line-height: 40px; }
  .heading-2 { font-size: 30px; line-height: 36px; }
  .heading-3 { font-size: 24px; line-height: 32px; }
  .section {
    padding: var(--s-700) 0;
  }
  .hero-lead {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.2em;
  }
  .hero-word {
    padding-inline-start: 0.25em;
    letter-spacing: 0.25em;
  }
  .hero-foot {
    padding: var(--s-200);
  }
  .hero-actions {
    padding-bottom: var(--s-700); /* clear of the floating message button */
  }
  .sec-title {
    margin-bottom: var(--s-400);
  }
  .brand-word {
    font-size: 16px;
  }
  .swoosh {
    height: 180px;
  }
  .swoosh-tr {
    top: -30px;
  }
  .swoosh-bl {
    bottom: -30px;
  }
  .vp-btn {
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
  }
  .vp-btn .icon {
    width: 28px;
    height: 28px;
  }
  .scene-wrap {
    --k: 0.7;
  }
  .msg-fab {
    inset-inline-end: var(--s-200);
    bottom: var(--s-200);
    width: 56px;
    height: 56px;
  }
  .contact-form {
    grid-template-columns: 1fr;
    padding: var(--s-200);
  }
  .about-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-hl {
    rotate: 0deg;
  }
  .steps {
    gap: var(--s-200);
  }
  .step:nth-child(3) {
    rotate: 0deg;
    margin-top: 0;
  }
  .faq details p {
    padding-inline-end: var(--s-300);
  }
  .contact {
    padding: var(--s-300);
  }
  .footer-card {
    padding: var(--s-500) 0;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-links {
    text-align: start;
  }
  .big-brand svg {
    width: 36px;
    height: 40px;
  }
  .big-brand .wordmark {
    width: 79px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .scene-wrap {
    --k: 0.5;
  }
  .gt small,
  .thumbs,
  .sw b {
    display: none;
  }
}

/* Reduced motion: no movement, plain opacity changes only */
/* ---------- Language switch ---------- */
.lang-switch {
  font-family: inherit;
}
.lang-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-75);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

/* ---------- Arabic: Cairo, right to left ---------- */
html[lang='ar'] {
  --font: 'Cairo', 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
/* Arabic letters join up, so any letter-spacing breaks the words. */
html[lang='ar'] body * {
  letter-spacing: 0 !important;
}
/* The hero scene is a 3D composition built with left/right math, so it stays as drawn; only its card text reads right to left. */
html[dir='rtl'] .scene-wrap {
  direction: ltr;
}
html[dir='rtl'] .scene .c {
  direction: rtl;
}
html[dir='rtl'] .nav-links a::after {
  transform-origin: right;
}
/* Arrows point the way the text reads */
html[dir='rtl'] svg:has(> use[href='#i-arrow-right']) {
  scale: -1 1;
}
html[dir='rtl'] .btn:hover .icon {
  translate: calc(-1 * var(--s-50)) 0;
}
/* The brand name is wrapped in translate="no" spans: keep "Board Lab" on one line */
span[translate='no'] {
  white-space: nowrap;
}
/* Colour swatches and HEX codes always read left to right */
html[dir='rtl'] .sw,
html[dir='rtl'] .swatches {
  direction: ltr;
}
html[dir='rtl'] .footer-copy {
  direction: ltr;
  text-align: right;
}
/* Phones: the language switch takes the Join button's place in the top bar (Join stays in the hero and the menu) */
@media (max-width: 600px) {
  .nav-actions .btn-primary {
    display: none;
  }
}
/* The Arabic Join button is wider, so it moves out of the top bar sooner (it stays in the hero and the menu) */
@media (max-width: 1100px) {
  html[lang='ar'] .nav-actions .btn-primary {
    display: none;
  }
}
/* Emails and phone numbers are always typed left to right */
html[dir='rtl'] input[type='email'],
html[dir='rtl'] input[type='tel'] {
  direction: ltr;
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-title, .hero-sub, .hero-actions {
    animation-name: fade;
    animation-duration: 400ms;
  }
  @keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .js .reveal {
    translate: none;
    transition: opacity 400ms linear;
  }
  .menu li {
    translate: none;
  }
  .nav .nav-inner,
  .nav-links a::after,
  .menu-btn span,
  .msg-fab {
    transition: none;
  }
  .spinner {
    animation: none;
  }
  .video-play:hover .vp-btn,
  .msg-fab:hover,
  .btn:hover,
  .btn:hover .icon {
    translate: none;
    scale: none;
  }
}


/* About on wide screens: the video runs from the top of the intro to the bottom of the feature cards */
@media (min-width: 1101px) {
  .about-wrap {
    width: min(1760px, 100% - var(--s-800));
  }
  .about {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    row-gap: var(--s-300);
    align-items: stretch;
  }
  .about-media,
  .about-side {
    display: contents;
  }
  .about-media .video {
    grid-area: 1 / 1 / 3 / 2;
    display: flex;
    max-width: none;
    width: 100%;
    margin: 0;
  }
  .about-media .video-frame {
    flex: 1;
    aspect-ratio: auto;
  }
  .about-media video {
    object-fit: contain;
    background: #000000;
  }
  .about-intro {
    grid-area: 1 / 2;
  }
  .about-cards {
    grid-area: 2 / 2;
  }
  .about-caption {
    grid-area: 3 / 1;
    align-self: center;
    margin: 0;
  }
  .about-side > .btn {
    grid-area: 3 / 2;
    justify-self: start;
  }
}
@media (max-width: 1100px) {
  .about {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-media {
    position: static;
  }
}

/* Hero actions: a tab in the page colour that rises from the bottom of the dark frame */
.hero-frame {
  border: 0;
}
.hero .hero-foot {
  padding: var(--s-300) var(--s-300) 0;
}
.hero .hero-actions {
  gap: var(--s-200);
  padding-bottom: 0;
}
.hero .hero-fine {
  margin: 0;
}
.hero-tab {
  position: relative;
  display: flex;
  gap: var(--s-75);
  padding: var(--s-100) var(--s-200) 0;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--r-3xl) var(--r-3xl) 0 0;
}
/* The links use the site buttons, in the brand teal, as pills */
.hero-tab {
  padding-bottom: var(--s-75);
}
.hero-tab .btn {
  padding: var(--s-75) var(--s-200);
  border-radius: var(--r-full);
}
.hero .hero-tab .btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.hero .hero-tab .btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, var(--text));
}
.hero .hero-tab .btn-secondary {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
}
/* The two inward curves where the tab meets the frame edge */
.hero-tab::before,
.hero-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 24px;
  height: 24px;
}
.hero-tab::before {
  right: 100%;
  background: radial-gradient(circle at 0 0, transparent 23.5px, var(--surface) 24px);
}
.hero-tab::after {
  left: 100%;
  background: radial-gradient(circle at 100% 0, transparent 23.5px, var(--surface) 24px);
}
@media (max-width: 720px) {
  .hero .hero-foot {
    padding-inline: 0;
  }
  .hero-tab {
    gap: var(--s-50);
    padding-inline: var(--s-75);
    font-size: 14px;
    line-height: 20px;
  }
  .hero-tab .btn {
    padding-inline: var(--s-100);
  }
  /* The floating message button would sit on top of the tab */
  body:has(.nav.on-hero) .msg-fab {
    opacity: 0;
    pointer-events: none;
  }
}

/* ---------- Waiting list: intro on the left, underlined fields on the right ---------- */
.wl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-900);
  align-items: start;
  max-width: 1240px;
  margin-inline: auto;
  padding: 0 var(--s-700);
}
.wl-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-300);
}
.wl-brand {
  display: flex;
  align-items: center;
  gap: var(--s-100);
}
.wl-intro h2 {
  letter-spacing: -0.02em;
}
.wl-intro p {
  max-width: 400px;
  color: var(--muted);
}
.wl .contact-form {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-200);
}
.field-tag {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.field-tag.is-required {
  color: var(--accent);
}
.wl .field input,
.wl .field textarea {
  padding: var(--s-75) 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--muted);
  border-radius: 0;
  transition: border-color 300ms var(--ease);
}
.wl .field input:hover,
.wl .field textarea:hover {
  border-color: var(--text);
}
.wl .field input:focus-visible,
.wl .field textarea:focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 2px 0 var(--accent);
}
.wl .field input[aria-invalid='true'],
.wl .field textarea[aria-invalid='true'] {
  border-color: var(--danger);
}
.wl .form-actions {
  flex-direction: row-reverse;
}
@media (max-width: 900px) {
  .wl {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-500);
    padding: 0;
  }
}

/* The asterisk glyph sits high: keep its row the same height as the others and nudge it onto the label line */
.field-tag.is-required.title-1 {
  line-height: 16px;
  translate: 0 var(--s-50);
}

/* ---------- A touch of brand teal across the page (a wash over the grey) ----------
   The top of the page is left plain so the hero button tab still matches the page colour. */
body {
  /* First layer keeps the hero area plain grey and fades into the wash below it */
  background-image:
    linear-gradient(180deg, var(--surface) 0, var(--surface) 100vh, transparent calc(100vh + 400px)),
    linear-gradient(
      100deg,
      rgba(0, 174, 184, 0.03) 0,
      rgba(0, 174, 184, 0.08) 28%,
      rgba(0, 122, 130, 0.04) 52%,
      rgba(0, 174, 184, 0.1) 76%,
      rgba(0, 122, 130, 0.05) 100%
    );
  background-repeat: no-repeat;
}
/* Let the wash run through the sections and the footer */
.about-band,
.msg-band {
  background: transparent;
}
.footer-card {
  background: rgba(0, 174, 184, 0.04);
}

/* ---------- Every section as wide as About ---------- */
.wrap {
  width: min(1760px, 100% - var(--s-800));
}
.msg,
.wl,
.faq-split {
  max-width: none;
}
.wl {
  padding-inline: 0;
}

/* ---------- Text sizes in the sections below the hero ---------- */
@media (min-width: 721px) {
  .section .heading-1,
  .section .heading-2 { font-size: 48px; line-height: 48px; }
  .section .heading-6,
  .section .title-1 { font-size: 20px; line-height: 28px; }
  .section .msg-col > p { font-size: 16px; line-height: 24px; }
  .how-head p,
  .faq-intro h2,
  .faq-intro p,
  .wl-intro p { max-width: 520px; }
}

/* Stronger dividers so they still show on the teal wash */
.faq details {
  border-bottom-color: color-mix(in srgb, var(--muted) 35%, transparent);
}

/* ---------- Softer headlines: charcoal instead of near black ---------- */
.section h2:not(.msg h2),
.section h3,
.section h4 {
  color: color-mix(in srgb, var(--text) 68%, var(--muted));
}

/* ---------- Footer: social link ---------- */
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: var(--s-200);
  border: 1px solid var(--accent);
  border-radius: var(--r-full);
  color: var(--accent);
  transition: background-color 300ms var(--ease), color 300ms var(--ease), scale 300ms var(--ease);
}
.footer-social:hover {
  background: var(--accent);
  color: var(--on-accent);
}
.footer-social:active {
  scale: 0.98;
}

/* ---------- Hero: Instagram link in the bottom left corner ---------- */
.hero-social {
  position: absolute;
  left: var(--s-300);
  bottom: var(--s-300);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.6);
  color: #f5f5f0;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease), scale 300ms var(--ease);
}
.hero-social:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.hero-social:active {
  scale: 0.98;
}
/* Narrow screens: the button tab fills the bottom edge, so the icon sits above it */
@media (max-width: 720px) {
  .hero-social {
    left: var(--s-200);
    bottom: var(--s-900);
    width: 40px;
    height: 40px;
  }
}

/* ---------- FAQ: heading on top, questions centred below ---------- */
.faq-split {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
  gap: var(--s-600);
}
.faq-intro {
  align-items: center;
  text-align: center;
}
.faq-intro h2,
.faq-intro p {
  max-width: none;
}
@media (max-width: 900px) {
  .faq-split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-400);
  }
}

/* ---------- How it works: four numbered steps ---------- */
.steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
.step:nth-child(3) {
  rotate: 0deg;
  margin-top: 0;
}
.step-art {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  padding-inline: var(--s-200);
}
.step h3 {
  display: flex;
  align-items: center;
  gap: var(--s-75);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.pages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-75);
}
.pages img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: var(--r-md);
}
@media (max-width: 1200px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}
@media (max-width: 720px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Narrow phones: drop the icons so both hero buttons fit the tab */
@media (max-width: 440px) {
  .hero-tab .btn .icon {
    display: none;
  }
}

/* ---------- How it works: a rising path with four stops ---------- */
.flow {
  position: relative;
  height: 640px;
}
.flow-head {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-200);
  max-width: 400px;
}
.flow-eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.flow-head .btn {
  padding: var(--s-100) var(--s-300);
  border-radius: var(--r-full);
}
.flow-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: var(--accent-art);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 12px 10px rgba(0, 122, 130, 0.2));
}
.flow-line path {
  vector-effect: non-scaling-stroke;
}
html[dir='rtl'] .flow-line {
  scale: -1 1;
}
/* Each stop: its dot sits exactly on the path (x = 3% + 25% per step, y in px) */
.flow-step {
  --y: 420px;
  position: absolute;
  top: var(--y);
  inset-inline-start: calc(var(--col) * 25% + 3%);
  width: 20%;
}
.flow-step:nth-child(1) { --col: 0; }
.flow-step:nth-child(2) { --col: 1; --y: 370px; }
.flow-step:nth-child(3) { --col: 2; --y: 250px; }
.flow-step:nth-child(4) { --col: 3; --y: 90px; }
.flow-dot {
  position: absolute;
  top: -24px;
  inset-inline-start: -24px;
  width: 48px;
  height: 48px;
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.flow-dot::after {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: var(--r-full);
  background: var(--accent);
  transition: scale 300ms var(--ease);
}
.flow-step:hover .flow-dot::after {
  scale: 1.4;
}
.flow-num {
  position: absolute;
  top: -24px;
  inset-inline-end: 0;
  z-index: -1;
  font-size: 128px;
  line-height: 128px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.1;
}
.flow-step h3 {
  margin: var(--s-600) 0 var(--s-75);
}
.flow-step p {
  color: var(--muted);
}
/* Narrower screens: a simple vertical list, no path */
@media (max-width: 1100px) {
  .flow {
    height: auto;
  }
  .flow-head {
    position: static;
    margin-bottom: var(--s-600);
  }
  .flow-line {
    display: none;
  }
  .flow-steps {
    display: grid;
    gap: var(--s-400);
  }
  .flow-step {
    position: relative;
    top: 0;
    inset-inline-start: 0;
    width: auto;
    isolation: isolate;
    padding-inline-start: var(--s-700);
  }
  .flow-dot {
    top: 0;
    inset-inline-start: 0;
  }
  .flow-num {
    top: 0;
  }
  .flow-step h3 {
    margin-top: 0;
    padding-top: var(--s-100);
  }
}

/* ---------- About: the video on its own, centred ---------- */
.about.about-solo {
  display: block;
  max-width: 1100px;
  margin-inline: auto;
}
.about-solo .about-media {
  display: block;
  position: static;
}
.about-solo .video {
  display: block;
  width: auto;
  margin-inline: auto;
}
.about-solo .video-frame {
  aspect-ratio: 16 / 9;
}
.about-solo .about-caption {
  margin-top: var(--s-200);
}

/* No frame around the video: it floats on a soft layered shadow and drifts gently */
.about-solo .video {
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--r-3xl);
  box-shadow:
    0 40px 80px -24px rgba(0, 60, 66, 0.45),
    0 16px 32px -16px rgba(0, 0, 0, 0.3);
  animation: float 6s var(--ease) infinite alternate;
}
.about-solo .video-frame {
  border-radius: var(--r-3xl);
}
.about-solo .about-caption {
  margin-top: var(--s-500); /* room for the shadow */
}
@keyframes float {
  from { translate: 0 0; }
  to { translate: 0 calc(-1 * var(--s-100)); }
}
/* Hold still while someone is using the player */
.about-solo .video:hover,
.about-solo .video:focus-within {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .about-solo .video {
    animation: none;
  }
}

/* ---------- About: intro, then the video ---------- */
.about-lead {
  margin-top: var(--s-200);
  text-wrap: balance;
}
.about-sub {
  margin-top: var(--s-75);
  color: var(--muted);
  text-wrap: pretty;
}
.about-trio {
  max-width: 1100px;
  margin: var(--s-500) auto 0;
}


/* ---------- Product screens: three PC monitors, one in front ---------- */
.screens {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: var(--s-400);
  text-align: center;
}
.screen-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-50);
  padding: var(--s-75);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}
.screen-tab {
  padding: var(--s-100) var(--s-300);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.screen-tab[aria-pressed='true'] {
  color: var(--on-accent);
  background: var(--accent);
}
.screen-stage {
  display: grid;
  justify-items: center;
  width: 100%;
  padding-block: var(--s-200);
  overflow: hidden;
}
.monitor {
  grid-area: 1 / 1;
  width: min(940px, 52%);
  margin: 0;
  cursor: pointer;
  transition: transform 600ms var(--ease), opacity 600ms var(--ease);
}
.monitor[data-pos='center'] {
  z-index: 2;
  cursor: default;
}
.monitor[data-pos='left'] {
  opacity: 0.75;
  transform: translateX(-54%) scale(0.7) rotate(-5deg);
}
.monitor[data-pos='right'] {
  opacity: 0.75;
  transform: translateX(54%) scale(0.7) rotate(5deg);
}
.monitor[data-pos='back'] {
  z-index: -1;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}
.monitor-body {
  padding: var(--s-75) var(--s-75) var(--s-300);
  background: #15171a;
  border-radius: var(--r-xl);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}
.monitor img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: var(--r-md);
}
.monitor-stand {
  display: block;
  width: 16%;
  height: 40px;
  margin-inline: auto;
  background: #b9bec4;
  clip-path: polygon(18% 0, 82% 0, 86% 78%, 100% 84%, 100% 100%, 0 100%, 0 84%, 14% 78%);
}
.screen-copy h3 {
  margin-bottom: var(--s-75);
}
.screen-copy p {
  color: var(--muted);
  text-wrap: pretty;
}
@media (max-width: 720px) {
  .monitor {
    width: 78%;
  }
  .monitor-body {
    padding: var(--s-50) var(--s-50) var(--s-100);
    border-radius: var(--r-md);
  }
  .monitor-stand {
    height: 16px;
  }
  .screen-tab {
    padding: var(--s-75) var(--s-100);
  }
}
@media (prefers-reduced-motion: reduce) {
  .monitor {
    transition: opacity 300ms var(--ease);
  }
}

/* ---------- Product screens: click a monitor to see it large ---------- */
.monitor,
.monitor[data-pos='center'] {
  cursor: zoom-in;
}
.screen-popup {
  /* as wide as fits both the width and the height of the window */
  width: min(1600px, 94vw, (100vh - 200px) * 1.6);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
}
.screen-popup::backdrop {
  background: rgba(4, 6, 11, 0.8);
}
.screen-popup img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #f6f7f8;
  border-radius: var(--r-md);
}
.screen-close {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 0 var(--s-100) auto;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  border-radius: var(--r-full);
  font-size: 24px;
  line-height: 40px;
  cursor: pointer;
}
html:has(.screen-popup[open]) {
  overflow: hidden;
}
.screen-nav {
  position: fixed;
  top: 50%;
  width: 48px;
  height: 48px;
  translate: 0 -50%;
  color: #fff;
  background: rgba(4, 6, 11, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--r-full);
  font-size: 30px;
  line-height: 44px;
  cursor: pointer;
  transition: background-color 300ms var(--ease);
}
.screen-nav:hover {
  background: var(--accent);
}
.screen-prev {
  inset-inline-start: var(--s-200);
}
.screen-next {
  inset-inline-end: var(--s-200);
}
html[dir='rtl'] .screen-nav {
  scale: -1 1;
}

/* ---------- Monster button: bigger ---------- */
.msg-fab {
  width: 96px;
  height: 96px;
  border-width: 4px;
}
@media (max-width: 720px) {
  .msg-fab {
    width: 72px;
    height: 72px;
  }
}

/* ---------- Page scrollbar: slim teal pill ---------- */
html::-webkit-scrollbar {
  width: 16px;
}
html::-webkit-scrollbar-track {
  background: var(--surface);
}
html::-webkit-scrollbar-thumb {
  background: var(--accent);
  background-clip: content-box;
  border: 3px solid transparent;
  border-radius: 999px;
}
html::-webkit-scrollbar-thumb:hover {
  border-width: 2px;
}
/* Firefox */
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--surface);
  }
}
html::-webkit-scrollbar-thumb {
  min-height: 64px;
}
html::-webkit-scrollbar-track {
  margin-block: 4px;
  border-radius: 999px;
}

/* ---------- About: the video in a laptop, with soft lines behind ---------- */
#about {
  overflow-x: clip;
}
#about .about-trio {
  position: relative;
  isolation: isolate;
}
#about .about-trio::before {
  content: '';
  position: absolute;
  top: -40px;
  bottom: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  translate: -50% 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 600' preserveAspectRatio='none' fill='none' stroke='%23007a82' stroke-width='1.2' stroke-opacity='.22'%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 300C240 160 420 430 720 270S1180 90 1440 230'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 322C240 190.8 420 438.8 720 292S1180 123 1440 252'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 344C240 221.6 420 447.6 720 314S1180 156 1440 274'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 366C240 252.39999999999998 420 456.4 720 336S1180 189 1440 296'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 388C240 283.2 420 465.2 720 358S1180 222 1440 318'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 410C240 314 420 474 720 380S1180 255 1440 340'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 432C240 344.79999999999995 420 482.8 720 402S1180 288 1440 362'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 454C240 375.6 420 491.6 720 424S1180 321 1440 384'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 476C240 406.4 420 500.4 720 446S1180 354 1440 406'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  /* fade out at both sides */
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  pointer-events: none;
}
#about .about-solo .video {
  position: relative;
  width: 86%;
  margin-inline: auto;
  padding: var(--s-200) var(--s-100) var(--s-100);
  overflow: visible;
  background: #15171a;
  border: 2px solid #b9bec4;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16);
}
/* camera dot */
#about .about-solo .video::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  width: 6px;
  height: 6px;
  translate: -50% 0;
  background: #4a5058;
  border-radius: 50%;
}
/* the base, with the notch you lift the lid by */
#about .about-solo .video::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -8%;
  width: 116%;
  height: 20px;
  background: radial-gradient(60px 10px at 50% 0, #8d949c 98%, transparent) , #c3c8ce;
  border-radius: 2px 2px 20px 20px;
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.18);
}
#about .about-solo .video-frame {
  border-radius: var(--r-md);
  box-shadow: none;
}
#about .about-solo .about-caption {
  margin-top: var(--s-500);
}
@media (max-width: 720px) {
  #about .about-solo .video {
    padding: var(--s-100) var(--s-50) var(--s-50);
    border-radius: 12px 12px 0 0;
  }
  #about .about-solo .video::before {
    display: none;
  }
  #about .about-solo .video::after {
    height: 10px;
  }
}
#about .about-solo .video-frame,
#about .about-solo .video-frame video {
  border: 0;
}

/* ---------- About video: PC monitor instead of the laptop ---------- */
#about .about-solo .video {
  padding: var(--s-100) var(--s-100) var(--s-400);
  border: 0;
  border-radius: var(--r-xl);
}
#about .about-solo .video::before {
  display: none;
}
/* neck and foot */
#about .about-solo .video::after {
  left: 42%;
  width: 16%;
  height: 56px;
  background: #b9bec4;
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(18% 0, 82% 0, 86% 80%, 100% 86%, 100% 100%, 0 100%, 0 86%, 14% 80%);
}
#about .about-solo .about-caption {
  margin-top: var(--s-800);
}
@media (max-width: 720px) {
  #about .about-solo .video {
    padding: var(--s-50) var(--s-50) var(--s-200);
    border-radius: var(--r-md);
  }
  #about .about-solo .video::after {
    height: 24px;
  }
  #about .about-solo .about-caption {
    margin-top: var(--s-500);
  }
}

/* ---------- Monster sticker on the corner of the video screen ---------- */
.video-sticker {
  position: absolute;
  right: -56px;
  bottom: -80px;
  z-index: 1;
  width: 112px;
  height: 112px;
  /* white die-cut edge */
  padding: 6px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 14px 24px rgba(0, 0, 0, 0.2);
  rotate: 12deg;
  pointer-events: none;
}
@media (max-width: 720px) {
  .video-sticker {
    right: -8px;
    bottom: -48px;
    width: 64px;
    height: 64px;
    padding: 4px;
  }
}

/* ---------- Small monster sticker on the front monitor, bottom left ---------- */
.monitor {
  position: relative;
}
.monitor[data-pos='center']::before {
  content: '';
  position: absolute;
  left: -40px;
  bottom: -8px;
  z-index: 1;
  width: 72px;
  height: 72px;
  background: url('images/board-lab-team-avatar.svg') center / contain no-repeat;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 12px 20px rgba(0, 0, 0, 0.2);
  rotate: -12deg;
  pointer-events: none;
}
@media (max-width: 720px) {
  .monitor[data-pos='center']::before {
    left: -12px;
    width: 40px;
    height: 40px;
    border-width: 2px;
  }
}

/* ---------- Early access: monster rubber stamp ---------- */
.wl-stamp {
  display: block;
  width: min(220px, 60%);
  height: auto;
  margin-top: var(--s-500);
  margin-inline-start: var(--s-700);
  color: var(--accent);
  rotate: -12deg;
}
.wl-stamp .ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
}
.wl-stamp .thin {
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}
.wl-stamp text {
  fill: currentColor;
  font-size: 14px;
  font-weight: 700;
  dominant-baseline: middle;
}
@media (max-width: 720px) {
  .wl-stamp {
    width: 140px;
    margin: var(--s-300) auto 0;
  }
}
