/* 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(255, 255, 255, 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(--bg);
  -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: dotted board background, content left, museum photo grid right ---------- */
.hero {
  overflow-x: clip;
  padding: calc(var(--s-900) + var(--s-200)) 0 var(--s-800);
  background-color: var(--bg);
  /* Flat dot pattern (an SVG tile, not a gradient) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23808080' fill-opacity='.35'/%3E%3C/svg%3E");
  background-size: 24px 24px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 700px);
  gap: var(--s-600);
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero h1 {
  letter-spacing: -0.02em;
  background-image: linear-gradient(90deg, var(--hero-from), var(--hero-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  max-width: 520px;
  margin-top: var(--s-300);
  color: var(--muted);
}
.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);
  margin-top: var(--s-400);
}
.hero-fine {
  margin-top: var(--s-200);
  color: var(--muted);
}

/* Entrance */
@keyframes rise {
  from {
    opacity: 0;
    translate: 0 var(--s-400);
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
.hero-text > h1 { animation: rise 800ms var(--ease) both; }
.hero-text > .hero-sub { animation: rise 800ms var(--ease) 60ms both; }
.hero-text > .hero-cta { animation: rise 800ms var(--ease) 120ms both; }
.hero-text > .hero-fine { animation: rise 800ms var(--ease) 180ms 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 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(6, minmax(0, 1fr));
  gap: var(--s-200);
}
.about-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-200);
  padding-inline-end: var(--s-200);
}
.about-intro h2 {
  letter-spacing: -0.02em;
}
.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;
}
.about-intro { grid-column: 1 / span 2; grid-row: 1; }
.f-1 { grid-column: 3 / span 2; grid-row: 1; }
.f-2 { grid-column: 5 / span 2; grid-row: 1; }
.f-3 { grid-column: 1 / span 3; grid-row: 2; }
.f-4 { grid-column: 4 / span 3; grid-row: 2; }

/* ---------- 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 {
  display: grid;
  gap: var(--s-75);
  max-width: 920px;
  margin-inline: auto;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.faq summary {
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-200);
  padding: var(--s-200) var(--s-300);
  cursor: pointer;
  list-style: none;
  transition:
    background-color 300ms var(--ease),
    color 300ms var(--ease);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  background: var(--surface-2);
}
.faq summary .icon {
  transition: rotate 500ms var(--ease);
}
.faq details[open] > summary {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.faq details[open] summary .icon {
  rotate: 45deg;
}
.faq details p {
  padding: var(--s-200) var(--s-300) var(--s-300);
  color: var(--muted);
}

/* ---------- 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(--surface);
  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 (dark panel, avatar left, message right) ---------- */
.msg {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--s-600);
  align-items: start;
  padding: var(--s-600);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-3xl);
}
.msg-who {
  position: sticky;
  top: var(--s-900);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-200);
  margin: 0;
}
.msg-who img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--r-full);
  border: 4px solid var(--bg);
}
.msg-who figcaption {
  color: var(--muted);
}
.msg-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-200);
}
.msg-body h2,
.msg-body h3 {
  letter-spacing: -0.01em;
}
.msg-sub {
  margin-top: var(--s-200);
}
.msg-body p {
  color: var(--muted);
  max-width: 680px;
}
.roadmap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-100);
  width: 100%;
  margin-block: var(--s-100);
}
.roadmap li {
  display: flex;
  flex-direction: column;
  gap: var(--s-75);
  padding: var(--s-200);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
}
.roadmap h4 {
  margin: 0;
  color: var(--accent);
}
.roadmap p {
  color: var(--muted);
}
.msg .btn-primary {
  margin-top: var(--s-100);
}

/* ---------- 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;
  }

  .msg {
    grid-template-columns: 1fr;
    gap: var(--s-400);
  }
  .msg-who {
    position: static;
  }
  .msg-who img {
    max-width: 200px;
  }

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

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: var(--s-500);
  }
  .hero-sub {
    max-width: 560px;
  }

  .about {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-intro {
    grid-column: 1 / span 2;
    padding-inline-end: 0;
  }
  .f-1, .f-2, .f-3, .f-4 { grid-column: auto; grid-row: auto; }
  .contact {
    grid-template-columns: 1fr;
    gap: var(--s-400);
  }
}

@media (max-width: 900px) {
  .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) {
  .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 {
    padding-top: calc(var(--s-800) + var(--s-400));
    padding-bottom: var(--s-700);
  }
  .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;
  }
  .msg {
    padding: var(--s-300);
  }
  .roadmap {
    grid-template-columns: 1fr;
  }
  .contact-form {
    grid-template-columns: 1fr;
    padding: var(--s-200);
  }
  .about {
    grid-template-columns: 1fr;
  }
  .about-intro {
    grid-column: auto;
  }
  .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-text > * {
    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-links a::after,
  .menu-btn span,
  .faq summary .icon,
  .msg-fab {
    transition: none;
  }
  .spinner {
    animation: none;
  }
  .video-play:hover .vp-btn,
  .msg-fab:hover,
  .btn:hover,
  .btn:hover .icon {
    translate: none;
    scale: none;
  }
}

