/* Live Board: landing page styles.
 * Tokens come from styles/tokens/*.css (Live Board design system). */
@import url('./tokens/fonts.css?v=20260722');
@import url('./tokens/colors.css?v=20260721');
@import url('./tokens/typography.css?v=20260721');
@import url('./tokens/spacing.css?v=20260721');

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Material Symbols Rounded helper (matches the product iconography) */
.msr {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400;
}
.msr.fill { font-variation-settings: 'FILL' 1, 'wght' 400; }

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* ---------- Buttons (DS: pill, filled coral / outlined) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  background: var(--accent);
  color: var(--text-on-brand);
  transition: background var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard);
}
.btn:hover { background: var(--accent-hover); color: var(--text-on-brand); }
.btn:active { background: var(--accent-pressed); }
.btn .msr { font-size: 20px; }

.btn--outlined { background: transparent; color: var(--brand-navy); border-color: var(--border-default); }
.btn--outlined:hover { background: rgba(0, 0, 0, 0.04); border-color: var(--border-strong); color: var(--brand-navy); }
.btn--outlined:active { background: rgba(0, 0, 0, 0.08); }

.btn--lg { height: 48px; padding: 0 26px; font-size: 15px; }
.btn--full { width: 100%; }

/* ---------- Status pill (DS: the green "Online" chip) ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 12px 0 8px;
  border-radius: var(--radius-pill);
  background: var(--success-bg);
  color: var(--success);
  font-size: 12px;
  font-weight: var(--fw-semibold);
}
.status-pill .msr { font-size: 15px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 26px; width: auto; display: block; }
.logo-word { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 20px; letter-spacing: -0.01em; }
.logo-word .live { color: var(--accent); }
.logo-word .board { color: var(--brand-navy); }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-secondary); font-size: 15px; font-weight: var(--fw-medium); }
.nav-links a:hover { color: var(--brand-navy); }

.nav-cta { display: flex; align-items: center; gap: 16px; }
.nav-cta .login { color: var(--brand-navy); font-size: 15px; font-weight: var(--fw-semibold); }
.nav-cta .login:hover { color: var(--brand-navy-600); }

/* Language toggle: a quiet globe + target-language label (shows the language
 * you'd switch TO: عربي for EN readers, EN for AR readers). Borderless so it
 * doesn't compete with the "Book a demo" pill beside it. */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--brand-navy);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-standard);
}
.lang-toggle .msr { font-size: 20px; }
.lang-toggle:hover { color: var(--accent); }
/* In the mobile menu it becomes a full-width row matching the nav links,
 * separated from them by a hairline divider. */
.lang-toggle--block {
  width: 100%;
  height: auto;
  justify-content: flex-start;
  padding: 14px 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--brand-navy);
}
.burger .msr { font-size: 28px; }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border-subtle);
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
  background: var(--white);
}
.mobile-menu.open { display: flex; }
.mobile-menu a:not(.btn) { padding: 12px 8px; color: var(--text-primary); font-weight: var(--fw-semibold); }
.mobile-menu .btn { margin-top: 8px; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
section[id], footer[id] { scroll-margin-top: 80px; }

.eyebrow {
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: var(--ls-tight);
  color: var(--brand-navy);
  margin: 0;
  text-wrap: balance;
}
.section-head p { font-size: 18px; line-height: 1.55; color: var(--text-secondary); margin: 16px 0 0; max-width: 640px; text-wrap: balance; }
.section-head { max-width: 820px; margin-bottom: 56px; }
.section-head--center { text-align: center; margin-left: auto; margin-right: auto; margin-bottom: 56px; }
.section-head--center p { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero { background: var(--white); border-bottom: 1px solid var(--border-subtle); overflow: hidden; }
/* Vertical only: the padding shorthand would wipe out .wrap's horizontal
 * padding (same specificity, later rule wins) and unalign the hero. */
.hero-inner { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px 0 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-navy-050);
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  margin-bottom: 24px;
}
.hero-badge .msr { font-size: 16px; color: var(--accent); }
/* Gear glyph (from assets/gear.svg), inlined and painted in the coral accent
 * via currentColor so it matches the brand and adapts to both themes. */
.hero-badge-icon { flex: none; width: 16px; height: 16px; color: var(--accent); }
.hero h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: var(--ls-tight);
  margin: 0 0 22px;
  color: var(--brand-navy);
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 32px;
  max-width: 520px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { display: flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--text-muted); font-size: 14px; }
