/* ═══════════════════════════════════════════════════════════
   PAGE STACK — Reverse Pyramid Navigation System
   ═══════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: only light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  scroll-behavior: smooth;
}

@media (hover: none) and (pointer: coarse) {
  html, body {
    position: fixed;
    inset: 0;
  }
}

body {
  font-family: 'Plus Jakarta Sans', Arial, Helvetica, sans-serif;
  background: #030712;
  color: #f8fafc;
  line-height: 1.5;
}

/* ─── Navbar ─────────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  padding-right: max(clamp(16px, 2.5vw, 32px), env(safe-area-inset-right, 0px));
  padding-bottom: 14px;
  padding-left: max(clamp(16px, 2.5vw, 32px), env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.6s ease;
}

.navbar.light-mode {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.logo {
  justify-self: start;
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.2rem, 1.1rem + 0.2vw, 1.4rem);
  letter-spacing: -0.02em;
  transition: color 0.6s ease;
}

.navbar.light-mode .logo { color: #0f172a; }

.nav-links {
  list-style: none;
  display: flex;
  gap: clamp(12px, 1.5vw, 24px);
  justify-self: center;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 1.05rem;
  transition: color 0.3s ease, opacity 0.2s ease;
  cursor: pointer;
}

.nav-links a:hover { opacity: 0.6; }
.nav-links a.active { color: #fff; opacity: 1; }

.navbar:not(.light-mode) .logo,
.navbar:not(.light-mode) .nav-links a {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 2px 14px rgba(0, 0, 0, 0.35);
}

.navbar.light-mode .nav-links a { color: rgba(15, 23, 42, 0.6); }
.navbar.light-mode .nav-links a.active { color: #0f172a; }

/* ─── Page Indicator Dots ─────────────────────────────────── */

.page-dots {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.page-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  cursor: pointer;
  transition: all 0.4s ease;
  padding: 0;
}

.page-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.3);
}

.page-dot.light {
  border-color: rgba(15, 23, 42, 0.25);
}

.page-dot.light.active {
  background: #0f172a;
  border-color: #0f172a;
}

/* ─── Page Stack Container ────────────────────────────────── */

.page-stack {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  /* perspective here rasterized scaled pages and softened full-bleed bitmaps */
}

/* ─── Individual Page ─────────────────────────────────────── */

.page {
  position: absolute;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: none;
  transition:
    transform 0.85s cubic-bezier(0.4, 0, 0.15, 1),
    opacity 0.85s cubic-bezier(0.4, 0, 0.15, 1),
    border-radius 0.85s cubic-bezier(0.4, 0, 0.15, 1),
    box-shadow 0.85s cubic-bezier(0.4, 0, 0.15, 1);
  transform-origin: center top;
}

.page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    80px
    max(clamp(20px, 4vw, 48px), env(safe-area-inset-right, 0px))
    40px
    max(clamp(20px, 4vw, 48px), env(safe-area-inset-left, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

/* Proposta + Exemplos: ilha centrada na página (como secção Exemplos) */
.page[data-index="1"] .page-inner,
.page[data-index="2"] .page-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: max(clamp(72px, 10vh, 88px), env(safe-area-inset-top, 0px) + 52px);
  padding-bottom: max(clamp(40px, 8vh, 72px), env(safe-area-inset-bottom, 0px) + 28px);
}

.page[data-index="1"] .problem-content,
.page[data-index="2"] .problem-content {
  flex-shrink: 0;
  margin-block: auto;
}

.page-label {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* ─── Page Position States (Reverse Pyramid) ──────────────── */

.page.pos-0 {
  transform: translateY(0) scale(1);
  opacity: 1;
  z-index: 10;
  border-radius: 0;
  box-shadow: none;
  pointer-events: auto;
}

.page.pos-0 .page-label { opacity: 0; }

.page.pos-1 {
  transform: translateY(70%) scale(0.76);
  opacity: 0.6;
  z-index: 9;
  border-radius: 24px;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  cursor: pointer;
}

.page.pos-1 .page-label { opacity: 1; }

.page.pos-2 {
  transform: translateY(78%) scale(0.58);
  opacity: 0.35;
  z-index: 8;
  border-radius: 24px;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  cursor: pointer;
}

.page.pos-2 .page-label { opacity: 0.8; }

.page.pos-3 {
  transform: translateY(84%) scale(0.42);
  opacity: 0.18;
  z-index: 7;
  border-radius: 24px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  cursor: pointer;
}

.page.pos-3 .page-label { opacity: 0.6; }

.page.pos-4 {
  transform: translateY(88%) scale(0.3);
  opacity: 0.08;
  z-index: 6;
  border-radius: 24px;
  box-shadow: none;
  pointer-events: auto;
  cursor: pointer;
}

.page.pos-4 .page-label { opacity: 0; }

.page.pos-gone {
  transform: translateY(-110%) scale(0.9);
  opacity: 0;
  z-index: 0;
  border-radius: 0;
  pointer-events: none;
}

.page.pos-hidden {
  transform: translateY(95%) scale(0.2);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.page.pos-1:hover { opacity: 0.75; transform: translateY(68%) scale(0.77); }
.page.pos-2:hover { opacity: 0.45; transform: translateY(76%) scale(0.59); }
.page.pos-3:hover { opacity: 0.25; transform: translateY(82%) scale(0.43); }

/* ─── Page Backgrounds ────────────────────────────────────── */

.page-bg--hero {
  background-color: #0a0a0a;
  overflow: hidden;
  isolation: isolate;
}

/* Real <img> scales more cleanly than background-image under page transforms */
.page-bg-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.page-bg--problem {
  /*
   * Proposta — axis shift: horizontal dusk → day (left carries the hero, right opens
   * toward Exemplos). No radial bouquets, no vertical colour ladder — only a soft
   * diagonal sheen on top for depth.
   */
  background-color: #e8eef6;
  background-image:
    repeating-linear-gradient(
      122deg,
      rgba(255, 255, 255, 0.045) 0 1px,
      transparent 1px 20px
    ),
    linear-gradient(
      90deg,
      #04070f 0%,
      #0c1626 12%,
      #152a42 26%,
      #2f4a66 42%,
      #5c7d9a 58%,
      #9db7cf 74%,
      #d2e2f2 88%,
      #f2f7fd 100%
    );
}

/* Exemplos: light canvas with saturated wheel hues at the edges (readable but still soft) */
.page-bg--examples {
  background-color: #eef2f9;
  background-image:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0) 48%),
    radial-gradient(circle at 10% 18%, rgba(239, 68, 68, 0.24) 0%, rgba(239, 68, 68, 0) 38%),
    radial-gradient(circle at 90% 18%, rgba(245, 158, 11, 0.24) 0%, rgba(245, 158, 11, 0) 38%),
    radial-gradient(circle at 50% 6%, rgba(249, 115, 22, 0.2) 0%, rgba(249, 115, 22, 0) 36%),
    radial-gradient(circle at 96% 62%, rgba(14, 165, 233, 0.22) 0%, rgba(14, 165, 233, 0) 36%),
    radial-gradient(circle at 8% 86%, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0) 36%),
    radial-gradient(circle at 78% 90%, rgba(139, 92, 246, 0.22) 0%, rgba(139, 92, 246, 0) 34%),
    linear-gradient(180deg, #f5f8ff 0%, #e8eef8 55%, #e2e9f4 100%);
}

.page-bg--process {
  /*
   * Exemplos → Contacto (cleaner take): no long grey ramp, no diagonal / bottom ellipse.
   * — Cool indigo column only (reads “same family” as Contacto’s blue glow).
   * — One soft top veil so the seam from the light page isn’t a hard cut.
   * — Centre radial close to Contacto’s, slightly softer, so the last two slides match.
   * — Cyan grid kept, subtle.
   */
  background-color: #020617;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(
      180deg,
      rgba(248, 250, 252, 0.36) 0%,
      rgba(241, 245, 249, 0.1) 8%,
      transparent 26%
    ),
    radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 58%),
    linear-gradient(180deg, #243a63 0%, #1c2e4f 24%, #0f172a 55%, #070d16 88%, #020617 100%);
  background-size: 40px 40px, 40px 40px, auto, auto, auto;
}

