/* =============================================================
   Elevano.rs — Landing Page Stylesheet
   Mobile-first, CSS variables, clean and easy to modify.
   ============================================================= */

/* ===================== CSS Variables ===================== */
/* Brand color sampled from elevano_logo-QbbgAW8Y.png — exact pixel value #00A7AE */
:root {
  --color-primary: #111827;
  --color-accent: #00A7AE;       /* Elevano teal — exact brand color */
  --color-accent-dark: #008E94;  /* Teal darkened ~15% for hover states */
  --color-bg: #ffffff;
  --color-bg-soft: #f4fafa;      /* Near-white with a barely-there teal tint */
  --color-bg-dark: #111827;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-border: #e0e8e9;       /* Neutral-cool border with a hint of teal */
  --color-success: #16a34a;
  --color-error: #dc2626;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,167,174,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,167,174,0.10), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 32px rgba(0,167,174,0.12), 0 4px 8px rgba(0,0,0,0.05);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-width: 1200px;
  --section-gap: 80px;
  --container-px: 20px;
  --transition: 0.22s ease;
  --header-height: 65px; /* .header-inner (64px) + .site-header border-bottom (1px) */
}

/* ===================== Reset & Base ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* Skip to main content for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus {
  top: 8px;
}

/* ===================== Reduced Motion ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .desk-layer--tube,
  .desk-layer--moving {
    transform: none !important;
  }
  #deskHeightBar {
    transform: scaleY(1) !important;
  }
}

/* ===================== Typography ===================== */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-primary);
}

h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.25rem); font-weight: 600; }

p { line-height: 1.7; }

strong { font-weight: 700; }

/* ===================== Container ===================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.075rem;
  border-radius: var(--radius-md);
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ===================== Section Shared Styles ===================== */
.section-title {
  text-align: center;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}
.section-cta-wrap {
  text-align: center;
  margin-top: 48px;
}

/* ===================== Header / Nav ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--color-primary);
}

/* Logo image — proportional, never distorted */
.site-logo-img {
  display: block;
  height: 34px;
  width: auto;
  max-height: 34px;
  object-fit: contain;
}

.nav-list {
  display: none;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-accent);
  background: var(--color-bg-soft);
}
.nav-cta-link {
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
}
.nav-cta-link:hover,
.nav-cta-link:focus-visible {
  background: var(--color-accent-dark);
  color: #fff;
}

/* Hamburger toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav open state */
.site-header.nav-open .nav-list {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 16px var(--container-px) 24px;
  gap: 4px;
  box-shadow: var(--shadow-md);
}
.site-header.nav-open .nav-link {
  display: block;
  padding: 12px 16px;
}

@media (min-width: 768px) {
  .nav-list {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* ===================== Hero Section (pinned scroll animation) ===================== */
/*
 * Both mobile (≤768px) and desktop (≥860px) use the same pinned-scroll architecture:
 *   outer section = min-height 100vh + Xpx   →  creates X px animation zone
 *   .hero-sticky-inner = position:sticky at header bottom  →  stays pinned while desk lowers
 *   JS progress = (scrollY - sectionTop) / animZone  →  0=raised, 1=seated
 *
 * Desktop: X = 700 px (viewport-independent speed across all desktop sizes)
 * Mobile:  X = 650 px (same principle, tuned for touch scroll distance on phones)
 *
 * The animation zone cancels perfectly: animZone = (100vh + X) − viewportH = X always,
 * so the desk animation speed is consistent regardless of phone screen size.
 */
.hero-scroll-section {
  position: relative;
  background: linear-gradient(150deg, #eef9f9 0%, #e6f5f5 55%, #f0fafa 100%);
}

@media (min-width: 860px) {
  .hero-scroll-section {
    min-height: calc(100vh + 700px);
  }
}

/* Mobile: flex column so hero-content and hero-visual stack vertically */
.hero-sticky-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100svh - var(--header-height, 64px));
  padding: 56px var(--container-px) 40px;
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 32px;
}

/*
 * Desktop: switch to sticky grid.
 * top: var(--header-height) keeps the panel below the sticky nav from scrollY=0.
 * overflow: visible is required — overflow:hidden would clip the desk shadow.
 */
@media (min-width: 860px) {
  .hero-sticky-inner {
    position: sticky;
    top: var(--header-height, 64px);
    height: calc(100vh - var(--header-height, 64px));
    min-height: unset;
    padding: 0 var(--container-px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    overflow: visible;
  }
}

@media (min-width: 1100px) {
  .hero-sticky-inner {
    grid-template-columns: 540px 1fr;
    gap: 80px;
  }
}

.hero-content {
  text-align: center;
}

@media (min-width: 860px) {
  .hero-content {
    display: block; /* reset display:contents that mobile applies */
    text-align: left;
  }
}

.hero-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-muted);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 460px;
}