.hero-note .msr { font-size: 18px; color: var(--success); }

/* Hero visual: a wall of screens across locations, all playing the same
 * rotation in sync (the player renders media edge to edge, no chrome).
 * One dominant screen, two smaller ones staggered beneath it. */
.hero-visual { position: relative; }
.hero-wall {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 18px;
  align-items: start;
}
.wall-screen { margin: 0; min-width: 0; }
.wall-a { grid-column: 1 / -1; }
.wall-b .screen, .wall-c .screen { border-width: 5px; border-radius: 8px; }
.wall-screen figcaption {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wall-dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--status-online); flex: none; }
/* TV anatomy: the bezel is a thick near-black border (absolute children sit
 * inside it), the panel behind the media is true black, corners near-square.
 * Shadow is a tight contact shadow, a mounted display, not a floating card. */
.screen {
  position: relative;
  border: 7px solid var(--black);
  border-radius: 10px;
  background: #000;
  box-shadow: 0 1px 2px rgba(0, 28, 42, 0.15), 0 10px 18px -14px rgba(0, 28, 42, 0.4);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
/* cover, not contain: the panel is a hair wider than 16:9 (borders eat into
 * the box), and side letterbox bars read worse than a ~2% edge trim */
.screen > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.screen > img:first-child { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .screen > img { animation: flow-rotate 9s infinite; }
  .screen > img:nth-child(1) { animation-delay: 0s; }
  .screen > img:nth-child(2) { animation-delay: 3s; }
  .screen > img:nth-child(3) { animation-delay: 6s; }
}

/* ---------- How it works ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.step-card { background: var(--white); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 32px 28px; }
.step-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-navy-050);
  color: var(--brand-navy);
}
.step-icon .msr { font-size: 26px; }
.step-num { font-family: var(--font-mono); font-size: 34px; font-weight: var(--fw-medium); color: var(--neutral-200); }
.step-card h3 { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 21px; letter-spacing: -0.01em; color: var(--brand-navy); margin: 0 0 10px; }
.step-card p { font-size: 15px; line-height: 1.55; color: var(--text-secondary); margin: 0; }

/* Publish-flow diagram: dashboard → cloud → screens (real product imagery) */
/* Spans the full wrap width so the dashboard's left edge and the screens
 * column's right edge align with the step cards above; the connector
 * tracks flex to absorb the slack. Desktop-only: hidden at ≤900px. */
.flow {
  display: grid;
  grid-template-columns: auto minmax(36px, 1fr) auto minmax(44px, 1fr) auto;
  align-items: center;
  margin: 72px 0 0;
}
.flow-col { position: relative; display: flex; flex-direction: column; align-items: center; }
.flow-caption {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
}
.flow-caption small { display: block; font-size: 12px; font-weight: var(--fw-regular); color: var(--text-muted); margin-top: 1px; }

.flow-dash {
  width: 360px;
  background: var(--white);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.flow-dash-chrome { display: flex; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); }
.flow-dash-chrome span { width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--neutral-300); }
.flow-dash img { display: block; width: 100%; height: auto; }

.flow-cloud {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--brand-navy);
  color: #fff;
}
.flow-cloud .msr { font-size: 32px; }

.flow-link, .flow-fan { width: 100%; display: block; }
.flow-link { height: 12px; }
/* Exact pixel height (3 × 92px rows + 2 × 18px gaps) so the three path
 * endpoints land on the row centers. The svg's intrinsic aspect ratio
 * would otherwise inflate the grid row. */
.flow-fan { height: 312px; }
.flow-link line, .flow-fan path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 6 7;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.5;
}
@media (prefers-reduced-motion: no-preference) {
  .flow-link line, .flow-fan path { animation: flow-dash 1.1s linear infinite; }
}
@keyframes flow-dash { to { stroke-dashoffset: -13; } }

/* Rows are a grid with a fixed mini slot so the meta column aligns across
 * rows. The parent .flow-col would otherwise center each row and stagger
 * them when the meta text widths differ. */