.page-bg--contact {
  background: #020617;
  background-image: radial-gradient(circle at center, rgba(37, 99, 235, 0.12) 0%, transparent 65%);
}

/* ─── Scroll Hint ────────────────────────────────────────── */

.scroll-hint {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom, 0px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  animation: hint-bob 2.5s ease-in-out infinite;
  transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              top 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              bottom 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              right 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.6s ease,
              opacity 0.5s ease;
}

.scroll-hint.light {
  color: rgba(15, 23, 42, 0.7);
}

.scroll-hint.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

.scroll-hint-text {
  transition: opacity 0.4s ease, max-height 0.4s ease;
  overflow: hidden;
}

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

/* ─── Scroll preview: glass outline boxes, page names — idle + expanded same language */

.scroll-preview {
  --strip-bg: linear-gradient(165deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.07) 45%, rgba(2, 6, 23, 0.52) 100%);
  --strip-border: rgba(255, 255, 255, 0.32);
  --strip-text: rgba(255, 255, 255, 0.96);
  --strip-outer: 0 4px 20px rgba(0, 0, 0, 0.42);
  --strip-inset: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  position: relative;
  width: 120px;
  height: 100px;
  clip-path: polygon(2% 0%, 98% 0%, 50% 100%);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    clip-path 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.35s ease,
    opacity 0.4s ease,
    box-shadow 0.35s ease;
  filter: brightness(1);
  border-radius: 0;
  opacity: 0.96;
  background: transparent;
}

.scroll-hint.light .scroll-preview {
  --strip-bg: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.9) 100%);
  --strip-border: rgba(15, 23, 42, 0.12);
  --strip-text: rgba(15, 23, 42, 0.82);
  --strip-outer: 0 4px 20px rgba(15, 23, 42, 0.1);
  --strip-inset: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --accent-glow: rgba(37, 99, 235, 0.2);
}

/* Bottom hint only: one taper for idle + expanded (row bands follow triangle edges) */
.scroll-hint:not(.vertical) .scroll-preview {
  --tri-1: 100%;
  --tri-2: 82%;
  --tri-3: 66%;
  --tri-4: 50%;
  --tri-5: 38%;
  align-items: center;
  box-sizing: border-box;
  /* Funnel fades toward the tip (bottom) — strong falloff, almost gone at the point */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 10%,
    rgba(0, 0, 0, 0.82) 35%,
    rgba(0, 0, 0, 0.45) 58%,
    rgba(0, 0, 0, 0.18) 82%,
    rgba(0, 0, 0, 0.04) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 10%,
    rgba(0, 0, 0, 0.82) 35%,
    rgba(0, 0, 0, 0.45) 58%,
    rgba(0, 0, 0, 0.18) 82%,
    rgba(0, 0, 0, 0.04) 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Top control sits independently near navbar */
.scroll-hint-top:not(.vertical) {
  top: max(92px, env(safe-area-inset-top, 0px) + 72px);
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  animation: none;
}

.scroll-hint-top .scroll-hint-text {
  display: none;
}

.scroll-preview::before {
  display: none;
  content: none;
}

/* Idle: stack of small frosted name pills, widths → triangle */
.scroll-hint:not(.vertical) .scroll-preview:not(:hover):not(.navigating) {
  width: 98px;
  min-height: 110px;
  height: auto;
  clip-path: none;
  filter: none;
  box-shadow: none;
  padding: 2px 0 4px;
  gap: 4px;
  justify-content: flex-start;
  overflow: visible;
}

.scroll-hint:not(.vertical) .scroll-preview:not(:hover):not(.navigating) .scroll-preview-strip {
  flex: 0 0 18px;
  min-height: 18px;
  max-height: 18px;
  align-self: center;
  width: 100%;
  margin: 0 auto;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 7px;
  border: 1px solid var(--strip-border);
  background: var(--strip-bg) !important;
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: var(--strip-outer), var(--strip-inset);
  overflow: hidden;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.2s ease;
}

.scroll-hint:not(.vertical) .scroll-preview:not(:hover):not(.navigating) .scroll-preview-strip.strip-current {
  border-color: rgba(59, 130, 246, 0.75);
  box-shadow: var(--strip-outer), var(--strip-inset), 0 0 0 1px var(--accent-glow), 0 0 18px var(--accent-glow);
}

.scroll-hint:not(.vertical) .scroll-preview:not(:hover):not(.navigating) .scroll-preview-strip::after {
  opacity: 0;
}

/* Face highlight (same idea as expanded) */
.scroll-preview-strip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, transparent 100%);
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.scroll-hint:not(.vertical) .scroll-preview:not(:hover):not(.navigating) .scroll-preview-strip::before {
  border-radius: 6px 6px 0 0;
}

/* Row widths are injected inline from JS (top inverted + bottom normal pyramid) */
.scroll-hint:not(.vertical) .scroll-preview .scroll-preview-strip {
  max-width: none;
}

/* Expanded = same as idle: separate frosted pills, taper, gaps — not a single clipped triangle */
.scroll-hint:not(.vertical) .scroll-preview:hover,
.scroll-hint:not(.vertical) .scroll-preview.navigating {
  width: 200px;
  min-width: 200px;
  min-height: 0;
  height: auto;
  clip-path: none;
  overflow: visible;
  gap: 4px;
  padding: 4px 0 8px;
  justify-content: flex-start;
  align-items: center;
  opacity: 1;
  /* Invisible shell: no ring, no box shadow, no filter — depth stays on .scroll-preview-strip */
  box-shadow: none;
  filter: none;
  background: transparent;
}

/* Vertical / other: don’t lock to old 280×180 triangle */
.scroll-preview:hover,
.scroll-preview.navigating {
  opacity: 1;
}

.scroll-hint:not(.vertical) .scroll-preview:hover .scroll-preview-strip,
.scroll-hint:not(.vertical) .scroll-preview.navigating .scroll-preview-strip {
  flex: 0 0 28px;
  min-height: 28px;
  max-height: 28px;
  align-self: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--strip-border) !important;
  background: var(--strip-bg) !important;
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: var(--strip-outer), var(--strip-inset) !important;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.3s ease, transform 0.2s ease;
}

.scroll-hint:not(.vertical) .scroll-preview:hover .scroll-preview-strip::before,
.scroll-hint:not(.vertical) .scroll-preview.navigating .scroll-preview-strip::before {
  border-radius: 6px 6px 0 0;
  height: 50%;
  opacity: 0.6;
}

.scroll-hint:not(.vertical) .scroll-preview:hover .scroll-preview-strip.strip-visited,
.scroll-hint:not(.vertical) .scroll-preview.navigating .scroll-preview-strip.strip-visited {
  opacity: 0.4;
}