@media (max-width: 860px) {
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

@media (min-width: 860px) {
  .hero-cta-group {
    justify-content: flex-start;
  }
}

/* Secondary outline button — used in hero */
.btn-outline {
  background: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}


/* ── Hero Visual: right column with desk ── */
.hero-visual {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  /* No explicit order — DOM order determines layout: content first, visual second */
}

@media (min-width: 860px) {
  .hero-visual {
    /* fills grid cell; height driven by .desk-visual-wrapper → .desk-anim-canvas aspect-ratio */
    align-self: center;
  }
}

/* Below desktop breakpoint: no animation headspace needed → use native 16:10 image ratio */
@media (max-width: 860px) {
  .hero-visual {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }
  .desk-anim-canvas {
    aspect-ratio: 16 / 10;
    min-height: 200px;
  }
}

/*
 * Mobile phones (≤768px):
 * Reorder so the desk appears immediately below the headline.
 * display:contents on .hero-content dissolves its box — its children (h1, subtitle,
 * cta-group, trust-list) become direct flex items of .hero-sticky-inner, enabling
 * the order properties below. Desktop resets .hero-content to display:block.
 *
 * Visual order: headline → desk (with indicator) → subtitle → CTAs → trust
 */
@media (max-width: 768px) {
  /* 650 px extra height → 650 px animation zone (mirrors desktop logic with 700 px) */
  .hero-scroll-section {
    min-height: calc(100vh + 650px);
  }

  /* Sticky on mobile mirrors desktop: inner panel pins below the header for the
     full animation zone, then releases so the next section scrolls normally.
     min-height (set in the base rule) keeps it viewport-tall while pinned. */
  .hero-sticky-inner {
    position: sticky;
    top: var(--header-height, 65px);
    text-align: center;
    padding: 36px var(--container-px) 32px;
    gap: 16px;
  }

  /* Dissolve hero-content box; children participate directly in sticky-inner flex */
  .hero-content {
    display: contents;
  }

  /* 1 — Headline */
  .hero-title {
    order: 1;
    width: 100%;
    margin-bottom: 0; /* gap handles spacing */
  }

  /* 2 — Desk animation with indicator on the left */
  .hero-visual {
    order: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0px;
    flex: 0 0 auto;
    min-height: 180px;
    padding-top: 20px;
  }

  /* Height indicator: smaller and more subtle on mobile — desk stays the visual focus */
  .desk-height-indicator {
    display: flex;
    width: 28px;
    flex-shrink: 0;
    gap: 5px;
    opacity: 0.72;
  }
  .height-bar {
    height: 80px;
    width: 4px;
  }
  .height-label {
    font-size: 0.66rem;
    min-width: 3ch;
  }

  /* 3 — Supporting text */
  .hero-subtitle {
    order: 3;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    text-align: center;
  }

  /* 4 — CTA buttons */
  .hero-cta-group {
    order: 4;
    justify-content: center;
    margin-bottom: 0;
  }

  /* 5 — Scroll hint: in-flow on mobile (overrides base display:none);
     desktop keeps it position:absolute via the min-width:860px rule */
  .hero-scroll-hint {
    display: flex;
    order: 5;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.8;
    transition: opacity 0.5s ease;
    pointer-events: none;
  }

}

/* ── Desk Visual Wrapper: outer shell; shadow renders here (below canvas clip boundary) ── */
.desk-visual-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
  /*
   * Do NOT set aspect-ratio here — the wrapper has no in-flow children on its own
   * (shadow is position:absolute, canvas was previously position:absolute too).
   * A flex item with only out-of-flow children collapses to 0 height in most browsers
   * even with aspect-ratio set — the in-flow .desk-anim-canvas below provides height.
   */
  overflow: visible; /* allow shadow img to show at the bottom if it bleeds below canvas */
  z-index: 0;        /* creates stacking context so shadow(z=1) and canvas(z=2) are scoped */
}

/* ── Desk Animation Canvas: IN-FLOW block that gives the wrapper its height ── */
.desk-anim-canvas {
  /*
   * position:relative (in-flow) so the wrapper gets height from aspect-ratio here.
   * 5:4 gives ~10.9% letterbox above/below the 16:10 PNG, enough headspace for the
   * 120 canvas-px lift.  overflow:hidden clips the tubes that scale above the canvas top.
   */
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  contain: paint; /* compositing boundary keeps will-change layers from leaking */
  z-index: 2;     /* stacks above the shadow img (z-index: 1) in the wrapper context */
}

/* All layers share the same 1600×1000 canvas rendered inside a uniform element box */
.desk-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
}

/*
 * z-order:
 *   .desk-layer--shadow (z=1) lives in .desk-visual-wrapper — below the canvas (z=2).
 *   Remaining layers live inside .desk-anim-canvas (its own stacking context):
 *     tubes sit behind fixed casings so casings mask the tube bottom.
 */
.desk-layer--shadow { z-index: 1; } /* sibling of canvas in wrapper */
.desk-layer--tube   { z-index: 2; will-change: transform; }
.desk-layer--fixed  { z-index: 3; }
.desk-layer--moving { z-index: 4; will-change: transform; }

/*
 * Transform origins for middle tubes — x=50% because scaleY ignores the x-axis.
 * y is computed for a 5:4 container (height = 0.8W) with the 1600×1000 image
 * rendered width-constrained (W wide, 0.625W tall) with 0.0875W letterbox top/bottom.
 *
 * formula: y% = (0.0875 + canvas_y/1600) / 0.8 × 100%
 *
 * Left  tube bottom: canvas y=359 → (0.0875 + 359/1600) / 0.8 = 38.98% ≈ 39%
 */
#deskTubeL { transform-origin: 50% 39%; }
/* Right tube bottom: canvas y=345 → (0.0875 + 345/1600) / 0.8 = 37.89% ≈ 37.9% */
#deskTubeR { transform-origin: 50% 37.9%; }

/* Height indicator bar */
.desk-height-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
  width: 52px; /* fixed — prevents canvas width changing when label text changes */
}

.height-bar {
  width: 6px;
  height: 120px;
  background: var(--color-border);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.height-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%; /* always 100% of bar — JS drives scaleY instead of height */
  transform: scaleY(1);
  transform-origin: bottom center;
  background: var(--color-accent);
  border-radius: 3px;
  will-change: transform; /* promote GPU layer immediately — avoids first-frame composite glitch */
}