.flow-screens { display: flex; flex-direction: column; gap: 18px; align-items: stretch; }
.flow-screen { display: grid; grid-template-columns: 146px 1fr; gap: 14px; align-items: center; height: 92px; }
.flow-mini {
  position: relative;
  flex: none;
  background: #000;
  border: 4px solid var(--black);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 28, 42, 0.15), 0 6px 12px -10px rgba(0, 28, 42, 0.4);
  overflow: hidden;
}
/* Each mini stacks the profile's three slides; a shared keyframe cycles
 * them with staggered delays, so all screens flip together, mirroring the
 * player's synced rotation. Reduced motion: only the first slide shows. */
.flow-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.flow-mini img:first-child { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .flow-mini img { animation: flow-rotate 9s infinite; }
  .flow-mini img:nth-child(1) { animation-delay: 0s; }
  .flow-mini img:nth-child(2) { animation-delay: 3s; }
  .flow-mini img:nth-child(3) { animation-delay: 6s; }
}
/* The player's transition (TRANSITION_FADE_MS = 500): fade to black over
 * 500ms, swap at full black, fade the next slide in over 500ms, never a
 * crossfade. 500ms = 5.56% of the 9s cycle; the fade-out lands exactly on
 * the slot boundary (33.33%) where the next slide's fade-in begins, and
 * the black comes from the panel behind the media. */
@keyframes flow-rotate {
  0% { opacity: 0; }
  5.56%, 27.78% { opacity: 1; }
  33.33%, 100% { opacity: 0; }
}
/* Near-16:9 so a 1920×1080 slide covers with only a sliver trimmed */
.flow-mini--wide { width: 146px; height: 83px; }
.flow-screen-meta .name { font-size: 13px; font-weight: var(--fw-semibold); color: var(--text-primary); white-space: nowrap; }
.flow-screen-meta .dims { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); white-space: nowrap; margin-top: 2px; }
.flow-screen-meta .state { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 11px; font-weight: var(--fw-semibold); color: var(--success); }
.flow-screen-meta .state::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--success); }


/* ---------- Features ---------- */
.features { background: var(--white); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature-card { background: var(--surface-page); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 28px; }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--brand-coral-050);
  color: var(--accent);
  margin-bottom: 20px;
}
.feature-icon .msr { font-size: 25px; }
.feature-card h3 { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 19px; letter-spacing: -0.01em; color: var(--brand-navy); margin: 0 0 8px; }
.feature-card p { font-size: 15px; line-height: 1.55; color: var(--text-secondary); margin: 0; }