.scroll-hint:not(.vertical) .scroll-preview:hover .scroll-preview-strip.strip-current,
.scroll-hint:not(.vertical) .scroll-preview.navigating .scroll-preview-strip.strip-current {
  border-color: rgba(59, 130, 246, 0.75) !important;
  box-shadow: var(--strip-outer), var(--strip-inset), 0 0 0 1px var(--accent-glow), 0 0 18px var(--accent-glow) !important;
  opacity: 1;
}

.scroll-hint:not(.vertical) .scroll-preview:hover .scroll-preview-strip-label,
.scroll-hint:not(.vertical) .scroll-preview.navigating .scroll-preview-strip-label {
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.scroll-preview-strip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: flex 0.35s ease, opacity 0.35s ease, box-shadow 0.25s ease, border-color 0.3s ease;
  min-height: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--strip-bg) !important;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: var(--strip-outer), var(--strip-inset);
  border-radius: 0;
}

.scroll-preview-strip:last-child {
  border-bottom: none;
  flex: 1.8;
}

/* Pills stack: equal row height (overrides last-child flex: 1.8) */
.scroll-hint:not(.vertical) .scroll-preview:hover .scroll-preview-strip:last-child,
.scroll-hint:not(.vertical) .scroll-preview.navigating .scroll-preview-strip:last-child {
  flex: 0 0 28px;
  min-height: 28px;
  max-height: 28px;
}

.scroll-preview-strip-label {
  position: relative;
  z-index: 2;
  color: var(--strip-text, rgba(255, 255, 255, 0.95));
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.1;
  opacity: 1;
  transition: font-size 0.3s ease, opacity 0.3s ease, color 0.3s ease;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Idle mini-labels: compact, still readable on hero */
.scroll-hint:not(.vertical) .scroll-preview:not(:hover):not(.navigating) .scroll-preview-strip-label {
  font-size: 5.5px;
  letter-spacing: 0.08em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
}

.scroll-preview-strip.strip-visited {
  opacity: 0.42;
}

.scroll-preview-strip.strip-current {
  box-shadow: var(--strip-outer), var(--strip-inset), 0 0 0 1px rgba(59, 130, 246, 0.5), 0 0 20px var(--accent-glow);
  opacity: 0.95;
}

.scroll-preview-strip:hover {
  opacity: 1 !important;
}

/* Don’t grow one row (breaks triangle); nudge instead */
.scroll-hint:not(.vertical) .scroll-preview:hover .scroll-preview-strip:hover,
.scroll-hint:not(.vertical) .scroll-preview.navigating .scroll-preview-strip:hover {
  flex: 0 0 28px;
  transform: scale(1.012);
  z-index: 2;
}

.scroll-preview-strip::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s ease;
  border-radius: inherit;
}

.scroll-preview-strip:hover::after {
  background: rgba(255, 255, 255, 0.08);
}

/* ─── Navigation animation (pre-transition) ──────────────── */

.scroll-preview.navigating .scroll-preview-strip-label {
  font-size: 8.5px;
  letter-spacing: 0.12em;
  opacity: 1;
}

.scroll-preview-strip.strip-target {
  animation: strip-pulse 0.5s ease-out;
  z-index: 2;
}

@keyframes strip-pulse {
  0% {
    box-shadow: inset 0 0 0 0 rgba(59, 130, 246, 0);
    filter: brightness(1);
  }
  40% {
    box-shadow: inset 0 0 0 3px rgba(59, 130, 246, 0.9),
                0 0 20px rgba(59, 130, 246, 0.4);
    filter: brightness(1.4);
  }
  100% {
    box-shadow: inset 0 0 0 3px rgba(59, 130, 246, 0.5),
                0 0 8px rgba(59, 130, 246, 0.2);
    filter: brightness(1.15);
  }
}

.scroll-preview-strip.strip-target .scroll-preview-strip-label {
  font-size: 10px !important;
  opacity: 1 !important;
  font-weight: 800;
}