.height-label {
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
  min-width: 4.5ch;    /* prevents width change when digit count changes, e.g. 100→99 */
  text-align: center;
  display: inline-block;
}

/* ── Scroll hint (fades once animation starts; absolute on desktop, in-flow on mobile) ── */
.hero-scroll-hint {
  display: none;
}

@media (min-width: 860px) {
  .hero-scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--color-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
  }
}

.hero-scroll-hint-arrow {
  color: var(--color-accent);
  animation: heroScrollBounce 1.8s ease-in-out infinite;
}

@keyframes heroScrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* =====================================================================
   Section Panel System
   =====================================================================
   Apply .section-panel + one variant to any <section> to get:
   · Full-height visual block (min-height: 90svh, flex-centered)
   · Distinct background treatment per variant
   · Smooth scroll-reveal animations via IntersectionObserver (main.js)
   ===================================================================== */

.section-panel {
  position: relative;
  min-height: 90svh;
  display: flex;
  align-items: center;
  padding: clamp(80px, 10vw, 120px) 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  .section-panel {
    min-height: auto;
    padding: 72px 0;
    /* clip background orbs without creating a scroll BFC that could
       interfere with nested overflow-x: auto card rows */
    overflow-x: clip;
    overflow-y: visible;
  }
}

/* White with a subtle teal radial glow in the top-right corner */
.section-panel--white {
  background:
    radial-gradient(ellipse at 88% 8%, rgba(0,167,174,0.07) 0%, transparent 52%),
    #ffffff;
}

/* Brand soft teal (#f4fafa) */
.section-panel--soft {
  background: var(--color-bg-soft);
}

/* Diagonal teal gradient — same tones as the hero */
.section-panel--gradient {
  background: linear-gradient(150deg, #eef9f9 0%, #e6f5f5 60%, #f0fafa 100%);
}

/* White + dual radial teal accents for a premium feel */
.section-panel--accent-tint {
  background:
    radial-gradient(ellipse at 8% 80%, rgba(0,167,174,0.09) 0%, transparent 50%),
    radial-gradient(ellipse at 92% 12%, rgba(0,167,174,0.06) 0%, transparent 50%),
    #ffffff;
}

/* Dark navy */
.section-panel--dark {
  background: var(--color-primary);
  color: #fff;
}

/* Cool neutral gray */
.section-panel--neutral {
  background: #f4f4f5;
}

/* Very light off-white */
.section-panel--muted {
  background: #fafafa;
}

/* =====================================================================
   Scroll Reveal Animations
   =====================================================================
   · [data-reveal]          — element fades + slides up on enter
   · [data-reveal="slide-left"]  — slides in from the left
   · [data-reveal="slide-right"] — slides in from the right
   · [data-reveal="fade"]        — opacity only, no transform
   · [data-stagger]         — children stagger-reveal on parent enter
   Triggered by IntersectionObserver in main.js (adds .is-visible).
   ===================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal="slide-left"]  { transform: translateX(-52px); }
[data-reveal="slide-right"] { transform: translateX(52px); }
[data-reveal="fade"]        { transform: none; }

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-stagger].is-visible > * { opacity: 1; transform: none; }

[data-stagger].is-visible > *:nth-child(1)  { transition-delay: 0.04s; }
[data-stagger].is-visible > *:nth-child(2)  { transition-delay: 0.10s; }
[data-stagger].is-visible > *:nth-child(3)  { transition-delay: 0.16s; }
[data-stagger].is-visible > *:nth-child(4)  { transition-delay: 0.22s; }
[data-stagger].is-visible > *:nth-child(5)  { transition-delay: 0.28s; }
[data-stagger].is-visible > *:nth-child(6)  { transition-delay: 0.34s; }
[data-stagger].is-visible > *:nth-child(7)  { transition-delay: 0.40s; }
[data-stagger].is-visible > *:nth-child(8)  { transition-delay: 0.46s; }
[data-stagger].is-visible > *:nth-child(9)  { transition-delay: 0.52s; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* =====================================================================
   Motion Scene System — premium per-section animations
   =====================================================================
   Trigger: IntersectionObserver adds .is-visible to .motion-section.
   All initial states live here; .is-visible releases them.
   Parallax orbs + 3D tilt driven by main.js.
   ===================================================================== */

/* ── Shared easing tokens ── */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:   cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Base states ── */
.motion-section .motion-heading {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s var(--ease-out-expo),
              transform 0.75s var(--ease-out-expo);
}
.motion-section.is-visible .motion-heading {
  opacity: 1;
  transform: none;
}

.motion-section .motion-text {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-smooth),
              transform 0.7s var(--ease-smooth);
  transition-delay: 0.14s;
}
.motion-section.is-visible .motion-text {
  opacity: 1;
  transform: none;
}

/* Generic reveal layer — bridge text, subheadings, etc. */
.motion-section .motion-layer {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-smooth),
              transform 0.65s var(--ease-smooth);
  transition-delay: 0.32s;
}
.motion-section.is-visible .motion-layer {
  opacity: 1;
  transform: none;
}

/* CTA always appears last in the scene */
.motion-section .motion-cta {
  opacity: 0;
  transform: translateY(18px) scale(0.94);
  transition: opacity 0.6s var(--ease-spring),
              transform 0.6s var(--ease-spring);
  transition-delay: 0.54s;
}
.motion-section.is-visible .motion-cta {
  opacity: 1;
  transform: none;
}