/* ---------- Surfaces ---------- */
.surface-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.surface-card { background: var(--white); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); overflow: hidden; display: flex; flex-direction: column; }
.surface-hero { height: 172px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.surface-hero--tv { background: var(--brand-navy); color: #fff; }
.surface-hero--web { background: var(--brand-navy-050); color: var(--brand-navy); }
.surface-hero--mobile { background: var(--brand-coral-050); color: var(--accent); }
/* Mini devices: each hero shows its surface as a real device running real
 * content, the same slides / profile / app the rest of the page shows.
 * The TV reuses the hero wall's .screen bezel grammar; the browser and the
 * phone are tall, so they peek up from the card's bottom edge instead. */
.mini-tv { width: 200px; border-width: 5px; border-radius: 8px; }
.surface-hero--web, .surface-hero--mobile { align-items: flex-end; }
.mini-browser { width: 232px; margin-bottom: -14px; background: var(--white); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-lg); overflow: hidden; direction: ltr; }
.mini-browser-bar { display: flex; gap: 4px; padding: 7px 9px; border-bottom: 1px solid var(--border-subtle); }
.mini-browser-bar span { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.mini-browser-view { height: 136px; overflow: hidden; }
.mini-browser-view img { display: block; width: 175%; }
.mini-phones { display: flex; align-items: flex-end; direction: ltr; }
.mini-phone { position: relative; z-index: 1; width: 126px; height: 156px; margin-bottom: -12px; border: 5px solid var(--black); border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--black); box-shadow: 0 1px 2px rgba(0, 28, 42, 0.15), 0 10px 18px -14px rgba(0, 28, 42, 0.4); overflow: hidden; }
.mini-phone img { display: block; width: 100%; margin-top: -9%; border-radius: 15px 15px 0 0; }
.mini-phone--back { z-index: 0; width: 104px; height: 128px; margin-right: -30px; }
.surface-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.surface-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; }
.surface-title h3 { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 20px; letter-spacing: -0.01em; color: var(--brand-navy); margin: 0; }
.surface-tag { font-family: var(--font-mono); font-size: 11px; white-space: nowrap; color: var(--text-muted); border: 1px solid var(--border-subtle); border-radius: var(--radius-xs); padding: 2px 6px; }
.surface-body p { font-size: 15px; line-height: 1.55; color: var(--text-secondary); margin: 0; }
a.surface-card { color: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
a.surface-card:hover { color: inherit; border-color: var(--border-strong); box-shadow: var(--shadow-md); }
a.surface-card:focus-visible { outline: 2px solid var(--brand-navy); outline-offset: 3px; }
.surface-link { display: inline-flex; align-items: center; align-self: flex-start; gap: 6px; margin-top: auto; padding-top: 16px; font-weight: var(--fw-semibold); font-size: 14px; color: var(--brand-navy); }
.surface-link .msr { font-size: 18px; transition: transform 0.15s ease; }
a.surface-card:hover .surface-link .msr { transform: translateX(3px); }
/* The mobile card offers two equal destinations, so instead of one whole-card
 * anchor it gets a pair of outlined store pills (DS .btn--outlined grammar)
 * carrying the platform glyph. */
.store-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 18px; }
.store-btn { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 0; min-width: max-content; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--border-default); border-radius: var(--radius-pill); font-weight: var(--fw-semibold); font-size: 14px; color: var(--brand-navy); transition: background 0.15s ease, border-color 0.15s ease; }
.store-btn:hover { background: rgba(0, 0, 0, 0.04); border-color: var(--border-strong); color: var(--brand-navy); }
.store-btn:active { background: rgba(0, 0, 0, 0.08); }
.store-btn-icon { flex: none; width: 18px; height: 18px; }

/* ---------- Use cases ---------- */
.usecases { background: var(--white); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.cases-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.case-tabs { display: flex; flex-direction: column; gap: 8px; }
.case-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-standard);
  font-family: var(--font-ui);
}
.case-tab .msr { font-size: 24px; color: var(--neutral-400); }
.case-tab .chev { font-size: 20px; }
.case-tab-text { flex: 1; }
.case-tab-text .title { display: block; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 17px; color: var(--brand-navy); }
.case-tab-text .tagline { display: block; font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.case-tab:hover { background: rgba(0, 0, 0, 0.04); }
.case-tab.active { background: var(--white); border-color: var(--border-default); box-shadow: var(--shadow-sm); }
.case-tab.active .msr { color: var(--accent); }

.case-detail { background: var(--surface-page); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); padding: clamp(28px, 4vw, 44px); }
.case-panel { display: none; }
.case-panel.active { display: block; }
.case-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--brand-navy);
  color: #fff;
  margin-bottom: 22px;
}
.case-panel-icon .msr { font-size: 30px; }
.case-panel h3 { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 26px; letter-spacing: -0.01em; color: var(--brand-navy); margin: 0 0 8px; }
.case-panel > p { font-size: 16px; line-height: 1.55; color: var(--text-secondary); margin: 0 0 24px; }
.case-points { display: flex; flex-direction: column; gap: 14px; }
.case-point { display: flex; align-items: flex-start; gap: 12px; }
.case-point .msr { font-size: 20px; color: var(--success); margin-top: 1px; }
.case-point span:last-child { font-size: 15px; line-height: 1.5; color: var(--text-primary); }