.scroll-hint.light .scroll-preview-strip {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.scroll-hint.light .scroll-preview-strip-label {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.scroll-hint.light .scroll-preview-strip:hover::after {
  background: rgba(0, 0, 0, 0.05);
}

/* ─── Vertical Control Panel (last page) ──────────────────── */

.scroll-hint.vertical {
  bottom: auto;
  left: auto;
  top: 50%;
  right: 48px;
  transform: translateY(-50%);
  animation: none;
  pointer-events: auto;
  gap: 0;
}

.scroll-hint.vertical .scroll-hint-text {
  opacity: 0;
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

.scroll-hint.vertical .scroll-preview {
  width: 160px;
  height: auto;
  clip-path: none;
  border-radius: 16px;
  filter: brightness(1);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 6px;
  gap: 4px;
}

.scroll-hint.vertical .scroll-preview:hover {
  width: 180px;
  height: auto;
  clip-path: none;
  overflow: visible;
}

.scroll-hint.vertical .scroll-preview-strip {
  flex: none;
  height: 42px;
  width: 100% !important;
  border-radius: 10px;
  border: 1px solid var(--strip-border) !important;
  border-bottom: 1px solid var(--strip-border) !important;
  background: var(--strip-bg) !important;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: var(--strip-inset), 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.scroll-hint.vertical .scroll-preview-strip::before {
  border-radius: 9px 9px 0 0;
  opacity: 0.55;
}

.scroll-hint.vertical .scroll-preview-strip:hover {
  flex: none;
  transform: scale(1.03);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.scroll-hint.vertical .scroll-preview-strip::after {
  border-radius: 10px;
}

.scroll-hint.vertical .scroll-preview-strip-label {
  font-size: 10px;
  opacity: 0.8;
  letter-spacing: 0.08em;
}

.scroll-hint.vertical .scroll-preview:hover .scroll-preview-strip-label {
  font-size: 10px;
  opacity: 1;
}

.scroll-hint.vertical .scroll-preview-strip.strip-visited {
  opacity: 0.45;
}

.scroll-hint.vertical .scroll-preview-strip.strip-visited:hover {
  opacity: 0.85;
}

.scroll-hint.vertical .scroll-preview-strip.strip-current {
  flex: none;
  height: 42px;
  border-color: rgba(59, 130, 246, 0.75) !important;
  box-shadow: var(--strip-outer), var(--strip-inset), 0 0 0 1px var(--accent-glow), 0 0 24px var(--accent-glow);
}

.scroll-hint.vertical .scroll-preview-strip.strip-current .scroll-preview-strip-label {
  font-size: 10px;
  opacity: 1;
  font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════
   CONTENT REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

.hero-text,
.hero-visual,
.problem-content > *,
.process-content > *,
.contact-content > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.page.pos-0 .hero-text,
.page.pos-0 .hero-visual,
.page.pos-0 .problem-content > *,
.page.pos-0 .process-content > *,
.page.pos-0 .contact-content > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 1, 0.3, 1);
}

.page.pos-0 .hero-visual { transition-delay: 0.15s; }

.page.pos-0 .problem-content > *:nth-child(1) { transition-delay: 0.05s; }
.page.pos-0 .problem-content > *:nth-child(2) { transition-delay: 0.12s; }
.page.pos-0 .problem-content > *:nth-child(3) { transition-delay: 0.2s; }
.page.pos-0 .problem-content > *:nth-child(4) { transition-delay: 0.3s; }

.page.pos-0 .process-content > *:nth-child(1) { transition-delay: 0.05s; }
.page.pos-0 .process-content > *:nth-child(2) { transition-delay: 0.2s; }

.page.pos-0 .contact-content > *:nth-child(1) { transition-delay: 0.05s; }
.page.pos-0 .contact-content > *:nth-child(2) { transition-delay: 0.15s; }

/* ═══════════════════════════════════════════════════════════
   PAGE CONTENT STYLES
   ═══════════════════════════════════════════════════════════ */

/* ─── Page 0: Hero ────────────────────────────────────────── */

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  justify-items: start;
  max-width: 1080px;
  width: 100%;
}

/* Width synced to measured title (see script.js --hero-title-w) so subtitle + CTAs align */
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: var(--hero-title-w, min-content);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hero-visual {
  display: none;
}

.hero-title {
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.055em;
  margin-bottom: 1.125rem;
  white-space: nowrap;
  /* Do not put large text-shadow on the whole h1: it composites badly with
     gradient / clipped text and reads as a harsh coloured halo on “SÓ APP.” */
  text-shadow: none;
  color: #fff;
}

.hero-title-lead {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.hero-highlight {
  display: inline;
  color: #dbeafe;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.hero-subtitle {
  color: rgba(226, 232, 240, 0.96);
  font-size: clamp(0.94rem, 1.15vw, 1.08rem);
  line-height: 1.68;
  width: 100%;
  margin-bottom: 1.5rem;
  padding: 0.95rem 1.15rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.hero-subtitle strong {
  color: #fff;
}

.hero-cta-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hero-cta {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 18px;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
  font-family: inherit;
  text-align: center;
}

.hero-cta:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.hero-cta-secondary {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 18px;
  background: rgba(2, 6, 23, 0.35);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  font-size: 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.15s ease;
  font-family: inherit;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

/* ─── Orbit Visual ───────────────────────────────────────── */

.orbit-container {
  /* Keep badges inside the square; % in translateY is relative to the badge box, not the orbit */
  --orbit-r: clamp(100px, 28vw, 142px);
  position: relative;
  width: min(100%, clamp(300px, 34vw, 380px));
  aspect-ratio: 1;
  margin-inline: auto;
}

/* Center hub — same language as the Exemplos wheel-hub (white disc + 2x2 tiles) */
.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 104px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 30px -10px rgba(15, 23, 42, 0.22),
    0 0 0 8px rgba(255, 255, 255, 0.7),
    0 0 0 9px rgba(15, 23, 42, 0.05);
}

.orbit-center-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  width: 32%;
  aspect-ratio: 1;
}

.orbit-center-grid span {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
}

.orbit-center-label {
  font-size: clamp(0.55rem, 1vw, 0.66rem);
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
}

/* Pills — Exemplos palette: colored fill + white border + SVG icon */
.orbit-badge {
  --ob-a: 0deg;
  --c: #64748b;
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 7px 12px 7px 9px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  background:
    radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 70%, white 30%) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 80%, black 20%) 100%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
  filter: saturate(1.05);
  box-shadow:
    0 10px 22px -6px color-mix(in srgb, var(--c) 55%, transparent),
    0 4px 10px rgba(15, 23, 42, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 8px rgba(0, 0, 0, 0.12);
  transform:
    translate(-50%, -50%)
    rotate(var(--ob-a))
    translateY(calc(-1 * var(--orbit-r)))
    rotate(calc(-1 * var(--ob-a)));
}

.orbit-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #ffffff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.orbit-badge-icon svg {
  width: 100%;
  height: 100%;
}

.ob-1 { --ob-a: 0deg;   --c: #f59e0b; } /* Vendas    — amber  (Comercial) */
.ob-2 { --ob-a: 60deg;  --c: #f97316; } /* Stock     — orange (Operações) */
.ob-3 { --ob-a: 120deg; --c: #0ea5e9; } /* Faturas   — sky    (Financeiro)*/
.ob-4 { --ob-a: 180deg; --c: #8b5cf6; } /* Tarefas   — violet (Projetos)  */
.ob-5 { --ob-a: 240deg; --c: #ef4444; } /* Chat      — red    (RH/comms)  */
.ob-6 { --ob-a: 300deg; --c: #10b981; } /* Dados     — green  (Qualidade) */

/* ─── Page 1: Proposta (claro, B2B) ─────────────────────── */

.problem-content {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  padding: 0 4px;
}

.problem-panel {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 28px 56px -24px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.problem-hero {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto;
  padding: 36px 28px 20px;
}

.problem-kicker {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid #e2e8f0;
}

.problem-title {
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.problem-title span {
  color: #1d4ed8;
}

.problem-subline {
  display: block;
  width: 40px;
  height: 2px;
  margin: 0 auto 14px;
  border: none;
  border-radius: 2px;
  background: linear-gradient(90deg, #1d4ed8, #0ea5e9);
  padding: 0;
  opacity: 0.9;
}

.problem-subtitle {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
  font-weight: 400;
}

.problem-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
  padding: 8px 18px 18px;
  border-top: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
}

.problem-card-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 22px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px -16px rgba(15, 23, 42, 0.1);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.2s ease;
}

.problem-card-item:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.06),
    0 18px 40px -20px rgba(15, 23, 42, 0.14);
}

.problem-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.problem-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  border: none;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.25);
}

.problem-card-item h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.problem-card-item > p {
  margin: 0;
  margin-top: 6px;
  padding-left: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.6;
}

.problem-outcome {
  margin: 0;
  padding: 0 18px 18px;
  background: linear-gradient(180deg, #eef2f6 0%, #e8edf2 100%);
  border-top: 1px solid #e2e8f0;
}

.problem-outcome-eyebrow {
  margin: 0;
  padding: 18px 8px 14px;
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  font-weight: 800;
  text-transform: none;
  letter-spacing: -0.02em;
  color: #0f172a;
  text-align: center;
}

.problem-outcome-lead {
  margin: 0 auto 12px;
  max-width: 40rem;
  padding: 0 6px 4px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #64748b;
  text-align: center;
  font-weight: 500;
}

.problem-outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 2px 0 0;
}

.problem-outcome-cell {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 14px 16px;
  min-height: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.problem-outcome-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.problem-outcome-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.problem-outcome-desc {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 400;
  color: #64748b;
  line-height: 1.5;
}

.problem-outcome-check {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.3);
  margin-top: 0.1rem;
}

.problem-outcome-check::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 45%;
  width: 3px;
  height: 6px;
  border: solid #ffffff;
  border-width: 0 1.5px 1.5px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 1;
}

/* ─── Page 2: Exemplos — Wheel layout ─────────────────────── */

.examples-content {
  max-width: 1040px;
}

.examples-panel {
  padding-bottom: 18px;
}

.examples-hero {
  padding-bottom: 12px;
}

/* In Exemplos, anchor the accent bar to the highlighted word "aplicação". */
.examples-hero .problem-subline {
  display: none;
}

.examples-hero .problem-title {
  margin-bottom: 20px;
}

.examples-hero .problem-title span {
  position: relative;
  display: inline-block;
}

.examples-hero .problem-title span::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 40px;
  height: 2px;
  border-radius: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #1d4ed8, #0ea5e9);
}

.wheel-stage {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  padding: 18px clamp(16px, 3vw, 36px) 16px;
  border-top: 1px solid #e8edf5;
  background:
    radial-gradient(ellipse 120% 80% at 88% 20%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 100% 70% at 12% 85%, rgba(14, 165, 233, 0.07) 0%, transparent 48%),
    linear-gradient(180deg, #f8fafc 0%, #f0f3f9 100%);
}

/* ── Info card (left) ─────────────────────────────────────── */

.wheel-info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px 26px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 36px -22px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.wheel-info::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--wheel-accent, #0ea5e9);
  transition: background 0.4s ease;
}

.wheel-info-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
}

.wheel-info-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wheel-accent, #0ea5e9);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04);
  transition: background 0.4s ease;
}

.wheel-info-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.wheel-info-desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #475569;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.wheel-info-tag {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 4px;
  padding: 5px 11px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wheel-accent, #0ea5e9);
  background: var(--wheel-accent-soft, rgba(14, 165, 233, 0.1));
  border: 1px solid var(--wheel-accent-line, rgba(14, 165, 233, 0.32));
  border-radius: 999px;
  transition: color 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

.wheel-info-mobile-hint {
  display: none;
  margin: 8px 0 0;
  font-size: 0.7rem;
  color: #94a3b8;
  font-style: italic;
}

.wheel-stage.is-swapping .wheel-info-title,
.wheel-stage.is-swapping .wheel-info-desc {
  opacity: 0;
  transform: translateY(4px);
}

/* ── Wheel (right) ────────────────────────────────────────── */

.wheel-orbit {
  --orbit-r: clamp(96px, 14vw, 132px);
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  margin: 0 auto;
  isolation: isolate;
}

/* Soft circular "platter" — clean white halo with subtle outer rim */
.wheel-orbit::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 72%);
  z-index: 0;
}