/* ── Stagger grid system ── */
/* Add .motion-stagger to any list/grid parent; children stagger in */
.motion-section .motion-stagger > * {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.55s var(--ease-smooth),
              transform 0.55s var(--ease-smooth);
}

.motion-section.is-visible .motion-stagger > * {
  opacity: 1;
  transform: none;
}

.motion-section.is-visible .motion-stagger > *:nth-child(1)  { transition-delay: 0.04s; }
.motion-section.is-visible .motion-stagger > *:nth-child(2)  { transition-delay: 0.12s; }
.motion-section.is-visible .motion-stagger > *:nth-child(3)  { transition-delay: 0.20s; }
.motion-section.is-visible .motion-stagger > *:nth-child(4)  { transition-delay: 0.28s; }
.motion-section.is-visible .motion-stagger > *:nth-child(5)  { transition-delay: 0.36s; }
.motion-section.is-visible .motion-stagger > *:nth-child(6)  { transition-delay: 0.44s; }
.motion-section.is-visible .motion-stagger > *:nth-child(7)  { transition-delay: 0.52s; }
.motion-section.is-visible .motion-stagger > *:nth-child(8)  { transition-delay: 0.60s; }
.motion-section.is-visible .motion-stagger > *:nth-child(9)  { transition-delay: 0.68s; }

/* Ensure container content stacks above absolutely-positioned orbs */
.motion-section > .container {
  position: relative;
  z-index: 1;
}

/* ── Background orbs ── */
.motion-bg-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 1.4s var(--ease-smooth),
              transform 1.4s var(--ease-smooth);
  z-index: 0;
}

.motion-section.is-visible .motion-bg-orb {
  opacity: 1;
  transform: scale(1);
}

.motion-bg-orb--a {
  width: clamp(280px, 45vw, 520px);
  height: clamp(280px, 45vw, 520px);
  background: radial-gradient(circle, rgba(0,167,174,0.14) 0%, transparent 68%);
  top: -10%;
  right: -8%;
  filter: blur(48px);
  transition-delay: 0s;
}

.motion-bg-orb--b {
  width: clamp(200px, 30vw, 360px);
  height: clamp(200px, 30vw, 360px);
  background: radial-gradient(circle, rgba(0,167,174,0.10) 0%, transparent 70%);
  bottom: 4%;
  left: -6%;
  filter: blur(56px);
  transition-delay: 0.2s;
}

/* Dark section orbs use a lighter teal */
.motion-bg-orb--dark {
  background: radial-gradient(circle, rgba(0,167,174,0.22) 0%, transparent 65%);
  filter: blur(64px);
}

/* ── Media reveal: semantic hook; section-specific CSS applies state ── */
.motion-media { will-change: transform; }

/* ── ──────────────────────────────────────────────────────────────────
   SECTION 1 — Problem  (data-motion="problem")
   Cards drift in with alternating tilt → settle flat.
   ─────────────────────────────────────────────────────────────────── */

[data-motion="problem"] .motion-stagger > *:nth-child(odd) {
  transform: translateY(44px) rotate(-2deg);
}
[data-motion="problem"] .motion-stagger > *:nth-child(even) {
  transform: translateY(44px) rotate(2deg);
}
[data-motion="problem"].is-visible .motion-stagger > * {
  transform: none;
}

/* Delay CTA later so cards finish first */
[data-motion="problem"] .motion-cta {
  transition-delay: 0.72s;
}

/* ── ──────────────────────────────────────────────────────────────────
   SECTION 2 — Electric  (data-motion="electric")
   Image slides from left; pulse ring + bounce arrows activate on entry.
   ─────────────────────────────────────────────────────────────────── */

[data-motion="electric"] .electric-image-wrap {
  position: relative; /* needed for absolute children */
}

[data-motion="electric"] .motion-media {
  opacity: 0;
  transform: translateX(-52px);
  transition: opacity 0.85s var(--ease-out-expo),
              transform 0.85s var(--ease-out-expo);
}
[data-motion="electric"].is-visible .motion-media {
  opacity: 1;
  transform: none;
}

/* Delayed stagger for the copy column text items */
[data-motion="electric"] .motion-heading { transition-delay: 0.18s; }
[data-motion="electric"] .motion-text    { transition-delay: 0.30s; }

/* CTA inside the copy column */
[data-motion="electric"] .motion-cta {
  transition-delay: 0.64s;
  text-align: left;
}

/* Pulsing ring around the button image */
.electric-pulse-ring {
  position: absolute;
  inset: -10px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(0,167,174,0.5);
  opacity: 0;
  pointer-events: none;
}

.motion-section.is-visible .electric-pulse-ring {
  animation: electricPulse 2.8s ease-out 0.9s infinite;
}

@keyframes electricPulse {
  0%   { opacity: 0.85; transform: scale(1); }
  100% { opacity: 0;    transform: scale(1.14); }
}

/* Up/down directional arrows beside the image */
.electric-arrows {
  position: absolute;
  right: -32px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.5s ease 1.0s;
}

.motion-section.is-visible .electric-arrows {
  opacity: 1;
}

.electric-arrow {
  display: block;
  font-size: 14px;
  color: var(--color-accent);
  line-height: 1;
}

.electric-arrow--up {
  animation: arrowUp 1.6s ease-in-out 1.1s infinite;
}
.electric-arrow--up:nth-child(2) {
  animation-delay: 1.3s;
  opacity: 0.6;
}
.electric-arrow--down {
  animation: arrowDown 1.6s ease-in-out 1.5s infinite;
  opacity: 0.5;
}