/* ---------- FAQ ---------- */
.faq .wrap { max-width: 820px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--white); overflow: hidden; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-ui);
}
.faq-q span:first-child { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 17px; color: var(--brand-navy); }
.faq-q .msr { font-size: 24px; color: var(--text-muted); flex: none; transition: transform var(--dur-base) var(--ease-emphasized); }
.faq-item.open .faq-q .msr { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 22px 22px; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.faq-item.open .faq-a { display: block; }

/* ---------- Demo band ---------- */
.demo-band { background: var(--brand-navy); padding: clamp(64px, 9vw, 110px) 0; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.demo-copy h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.06;
  letter-spacing: var(--ls-tight);
  color: #fff;
  margin: 0 0 18px;
}
.demo-copy > p { font-size: 18px; line-height: 1.55; color: var(--brand-navy-100); margin: 0 0 28px; max-width: 440px; }
.demo-points { display: flex; flex-direction: column; gap: 14px; }
.demo-point { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 15px; }
.demo-point .msr { font-size: 20px; color: var(--brand-coral-300); }

.demo-card { background: var(--white); border-radius: var(--radius-xl); padding: clamp(26px, 3vw, 36px); box-shadow: var(--shadow-xl); }
.demo-card h3 { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 22px; color: var(--brand-navy); margin: 0 0 4px; }
.demo-card .form-sub { font-size: 14px; color: var(--text-secondary); margin: 0 0 22px; }
.demo-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field span { font-size: 12px; font-weight: var(--fw-semibold); color: var(--text-secondary); }
.field input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default);
  background: var(--white);
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--brand-coral-100); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--danger-bg); }
/* .field .field-error so it outranks the `.field span` label rule */
.field .field-error { font-size: 12px; color: var(--danger); font-weight: var(--fw-medium); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-fine { font-size: 12px; color: var(--text-muted); margin: 0; text-align: center; }

.demo-success { display: none; text-align: center; padding: 28px 8px; }
.demo-card.submitted .demo-success { display: block; }
.demo-card.submitted .demo-form-wrap { display: none; }
.demo-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
  margin-bottom: 18px;
}
.demo-success-icon .msr { font-size: 36px; }
.demo-success h3 { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 24px; color: var(--brand-navy); margin: 0 0 8px; }
.demo-success p { font-size: 15px; line-height: 1.55; color: var(--text-secondary); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-navy-900); }
/* Vertical only: see .hero-inner note; the shorthand was wiping out .wrap's
 * horizontal padding, pushing footer content 48px left of every section. */