/* Dashed orbit guide circle (the path the pieces sit on) */
.wheel-orbit::after {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1.5px dashed rgba(15, 23, 42, 0.12);
  pointer-events: none;
  z-index: 0;
}

/* Piece — bold colored circle positioned around the center */
.wheel-piece {
  --c: #475569;
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(80px, 29%, 108px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background:
    radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 70%, white 30%) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 80%, black 20%) 100%);
  color: #ffffff;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  z-index: 2;
  transform:
    translate(-50%, -50%)
    rotate(var(--a))
    translateY(calc(-1 * var(--orbit-r)))
    rotate(calc(-1 * var(--a)));
  box-shadow:
    0 10px 22px -6px color-mix(in srgb, var(--c) 55%, transparent),
    0 4px 10px rgba(15, 23, 42, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 8px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s ease,
    filter 0.35s ease,
    background 0.35s ease;
  outline: none;
  filter: saturate(1.05);
}

.wheel-piece-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38%;
  aspect-ratio: 1;
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.wheel-piece-icon svg {
  width: 100%;
  height: 100%;
}

.wheel-piece-label {
  font-size: clamp(0.56rem, 1vw, 0.66rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

/* Idle pieces — slightly muted so the active one pops more */
.wheel-stage .wheel-piece {
  filter: saturate(0.92) brightness(0.96);
  opacity: 0.92;
}

/* Active piece — popped outward, full color, white halo + colored ring */
.wheel-stage[data-active="0"] .wheel-piece[data-i="0"],
.wheel-stage[data-active="1"] .wheel-piece[data-i="1"],
.wheel-stage[data-active="2"] .wheel-piece[data-i="2"],
.wheel-stage[data-active="3"] .wheel-piece[data-i="3"],
.wheel-stage[data-active="4"] .wheel-piece[data-i="4"],
.wheel-stage[data-active="5"] .wheel-piece[data-i="5"] {
  z-index: 3;
  opacity: 1;
  filter: saturate(1.15) brightness(1.04);
  transform:
    translate(-50%, -50%)
    rotate(var(--a))
    translateY(calc(-1 * var(--orbit-r) - 10px))
    rotate(calc(-1 * var(--a)))
    scale(1.09);
  box-shadow:
    0 0 0 5px #ffffff,
    0 0 0 7px color-mix(in srgb, var(--c) 70%, transparent),
    0 18px 32px -8px color-mix(in srgb, var(--c) 55%, transparent),
    0 6px 14px rgba(15, 23, 42, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

@media (hover: hover) {
  .wheel-piece:hover {
    z-index: 3;
    opacity: 1;
    filter: saturate(1.15) brightness(1.04);
    transform:
      translate(-50%, -50%)
      rotate(var(--a))
      translateY(calc(-1 * var(--orbit-r) - 10px))
      rotate(calc(-1 * var(--a)))
      scale(1.09);
  }
}

.wheel-piece:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 4px;
}

/* ── Hub (center) ─────────────────────────────────────────── */

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26%;
  aspect-ratio: 1;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 30px -10px rgba(15, 23, 42, 0.22),
    0 0 0 10px rgba(255, 255, 255, 0.75),
    0 0 0 11px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 2;
  pointer-events: none;
}

.wheel-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  width: 32%;
  aspect-ratio: 1;
}

.wheel-hub-grid span {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
}

.wheel-hub-text {
  font-size: clamp(0.58rem, 1.05vw, 0.68rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.1;
  text-transform: uppercase;
}

/* ── Mobile auto-rotation: subtle ring pulse on the active segment ─ */

.wheel-stage.is-mobile[data-active="0"] .wheel-piece[data-i="0"],
.wheel-stage.is-mobile[data-active="1"] .wheel-piece[data-i="1"],
.wheel-stage.is-mobile[data-active="2"] .wheel-piece[data-i="2"],
.wheel-stage.is-mobile[data-active="3"] .wheel-piece[data-i="3"],
.wheel-stage.is-mobile[data-active="4"] .wheel-piece[data-i="4"],
.wheel-stage.is-mobile[data-active="5"] .wheel-piece[data-i="5"] {
  animation: wheel-piece-breathe 2.6s ease-in-out infinite;
}

@keyframes wheel-piece-breathe {
  0%, 100% {
    box-shadow:
      0 0 0 5px #ffffff,
      0 0 0 7px color-mix(in srgb, var(--c) 70%, transparent),
      0 18px 32px -8px color-mix(in srgb, var(--c) 55%, transparent),
      0 6px 14px rgba(15, 23, 42, 0.14),
      inset 0 2px 0 rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 5px #ffffff,
      0 0 0 7px color-mix(in srgb, var(--c) 75%, transparent),
      0 0 0 16px color-mix(in srgb, var(--c) 18%, transparent),
      0 18px 32px -8px color-mix(in srgb, var(--c) 55%, transparent),
      0 6px 14px rgba(15, 23, 42, 0.14),
      inset 0 2px 0 rgba(255, 255, 255, 0.3);
  }
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 760px) {
  .wheel-stage {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 14px 16px;
  }

  .wheel-info {
    order: 2;
    text-align: center;
    align-items: center;
    padding: 18px 18px 18px 22px;
  }

  .wheel-info-eyebrow,
  .wheel-info-tag {
    align-self: center;
  }

  .wheel-info-mobile-hint {
    display: none !important;
  }

  .wheel-orbit {
    --orbit-r: clamp(76px, 30vw, 102px);
    order: 1;
    max-width: 280px;
    margin-top: 10px;
  }

  .wheel-piece-label {
    font-size: 0.56rem;
  }
}

@media (max-width: 420px) {
  .wheel-orbit { max-width: 250px; }
}

.example-mock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.example-mock-btn:hover {
  color: #fff;
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
}

.example-mock-btn[disabled] {
  cursor: not-allowed;
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.35);
  background: rgba(51, 65, 85, 0.22);
}

/* ─── Department modal (mock UI) ─────────────────────────── */

.dept-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: deptFadeIn 0.2s ease;
}

.dept-modal-overlay[hidden] {
  display: none !important;
}