@keyframes arrowUp {
  0%, 100% { transform: translateY(0);   opacity: 0.5; }
  50%       { transform: translateY(-5px); opacity: 1; }
}
@keyframes arrowDown {
  0%, 100% { transform: translateY(0);  opacity: 0.4; }
  50%       { transform: translateY(4px); opacity: 0.9; }
}

@media (max-width: 899px) {
  .electric-arrows { display: none; }
}

/* CTA for benefits appears after all 9 cards finish staggering */
[data-motion="benefits"] .motion-cta { transition-delay: 0.82s; }

/* ── ──────────────────────────────────────────────────────────────────
   SECTION 3 — Benefits  (data-motion="benefits")
   Cards enter with perspective flip from below; hover triggers 3D tilt.
   ─────────────────────────────────────────────────────────────────── */

[data-motion="benefits"] .benefits-grid {
  perspective: 1000px;
}

[data-motion="benefits"] .motion-stagger > * {
  transform: translateY(52px) rotateX(14deg);
  transform-origin: bottom center;
  transform-style: preserve-3d;
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.6s var(--ease-out-expo),
              box-shadow 0.3s ease;
}

[data-motion="benefits"].is-visible .motion-stagger > * {
  transform: none;
  transform-origin: center center;
}

/* 3D hover tilt — applied via JS on mousemove */
.motion-card--tilt {
  transition: transform 0.12s linear, box-shadow 0.3s ease !important;
  will-change: transform;
}

.motion-card--tilt:hover {
  box-shadow: var(--shadow-lg);
}

/* ── ──────────────────────────────────────────────────────────────────
   SECTION 4 — Custom Teaser  (data-motion="custom")
   Product image uncovers right via clip-path wipe.
   Options list items cascade in left.
   ─────────────────────────────────────────────────────────────────── */

/* Wrapper clips the image; clip-path on wrapper drives the wipe reveal */
[data-motion="custom"] .motion-media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); /* shadow lives on wrapper since overflow:hidden hides it on the img */
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.05s cubic-bezier(0.77, 0, 0.175, 1) 0.18s;
}

[data-motion="custom"].is-visible .motion-media {
  clip-path: inset(0 0% 0 0);
}

/* Image zooms from 1.04 → 1 as the wipe opens */
[data-motion="custom"] .motion-media img {
  transform: scale(1.06);
  transition: transform 1.1s var(--ease-out-expo) 0.18s;
  box-shadow: none; /* shadow moved to wrapper */
}

[data-motion="custom"].is-visible .motion-media img {
  transform: scale(1);
}

/* Options list items slide in from the left */
[data-motion="custom"] .motion-stagger > * {
  transform: translateX(-28px);
}

[data-motion="custom"].is-visible .motion-stagger > * {
  transform: none;
}

[data-motion="custom"] .motion-heading { transition-delay: 0s; }
[data-motion="custom"] .motion-text    { transition-delay: 0.12s; }
[data-motion="custom"] .motion-cta {
  transition-delay: 0.72s;
  text-align: left;
}

/* ── ──────────────────────────────────────────────────────────────────
   SECTION 5 — Use Cases  (data-motion="usecases")
   Odd cards from left, even cards from right; parallax teal orb.
   ─────────────────────────────────────────────────────────────────── */

[data-motion="usecases"] .motion-stagger > *:nth-child(odd) {
  transform: translateX(-48px) translateY(24px);
}
[data-motion="usecases"] .motion-stagger > *:nth-child(even) {
  transform: translateX(48px) translateY(24px);
}
[data-motion="usecases"].is-visible .motion-stagger > * {
  transform: none;
}

/* Slightly longer delay so heading + subtitle read first */
[data-motion="usecases"] .motion-cta { transition-delay: 0.80s; }