.footer-inner { padding-top: 64px; padding-bottom: 40px; }
.footer-grid { display: grid; grid-template-columns: auto auto auto auto; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo img { height: auto; width: 30px; }
.footer-brand .logo-word .board { color: #fff; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: var(--brand-navy-100); margin: 0 0 22px; max-width: 280px; }
.footer-nesco { display: flex; align-items: baseline; gap: 10px; }
.footer-nesco span { font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.footer-nesco img { height: 30px; width: auto; display: block; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-col h4 {
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  /* match the 26px logo row height so the heading row and the first
   * link row line up with the brand block */
  line-height: 26px;
  margin: 0 0 16px;
}
.footer-col nav { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14px; color: var(--brand-navy-100); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom .copyright { font-size: 13px; color: rgba(255, 255, 255, 0.45); }
.footer-legal { display: flex; gap: 22px; }
.footer-legal a { font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.footer-legal a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .burger { display: inline-flex; }
  .hero-inner { padding-top: 40px; padding-bottom: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { order: 2; }
  .cases-grid { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  /* The step cards carry "how it works" on small screens */
  .flow { display: none; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

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

/* ---------- Arabic / RTL ----------
 * Layout largely mirrors for free: flex rows and space-between headers
 * reverse under dir="rtl", and the body font (IBM Plex Arabic) already
 * carries Arabic. These rules fix the things that don't auto-mirror. */

/* All Arabic text uses IBM Plex Sans Arabic, headings included. The Latin
 * display face (Google Sans Flex) has no Arabic glyphs, so overriding the
 * font tokens on the RTL root cascades the Arabic face to every element,
 * including display headings, labels, and the mono captions. */
html[dir="rtl"] {
  --font-display: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-ui: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-mono: 'IBM Plex Sans Arabic', ui-monospace, monospace;
}

/* Uppercasing and letter-spacing are Latin typographic devices; they break
 * Arabic's cursive joining, so neutralize them for RTL. */
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .footer-col h4 { letter-spacing: normal; text-transform: none; }
html[dir="rtl"] h1,
html[dir="rtl"] .section-head h2,
html[dir="rtl"] .demo-copy h2 { letter-spacing: normal; }

/* The "Live Board" wordmark is a Latin brand mark; it must look identical in
 * every language, so keep it in the brand display face rather than letting the
 * RTL token override drag it into the Arabic body font. */
html[dir="rtl"] .logo-word { font-family: 'Google Sans Flex', 'Google Sans', sans-serif; }

/* Mirror the one asymmetric pill padding (icon sits at the start). */
html[dir="rtl"] .hero-badge { padding-right: 8px; padding-left: 14px; }

/* Directional glyphs point the other way in RTL. */
html[dir="rtl"] .btn--outlined .msr,
html[dir="rtl"] .surface-link .msr,
html[dir="rtl"] .case-tab .chev { transform: scaleX(-1); }
/* translate composes inside the flipped space, so +3px moves visually left */
html[dir="rtl"] a.surface-card:hover .surface-link .msr { transform: scaleX(-1) translateX(3px); }

/* The flow diagram is a fixed illustration whose SVG connectors assume a
 * left-to-right dashboard → cloud → screens order (and its dashboard image
 * is an LTR UI). Keep its internal layout LTR; the Arabic captions inside
 * are centered, so reading direction still holds. */
html[dir="rtl"] .flow { direction: ltr; }

/* ---------- Dark theme fixups ----------
 * Most of the theme comes from token overrides in tokens/colors.css. These
 * rules handle the cases that reference literal light values or that use
 * --brand-navy as a *background* (where the token flip would break them). */
@media (prefers-color-scheme: dark) {
  /* Sticky header uses a literal white glass fill in the light theme;
   * here it takes the recessed "sunken" tone (as a translucent glass) so it
   * matches the plain content sections and bands. */
  .site-header { background: rgba(16, 28, 38, 0.85); }

  /* Plain content sections sat on the near-black page ground, which read too
   * dark next to the raised panels. Lift them to the same recessed tone as
   * the demo band so all the "dark" surfaces share one color.
   * (.features/.usecases keep their raised --white surface. .faq stays on
   * the page ground: it sits directly above the sunken demo band, and its
   * cards carry the section.) */
  .section:not(.features):not(.usecases):not(.faq) { background: var(--surface-sunken); }

  /* --brand-navy is flipped to a light ink for text, so the surfaces that
   * used it as a *background* need re-doing. In dark mode a saturated navy
   * slab reads as an out-of-place teal block (nothing light to contrast
   * against), so the full-width bands become subtly top-lit dark panels
   * defined by hairline rules, and the brand typography carries them. */
  .demo-band {
    background: var(--surface-sunken);
    border-top: 1px solid var(--border-subtle);
  }
  /* The "TV player" tile should read like a powered-off screen */
  .surface-hero--tv { background: var(--brand-navy-900); }
  /* Deep navy icon tile: white icon, but far less teal than #003B57 */
  .case-panel-icon { background: #12303F; }

  /* Hover overlays are dark-on-light in the base theme */
  .btn--outlined:hover { background: rgba(255, 255, 255, 0.06); }
  .btn--outlined:active { background: rgba(255, 255, 255, 0.10); }
  .store-btn:hover { background: rgba(255, 255, 255, 0.06); }
  .store-btn:active { background: rgba(255, 255, 255, 0.10); }
  .case-tab:hover { background: rgba(255, 255, 255, 0.05); }

  /* Big ghosted step number reads too bright on a dark card */
  .step-num { color: rgba(255, 255, 255, 0.12); }

  /* Bezels melt into the near-black ground: lift them a step */
  .screen, .flow-mini { border-color: #26313B; }
  .mini-phone { border-color: #26313B; }

  /* Inset cards on raised sections used the page ground (--surface-page),
   * which reads as black holes; recess them only one step instead, to the
   * same sunken tone the neighboring sections sit on. The FAQ cards get the
   * same tone from the other direction: their raised --white surface popped
   * too bright against the page ground the FAQ section sits on. */
  .feature-card, .case-detail, .faq-item { background: var(--surface-sunken); }
  /* Match the case-panel-icon fixup: saturated navy reads teal on dark */
  .flow-cloud { background: #12303F; }

  /* Shadows barely register on dark, so elevated cards get a hairline edge */
  .demo-card { border: 1px solid var(--border-subtle); }

  /* Footer used pure navy-900, which clashes in hue with the slate band
   * above it. Drop it onto the page ground so the bottom of the page steps
   * down cleanly (card -> sunken band -> ground), with a hairline seam. */
  .site-footer {
    background: var(--surface-page);
    border-top: 1px solid var(--border-subtle);
  }
}