@keyframes deptFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dept-modal {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  overflow: auto;
  background: radial-gradient(circle at 15% 10%, #1e3a8a 0%, #0b1220 38%, #020617 100%);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 18px 22px 20px;
}

.dept-modal-close {
  position: absolute;
  top: 20px;
  right: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  cursor: pointer;
  z-index: 2;
  font-family: inherit;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.dept-modal-close:hover {
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.65);
}

.dept-modal-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #93c5fd;
  margin: 0 0 4px 0;
}

.dept-modal-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
  padding-right: 70px;
}

.dept-modal-body {
  min-height: calc(100vh - 120px);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dept-mock {
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.45;
}

.dept-mock--rh {
  font-size: 0.85rem;
  color: #e2e8f0;
}

.dept-mock[hidden] {
  display: none !important;
}

.dm-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.dm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
}
.dm-dot:nth-child(1) { background: #f87171; }
.dm-dot:nth-child(2) { background: #fbbf24; }
.dm-dot:nth-child(3) { background: #4ade80; }

.dm-chrome-title {
  margin-left: 4px;
  font-size: 0.72rem;
  color: #93c5fd;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hr-demo {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  min-height: calc(100vh - 150px);
}

.hr-sidebar {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
}

.hr-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hr-hamburger {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #475569;
  background: #1e293b;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 9px;
  cursor: pointer;
}

.hr-hamburger span {
  height: 2px;
  background: #cbd5e1;
  border-radius: 999px;
}

.hr-brand-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.hr-brand-subtitle {
  margin: 0;
  color: #94a3b8;
  font-size: 0.72rem;
}

.hr-menu-label {
  margin: 0 0 10px;
  font-size: 0.66rem;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.hr-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hr-menu a {
  text-decoration: none;
  color: #cbd5e1;
  font-size: 0.8rem;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hr-menu a:hover {
  background: #1e293b;
  color: #fff;
}

.hr-menu a.is-active {
  background: #2563eb;
  color: #fff;
  border-color: rgba(191, 219, 254, 0.5);
}

.hr-main {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #dbe2ea;
  padding: 18px;
  color: #334155;
}

.hr-main-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.hr-kicker {
  margin: 0;
  font-size: 0.68rem;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.hr-main-header h4 {
  margin: 3px 0 4px;
  color: #0f172a;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.hr-main-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
}

.hr-header-actions {
  display: flex;
  gap: 8px;
}

.hr-header-actions button,
.hr-user-actions button {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
}

.hr-header-actions .is-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.hr-panels {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  gap: 14px;
}

.hr-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.hr-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.hr-card-head h5 {
  margin: 0;
  font-size: 0.95rem;
  color: #0f172a;
}

.hr-card-head span {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 700;
}

.hr-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.hr-task-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.hr-task-list input {
  margin-top: 4px;
}

.hr-task-list strong {
  display: block;
  color: #0f172a;
  font-size: 0.8rem;
}

.hr-task-list p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 0.72rem;
}

.hr-pill {
  font-style: normal;
  font-size: 0.65rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  color: #64748b;
  padding: 3px 8px;
}

.hr-pill.done {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.1);
}

.hr-pill.progress {
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.1);
}

.hr-pill.alert {
  color: #be123c;
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.1);
}

.hr-user-actions {
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hr-user-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: auto;
}

.hr-user-table {
  width: 100%;
  border-collapse: collapse;
}

.hr-user-table th,
.hr-user-table td {
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.78rem;
  color: #334155;
}

.hr-user-table th {
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.66rem;
  font-weight: 700;
  background: #f8fafc;
}

.hr-user-table tbody tr:last-child td {
  border-bottom: 0;
}

.hr-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.63rem;
  border: 1px solid #cbd5e1;
  color: #cbd5e1;
}

.hr-status.active {
  color: #047857;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.hr-status.onboarding {
  color: #b45309;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.hr-status.leave {
  color: #7c3aed;
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.08);
}

.rh-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 16px;
}

.rh-eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.62rem;
  color: #64748b;
  font-weight: 700;
}

.rh-title {
  margin: 0;
  color: #0f172a;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.rh-title span {
  display: inline-flex;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  vertical-align: middle;
}

.rh-subtitle {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.94rem;
  max-width: 70ch;
}

.rh-top-actions {
  display: flex;
  gap: 10px;
}

.rh-primary,
.rh-secondary {
  border: 1px solid #94a3b8;
  background: #334155;
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.rh-secondary {
  background: #fff;
  color: #475569;
  border-color: #cbd5e1;
}

.rh-filters {
  display: grid;
  grid-template-columns: 1fr 220px 240px;
  gap: 10px;
  margin-bottom: 14px;
}

.rh-search,
.rh-select {
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  min-height: 42px;
  display: flex;
  align-items: center;
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 0 12px;
}

.rh-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.rh-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}

.rh-kpi span {
  display: block;
  font-size: 0.64rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.rh-kpi strong {
  font-size: 1.3rem;
  line-height: 1;
  color: #0f172a;
}

.rh-kpi .is-alert {
  color: #fb7185;
}

.rh-grid {
  display: grid;
  grid-template-columns: 300px 1fr 280px;
  gap: 12px;
  margin-bottom: 12px;
}

.rh-queue,
.rh-detail,
.rh-right {
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  padding: 12px;
}

.rh-queue h5,
.rh-detail h5,
.rh-right h6 {
  margin: 0;
  color: #0f172a;
}

.rh-queue h5 {
  font-size: 0.86rem;
  margin-bottom: 10px;
}

.rh-queue-list,
.rh-mini-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rh-queue-list li {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}

.rh-queue-list strong {
  display: block;
  font-size: 0.78rem;
  color: #0f172a;
}

.rh-queue-list span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.7rem;
}

.rh-chip {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.62rem;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-style: normal;
}

.rh-chip.warn {
  color: #b45309;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.rh-chip.danger {
  color: #be123c;
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.1);
}

.rh-detail-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.rh-detail-head h5 {
  font-size: 0.96rem;
  margin: 0;
}

.rh-detail-head p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 0.74rem;
}

.rh-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.rh-detail-metrics label {
  display: block;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.rh-detail-metrics p {
  margin: 0;
  font-size: 0.78rem;
  color: #0f172a;
}

.rh-detail-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.rh-mini-panel {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
}

.rh-mini-panel h6 {
  margin: 0 0 8px;
  font-size: 0.74rem;
  color: #0f172a;
}

.rh-mini-panel li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.71rem;
  color: #334155;
}

.rh-mini-panel li:last-child {
  border-bottom: 0;
}

.rh-mini-panel li em {
  font-style: normal;
  color: #0f172a;
}

.rh-mini-panel li span {
  color: #64748b;
  white-space: nowrap;
}

.rh-mini-panel .ok,
.rh-mini-panel .warn {
  font-size: 0.62rem;
  border-radius: 999px;
  padding: 2px 6px;
  border: 1px solid transparent;
}

.rh-mini-panel .ok {
  color: #059669;
  border-color: rgba(16, 185, 129, 0.35);
}

.rh-mini-panel .warn {
  color: #b45309;
  border-color: rgba(251, 191, 36, 0.45);
}

.rh-right {
  display: grid;
  gap: 10px;
}

.rh-team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rh-user-card {
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  padding: 12px;
}

.rh-user-card.is-active {
  border-color: #93c5fd;
  box-shadow: 0 8px 24px rgba(51, 65, 85, 0.08);
}