/* Card hover glow on dark bg */
[data-motion="usecases"] .use-case-card:hover {
  box-shadow: 0 0 0 1px rgba(0,167,174,0.35),
              0 8px 28px rgba(0,167,174,0.18);
  transform: translateY(-3px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* ── ──────────────────────────────────────────────────────────────────
   SECTION 6 — Reviews  (data-motion="reviews")
   Marquee entry fade-in; stars spring-bounce after marquee appears.
   ─────────────────────────────────────────────────────────────────── */

/* Marquee wrapper fade-in on section entry */
[data-motion="reviews"] .reviews-marquee {
  opacity: 0;
  transition: opacity 0.85s var(--ease-smooth) 0.2s;
}

[data-motion="reviews"].is-visible .reviews-marquee {
  opacity: 1;
}

/* Stars spring in after the marquee fades in */
[data-motion="reviews"] .review-stars {
  opacity: 0;
  transform: scale(0.7) translateY(-6px);
  transition: opacity 0.45s var(--ease-spring) 0.9s,
              transform 0.45s var(--ease-spring) 0.9s;
}

[data-motion="reviews"].is-visible .review-stars {
  opacity: 1;
  transform: none;
}

/* Hover lift on desktop — works alongside the marquee pause */
@media (min-width: 769px) {
  .review-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
}

[data-motion="reviews"] .motion-cta { transition-delay: 0.70s; }

/* ── ──────────────────────────────────────────────────────────────────
   SECTION 7 — FAQ  (data-motion="faq")
   Staggered item reveal; minimal animation to keep usability first.
   ─────────────────────────────────────────────────────────────────── */

[data-motion="faq"] .motion-stagger > * {
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease-smooth),
              transform 0.5s var(--ease-smooth);
}

[data-motion="faq"].is-visible .motion-stagger > * {
  transform: none;
}

[data-motion="faq"] .motion-cta { transition-delay: 0.62s; }

/* ── ──────────────────────────────────────────────────────────────────
   Reduced Motion — flatten everything above
   ─────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .motion-section .motion-heading,
  .motion-section .motion-text,
  .motion-section .motion-layer,
  .motion-section .motion-cta,
  .motion-section .motion-stagger > *,
  .motion-section .motion-bg-orb,
  .motion-section .motion-media,
  [data-motion="electric"] .motion-media,
  [data-motion="custom"] .motion-media img,
  [data-motion="reviews"] .review-stars {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
    animation: none !important;
  }
  .electric-pulse-ring,
  .electric-arrow { animation: none !important; }
}

/* ── Mobile — lighter values ── */
@media (max-width: 768px) {
  [data-motion="problem"]  .motion-stagger > *:nth-child(odd),
  [data-motion="problem"]  .motion-stagger > *:nth-child(even) {
    transform: translateY(32px) rotate(0deg);
  }
  [data-motion="usecases"] .motion-stagger > *:nth-child(odd),
  [data-motion="usecases"] .motion-stagger > *:nth-child(even) {
    transform: translateY(32px);
  }
  [data-motion="benefits"] .motion-stagger > * {
    transform: translateY(36px);
  }
  [data-motion="custom"] .motion-stagger > * {
    transform: translateY(24px);
  }
  [data-motion="electric"] .motion-media {
    transform: translateY(32px);
  }
  .motion-bg-orb--a,
  .motion-bg-orb--b {
    filter: blur(40px);
  }
}

/* CTA row used in sections that need an additional call-to-action below their content */
.section-cta-wrap {
  text-align: center;
  margin-top: 48px;
}

/* Left-align the CTA inside the electric copy column */
.electric-copy .section-cta-wrap {
  text-align: left;
  margin-top: 32px;
}

/* ===================== Problem Section ===================== */
.problem-section {}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.problem-card {
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.problem-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}

.problem-card-title {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.problem-card-text {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.problem-solution-bridge {
  text-align: center;
  font-size: 1.1rem;
  color: var(--color-text);
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .problem-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* (Desk scroll animation is inside .hero-scroll-section above, not a separate section) */

/* ===================== Electric Control Section ===================== */
.electric-section {}

.electric-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
}

.electric-image-wrap {
  width: 100%;
  max-width: 520px;
}

.electric-image {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.electric-copy {
  width: 100%;
}

/* Left-align heading and subtitle inside the two-column copy block */
.electric-copy .section-title {
  text-align: left;
}

.electric-copy .section-subtitle {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.electric-points {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.electric-point {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 10px 16px;
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-accent);
}

.electric-point-check {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .electric-inner {
    flex-direction: row;
    justify-content: space-between;
    gap: 64px;
  }
  .electric-image-wrap {
    flex: 0 0 auto;
    width: 46%;
    max-width: 480px;
  }
  .electric-copy {
    flex: 1;
  }
}

/* ===================== Benefits Section ===================== */
.benefits-section {}

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

.benefit-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.benefit-icon {
  color: var(--color-accent);
  margin-bottom: 16px;
  display: block;
  width: 40px;
  height: 40px;
}

.benefit-card-title {
  margin-bottom: 8px;
}

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

@media (min-width: 600px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===================== Custom Teaser Section ===================== */
.custom-teaser-section {}

.custom-teaser-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
}

.custom-teaser-copy {
  max-width: 560px;
}

.custom-teaser-copy .section-title,
.custom-teaser-copy .section-subtitle {
  text-align: left;
}

.custom-options-list {
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom-option-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  padding: 12px 16px;
  background: var(--color-bg-soft);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-accent);
}

.custom-option-label {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.9rem;
  min-width: 90px;
}

.custom-option-values {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.custom-teaser-image {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  background: var(--color-border);
  min-height: 200px;
}

@media (min-width: 900px) {
  .custom-teaser-inner {
    flex-direction: row;
    justify-content: space-between;
    gap: 64px;
  }
  .custom-teaser-copy {
    flex: 0 0 auto;
    max-width: 480px;
  }
  .custom-teaser-image {
    flex: 1;
    max-width: 520px;
  }
}

/* ===================== Use Cases Section ===================== */
.use-cases-section {}

.use-cases-section .section-title {
  color: #fff;
}

.use-cases-section .section-subtitle {
  color: rgba(255,255,255,0.7);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.use-case-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: background var(--transition);
}

.use-case-card:hover {
  background: rgba(255,255,255,0.10);
}

.use-case-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.use-case-title {
  color: #fff;
  margin-bottom: 8px;
}

.use-case-text {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

.use-cases-section .section-cta-wrap .btn-primary {
  background: var(--color-accent);
  color: #fff;
}

@media (min-width: 600px) {
  .use-cases-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===================== Reviews Section — Marquee ===================== */
.reviews-section {}

/* ── Marquee wrapper ── */
.reviews-marquee {
  overflow: hidden;
  width: 100%;
  margin-top: 48px;
  /* Cursor hint that the loop can be paused */
  cursor: default;
}

/* ── Scrolling track ── */
.reviews-track {
  display: flex;
  gap: 24px;
  width: max-content;
}

/* Desktop: trigger the infinite loop once the section is visible */
@media (min-width: 769px) {
  .motion-section.is-visible .reviews-track {
    animation: reviewsMarquee 44s linear 0.9s infinite;
  }
  .reviews-marquee:hover .reviews-track {
    animation-play-state: paused;
  }
}

@keyframes reviewsMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Cloned cards needed for desktop loop — invisible on mobile */
.review-card--clone { user-select: none; }

/* ── Card base ── */
.review-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* Fixed width so the marquee math (translateX -50%) is deterministic */
  flex: 0 0 340px;
  width: 340px;
}

.review-stars {
  color: var(--color-accent);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
}

.review-text {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.65;
  font-style: italic;
  flex: 1;
}

.review-author {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.review-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary);
}

.review-role {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Mobile: switch marquee to a manual swipe strip */
@media (max-width: 768px) {
  .reviews-marquee {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    cursor: default;
  }
  .reviews-marquee::-webkit-scrollbar { display: none; }

  .reviews-track {
    gap: 14px;
    padding-bottom: 4px;
  }

  .review-card {
    flex: 0 0 82vw;
    width: auto;
    max-width: 320px;
    scroll-snap-align: start;
  }

  /* Hide marquee duplicates — only originals needed for swipe */
  .review-card--clone { display: none; }
}

/* Reduced motion: disable loop, fall back to swipe on all viewports */
@media (prefers-reduced-motion: reduce) {
  .reviews-marquee {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .reviews-marquee::-webkit-scrollbar { display: none; }
  .reviews-track {
    animation: none !important;
  }
  .review-card {
    flex: 0 0 82vw;
    max-width: 340px;
    scroll-snap-align: start;
  }
  .review-card--clone { display: none !important; }
}

/* =====================================================================
   Mobile Horizontal Scroll — Card Sections

   Pattern: negative margins break the grid OUT of .container's 20px
   padding so the track spans the full viewport width (0 → 100vw).
   padding-left restores the visual indent for the first card.
   padding-bottom must cover both the entry-animation translateY(32px)
   offset AND card shadow bleed, so overflow-y:auto (coerced by
   overflow-x:auto) does not clip cards during the transition.
   Card widths in vw units are viewport-relative, not container-relative.
   ===================================================================== */

/* Shared scrollbar hide */
@media (max-width: 768px) {
  .problem-grid,
  .benefits-grid,
  .use-cases-grid {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .problem-grid::-webkit-scrollbar,
  .benefits-grid::-webkit-scrollbar,
  .use-cases-grid::-webkit-scrollbar { display: none; }
}

/* ── Problem Section — 4 cards ── */
@media (max-width: 768px) {
  .problem-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    /* Escape container padding → grid fills viewport edge to edge */
    margin-left: calc(-1 * var(--container-px));
    margin-right: calc(-1 * var(--container-px));
    /* Indent first card to match content column; bottom covers translateY(32px) + shadow */
    padding: 8px var(--container-px) 44px;
    scroll-padding-left: var(--container-px);
    grid-template-columns: unset;
  }
  .problem-grid > * {
    flex: 0 0 78vw;
    min-width: 0;
    scroll-snap-align: start;
  }
}
@media (min-width: 600px) and (max-width: 768px) {
  .problem-grid { display: flex; }
}

/* ── Benefits Section — 9 cards ── */
@media (max-width: 768px) {
  .benefits-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    margin-left: calc(-1 * var(--container-px));
    margin-right: calc(-1 * var(--container-px));
    padding: 8px var(--container-px) 44px;
    scroll-padding-left: var(--container-px);
    grid-template-columns: unset;
  }
  .benefits-grid > * {
    flex: 0 0 82vw;
    min-width: 0;
    scroll-snap-align: start;
  }
}
@media (min-width: 600px) and (max-width: 768px) {
  .benefits-grid { display: flex; }
}

/* Remove perspective on mobile — avoid 3D artefacts in scroll container */
@media (max-width: 768px) {
  [data-motion="benefits"] .benefits-grid { perspective: none; }
}

/* ── Use Cases Section — 8 cards ── */
@media (max-width: 768px) {
  .use-cases-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    margin-left: calc(-1 * var(--container-px));
    margin-right: calc(-1 * var(--container-px));
    padding: 8px var(--container-px) 44px;
    scroll-padding-left: var(--container-px);
    grid-template-columns: unset;
  }
  .use-cases-grid > * {
    flex: 0 0 80vw;
    min-width: 0;
    scroll-snap-align: start;
  }
}
@media (min-width: 600px) and (max-width: 768px) {
  .use-cases-grid { display: flex; }
}

/* ===================== FAQ Section ===================== */
.faq-section {}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.faq-question {
  font-weight: 600;
  font-size: 1rem;
}

.faq-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  text-align: left;
  background: none;
  cursor: pointer;
  transition: background var(--transition);
}

.faq-toggle:hover {
  background: rgba(0,0,0,0.03);
}

.faq-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.faq-toggle-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
  content: '';
  position: absolute;
  background: var(--color-muted);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.faq-toggle-icon::before {
  width: 8px;
  height: 2px;
}

.faq-toggle-icon::after {
  width: 2px;
  height: 8px;
}

.faq-toggle[aria-expanded="true"] .faq-toggle-icon {
  border-color: var(--color-accent);
  transform: rotate(45deg);
}
.faq-toggle[aria-expanded="true"] .faq-toggle-icon::before,
.faq-toggle[aria-expanded="true"] .faq-toggle-icon::after {
  background: var(--color-accent);
}

.faq-answer {
  padding: 0 20px 20px;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-answer[hidden] {
  display: none;
}

/* ===================== Configurator Section ===================== */
.configurator-section {
  padding: var(--section-gap) 0 80px;
  background: var(--color-bg-soft);
}

.configurator-header {
  margin-bottom: 48px;
}

.configurator-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

@media (min-width: 960px) {
  .configurator-inner {
    grid-template-columns: 340px 1fr;
    gap: 40px;
  }
}

.desk-configurator {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

/* Config group */
.config-group {
  margin-bottom: 28px;
  border: none;
  padding: 0;
}

.config-group-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 12px;
}

/* Option buttons */
.config-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.config-option-btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  background: var(--color-bg-soft);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.config-option-btn:hover {
  border-color: var(--color-accent);
  background: rgba(0, 167, 174, 0.06);
}

.config-option-btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.config-option-btn.selected,
.config-option-btn[aria-pressed="true"] {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,167,174,0.3);
}

/* Color option buttons */
.config-color-options .config-option-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
  display: inline-block;
}

/* Quantity input */
.quantity-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-text);
  background: var(--color-bg-soft);
  transition: background var(--transition);
}

.qty-btn:hover {
  background: var(--color-border);
}

.qty-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.qty-input {
  width: 60px;
  height: 44px;
  text-align: center;
  border: none;
  border-left: 2px solid var(--color-border);
  border-right: 2px solid var(--color-border);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  font-family: inherit;
  background: var(--color-bg);
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.qty-input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

/* Live Summary */
.config-summary {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
  border-left: 4px solid var(--color-accent);
}

.config-summary-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.config-summary-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.config-summary-list li {
  display: flex;
  gap: 8px;
  font-size: 0.95rem;
}

.summary-label {
  font-weight: 600;
  color: var(--color-text);
  min-width: 100px;
}

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

.summary-value.filled {
  color: var(--color-primary);
  font-weight: 500;
}

.config-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 28px 0;
}

/* Contact form */
.contact-group h3 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.form-field {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--color-primary);
}

.required-mark {
  color: var(--color-error);
  margin-left: 2px;
}

.optional-mark {
  color: var(--color-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0,167,174,0.15);
}

.form-input:invalid:not(:placeholder-shown),
.form-textarea:invalid:not(:placeholder-shown) {
  border-color: var(--color-error);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Error message */
.form-error-message {
  padding: 12px 16px;
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: var(--radius-sm);
  color: var(--color-error);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.form-error-message[hidden] {
  display: none;
}

/* Submit button */
.btn-submit {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 16px;
  padding: 16px 32px;
  font-size: 1.05rem;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-privacy-note {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: center;
  line-height: 1.5;
}

/* Success state */
.form-success {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 60px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  text-align: center;
}

.form-success[hidden] {
  display: none;
}

.form-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.form-success-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.form-success-text {
  color: var(--color-muted);
  max-width: 420px;
  margin: 0 auto;
}

/* Tablet: slightly more comfortable form padding */
@media (max-width: 480px) {
  .desk-configurator {
    padding: 28px 18px;
  }
}

/* ===================== Configurator — Preview Panel ===================== */
.configurator-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 960px) {
  .configurator-preview-panel {
    position: sticky;
    top: 84px;
  }
}

.configurator-preview-img-wrap {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.configurator-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.18s ease;
}

.configurator-price-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 20px 20px 22px;
  box-shadow: var(--shadow-sm);
}

.configurator-price-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-primary);
  margin-bottom: 14px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-breakdown {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  font-size: 0.82rem;
}