.rh-user-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.rh-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #64748b;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.rh-user-head h5 {
  margin: 0;
  color: #0f172a;
  font-size: 0.88rem;
}

.rh-user-head p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 0.72rem;
}

.rh-tag {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.63rem;
  border: 1px solid #cbd5e1;
  color: #64748b;
  white-space: nowrap;
}

.rh-tag.ok {
  color: #059669;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.rh-tag.warn {
  color: #b45309;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
}

.rh-user-foot {
  display: flex;
  gap: 8px;
}

.rh-user-foot button {
  flex: 1;
  border: 1px solid #dbe2ea;
  background: #f8fafc;
  color: #475569;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 0.72rem;
  font-weight: 600;
}

@media (max-width: 760px) {
  .dept-modal {
    padding: 14px 10px 14px;
  }

  .dept-modal-body {
    min-height: calc(100vh - 104px);
  }

  .rh-topbar {
    flex-direction: column;
  }

  .rh-filters {
    grid-template-columns: 1fr;
  }

  .rh-kpis,
  .rh-grid,
  .rh-team,
  .rh-detail-metrics,
  .rh-detail-panels {
    grid-template-columns: 1fr;
  }

  .hr-demo {
    grid-template-columns: 1fr;
  }

  .hr-panels {
    grid-template-columns: 1fr;
  }

  .hr-main-header,
  .hr-header-actions,
  .hr-user-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.dm-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  min-height: 180px;
}

@media (max-width: 500px) {
  .dm-layout { grid-template-columns: 1fr; }
}

.dm-side {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px;
}

.dm-side-h {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 700;
}

.dm-pill {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid transparent;
  margin-bottom: 6px;
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.dm-pill span { font-size: 0.62rem; color: #64748b; }
.dm-pill.is-active { border-color: rgba(59, 130, 246, 0.5); }

.dm-main {
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
}

.dm-block-h {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 8px;
}

.dm-fields { display: flex; flex-direction: column; gap: 8px; }

.dm-f {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.75rem;
}

.dm-f label { color: #64748b; font-size: 0.68rem; }
.dm-f span { color: #e2e8f0; }

.dm-doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dm-doc-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
}
.dm-doc-list li:first-child { border-top: 0; padding-top: 0; }
.dm-doc-list em { font-style: normal; color: #e2e8f0; }
.dm-doc-list span { color: #64748b; font-size: 0.65rem; }

.dm-pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 160px;
}

.dm-col {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 8px;
  min-width: 0;
}

.dm-col-h {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.dm-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 0.72rem;
  color: #e2e8f0;
}

.dm-card small { display: block; color: #64748b; margin-top: 4px; font-size: 0.65rem; }
.dm-card.is-hi { border-color: rgba(59, 130, 246, 0.45); background: rgba(30, 58, 138, 0.35); }
.dm-card.dim { opacity: 0.6; }

.dm-table-wrap { overflow: auto; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.06); }
.dm-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.dm-table th,
.dm-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.dm-table th { color: #64748b; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; }
.dm-table tr:last-child td { border-bottom: 0; }
.dm-table .ok { color: #4ade80; }
.dm-table .warn { color: #f87171; font-weight: 700; }

.dm-footnote {
  margin: 10px 0 0;
  font-size: 0.68rem;
  color: #64748b;
}

.dm-fi-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.dm-stat { background: rgba(30, 41, 59, 0.6); border-radius: 10px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.06); }
.dm-stat span { display: block; font-size: 0.6rem; text-transform: uppercase; color: #64748b; letter-spacing: 0.08em; }
.dm-stat strong { font-size: 1.1rem; color: #f1f5f9; }
.dm-stat .bad { color: #f87171; }

.dm-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
  margin-left: auto;
}

.dm-bars span {
  display: block;
  width: 7px;
  min-height: 4px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  border-radius: 2px 2px 0 0;
  height: var(--h);
  opacity: 0.85;
}

.dm-invoice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.dm-invoice-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.72rem;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dm-invoice-list li:last-child { border-bottom: 0; }
.dm-invoice-list .ok { color: #4ade80; font-size: 0.65rem; }
.dm-invoice-list .pend { color: #fbbf24; font-size: 0.65rem; }

.dm-qual-list { list-style: none; margin: 0; padding: 0; }
.dm-qual-list li {
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 8px;
}
.dm-qual-name { font-weight: 600; color: #e2e8f0; font-size: 0.78rem; }
.dm-qual-name .ver {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.6rem;
  color: #94a3b8;
  font-weight: 500;
  vertical-align: middle;
}
.dm-qual-meta { font-size: 0.68rem; color: #64748b; margin-top: 4px; }

.dm-kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 150px;
}

.dm-kcol { background: rgba(15, 23, 42, 0.55); border-radius: 10px; padding: 8px; min-width: 0; }
.dm-kh { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; color: #64748b; margin-bottom: 8px; letter-spacing: 0.06em; }
.dm-kcard { background: #1e293b; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; padding: 6px 8px; margin-bottom: 5px; font-size: 0.7rem; }
.dm-kcard.is-hi { border-color: rgba(59, 130, 246, 0.4); }
.dm-kcard.dim { opacity: 0.65; }

/* ─── Page 3: Process ─────────────────────────────────────── */

.process-content {
  max-width: 680px;
  width: 100%;
}

.process-header {
  margin-bottom: 36px;
}

.process-bar {
  width: 72px;
  height: 4px;
  background: #22d3ee;
  margin-bottom: 24px;
  border-radius: 2px;
}

.process-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 10px;
}

.process-highlight {
  color: #22d3ee;
  font-weight: 400;
}

.process-subtitle {
  color: rgba(165, 243, 252, 0.5);
  font-size: 1rem;
  line-height: 1.6;
}

/* Timeline */
.process-timeline {
  position: relative;
  padding-left: 0;
}

.process-line {
  position: absolute;
  left: 27px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: rgba(34, 211, 238, 0.12);
  overflow: hidden;
}

.process-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #22d3ee, #0891b2);
  transition: height 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
}

.page.pos-0 .process-line::after {
  height: 100%;
}

.process-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 36px;
  position: relative;
}

.process-step:last-child {
  margin-bottom: 0;
}

.step-number {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0891b2, #22d3ee);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  position: relative;
  z-index: 1;
  transform: scale(0.5);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.5s ease;
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.3);
}

.page.pos-0 .step-number {
  transform: scale(1);
  opacity: 1;
}

.page.pos-0 .process-step[data-step="1"] .step-number { transition-delay: 0.35s; }
.page.pos-0 .process-step[data-step="2"] .step-number { transition-delay: 0.7s; }
.page.pos-0 .process-step[data-step="3"] .step-number { transition-delay: 1.05s; }
.page.pos-0 .process-step[data-step="4"] .step-number { transition-delay: 1.4s; }

.step-body {
  padding-top: 6px;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.step-desc {
  font-size: 0.9rem;
  color: rgba(165, 243, 252, 0.55);
  line-height: 1.6;
}

/* ─── Page 4: Contact ─────────────────────────────────────── */

.contact-content {
  max-width: 640px;
  width: 100%;
}

.contact-title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
  text-align: center;
}

.contact-intro {
  color: #94a3b8;
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 24px;
}

.contact-box {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: clamp(24px, 3.5vw, 36px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.contact-input::placeholder { color: rgba(148, 163, 184, 0.4); }

.contact-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.contact-select option {
  background: #1e293b;
  color: #e2e8f0;
}

.contact-textarea {
  resize: vertical;
  min-height: 90px;
}

.contact-btn {
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
  font-family: inherit;
  margin-top: 4px;
}

.contact-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.contact-disclaimer {
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.5);
  text-align: center;
  margin-top: 4px;
  line-height: 1.4;
}

.contact-status {
  font-size: 0.85rem;
  text-align: center;
  margin-top: 8px;
  line-height: 1.5;
  min-height: 1.25em;
}

.contact-status--success {
  color: #4ade80;
}

.contact-status--error {
  color: #f87171;
}

.contact-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  /* Scrollable pages: comfortable vertical layout */
  .page-inner {
    align-items: flex-start;
    padding-top: max(72px, env(safe-area-inset-top, 0px) + 52px);
  }

  .page:not([data-index="0"]) .page-inner {
    padding-bottom: max(36px, env(safe-area-inset-bottom, 0px) + 28px);
  }

  .page[data-index="0"] .page-inner {
    align-items: center;
    justify-content: center;
    padding-bottom: max(112px, 15vh, env(safe-area-inset-bottom, 0px) + 64px);
  }

  .page[data-index="1"] .page-inner,
  .page[data-index="2"] .page-inner {
    align-items: center;
    justify-content: center;
    padding-top: max(clamp(68px, 9vh, 80px), env(safe-area-inset-top, 0px) + 52px);
    padding-bottom: max(clamp(36px, 8vh, 64px), env(safe-area-inset-bottom, 0px) + 28px);
  }

  .hero-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
    margin-inline: auto;
  }

  .hero-visual { display: none; }
  .hero-subtitle { margin: 0 auto 28px; }
  .hero-cta-row { justify-content: center; }

  .hero-cta,
  .hero-cta-secondary {
    min-height: 48px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .page-dots {
    right: max(10px, env(safe-area-inset-right, 0px));
  }

  .problem-cards {
    grid-template-columns: 1fr;
  }

  .examples-content {
    max-width: 100%;
  }

  .wheel-stage {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .process-content {
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
  }

  .contact-content {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .problem-cards {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 8px 14px 16px;
  }

  .problem-outcome {
    padding: 0 12px 14px;
  }

  .problem-outcome-lead {
    font-size: 0.76rem;
    margin-bottom: 10px;
  }

  .problem-outcome-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 4px 2px 2px;
  }

  .problem-outcome-cell {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .navbar {
    grid-template-columns: auto 1fr;
    padding-top: max(10px, env(safe-area-inset-top, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    padding-bottom: 10px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
  }

  .nav-links {
    justify-self: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 6px;
    max-width: 100%;
    gap: 8px;
  }

  .nav-links a { font-size: 0.93rem; }

  .page-inner {
    padding-top: max(68px, env(safe-area-inset-top, 0px) + 48px);
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
  }

  .page:not([data-index="0"]) .page-inner {
    padding-bottom: max(28px, env(safe-area-inset-bottom, 0px) + 20px);
  }

  .page[data-index="0"] .page-inner {
    padding-bottom: max(120px, 17vh, env(safe-area-inset-bottom, 0px) + 64px);
  }

  .page[data-index="1"] .page-inner,
  .page[data-index="2"] .page-inner {
    align-items: center;
    justify-content: center;
  }

  .page.pos-1 { transform: translateY(74%) scale(0.72); }
  .page.pos-2 { transform: translateY(82%) scale(0.52); }
  .page.pos-3 { transform: translateY(87%) scale(0.36); }

  .problem-hero {
    padding: 24px 18px 4px;
  }

  .problem-panel {
    border-radius: 16px;
  }

  .hero-title {
    white-space: normal;
    line-height: 1.1;
    font-size: clamp(1.45rem, 6.5vw + 0.2rem, 2.65rem);
  }

  .hero-cta-row { flex-direction: column; align-items: center; }

  .hero-cta,
  .hero-cta-secondary {
    flex: 0 0 auto;
    width: min(100%, 320px);
    text-align: center;
  }

  .process-step {
    gap: 14px;
    margin-bottom: 28px;
  }

  .process-line {
    left: 22px;
    top: 22px;
    bottom: 22px;
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    border-radius: 14px;
  }

  .step-title {
    font-size: 1.1rem;
  }

  .step-desc {
    font-size: 0.86rem;
  }

  .contact-input,
  .contact-select,
  .contact-textarea {
    font-size: 1rem;
  }

  .contact-btn {
    min-height: 48px;
    width: 100%;
  }

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

/* Tablet tuning after navbar size increase */
@media (max-width: 1024px) {
  .logo {
    font-size: clamp(1.02rem, 0.96rem + 0.25vw, 1.16rem);
  }

  .nav-links {
    gap: clamp(10px, 1.3vw, 16px);
  }

  .nav-links a {
    font-size: 0.84rem;
  }
}

/* Keep first section readable on tablets/large phones */
@media (max-width: 900px) {
  .page[data-index="0"] .hero-text {
    width: min(100%, 34rem);
  }

  .hero-title {
    white-space: normal;
    font-size: clamp(1.8rem, 5.4vw, 3rem);
  }

  .hero-subtitle {
    width: 100%;
    max-width: none;
  }

  .hero-cta-row {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-cta,
  .hero-cta-secondary {
    flex: 1 1 220px;
    max-width: 320px;
  }
}

/* Small tablets / phones: stabilize navbar and reserve vertical space */
@media (max-width: 768px) {
  .navbar {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 6px;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-bottom: 10px;
  }

  .logo {
    justify-self: center;
    font-size: 1rem;
  }

  .nav-links {
    justify-self: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: min(100%, 340px);
    row-gap: 6px;
    column-gap: 10px;
  }

  .nav-links a {
    font-size: 0.76rem;
  }

  .page-inner {
    padding-top: max(112px, env(safe-area-inset-top, 0px) + 88px);
  }
}

/* Narrow phones */
@media (max-width: 480px) {
  .nav-links {
    max-width: min(100%, 300px);
  }

  .nav-links a {
    font-size: 0.72rem;
  }

  .page[data-index="0"] .hero-text {
    width: 100%;
  }

  .hero-title {
    font-size: clamp(1.4rem, 7vw, 2.2rem);
  }

  .hero-subtitle {
    font-size: clamp(0.9rem, 3.9vw, 1rem);
  }

  .hero-cta,
  .hero-cta-secondary {
    width: min(100%, 280px);
  }
}

/* Ensure mobile CTAs never stretch vertically from flex-basis rules */
@media (max-width: 768px) {
  .hero-cta-row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }

  .hero-cta,
  .hero-cta-secondary {
    flex: 0 0 auto;
    width: min(100%, 300px);
    max-width: 300px;
    min-height: 48px;
    padding: 12px 16px;
    line-height: 1.25;
  }
}

/* Low-height devices (landscape phones, compact windows) */
@media (max-height: 700px) {
  .page-inner {
    padding-top: max(76px, env(safe-area-inset-top, 0px) + 58px);
  }

  .page[data-index="0"] .page-inner {
    padding-bottom: max(86px, 11vh, env(safe-area-inset-bottom, 0px) + 44px);
  }

  .hero-title {
    font-size: clamp(1.4rem, 3.6vw, 2.35rem);
  }

  .hero-subtitle {
    margin-bottom: 0.95rem;
  }

  .process-header {
    margin-bottom: 24px;
  }

  .process-step {
    margin-bottom: 22px;
  }

  .contact-box {
    padding: clamp(18px, 2.2vw, 26px);
  }
}