.price-row-label {
  color: var(--color-muted);
  flex: 1;
  line-height: 1.3;
}

.price-row-value {
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.price-row-surcharge .price-row-value {
  color: var(--color-accent);
}

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

.price-total-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted);
}

.price-total-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.5px;
}

/* ===================== Configurator — Card Grid ===================== */
.config-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.config-card-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 480px) {
  .config-card-grid--3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================== Configurator — Option Cards ===================== */
.config-option-card {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 8px 10px;
  cursor: pointer;
  background: var(--color-bg-soft);
  transition: border-color var(--transition), background var(--transition),
              box-shadow var(--transition), transform var(--transition);
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

.config-option-card:hover {
  border-color: var(--color-accent);
  background: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.config-option-card:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.config-option-card.is-selected {
  border-color: var(--color-accent);
  background: var(--color-bg);
  box-shadow: 0 0 0 3px rgba(0,167,174,0.18), var(--shadow-sm);
  transform: translateY(-1px);
}

.config-option-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 6px);
  display: block;
  margin-bottom: 8px;
}

.config-option-card--dim .config-option-card-img {
  aspect-ratio: 4 / 3;
}

.config-option-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.config-option-card-price {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-accent);
  display: block;
}

.config-option-card-price--included {
  color: var(--color-muted);
  font-weight: 500;
}

/* Summary price value accent */
.summary-price-value {
  color: var(--color-accent) !important;
  font-weight: 700 !important;
}

/* ===================== Footer ===================== */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.8);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
}

.footer-logo .logo-text {
  color: #fff;
}

.footer-tagline {
  margin-top: 4px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
}

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.footer-nav-link {
  padding: 6px 12px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.footer-nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.footer-legal {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* ===================== Mobile Sticky CTA ===================== */
.mobile-sticky-cta {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.mobile-sticky-cta.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Only show on mobile, hide when near the configurator */
.mobile-sticky-cta.hidden-near-form {
  opacity: 0;
  pointer-events: none;
}

.mobile-sticky-btn {
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

@media (min-width: 768px) {
  .mobile-sticky-cta {
    display: none;
  }
}

/* ===================== Utility ===================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
