/* ===================================================================
   ImOptim Website Stylesheet
   =================================================================== */

:root {
  --navy: #0A2E5C;
  --navy-dark: #081F3E;
  --navy-deep: #061A36;
  --teal: #6EC5CF;
  --teal-bright: #4AB8C4;
  --white: #ffffff;
  --off-white: #F0F6FB;
  --bg-light: #EAF2F9;
  --light-gray: #e9eef5;
  --text-gray: #6b7785;
  --text-dark: #1a2b3c;
  --text-body: #4a5664;
  --shadow: 0 10px 30px rgba(10, 46, 92, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  font-family: var(--font);
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--navy); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--teal); }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============== HEADER ============== */
.header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 0;
}

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

.logo { flex-shrink: 0; }
.logo img { height: 64px; width: auto; max-width: none; display: block; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  color: var(--white);
  font-weight: 500;
  font-size: 16px;
  transition: color 0.2s;
  white-space: nowrap;
}

.main-nav a:hover { color: var(--teal); }

.header-right { display: flex; align-items: center; gap: 20px; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-size: 15px;
  cursor: pointer;
  position: relative;
  padding: 6px 8px;
  border-radius: 4px;
  outline: none;
}
.lang-switch:focus-visible {
  box-shadow: 0 0 0 2px rgba(110, 197, 207, 0.6);
}

.flag {
  display: inline-block;
  width: 22px;
  height: 14px;
  vertical-align: -2px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.lang-switch .arrow { font-size: 11px; color: var(--teal); }

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border-radius: 4px;
  min-width: 150px;
  padding: 6px 0;
  display: none;
  overflow: hidden;
  z-index: 100;
}

.lang-switch:hover .lang-dropdown,
.lang-switch:focus-within .lang-dropdown { display: block; }

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--text-dark);
  font-size: 14px;
}

.lang-dropdown a:hover { background: var(--bg-light); color: var(--navy); }

.btn-contact-header {
  display: inline-block;
  padding: 14px 32px;
  border: 1.5px solid var(--white);
  color: var(--white);
  border-radius: 30px;
  font-weight: 500;
  font-size: 15px;
  background: transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-contact-header:hover { background: var(--white); color: var(--navy); }

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-bright); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--navy); color: var(--white); }

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 28px;
  color: var(--white);
}

/* ============== HERO ============== */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 80px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 100%, rgba(110, 197, 207, 0.08), transparent 50%),
    radial-gradient(ellipse at 80% 0%, rgba(110, 197, 207, 0.06), transparent 50%);
  pointer-events: none;
}

.hero-logo {
  max-width: 1100px;
  width: 92%;
  margin: 0 auto;
  position: relative;
}
.hero-logo img { width: 100%; height: auto; }

/* ============== HERO — SPLIT (message left, vertical logo right) ============== */
.hero.hero--split {
  text-align: left;
  padding: 90px 0 100px;
  background:
    radial-gradient(ellipse 900px 700px at 88% 12%, rgba(110, 197, 207, 0.18), transparent 60%),
    radial-gradient(ellipse 700px 600px at 8% 95%, rgba(74, 184, 196, 0.14), transparent 60%),
    var(--navy);
}
.hero.hero--split::before { display: none; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.hero-copy-block-1 {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 300;
  color: #b8d3ea;
  line-height: 1.18;
  letter-spacing: -0.4px;
  margin: 0;
}
.hero-copy-block-1 strong {
  color: var(--white);
  font-weight: 600;
}

.hero-copy-block-2 {
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -1.4px;
  margin: 0;
}
.hero-copy-block-2 span {
  color: #8a99ad;
}

.hero-copy-block-3 {
  border-left: 4px solid var(--teal);
  padding: 6px 0 6px 22px;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 500;
  color: #e0f4f7;
  line-height: 1.3;
  margin: 0;
}
.hero-copy-block-3 b {
  color: var(--teal);
  font-weight: 700;
}

.hero-logo-vertical {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-logo-vertical::before {
  content: "";
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(110, 197, 207, 0.22), transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}
.hero-logo-vertical img {
  position: relative;
  z-index: 1;
  max-height: 560px;
  width: auto;
  max-width: 100%;
}

/* ============== PITCH SECTION (light gradient, below hero) ============== */
.pitch-section {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
  padding: 56px 0 60px;
  position: relative;
}

/* Flyer-style chevron flow (on light bg — solid navy fill, white text) */
.hero-flow {
  display: flex;
  gap: 12px;
  justify-content: center;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto 40px;
}

.hero-flow-step {
  flex: 1;
  background: var(--navy);
  color: var(--white);
  padding: 32px 40px 32px 62px;
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.2px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  margin: 0;
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 50%, calc(100% - 32px) 100%, 0 100%, 32px 50%);
  transition: background 0.25s ease;
}
.hero-flow-step:hover { background: var(--navy-dark); }

.hero-flow-step--first {
  padding-left: 40px;
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 50%, calc(100% - 32px) 100%, 0 100%);
}

.hero-flow-step--yes {
  background: var(--teal);
  color: var(--white);
}
.hero-flow-step--yes:hover { background: var(--teal-bright); }

.hero-flow--closing { margin-top: 24px; margin-bottom: 20px; }
.hero-flow--closing .hero-flow-step {
  font-size: clamp(13px, 1.25vw, 16px);
  min-height: 110px;
  padding: 22px 28px 22px 52px;
  line-height: 1.35;
}
.hero-flow--closing .hero-flow-step--first { padding-left: 30px; }

.hero-flow-step--link {
  text-decoration: none;
  color: var(--white);
  cursor: pointer;
}

.hero-flow-watch {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.hero-flow-step--link:hover .hero-flow-watch { background: var(--teal); }

.pitch-cta-link { text-align: center; margin: 0; }
.pitch-cta-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-bright);
  font-weight: 600;
  font-size: 15px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(74, 184, 196, 0.4);
  transition: color 0.2s, border-color 0.2s;
}
.pitch-cta-link a:hover {
  color: var(--navy);
  border-color: var(--navy);
}
.pitch-cta-link .pitch-cta-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}
.pitch-cta-link a:hover .pitch-cta-arrow { transform: translateX(3px); }

/* ============== PROCESS STEPS (modern card layout, replaces closing chevrons) ============== */
.process-steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto 32px;
}

.process-step {
  flex: 1;
  background: var(--white);
  border: 1px solid #e5ebf2;
  border-radius: 14px;
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: 0 1px 2px rgba(10, 46, 92, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  min-height: 168px;
}
.process-step:hover {
  box-shadow: 0 10px 28px rgba(10, 46, 92, 0.08);
  transform: translateY(-2px);
}
.process-step--workshops:hover { border-color: #c5d7ec; }
.process-step--simulation:hover { border-color: #aacfd6; }
.process-step--run:hover { border-color: var(--teal); }

.process-step-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.process-step-icon svg { width: 22px; height: 22px; }
.process-step-icon--workshops { background: #E5EDF7; color: var(--navy); }
.process-step-icon--simulation { background: #D7ECF0; color: #2A7A88; }
.process-step-icon--run { background: rgba(110, 197, 207, 0.22); color: #228A98; }

.process-step-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.process-step-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.3;
}

.process-step-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-body);
  margin: 0;
}

.process-step-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  align-self: flex-start;
  background: var(--teal);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 7px 12px;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.process-step-cta:hover {
  background: var(--teal-bright);
  color: var(--white);
  transform: translateY(-1px);
}
.process-step-cta svg { width: 14px; height: 14px; }

.process-separator {
  display: flex;
  align-items: center;
  color: #c8d2de;
  flex-shrink: 0;
}
.process-separator svg { width: 22px; height: 22px; }

/* "How?" block — conductor with Minimize / Maximize flanks */
.how-hero {
  max-width: 1180px;
  margin: 0 auto 40px;
}

.how-hero-header {
  text-align: center;
  margin-bottom: 36px;
}
.how-hero-title {
  color: var(--text-dark);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.how-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 36px;
  align-items: center;
}

.how-conductor { text-align: center; }
.how-conductor img {
  width: 100%;
  max-width: 440px;
  height: auto;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 14px 30px rgba(10, 46, 92, 0.14));
}

.how-side { display: flex; flex-direction: column; align-items: center; gap: 22px; }

.how-side-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3px;
}
.how-side-label svg { width: 18px; height: 18px; }

.how-side-label--min {
  background: rgba(10, 46, 92, 0.08);
  color: var(--navy);
}
.how-side-label--max {
  background: rgba(110, 197, 207, 0.2);
  color: var(--teal-bright);
}

.how-side-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  align-items: center;
}

.how-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  max-width: 200px;
}

.how-item-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
}
.how-item-icon svg { width: 30px; height: 30px; stroke: currentColor; }
.how-item:hover .how-item-icon { background: var(--teal-bright); transform: translateY(-2px); }

.how-item-label {
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.how-item-label strong { color: var(--teal-bright); font-weight: 700; }

.how-hero-caption {
  max-width: 860px;
  margin: 44px auto 0;
  text-align: center;
  color: var(--text-body);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.75;
}
.how-hero-caption strong { color: var(--text-dark); font-weight: 700; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 60px;
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(10, 46, 92, 0.35);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.hero-video {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(110, 197, 207, 0.12);
  background: linear-gradient(135deg, var(--navy-dark) 0%, rgba(110, 197, 207, 0.35) 100%);
}

.hero-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
}

.hero-video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-align: center;
  padding: 20px;
  z-index: 1;
}

/* ============== PAGE HEADER ============== */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 80px 0 60px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--white);
  letter-spacing: -0.5px;
}

.breadcrumb { color: rgba(255, 255, 255, 0.75); font-size: 14px; }
.breadcrumb a { color: rgba(255, 255, 255, 0.75); }
.breadcrumb a:hover { color: var(--teal); }

/* ============== SECTIONS ============== */
.section { padding: 100px 0; background: var(--white); }

.section-tag {
  display: block;
  color: var(--teal-bright);
  font-weight: 500;
  font-size: 17px;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 24px;
  line-height: 1.1;
  letter-spacing: -1px;
}

.section-title .accent { color: var(--teal-bright); display: block; }

.section-header { text-align: center; max-width: 900px; margin: 0 auto 60px; }

/* ============== MISSION SECTION ============== */
.mission-section {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
  padding: 100px 0;
}

.mission {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.mission-content h2 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 32px;
  letter-spacing: -1px;
}

.mission-content p {
  color: var(--text-body);
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.8;
}

.mission-content .btn { margin-top: 28px; }

.mission-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mission-visual svg { width: 100%; max-width: 560px; height: auto; }

/* ============== HOW IT WORKS ============== */
.how-section {
  background: linear-gradient(315deg, var(--bg-light) 0%, var(--white) 70%);
  padding: 70px 0 80px;
}

.section-lead {
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.7;
  max-width: 780px;
  margin: 18px auto 0;
}

/* Big "How?" + subtitle header (flyer page-2 style) */
.how-hero-header-split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 50px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto 36px;
}

.how-big-title {
  font-size: clamp(56px, 7vw, 96px);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -2.5px;
  line-height: 1;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--text-dark);
  display: inline-block;
  white-space: nowrap;
}

.how-big-subtitle-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.how-big-subtitle {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin: 0;
}

.how-big-subtitle-secondary {
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 500;
  color: var(--text-body);
  line-height: 1.45;
  letter-spacing: -0.1px;
  margin: 0;
}

/* Compact steps: 1/4 title + 3/4 image per step, stacked vertically */
.how-steps--stacked {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.how-steps--stacked .how-step {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 40px;
  align-items: center;
}

.how-step-title {
  color: var(--text-dark);
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.35;
  padding: 0;
  margin: 0;
  border: none;
  border-left: 3px solid var(--teal);
  padding-left: 18px;
}

.how-step-visual {
  width: 100%;
  display: block;
}
.how-step-visual img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* ============== ALGO LOOP (interactive HOW visualization) ============== */
.algo-loop {
  display: grid;
  grid-template-columns: 1fr 2.25fr 1.95fr;
  align-items: stretch;
  justify-content: center;
  gap: 32px;
  max-width: 1320px;
  margin: 36px auto 0;
  padding: 32px 24px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(10, 46, 92, 0.06);
  border: 1px solid #e5ebf2;
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.algo-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-width: 0;
  min-height: 360px;
  position: relative;
}

/* Vertical dividers between the 3 panels */
.algo-panel--inputs::after,
.algo-panel--engine::after {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  right: -16px;
  width: 1px;
  background: #e5ebf2;
}

.algo-panel-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 8px;
  letter-spacing: -0.3px;
  text-align: center;
  line-height: 1.25;
}

/* ---- Cards (inputs panel) ---- */
.algo-card {
  background: var(--white);
  border: 1px solid #e5ebf2;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(10, 46, 92, 0.04);
  width: 100%;
  max-width: 240px;
  position: relative;
  transition: border-color 0.4s ease;
}
.algo-card--users { min-height: 118px; }

.algo-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.algo-card-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E0E7FF;
  color: #4F46E5;
  transition: background 0.4s ease, color 0.4s ease;
}
.algo-card-icon svg { width: 20px; height: 20px; }

.algo-loop[data-over-capacity="true"] .algo-card--users { border-color: #fca5a5; }
.algo-loop[data-over-capacity="true"] .algo-card-icon--users { background: #FEE2E2; color: #DC2626; }

.algo-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-gray);
  margin: 0 0 2px;
}

.algo-card-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.algo-card-cap {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-gray);
}

.algo-alert {
  display: flex;
  visibility: hidden;
  align-items: center;
  gap: 6px;
  background: #FEE2E2;
  color: #DC2626;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-top: 8px;
  transition: visibility 0s 0.4s;
}
.algo-alert svg { width: 14px; height: 14px; flex-shrink: 0; }
.algo-loop[data-over-capacity="true"] .algo-alert { visibility: visible; }

/* ---- Seasons ---- */
.algo-seasons {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 10px;
}

.algo-season {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  transition: all 0.4s ease;
  transform: scale(0.85);
}
.algo-season svg {
  width: 22px;
  height: 22px;
  transition: stroke-width 0.3s ease;
}
.algo-loop[data-season-active] .algo-season:not([data-season=""]) svg { stroke-width: 2; }
.algo-loop[data-season-active="0"] .algo-season[data-season="0"] svg,
.algo-loop[data-season-active="1"] .algo-season[data-season="1"] svg,
.algo-loop[data-season-active="2"] .algo-season[data-season="2"] svg { stroke-width: 2.4; }

.algo-loop[data-season-active="0"] .algo-season[data-season="0"] {
  background: #A7F3D0; color: #047857;
  transform: scale(1.18);
  box-shadow: 0 0 0 2px #e2e8f0, 0 4px 10px rgba(4, 120, 87, 0.25);
}
.algo-loop[data-season-active="1"] .algo-season[data-season="1"] {
  background: #93C5FD; color: #1E3A8A;
  transform: scale(1.18);
  box-shadow: 0 0 0 2px #e2e8f0, 0 4px 10px rgba(30, 58, 138, 0.3);
}
.algo-loop[data-season-active="2"] .algo-season[data-season="2"] {
  background: #FCD34D; color: #92400E;
  transform: scale(1.18);
  box-shadow: 0 0 0 2px #e2e8f0, 0 4px 10px rgba(146, 64, 14, 0.25);
}


/* ---- Data packets ---- */
.algo-packet {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.algo-packet--users { background: #6366f1; right: 6px; transform: translateY(-50%); }
.algo-packet--weather { background: #f59e0b; right: 6px; transform: translateY(-50%); }
.algo-packet--out { background: #34d399; right: -8px; box-shadow: 0 4px 10px rgba(52, 211, 153, 0.4); }

.algo-loop[data-phase="0"] .algo-packet--users { animation: algo-packet-fly 1.1s ease-out forwards; }
.algo-loop[data-phase="0"] .algo-packet--weather { animation: algo-packet-fly 1.1s ease-out 0.2s forwards; }
.algo-loop[data-phase="2"] .algo-packet--out { animation: algo-packet-fly-out 0.8s ease-out forwards; }

@keyframes algo-packet-fly {
  0% { opacity: 1; transform: translate(0, -50%); }
  100% { opacity: 0; transform: translate(140px, -50%) scale(0.4); }
}
@keyframes algo-packet-fly-out {
  0% { opacity: 1; transform: translate(0, -50%) scale(1); }
  100% { opacity: 0; transform: translate(140px, -50%) scale(0.4); }
}

/* ---- Engine ---- */
.algo-engine {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0;
}

/* Initial plan status pill (sits above the engine ring as an engine parameter) */
.algo-engine-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e5ebf2;
  border-radius: 999px;
  padding: 5px 6px 5px 14px;
  margin-top: 4px;
}
.algo-engine-status-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gray);
}
.algo-engine-status-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  cursor: default;
  background: #e2e8f0;
  color: var(--text-body);
  letter-spacing: 0.02em;
  transition: background 0.3s ease, color 0.3s ease;
}
.algo-engine-status-btn[data-plan="adjust"] {
  background: var(--navy);
  color: var(--white);
}

.algo-engine-ring {
  position: absolute;
  inset: 12px;
  border: 3px dashed #cbd5e1;
  border-radius: 50%;
  transition: transform 1.8s ease-in-out;
}
.algo-loop[data-phase="1"] .algo-engine-ring { transform: rotate(180deg); }

.algo-engine-core {
  width: 92px;
  height: 92px;
  background: #1e293b;
  border: 4px solid #334155;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.algo-engine-core svg { width: 40px; height: 40px; transition: transform 1s linear; }
.algo-loop[data-phase="1"] .algo-engine-core {
  animation: algo-engine-pulse 1.2s ease-in-out infinite;
}
.algo-loop[data-phase="1"] .algo-engine-core svg {
  animation: algo-engine-spin 1.2s linear infinite;
}
@keyframes algo-engine-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(96, 165, 250, 0), 0 8px 20px rgba(15, 23, 42, 0.3); transform: scale(1); }
  50% { box-shadow: 0 0 36px rgba(96, 165, 250, 0.6), 0 8px 20px rgba(15, 23, 42, 0.3); transform: scale(1.04); }
}
@keyframes algo-engine-spin {
  to { transform: rotate(360deg); }
}

/* ---- Rules grouped by category around the engine ---- */
.algo-rules-group {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 3;
  width: 132px;
}
.algo-rules-group--tl { top: -12px; left: -136px; align-items: stretch; }
.algo-rules-group--tr { top: -12px; right: -136px; align-items: stretch; }
.algo-rules-group--bl { bottom: -12px; left: -136px; align-items: stretch; }
.algo-rules-group--br { bottom: -12px; right: -136px; align-items: stretch; }

.algo-rules-group-label {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-gray);
  margin-bottom: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: transparent;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease;
}
/* Align the inline-flex pill within its column (right for tl/bl, left for tr/br) */
.algo-rules-group--tl .algo-rules-group-label,
.algo-rules-group--bl .algo-rules-group-label { align-self: flex-end; }
.algo-rules-group--tr .algo-rules-group-label,
.algo-rules-group--br .algo-rules-group-label { align-self: flex-start; }

/* When any rule inside the group is active, the category label becomes a navy pill */
.algo-rules-group:has(.is-active) .algo-rules-group-label {
  background: var(--navy);
  color: var(--white);
}

/* Individual rule pills */
.algo-rule {
  background: var(--white);
  border: 1px solid #e5ebf2;
  color: var(--text-body);
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(10, 46, 92, 0.06);
  white-space: nowrap;
  transition: all 0.4s ease;
}
.algo-rule svg { width: 12px; height: 12px; color: var(--text-gray); transition: color 0.3s ease; flex-shrink: 0; }

.algo-rule.is-active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 8px 18px rgba(10, 46, 92, 0.22);
}
.algo-rule.is-active svg { color: var(--teal); }

/* ---- Output ---- */
.algo-output {
  position: relative;
  width: 100%;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.algo-output-waiting {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 130px;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  transition: opacity 0.3s ease;
}
.algo-loop.is-initialized .algo-output-waiting { opacity: 0; pointer-events: none; }

/* Team color palette (used by floor plan + legend, shared with the comparison section).
   Each floor has 2 teams in the same color family but visually distinct (one deep, one lighter
   but still saturated) — so neither looks like an absent/empty desk. */
.algo-loop {
  --team-sales: #1D4ED8;       /* blue-700: deeper blue */
  --team-marketing: #38BDF8;   /* sky-400: lighter saturated sky */
  --team-tech: #047857;        /* emerald-700: deep forest green */
  --team-product: #2DD4BF;     /* teal-400: lighter teal */
  --team-hr: #A855F7;          /* purple-500 */
  --team-support: #D946EF;     /* fuchsia-500 */
}

.algo-floor {
  flex: 0 0 auto;
  width: 230px;
  background: var(--white);
  border: 2px solid #e5ebf2;
  border-radius: 14px;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 28px rgba(10, 46, 92, 0.1);
  position: relative;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.algo-loop.is-initialized .algo-floor {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.algo-floor-header {
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-gray);
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 12px;
}

/* Floor plan: stacked floors with team-colored desk blocks */
.algo-floor-plan {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.algo-floor-level {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.algo-floor-level-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #94a3b8;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.algo-floor-level-grid {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  padding: 7px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 6px;
}

.algo-block {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--block-color, #e2e8f0);
  border-radius: 2px;
  overflow: hidden;
}
.algo-block::before,
.algo-block::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.algo-block::before {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  margin-top: -0.5px;
}
.algo-block::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  margin-left: -0.5px;
}

.algo-block[data-team="sales"] { --block-color: var(--team-sales); }
.algo-block[data-team="marketing"] { --block-color: var(--team-marketing); }
.algo-block[data-team="tech"] { --block-color: var(--team-tech); }
.algo-block[data-team="product"] { --block-color: var(--team-product); }
.algo-block[data-team="hr"] { --block-color: var(--team-hr); }
.algo-block[data-team="support"] { --block-color: var(--team-support); }
.algo-block[data-team="empty"] { --block-color: #e2e8f0; }
.algo-block[data-team="empty"]::before,
.algo-block[data-team="empty"]::after { background: rgba(255, 255, 255, 0.7); }

/* Winter cycle: teams relocated from the closed floor get a dashed outline
   to show they've been reassigned from their normal floor. */
.algo-block--relocated {
  outline: 1.5px dashed #94a3b8;
  outline-offset: 2px;
}

/* Per-scenario block overrides */
.algo-block { transition: background-color 0.4s ease, background-image 0.4s ease; }
.algo-block-quad { transition: background-color 0.4s ease; }
.algo-block.is-empty { --block-color: #e2e8f0; }
.algo-block.is-empty::before,
.algo-block.is-empty::after { background: rgba(255, 255, 255, 0.7); }

/* Summer: right column (rightmost block in each row) marked as sun-exposed.
   The algo prefers leaving these empty when there's slack;
   when the building is full they stay occupied (AC on full blast). */
.algo-loop[data-season-active="2"] .algo-floor-level-grid > .algo-block:nth-child(4n) {
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 3px,
    rgba(245, 158, 11, 0.55) 3px,
    rgba(245, 158, 11, 0.55) 5px
  );
}

/* Weather decorations: positioned over the output panel, above the popup card.
   Sun (summer) shines diagonally toward the building; snowflakes (winter) scatter above. */
.algo-weather-deco {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 6;
}
.algo-weather-deco svg { width: 100%; height: 100%; display: block; }

/* Sun: bigger, sits above the popup area (right portion of the output panel) */
.algo-weather-deco--sun {
  width: 52px;
  height: 52px;
  top: 6px;
  right: 80px;
  color: #F59E0B;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.55));
}
.algo-loop.is-initialized[data-season-active="2"] .algo-weather-deco--sun { opacity: 1; }

/* Snowflakes: 6 scattered above the popup (varying sizes, light rotations) */
.algo-weather-deco--snow {
  color: #60A5FA;
  filter: drop-shadow(0 0 3px rgba(96, 165, 250, 0.55));
}
.algo-weather-deco--snow-1 { width: 14px; height: 14px; top: 8px; right: 160px; transform: rotate(-14deg); }
.algo-weather-deco--snow-2 { width: 20px; height: 20px; top: 4px; right: 90px; }
.algo-weather-deco--snow-3 { width: 12px; height: 12px; top: 32px; right: 200px; transform: rotate(18deg); }
.algo-weather-deco--snow-4 { width: 16px; height: 16px; top: 36px; right: 60px; transform: rotate(-6deg); }
.algo-weather-deco--snow-5 { width: 13px; height: 13px; top: 56px; right: 150px; transform: rotate(22deg); }
.algo-weather-deco--snow-6 { width: 15px; height: 15px; top: 62px; right: 40px; transform: rotate(-18deg); }
.algo-loop.is-initialized[data-season-active="1"] .algo-weather-deco--snow { opacity: 0.95; }

/* User's pre-booked desk marker (appears with popup in phase 3) */
.algo-user-marker {
  position: absolute;
  width: 46%;
  height: 46%;
  background: #FACC15;
  border: 1.5px solid #CA8A04;
  border-radius: 2px;
  z-index: 5;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.65);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.algo-user-marker[data-quad="1"] { top: 4%; left: 4%; }
.algo-user-marker[data-quad="2"] { top: 4%; right: 4%; }
.algo-user-marker[data-quad="3"] { bottom: 4%; left: 4%; }
.algo-user-marker[data-quad="4"] { bottom: 4%; right: 4%; }

.algo-loop[data-phase="3"] .algo-user-marker {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.2s;
}

.algo-loop[data-phase="3"] .algo-user-marker.is-pulsing {
  animation: algo-user-pulse 1.1s ease-in-out 0.55s infinite;
}
@keyframes algo-user-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(250, 204, 21, 0.5); }
  50% { transform: scale(1.18); box-shadow: 0 0 18px rgba(250, 204, 21, 1); }
}

/* Mix block: 2x2 sub-grid where each quadrant can be its own team */
.algo-block--mix {
  background: transparent;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
}
.algo-block--mix::before,
.algo-block--mix::after { display: none; }
.algo-block-quad {
  background-color: var(--block-color, #e2e8f0);
  border-radius: 1px;
}
.algo-block-quad[data-team="sales"] { --block-color: var(--team-sales); }
.algo-block-quad[data-team="marketing"] { --block-color: var(--team-marketing); }
.algo-block-quad[data-team="tech"] { --block-color: var(--team-tech); }
.algo-block-quad[data-team="product"] { --block-color: var(--team-product); }
.algo-block-quad[data-team="hr"] { --block-color: var(--team-hr); }
.algo-block-quad[data-team="support"] { --block-color: var(--team-support); }
.algo-block-quad[data-team="empty"] { --block-color: #e2e8f0; }

/* Floor closed overlay: covers a specific floor (only FL.3 in eco cycle) */
.algo-floor-closed {
  position: absolute;
  top: 0;
  left: 32px;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(2px);
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: rgba(255, 255, 255, 0.92);
  z-index: 2;
}
.algo-floor-closed svg { width: 14px; height: 14px; }
.algo-floor-closed span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.algo-loop[data-cycle="3"][data-phase="2"] .algo-floor-level[data-level="3"] .algo-floor-closed,
.algo-loop[data-cycle="3"][data-phase="3"] .algo-floor-level[data-level="3"] .algo-floor-closed { display: flex; }

/* Team legend at the bottom */
.algo-floor-legend {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px 6px;
}
.algo-legend-team {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: uppercase;
}
.algo-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background-color: var(--block-color, #e2e8f0);
}
.algo-legend-dot[data-team="sales"] { --block-color: var(--team-sales); }
.algo-legend-dot[data-team="marketing"] { --block-color: var(--team-marketing); }
.algo-legend-dot[data-team="tech"] { --block-color: var(--team-tech); }
.algo-legend-dot[data-team="product"] { --block-color: var(--team-product); }
.algo-legend-dot[data-team="hr"] { --block-color: var(--team-hr); }
.algo-legend-dot[data-team="support"] { --block-color: var(--team-support); }

/* ---- Mobile popup (sits to the right of the floor plan; reserves its space) ---- */
.algo-popup {
  flex: 0 0 auto;
  width: 200px;
  background: var(--white);
  border: 1px solid #e5ebf2;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(10, 46, 92, 0.18);
  z-index: 5;
  opacity: 0;
  transform: scale(0.9) translateY(8px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.algo-loop[data-phase="3"] .algo-popup {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.algo-popup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-gray);
  text-transform: uppercase;
}
.algo-popup-header svg { width: 14px; height: 14px; color: #94a3b8; }

.algo-popup-body { text-align: center; margin-bottom: 12px; }
.algo-popup-check {
  width: 34px;
  height: 34px;
  background: #d1fae5;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}
.algo-popup-check svg { width: 20px; height: 20px; }
.algo-popup-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0;
}
.algo-popup-zone {
  font-size: 11px;
  color: var(--text-gray);
  margin: 3px 0 0;
}

.algo-popup-actions { display: flex; gap: 6px; }
.algo-popup-btn {
  flex: 1;
  border: none;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: inherit;
}
.algo-popup-btn--accept { background: var(--navy); color: var(--white); }
.algo-popup-btn--accept:hover { background: var(--navy-dark); }
.algo-popup-btn--change { background: #f1f5f9; color: var(--text-body); }
.algo-popup-btn--change:hover { background: #e2e8f0; }
.algo-popup-btn.is-pressed {
  background: #cbd5e1;
  transform: scale(0.94);
  transition: transform 0.12s ease, background 0.12s ease;
}
.algo-popup-btn svg { width: 11px; height: 11px; }

/* ============== IMOPTIM IN ACTION (FCFS vs ImOptim comparison) ============== */
.in-action-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.in-action-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 15% 30%, rgba(110, 197, 207, 0.14), transparent 50%),
    radial-gradient(ellipse at 85% 85%, rgba(110, 197, 207, 0.09), transparent 55%);
  pointer-events: none;
}

/* Two-column layout: text on the left, comparison visualization on the right */
.in-action-grid-2col {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
}

.in-action-text {
  color: rgba(255, 255, 255, 0.82);
}
.in-action-text .section-tag {
  color: var(--teal);
  display: inline-block;
  margin-bottom: 14px;
}
.in-action-title {
  color: var(--white);
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
}
.in-action-subtitle {
  color: var(--white);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 18px;
}
.in-action-text p {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 14px;
}
.in-action-text p:last-child { margin-bottom: 0; }
.in-action-text strong { color: var(--white); font-weight: 700; }

.in-action-viz { min-width: 0; }
/* The comparison fills its grid cell (no need for its own max-width here) */
.in-action-viz .comparison { max-width: none; margin: 0; }

/* The comparison block: 2 panels side by side */
.comparison {
  --team-sales: #1D4ED8;       /* blue-700: deeper blue for Sales */
  --team-marketing: #38BDF8;   /* sky-400: lighter saturated sky — distinct from Sales but same blue family */
  --team-tech: #047857;        /* emerald-700: deep forest green */
  --team-product: #2DD4BF;     /* teal-400: lighter teal — distinct from Tech but same green family */
  --team-hr: #A855F7;          /* purple-500 */
  --team-support: #D946EF;     /* fuchsia-500 */
  --team-empty: #e2e8f0;

  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 24px;
  z-index: 1;
}

/* Scenario tabs */
/* Single "Situations" title above the tab bar */
.comparison-tabs-header {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.comparison-tabs-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* Connected pill bar (segmented control) — tabs share a single rounded container */
.comparison-tabs {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto 24px;
  width: fit-content;
  max-width: 100%;
  gap: 2px;
}
.comparison-tab {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}
.comparison-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.comparison-tab.is-active {
  background: var(--teal);
  color: var(--navy-dark);
  box-shadow: 0 2px 8px rgba(74, 184, 196, 0.35);
}

/* Fade transition when situation changes (driven by .is-switching class via JS) */
.comparison-panels {
  transition: opacity 0.28s ease;
}
.comparison.is-switching .comparison-panels {
  opacity: 0.15;
}

.comparison-panels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}

.comparison-panel {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  position: relative;
}
.comparison-panel--fcfs {
  /* allow the explanatory popup to extend slightly beyond the panel edges */
  overflow: visible;
}
.comparison-panel--imoptim {
  outline: 2px solid rgba(110, 197, 207, 0.35);
  outline-offset: -2px;
}

.comparison-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid;
}
.comparison-panel-header svg { width: 22px; height: 22px; flex-shrink: 0; }
.comparison-panel-header h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}
.comparison-panel-header p {
  font-size: 12px;
  font-weight: 500;
  margin: 1px 0 0;
  opacity: 0.85;
}
.comparison-panel-header--fcfs {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.comparison-panel-header--imoptim {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

/* Floor plans inside each panel */
.comparison-floors {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  flex: 1;
}
/* Only the active scenario's floors are visible (hides all others) */
.comparison[data-scenario="0"] .comparison-floors:not([data-scenario="0"]) { display: none; }
.comparison[data-scenario="1"] .comparison-floors:not([data-scenario="1"]) { display: none; }
.comparison[data-scenario="2"] .comparison-floors:not([data-scenario="2"]) { display: none; }
.comparison[data-scenario="3"] .comparison-floors:not([data-scenario="3"]) { display: none; }
.comparison[data-scenario="4"] .comparison-floors:not([data-scenario="4"]) { display: none; }

.comparison-floor {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 8px 10px;
  position: relative;
}
.comparison-floor-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}
.comparison-blocks {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* Each block = 2x2 grid of individual desks */
.comparison-block {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 3px;
  background: #f1f5f9;
  border-radius: 5px;
  aspect-ratio: 1 / 1;
}
.comparison-quad {
  border-radius: 2px;
  background-color: var(--quad-color, var(--team-empty));
  transition: background-color 0.4s ease;
}
.comparison-quad[data-team="sales"] { --quad-color: var(--team-sales); }
.comparison-quad[data-team="marketing"] { --quad-color: var(--team-marketing); }
.comparison-quad[data-team="tech"] { --quad-color: var(--team-tech); }
.comparison-quad[data-team="product"] { --quad-color: var(--team-product); }
.comparison-quad[data-team="hr"] { --quad-color: var(--team-hr); }
.comparison-quad[data-team="support"] { --quad-color: var(--team-support); }
.comparison-quad[data-team="empty"] { --quad-color: #e2e8f0; }
/* Broken desk — diagonal hatch with warning red */
.comparison-quad[data-team="broken"] {
  --quad-color: #fee2e2;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(220, 38, 38, 0.55) 2px,
    rgba(220, 38, 38, 0.55) 3px
  );
}
/* New intern — soft amber with subtle pulse so the eye finds them quickly */
.comparison-quad[data-team="newcomer"] {
  --quad-color: #fbbf24;
  box-shadow: 0 0 0 1.5px #f59e0b inset;
  animation: comparison-newcomer-pulse 1.8s ease-in-out infinite;
}
@keyframes comparison-newcomer-pulse {
  0%, 100% { box-shadow: 0 0 0 1.5px #f59e0b inset, 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 1.5px #f59e0b inset, 0 0 0 3px rgba(245, 158, 11, 0); }
}

/* Isolated desk: red pulsing ring marks an employee dropped in the wrong team area */
.comparison-quad[data-isolated="true"] {
  outline: 2px solid #dc2626;
  outline-offset: 1px;
  z-index: 2;
  position: relative;
  animation: comparison-isolated-pulse 1.6s ease-in-out infinite;
}
@keyframes comparison-isolated-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0); }
}

/* Overflow indicator on FCFS FL.1 (scenario 2): people unable to enter */
.comparison-overflow-badge {
  position: absolute;
  top: -10px;
  right: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}
.comparison-overflow-badge svg { width: 12px; height: 12px; }
/* Amber-tinted variant for the "3 floors heated" warning in scenario 3 */
.comparison-overflow-badge--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

/* "Floor closed" badge centered on FL.3 in ImOptim scenario 3 */
.comparison-floor--closed {
  position: relative;
}
.comparison-floor--closed .comparison-blocks {
  opacity: 0.55;
}
.comparison-closed-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.88);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.comparison-closed-badge svg { width: 13px; height: 13px; }

/* Explanatory popup in FCFS panel — only visible in scenario 2 ("why people stay home") */
.comparison-popup {
  position: absolute;
  top: 48%;
  left: 58%;
  transform: translate(-50%, -50%);
  width: 200px;
  background: var(--white);
  border: 1px solid #e5ebf2;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  z-index: 20;
  display: none;
}
.comparison[data-scenario="1"] .comparison-popup:not(.comparison-popup--over) {
  display: block;
  animation: comparison-popup-pulse 2.6s ease-in-out infinite;
}
/* "Office full" popup — only in scenario 4 (over capacity) */
.comparison[data-scenario="3"] .comparison-popup--over {
  display: block;
  animation: comparison-popup-pulse 2.6s ease-in-out infinite;
}
/* "When it's not that simple" popup — only in scenario 5 */
.comparison[data-scenario="4"] .comparison-popup--complex {
  display: block;
  animation: comparison-popup-pulse 2.6s ease-in-out infinite;
}
.comparison-popup--over {
  width: 210px;
  text-align: center;
}
.comparison-popup--over .comparison-popup-title {
  font-size: 14px;
  margin: 0 auto;
}
.comparison-popup--over .comparison-popup-header {
  justify-content: center;
  margin-bottom: 8px;
}
.comparison-popup--over .comparison-popup-text {
  text-align: center;
  font-style: italic;
  font-size: 11.5px;
  color: #475569;
  margin: 0;
}

/* Schedule rules card on ImOptim side (scenario 4 only) */
.comparison-rules-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 280px;
  background: var(--white);
  border: 1px solid #d1fae5;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 20px 50px rgba(10, 46, 92, 0.22);
  z-index: 4;
  animation: comparison-rules-pulse 2.4s ease-in-out infinite;
}
.comparison[data-scenario="3"] .comparison-rules-card { display: flex; }
.comparison-rules-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f7;
}
.comparison-rules-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.comparison-rules-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
  animation: comparison-rules-dot 1.6s ease-in-out infinite;
}
.comparison-rules-body {
  display: flex;
  align-items: center;
  gap: 12px;
}
.comparison-rules-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: #ecfdf5;
  color: #047857;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.comparison-rules-icon svg { width: 18px; height: 18px; }
.comparison-rules-text { display: flex; flex-direction: column; gap: 3px; }
.comparison-rules-text p {
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  margin: 0;
}
.comparison-rules-text p strong {
  color: #0f172a;
  font-weight: 700;
}
.comparison-rules-pointer {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: var(--white);
  border-right: 1px solid #d1fae5;
  border-bottom: 1px solid #d1fae5;
  box-shadow: 4px 4px 10px rgba(10, 46, 92, 0.06);
}
@keyframes comparison-rules-pulse {
  0%, 100% { box-shadow: 0 20px 50px rgba(10, 46, 92, 0.22); }
  50% { box-shadow: 0 20px 50px rgba(16, 185, 129, 0.32); }
}
@keyframes comparison-rules-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0.08); }
}

/* === Scenario 5 — When it's not that simple === */
/* FCFS "Zone Full" complex popup */
.comparison-popup--complex {
  width: 260px;
  text-align: left;
}
.comparison-popup--complex .comparison-popup-header {
  margin-bottom: 8px;
}
.comparison-popup--complex .comparison-popup-text {
  font-size: 11.5px;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 8px;
}
.comparison-popup-tagline {
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  color: #dc2626;
  text-align: center;
  margin: 0 0 8px;
}
.comparison-walkout {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0 2px;
  color: #64748b;
}
.comparison-walkout-icon {
  width: 64px;
  height: 40px;
  overflow: visible;
}
.comparison-walkout-icon .comparison-walkout-item {
  animation: comparison-walkout-toss 1.8s ease-in-out infinite;
  transform-origin: 5px 6px;
}
@keyframes comparison-walkout-toss {
  0%, 100% { transform: translate(8px, 14px) rotate(-20deg); }
  50% { transform: translate(4px, 10px) rotate(-50deg); }
}

/* ImOptim "Resolution" card */
.comparison-resolution-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 300px;
  background: var(--white);
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.25);
  z-index: 4;
  animation: comparison-rules-pulse 2.4s ease-in-out infinite;
}
.comparison[data-scenario="4"] .comparison-resolution-card { display: flex; }
.comparison-resolution-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f7;
}
.comparison-resolution-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.comparison-resolution-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
  animation: comparison-rules-dot 1.6s ease-in-out infinite;
}
.comparison-resolution-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.comparison-resolution-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #1e293b;
}
.comparison-resolution-check {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.2;
}
.comparison-resolution-note {
  font-size: 11px;
  line-height: 1.5;
  font-style: italic;
  color: #475569;
  margin: 4px 0 0;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.comparison-resolution-pointer {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: var(--white);
  border-right: 1.5px solid #a7f3d0;
  border-bottom: 1.5px solid #a7f3d0;
}

.comparison-panel--imoptim { position: relative; }
@keyframes comparison-popup-pulse {
  0%, 100% { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22); }
  50% { box-shadow: 0 16px 40px rgba(220, 38, 38, 0.35); }
}

.comparison-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.comparison-popup-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.1px;
}
.comparison-popup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}
.comparison-popup-text {
  font-size: 11px;
  line-height: 1.5;
  color: #64748b;
  margin: 0 0 12px;
}
.comparison-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.comparison-popup-btn {
  position: relative;
  border: none;
  font-family: inherit;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.comparison-popup-btn--alt {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.comparison-popup-btn--alt:hover { background: #e2e8f0; }
.comparison-popup-btn--primary {
  background: #ef4444;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.comparison-popup-btn--primary:hover { background: #dc2626; }

/* Fake mouse cursor on the Stay home button — suggests the user is about to click */
.comparison-popup-cursor {
  position: absolute;
  bottom: -12px;
  right: -10px;
  width: 22px;
  height: 22px;
  color: #1e293b;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

/* Pointer triangle at the bottom of the popup, pointing down toward FL.1 */
.comparison-popup-pointer {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: var(--white);
  border-right: 1px solid #e5ebf2;
  border-bottom: 1px solid #e5ebf2;
}

/* Highlight the block where ImOptim moved overflow people (scenario 2 right panel) */
.comparison-block[data-overflow="true"] {
  outline: 2px dashed rgba(59, 130, 246, 0.5);
  outline-offset: 1px;
  animation: comparison-overflow-pulse 2s ease-in-out infinite;
}
@keyframes comparison-overflow-pulse {
  0%, 100% { outline-color: rgba(59, 130, 246, 0.35); }
  50% { outline-color: rgba(59, 130, 246, 0.7); }
}

/* Center arrow between the two panels */
.comparison-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  padding: 0 4px;
}
.comparison-arrow svg {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px;
  box-sizing: content-box;
}

/* Shared legend */
.comparison-legend {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 16px;
}
.comparison-legend-team {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.comparison-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background-color: var(--quad-color, var(--team-empty));
}
.comparison-legend-dot[data-team="sales"] { --quad-color: var(--team-sales); }
.comparison-legend-dot[data-team="marketing"] { --quad-color: var(--team-marketing); }
.comparison-legend-dot[data-team="tech"] { --quad-color: var(--team-tech); }
.comparison-legend-dot[data-team="product"] { --quad-color: var(--team-product); }
.comparison-legend-dot[data-team="hr"] { --quad-color: var(--team-hr); }
.comparison-legend-dot[data-team="support"] { --quad-color: var(--team-support); }

/* CTA at the bottom of the section */
.in-action-cta {
  position: relative;
  margin: 50px auto 0;
  max-width: 980px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 40px 32px;
  text-align: center;
  overflow: hidden;
  z-index: 1;
}
.in-action-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(59, 130, 246, 0.18), transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(110, 197, 207, 0.22), transparent 50%);
  pointer-events: none;
}
.in-action-cta h3 {
  position: relative;
  color: var(--white);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 12px;
  line-height: 1.2;
}
.in-action-cta-accent {
  background: linear-gradient(90deg, #60a5fa 0%, #6EC5CF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.in-action-cta p {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto 26px;
}
.in-action-cta-actions {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-cta-primary,
.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-cta-primary svg,
.btn-cta-secondary svg { width: 16px; height: 16px; }

.btn-cta-primary {
  background: var(--teal);
  color: var(--navy-dark);
  box-shadow: 0 10px 24px rgba(110, 197, 207, 0.3);
}
.btn-cta-primary:hover {
  background: var(--teal-bright);
  color: var(--navy-dark);
  transform: translateY(-2px);
}
.btn-cta-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

/* ============== KEY BENEFITS ============== */
.benefits-section {
  background: linear-gradient(45deg, var(--bg-light) 0%, var(--white) 100%);
  padding: 100px 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.benefit {
  text-align: center;
  padding: 10px 8px;
}

.benefit-icon {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  color: var(--white);
  transition: transform 0.3s, background 0.3s;
}

.benefit:hover .benefit-icon {
  transform: scale(1.05);
  background: var(--teal-bright);
}

.benefit-icon svg { width: 44px; height: 44px; stroke: currentColor; }

.benefit h3 {
  color: var(--text-dark);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.benefit p {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.75;
  max-width: 300px;
  margin: 0 auto;
}

/* ============== FAQ ============== */
.faq-section {
  background: linear-gradient(225deg, var(--bg-light) 0%, var(--white) 70%);
  padding: 100px 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px 70px;
  max-width: 1200px;
  margin: 0 auto;
}

.faq-item h3 {
  color: var(--text-dark);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.faq-item p {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.75;
}

.faq-cta-wrap {
  text-align: center;
  margin-top: 70px;
  font-size: 17px;
  color: var(--text-body);
}

.faq-cta-wrap a {
  color: var(--teal-bright);
  font-weight: 600;
  margin-left: 10px;
  text-decoration: underline;
}

.faq-cta-wrap a:hover { color: var(--navy); }

/* ============== FLEX LOCKER — Nav ============== */
.main-nav .nav-active {
  color: var(--teal);
  font-weight: 700;
  position: relative;
}
.main-nav .nav-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

/* Product switcher — "exit" link to the sibling product site */
.product-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid rgba(110, 197, 207, 0.45);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.product-switch:hover {
  background: var(--teal);
  color: var(--navy);
  border-color: var(--teal);
  transform: translateY(-1px);
}
.product-switch-arrow {
  font-size: 13px;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s;
}
.product-switch:hover .product-switch-arrow {
  transform: translate(2px, -2px);
}

/* ============== FLEX LOCKER — Hero ============== */
.locker-hero {
  padding: 90px 0 80px;
  text-align: left;
}

.locker-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.locker-hero-logo { text-align: center; }
.locker-hero-logo img {
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.35));
}

.locker-hero-product { color: var(--white); }

.locker-hero-wordmark {
  display: block;
  width: auto;
  max-width: 280px;
  height: auto;
  margin: 0 0 18px;
}

.locker-hero-title {
  color: var(--white);
  font-size: clamp(44px, 6.5vw, 80px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 20px;
}

.locker-hero-subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 40px;
  max-width: 540px;
}

.locker-hero-metrics {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.locker-metric { display: flex; flex-direction: column; gap: 4px; }

.locker-metric-value {
  color: var(--teal);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.locker-metric-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 500;
}

/* ============== FLEX LOCKER — Problems ============== */
.locker-problems {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
  padding: 90px 0;
}

.section-header--tag-only { margin-bottom: 30px; }

.locker-problems-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
}

.locker-problems-content {
  display: flex;
  flex-direction: column;
}

.locker-problems-title {
  color: var(--text-dark);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin-bottom: 12px;
}

.locker-problems-lead {
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.locker-problems-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.locker-problem {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--white);
  border: 1px solid rgba(10, 46, 92, 0.08);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 4px 18px rgba(10, 46, 92, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.locker-problem:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(10, 46, 92, 0.09);
}

.locker-problem-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.locker-problem-icon svg { width: 24px; height: 24px; stroke: currentColor; }

.locker-problem-body { flex: 1; min-width: 0; }

.locker-problem h3 {
  color: var(--text-dark);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
  line-height: 1.25;
}
.locker-problem p {
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.locker-problems-visual {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(10, 46, 92, 0.16);
  min-height: 320px;
}
.locker-problems-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============== FLEX LOCKER — Solution ============== */
.locker-solution {
  background: var(--white);
  padding: 45px 0 90px;
}
.locker-solution .section-header { max-width: 1040px; margin-bottom: 45px; }
.locker-solution .section-lead { max-width: 920px; }

.locker-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto 56px;
}

.locker-feature {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 28px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.locker-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(10, 46, 92, 0.08);
}

.locker-feature-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.locker-feature-num {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.locker-feature h3 {
  color: var(--text-dark);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
  margin: 0;
}
.locker-feature p {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

.locker-screenshot {
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(10, 46, 92, 0.16);
  border: 1px solid rgba(10, 46, 92, 0.1);
}
.locker-screenshot img { width: 100%; height: auto; display: block; }

/* ============== FLEX LOCKER — Testimonial ============== */
.locker-testimonial {
  background: linear-gradient(225deg, var(--bg-light) 0%, var(--white) 70%);
  padding: 90px 0;
}

.locker-testimonial-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.locker-pullquote {
  color: var(--navy);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.3;
  margin: 16px 0 40px;
}

.locker-quote {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.8;
  text-align: left;
  max-width: 720px;
  margin: 0 auto 30px;
  padding-left: 24px;
  border-left: 3px solid var(--teal);
}
.locker-quote p { margin-bottom: 14px; }
.locker-quote p:last-child { margin-bottom: 0; }

.locker-testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: var(--text-dark);
  text-align: left;
}
.locker-testimonial-author strong {
  display: block;
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}
.locker-testimonial-author span {
  display: block;
  color: var(--text-gray);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.locker-testimonial-logo {
  height: 48px;
  width: auto;
  max-width: 160px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .locker-testimonial-author { flex-direction: column; gap: 14px; text-align: center; }
}

/* ============== ABOUT PAGE ============== */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.about-intro h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 30px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.about-intro ul { list-style: none; padding: 0; }

.about-intro ul li {
  position: relative;
  padding: 0 0 18px 36px;
  color: var(--text-body);
  line-height: 1.7;
  font-size: 15px;
}

.about-intro ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
}

.about-intro ul li::after {
  content: "✓";
  position: absolute;
  left: 6px;
  top: 6px;
  color: var(--white);
  font-size: 13px;
  font-weight: bold;
}

.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 40px auto 0;
  max-width: 1100px;
}

.team--pair {
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 0 auto;
  max-width: 560px;
}
.team--pair .team-member { aspect-ratio: 3 / 4; }
.team--pair .team-info { padding: 10px 10px; }
.team--pair .team-info h3 { font-size: 16px; margin-bottom: 1px; }
.team--pair .team-info p { font-size: 12px; }

.team-member {
  position: relative;
  background: var(--navy);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}

.team-photo {
  width: 100%;
  height: 100%;
  background: var(--navy);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.team-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 18px 20px;
  text-align: center;
}

.team-info h3 {
  color: var(--text-dark);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.team-info p {
  color: var(--teal-bright);
  font-size: 13px;
  font-weight: 500;
}

/* ============== CONTACT PAGE ============== */
.contact-section {
  background: #F3F4F6;
  padding: 90px 0 110px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info { color: var(--text-dark); }

.contact-tag {
  color: var(--teal-bright);
  font-size: 17px;
  font-weight: 600;
  display: block;
  margin-bottom: 16px;
}

.contact-title {
  color: var(--text-dark);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.contact-desc {
  color: var(--text-gray);
  font-size: 16px;
  margin-bottom: 36px;
  max-width: 460px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.contact-icon {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item-text { display: flex; flex-direction: column; line-height: 1.4; }
.contact-item-text span {
  color: var(--text-gray);
  font-size: 14px;
  margin-bottom: 2px;
}
.contact-item-text a,
.contact-item-text strong {
  color: var(--text-dark);
  font-size: 17px;
  font-weight: 700;
}
.contact-item-text a:hover { color: var(--teal-bright); }

.contact-follow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(10, 46, 92, 0.12);
}
.contact-follow h3 {
  color: var(--text-dark);
  font-size: 22px;
  font-weight: 800;
}

.social-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.social-circle:hover {
  background: var(--teal-bright);
  color: var(--white);
  transform: translateY(-2px);
}

.contact-form { background: transparent; padding: 0; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-group { margin-bottom: 22px; }

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: none;
  letter-spacing: 0;
}
.form-group label .req { color: var(--teal-bright); margin-left: 2px; }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #C9CED6;
  border-radius: 2px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-dark);
  transition: border-color 0.2s, background 0.2s;
  background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9AA3AE;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
}

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

.btn-submit {
  background: #2D5BDE;
  color: var(--white);
  border: none;
  padding: 14px 42px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s, transform 0.2s;
  margin-top: 6px;
}
.btn-submit:hover { background: #1F47BC; transform: translateY(-1px); }

/* ============== HUMAN-CENTERED (co-built algorithm) ============== */
.human-section {
  /* Team palette must be redeclared here — variables are scoped to .algo-loop / .comparison elsewhere */
  --team-sales: #1D4ED8;
  --team-marketing: #38BDF8;
  --team-tech: #047857;
  --team-product: #2DD4BF;
  --team-hr: #A855F7;
  --team-support: #D946EF;
  --team-empty: #e2e8f0;

  background: #f8fafc;
  padding: 90px 0;
  border-top: 1px solid #e2e8f0;
}
.human-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: center;
}

/* LEFT: narrative */
.human-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-bright, #14b8a6);
  background: #ccfbf1;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.human-title {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 16px;
  font-weight: 800;
}
.human-lead {
  font-size: 17px;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 28px;
}
.human-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.human-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.human-step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy, #0a2e5c);
  color: var(--white, #fff);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.human-steps h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 4px 0 4px;
  line-height: 1.3;
}
.human-steps p {
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
  margin: 0;
}

/* RIGHT: diagram container */
.human-diagram {
  position: relative;
  background: #f1f5f9;
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.human-diagram-cols {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 8px;
  align-items: stretch;
  min-height: 460px;
}
.human-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

/* --- COL 1: stakeholders --- */
.human-col--stakeholders { gap: 14px; padding: 4px 0; }
.human-stake {
  position: relative;
  background: var(--white, #fff);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.human-stake-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.human-stake-icon svg { width: 22px; height: 22px; }
.human-stake--exec .human-stake-icon { background: #dbeafe; color: #2563eb; }
.human-stake--mgr  .human-stake-icon { background: #e0e7ff; color: #4f46e5; }
.human-stake--emp  .human-stake-icon { background: #d1fae5; color: #047857; }
.human-stake-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

/* Animated flow lines between columns */
.human-flow {
  position: absolute;
  top: 0;
  width: 80px;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.human-flow--in  { right: -42px; }
.human-flow--out { left: -42px; }
.human-flow-path {
  fill: none;
  stroke: #94a3b8;
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  stroke-linecap: round;
  animation: humanFlow 1.6s linear infinite;
}
@keyframes humanFlow {
  from { stroke-dashoffset: 20; }
  to   { stroke-dashoffset: 0; }
}

/* --- COL 2: engine --- */
.human-col--engine {
  background: var(--white, #fff);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 14px;
  align-items: center;
  gap: 10px;
}
.human-engine-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.human-data-icon {
  position: relative;
  color: #059669;
}
.human-data-icon svg { width: 38px; height: 38px; }
.human-data-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
  animation: humanPulse 2s ease-out infinite;
}
@keyframes humanPulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  70%  { transform: scale(1.4); box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.human-block-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
}

.human-connector {
  width: 2px;
  height: 18px;
  background-image: linear-gradient(to bottom, #cbd5e1 50%, transparent 50%);
  background-size: 2px 6px;
  background-repeat: repeat-y;
}

.human-engine-core {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: humanCoreGlow 2.4s ease-in-out infinite;
}
.human-engine-cpu {
  width: 44px;
  height: 44px;
  color: #60a5fa;
  position: relative;
  z-index: 2;
}
.human-engine-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.22) 50%, transparent 100%);
  animation: humanScan 1.8s linear infinite;
}
@keyframes humanCoreGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
  50%      { box-shadow: 0 0 28px 2px rgba(59, 130, 246, 0.45); }
}
@keyframes humanScan {
  from { transform: translateY(-100%); }
  to   { transform: translateY(100%); }
}

.human-mixer {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.human-mixer-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #94a3b8;
}
.human-mixer-sliders {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  height: 70px;
  padding: 0 4px;
}
.human-slider {
  flex: 1;
  height: 100%;
  display: flex;
  justify-content: center;
}
.human-slider-track {
  position: relative;
  width: 6px;
  height: 100%;
  background: #e2e8f0;
  border-radius: 999px;
}
.human-slider-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--val);
  background: linear-gradient(to top, #3b82f6, #93c5fd);
  border-radius: 999px;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.human-slider-thumb {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--val) - 4px);
  width: 16px;
  height: 8px;
  background: #334155;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: bottom 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.human-slider-thumb::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 25%;
  right: 25%;
  height: 1px;
  background: #94a3b8;
  transform: translateY(-50%);
}

/* --- COL 3: outputs --- */
.human-col--outputs { gap: 12px; padding: 4px 0; }
.human-output {
  background: var(--white, #fff);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.human-output-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 6px;
}
.human-chart {
  width: 100%;
  height: 60px;
  display: block;
}
/* Chart line and fill are now phase-driven via transitions (see phase rules below) */
.human-chart-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.6s ease-out;
}
.human-chart-area {
  opacity: 0;
  transition: opacity 1.6s ease-out;
}

.human-output--plan { padding: 12px; }
.human-mini-stage {
  position: relative;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  padding: 8px;
  height: 120px;
  overflow: hidden;
}
/* Each scenario stacks 3 floors. Each floor has 4 blocks (2x2 quads), matching the big comparison plans. */
.human-mini-floors {
  position: absolute;
  inset: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.06s ease;
}
.human-mini-floors.is-active { opacity: 1; }
.human-mini-floor {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
/* Closed floor: diagonal hatch overlay + lock icon centered, like the big comparison plan */
.human-mini-floor--closed {
  position: relative;
  opacity: 0.92;
}
.human-mini-floor--closed::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(71, 85, 105, 0.55) 3px,
    rgba(71, 85, 105, 0.55) 4px
  );
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}
.human-mini-floor--closed::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background-color: var(--white, #fff);
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
  z-index: 2;
}
.human-mini-block {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1px;
  padding: 1px;
  background: #cbd5e1;
  border-radius: 3px;
  min-height: 0;
}
.human-mini-q {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  border-radius: 1px;
  background-color: var(--quad-color, #f1f5f9);
}
.human-mini-q[data-team="sales"]     { --quad-color: var(--team-sales); }
.human-mini-q[data-team="marketing"] { --quad-color: var(--team-marketing); }
.human-mini-q[data-team="tech"]      { --quad-color: var(--team-tech); }
.human-mini-q[data-team="product"]   { --quad-color: var(--team-product); }
.human-mini-q[data-team="hr"]        { --quad-color: var(--team-hr); }
.human-mini-q[data-team="support"]   { --quad-color: var(--team-support); }
.human-mini-q[data-team="empty"]     { --quad-color: #e2e8f0; }

.human-output--stats {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.human-stat {
  border-radius: 10px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.human-stat-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.human-stat-value small {
  font-size: 12px;
  font-weight: 700;
  margin-left: 1px;
}
.human-stat-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.human-stat-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  opacity: 0.85;
}
.human-stat-seat { display: none; }
.human-stat-seat[data-state="v1"] { display: inline; }
.human-section[data-phase="outputs2"] .human-stat-seat[data-state="v1"],
.human-section[data-phase="approved"] .human-stat-seat[data-state="v1"] { display: none; }
.human-section[data-phase="outputs2"] .human-stat-seat[data-state="v2"],
.human-section[data-phase="approved"] .human-stat-seat[data-state="v2"] { display: inline; }
.human-stat--green { background: #ecfdf5; border: 1px solid #d1fae5; }
.human-stat--green .human-stat-value { color: #047857; }
.human-stat--green .human-stat-label { color: #065f46; }
.human-stat--amber { background: #fffbeb; border: 1px solid #fde68a; }
.human-stat--amber .human-stat-value { color: #b45309; }
.human-stat--amber .human-stat-label { color: #92400e; }
.human-stat--slate { background: #f1f5f9; border: 1px solid #e2e8f0; }
.human-stat--slate .human-stat-value { color: #475569; }
.human-stat--slate .human-stat-label { color: #475569; }

/* Pause animations when offscreen / reduced motion */
.human-section[data-paused="true"] .human-flow-path,
.human-section[data-paused="true"] .human-engine-scan,
.human-section[data-paused="true"] .human-data-dot,
.human-section[data-paused="true"] .human-engine-core,
.human-section[data-paused="true"] .human-chart-line,
.human-section[data-paused="true"] .human-chart-area {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .human-flow-path, .human-engine-scan, .human-data-dot, .human-engine-core,
  .human-chart-line, .human-chart-area, .human-slider-fill, .human-slider-thumb {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================================================
   PHASE CHOREOGRAPHY — driven by [data-phase] on .human-section
   Phases: pending → inputs → tuning → computing → outputs
         → review → retune → recompute → outputs2 → approved
   ========================================================= */

/* ----- Stake-card badges (✓ / 🖐️) ----- */
.human-stake-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 4;
}
.human-stake-badge[data-state="check"] {
  background: #10b981;
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}
.human-stake-badge[data-state="hand"] {
  background: #f59e0b;
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.45);
  animation: humanHandWave 1.1s ease-in-out infinite;
}
@keyframes humanHandWave {
  0%, 100% { transform: scale(1) rotate(-12deg); }
  50% { transform: scale(1.1) rotate(12deg); }
}
.human-stake-badge-icon { display: none; width: 13px; height: 13px; }
.human-stake-badge[data-state="check"] .human-stake-badge-icon--check { display: block; }
.human-stake-badge[data-state="hand"] .human-stake-badge-icon--hand { display: block; }

/* ----- Floating pills overlay ----- */
.human-pill {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  background: var(--white, #fff);
  border: 1.5px solid;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
  transform: translate(-50%, -50%) scale(0.5);
}
.human-pill--in[data-pill="exec"] { top: 14%; left: 22%; border-color: #93c5fd; color: #1e40af; }
.human-pill--in[data-pill="mgr"]  { top: 50%; left: 22%; border-color: #a5b4fc; color: #4338ca; }
.human-pill--in[data-pill="emp"]  { top: 86%; left: 22%; border-color: #6ee7b7; color: #047857; }
.human-pill--out[data-pill="chart"] { top: 50%; left: 52%; border-color: #93c5fd; color: #1e40af; }
.human-pill--out[data-pill="plan"]  { top: 50%; left: 52%; border-color: #d1fae5; color: #065f46; }
.human-pill--out[data-pill="stats"] { top: 50%; left: 52%; border-color: #fde68a; color: #92400e; }

.human-section[data-phase="inputs"] .human-pill--in[data-pill="exec"] {
  animation: humanPillIn--exec 2.4s ease-in-out forwards;
}
.human-section[data-phase="inputs"] .human-pill--in[data-pill="mgr"] {
  animation: humanPillIn--mgr 2.4s ease-in-out 0.25s forwards;
}
.human-section[data-phase="inputs"] .human-pill--in[data-pill="emp"] {
  animation: humanPillIn--emp 2.4s ease-in-out 0.5s forwards;
}

.human-section[data-phase="computing"] .human-pill--out[data-pill="chart"],
.human-section[data-phase="recompute"] .human-pill--out[data-pill="chart"] {
  animation: humanPillOut--chart 1.8s ease-in-out 0.25s forwards;
}
.human-section[data-phase="computing"] .human-pill--out[data-pill="plan"],
.human-section[data-phase="recompute"] .human-pill--out[data-pill="plan"] {
  animation: humanPillOut--plan 1.8s ease-in-out 0.45s forwards;
}
.human-section[data-phase="computing"] .human-pill--out[data-pill="stats"],
.human-section[data-phase="recompute"] .human-pill--out[data-pill="stats"] {
  animation: humanPillOut--stats 1.8s ease-in-out 0.65s forwards;
}

@keyframes humanPillIn--exec {
  0%  { opacity: 0; top: 14%; left: 22%; transform: translate(-50%, -50%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.45); }
}
@keyframes humanPillIn--mgr {
  0%  { opacity: 0; top: 50%; left: 22%; transform: translate(-50%, -50%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.45); }
}
@keyframes humanPillIn--emp {
  0%  { opacity: 0; top: 86%; left: 22%; transform: translate(-50%, -50%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.45); }
}
@keyframes humanPillOut--chart {
  0%  { opacity: 0; top: 50%; left: 52%; transform: translate(-50%, -50%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; top: 18%; left: 82%; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; top: 18%; left: 82%; transform: translate(-50%, -50%) scale(0.45); }
}
@keyframes humanPillOut--plan {
  0%  { opacity: 0; top: 50%; left: 52%; transform: translate(-50%, -50%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; top: 50%; left: 82%; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; top: 50%; left: 82%; transform: translate(-50%, -50%) scale(0.45); }
}
@keyframes humanPillOut--stats {
  0%  { opacity: 0; top: 50%; left: 52%; transform: translate(-50%, -50%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; top: 86%; left: 82%; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; top: 86%; left: 82%; transform: translate(-50%, -50%) scale(0.45); }
}

/* ----- Chart + Pie layout ----- */
.human-chart-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.human-chart { flex: 1; min-width: 0; }
.human-pie {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}
.human-pie-version {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* ----- Stat v1 / v2 toggle ----- */
.human-stat-num { display: none; }
.human-stat-num[data-state="v1"] { display: inline; }

/* ----- Output reveal (hidden until first compute completes) ----- */
.human-output {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.human-output--chart { transition-delay: 0s; }
.human-output--plan { transition-delay: 0.15s; }
.human-output--stats { transition-delay: 0.3s; }

/* ----- Excel block descends during compute ----- */
.human-engine-block {
  transition: transform 0.7s cubic-bezier(0.6, 0, 0.4, 1), opacity 0.7s ease;
}

/* ----- Engine core "milling" during compute ----- */
.human-engine-core {
  transition: transform 0.3s ease;
}

/* =========================================================
   Per-phase state rules
   ========================================================= */

/* --- PENDING: outputs invisible, no badges, no chart drawn --- */
.human-section[data-phase="pending"] .human-output,
.human-section[data-phase="inputs"] .human-output,
.human-section[data-phase="tuning"] .human-output,
.human-section[data-phase="computing"] .human-output {
  opacity: 0;
  transform: translateY(8px);
}

/* --- Outputs reveal once first compute completes --- */
.human-section[data-phase="outputs"] .human-output,
.human-section[data-phase="review"] .human-output,
.human-section[data-phase="retune"] .human-output,
.human-section[data-phase="recompute"] .human-output,
.human-section[data-phase="outputs2"] .human-output,
.human-section[data-phase="approved"] .human-output {
  opacity: 1;
  transform: translateY(0);
}

/* --- Chart drawing: drawn once on outputs / outputs2, persists after --- */
.human-section[data-phase="outputs"] .human-chart-line,
.human-section[data-phase="review"] .human-chart-line,
.human-section[data-phase="retune"] .human-chart-line,
.human-section[data-phase="outputs2"] .human-chart-line,
.human-section[data-phase="approved"] .human-chart-line {
  stroke-dashoffset: 0;
}
.human-section[data-phase="outputs"] .human-chart-area,
.human-section[data-phase="review"] .human-chart-area,
.human-section[data-phase="retune"] .human-chart-area,
.human-section[data-phase="outputs2"] .human-chart-area,
.human-section[data-phase="approved"] .human-chart-area {
  opacity: 1;
}
/* Reset the chart instantly during recompute so it can re-draw in outputs2 */
.human-section[data-phase="recompute"] .human-chart-line {
  transition: stroke-dashoffset 0.12s ease-out;
  stroke-dashoffset: 600;
}
.human-section[data-phase="recompute"] .human-chart-area {
  transition: opacity 0.12s ease-out;
  opacity: 0;
}

/* --- Pie chart version visibility per phase --- */
.human-section[data-phase="outputs"] .human-pie-version[data-version="v1"],
.human-section[data-phase="review"] .human-pie-version[data-version="v1"],
.human-section[data-phase="retune"] .human-pie-version[data-version="v1"] {
  opacity: 1;
}
.human-section[data-phase="outputs2"] .human-pie-version[data-version="v2"],
.human-section[data-phase="approved"] .human-pie-version[data-version="v2"] {
  opacity: 1;
}

/* --- Stat numbers v1 / v2 swap --- */
.human-section[data-phase="outputs2"] .human-stat-num[data-state="v1"],
.human-section[data-phase="approved"] .human-stat-num[data-state="v1"] { display: none; }
.human-section[data-phase="outputs2"] .human-stat-num[data-state="v2"],
.human-section[data-phase="approved"] .human-stat-num[data-state="v2"] { display: inline; }

/* --- Excel descends into the engine during compute / recompute --- */
.human-section[data-phase="computing"] .human-engine-block,
.human-section[data-phase="recompute"] .human-engine-block {
  transform: translateY(55px) scale(0.55);
  opacity: 0;
}

/* --- Engine "milling" — faster scan + stronger glow + spinning CPU during compute --- */
.human-section[data-phase="computing"] .human-engine-core,
.human-section[data-phase="recompute"] .human-engine-core {
  animation: humanCoreCompute 0.6s ease-in-out infinite;
}
.human-section[data-phase="computing"] .human-engine-scan,
.human-section[data-phase="recompute"] .human-engine-scan {
  animation-duration: 0.45s;
}
/* CPU icon rotates while the algorithm is running — same metaphor as the HOW engine */
.human-engine-cpu {
  transition: transform 0.4s ease;
  transform-origin: 50% 50%;
}
.human-section[data-phase="computing"] .human-engine-cpu,
.human-section[data-phase="recompute"] .human-engine-cpu {
  animation: humanCpuSpin 1.2s linear infinite;
}
@keyframes humanCpuSpin {
  to { transform: rotate(360deg); }
}
@keyframes humanCoreCompute {
  0%, 100% { box-shadow: 0 0 25px 4px rgba(59, 130, 246, 0.55); transform: scale(1); }
  50%      { box-shadow: 0 0 50px 10px rgba(59, 130, 246, 0.85); transform: scale(1.045); }
}

/* --- Pause flow animations during pending --- */
.human-section[data-phase="pending"] .human-flow-path {
  animation-play-state: paused;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 980px) {
  .human-grid { grid-template-columns: 1fr; gap: 36px; }
  .human-diagram-cols { min-height: 420px; }
}
@media (max-width: 640px) {
  .human-section { padding: 64px 0; }
  .human-diagram { padding: 16px 0 24px; overflow: visible; }

  /* Same horizontal swipe-snap pattern as the HOW algo-loop —
     the 3 columns (Stakeholders → Engine → Outputs) only read left-to-right.
     padding-inline: 6vw on the cols container lets the first and last panel snap to center. */
  .human-diagram-cols {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    gap: 16px;
    padding: 0 6vw 28px;
    min-height: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
  }
  .human-diagram-cols::-webkit-scrollbar { display: none; }
  .human-col {
    flex: 0 0 88vw;
    max-width: 88vw;
    min-width: 88vw;
    scroll-snap-align: center;
  }
  .human-col--engine { padding: 16px 12px; }

  /* Pills + connector flows don't make sense in a swipe view — hide them */
  .human-flow { display: none; }
  .human-pill { display: none; }

  /* Swipe affordance under the diagram */
  .human-diagram::after {
    content: "← swipe →";
    display: block;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-top: 6px;
    animation: algoSwipeHint 2.4s ease-in-out infinite;
  }
}

/* ============== POSITIONING ============== */
.positioning-section {
  background: linear-gradient(120deg, var(--navy) 0%, var(--teal-bright) 150%);
  color: var(--white);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}

.positioning-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(110, 197, 207, 0.18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(110, 197, 207, 0.12), transparent 50%);
  pointer-events: none;
}

.positioning-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.positioning-title {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.6px;
  color: var(--white);
  margin-bottom: 24px;
}

.positioning-body {
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

/* ============== FINAL CTA ============== */
.final-cta {
  background: linear-gradient(120deg, var(--navy) 0%, var(--teal-bright) 150%);
  color: var(--white);
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(110, 197, 207, 0.18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(110, 197, 207, 0.12), transparent 50%);
  pointer-events: none;
}

.final-cta-inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.final-cta h2 {
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--white);
}

.final-cta p {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 36px;
}

/* ============== FOOTER ============== */
.footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.65);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-logo img { max-width: 150px; }

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
  font-size: 13px;
}

.footer-award {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.footer-award:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.footer-award img {
  height: 64px;
  width: auto;
  display: block;
}

.footer-contact {
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.footer-contact a { color: rgba(255, 255, 255, 0.85); }
.footer-contact a:hover { color: var(--teal); }
.footer-sep { color: rgba(255, 255, 255, 0.35); }

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ============== CURSOR FOLLOWER ============== */
.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}
.cursor-follower.show { opacity: 1; }

.cursor-follower--big {
  width: 28px;
  height: 28px;
  background: rgba(110, 197, 207, 0.45);
  box-shadow: 0 0 18px rgba(74, 184, 196, 0.35);
}

.cursor-follower--small {
  width: 7px;
  height: 7px;
  background: #4AB8C4;
  box-shadow: 0 0 6px rgba(74, 184, 196, 0.9);
  z-index: 10000;
}

@media (hover: none), (max-width: 768px) {
  .cursor-follower { display: none; }
}

/* ============== BACK TO TOP ============== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
  box-shadow: var(--shadow);
}

.back-to-top.show { opacity: 1; visibility: visible; }

.back-to-top:hover {
  background: var(--teal);
  transform: translateY(-3px);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 992px) {
  .mission,
  .about-intro,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .mission-visual { order: -1; }

  .benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }

  .how-hero-header-split {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }
  .in-action-section { padding: 60px 0; }
  .in-action-grid-2col {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .comparison { padding: 14px; }
  .comparison-panels {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .comparison-arrow {
    transform: rotate(90deg);
    padding: 0;
  }
  .comparison-tabs {
    /* On mobile keep the pill bar horizontal but make it horizontally scrollable
       if labels overflow. Active tab gets scrolled into view by JS. */
    flex-direction: row;
    overflow-x: auto;
    width: 100%;
    border-radius: 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
  }
  .comparison-tabs::-webkit-scrollbar { display: none; }
  .comparison-tab { font-size: 12px; padding: 8px 14px; }
  .comparison-legend { gap: 8px 14px; }
  .in-action-cta { padding: 28px 20px; }
  .in-action-cta-actions { flex-direction: column; align-items: stretch; }
  .btn-cta-primary, .btn-cta-secondary { justify-content: center; }
  .how-big-title { display: inline-block; }
  .how-steps--stacked { gap: 36px; }
  .how-steps--stacked .how-step {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .how-step-title { border-left: none; border-bottom: 1px solid rgba(10, 46, 92, 0.18); padding-left: 0; padding-bottom: 12px; }
  .how-step-visual img { max-height: none; }

  /* HOW algo-loop on mobile: keep the 3 panels side-by-side, allow horizontal swipe with snap.
     The diagram only reads left-to-right (Inputs → Engine → Outputs), so vertical stacking breaks it.
     padding-inline: 6vw is critical — it lets the first AND last panel snap to center,
     otherwise the last panel can't be reached (its center is beyond max scroll). */
  .algo-loop {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    gap: 16px;
    padding: 24px 6vw 32px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .algo-loop::-webkit-scrollbar { display: none; }
  .algo-panel {
    flex: 0 0 88vw;
    max-width: 88vw;
    min-width: 88vw;
    min-height: auto;
    scroll-snap-align: center;
  }
  /* Hide vertical dividers — they only made sense in stacked layout */
  .algo-panel--inputs::after,
  .algo-panel--engine::after {
    display: none;
  }
  /* Swipe affordance: subtle hint visible on first paint */
  .algo-loop::before {
    content: "← swipe →";
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #94a3b8;
    pointer-events: none;
    opacity: 0.7;
    animation: algoSwipeHint 2.4s ease-in-out infinite;
  }
  @keyframes algoSwipeHint {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.9; }
  }
  .algo-engine {
    width: 240px;
    height: 240px;
    margin: 96px 0 96px;
  }
  .algo-engine-core { width: 90px; height: 90px; }
  .algo-rules-group {
    width: 48%;
  }
  .algo-rules-group--tl { top: -92px; left: 0; right: auto; bottom: auto; }
  .algo-rules-group--tr { top: -92px; right: 0; left: auto; bottom: auto; }
  .algo-rules-group--bl { bottom: -92px; left: 0; right: auto; top: auto; }
  .algo-rules-group--br { bottom: -92px; right: 0; left: auto; top: auto; }
  .algo-rules-group-label { text-align: center !important; }
  .algo-packet { display: none !important; }
  .algo-weather-deco { display: none !important; }
  .algo-output {
    flex-direction: column;
    gap: 16px;
  }
  .algo-popup {
    transform: scale(0.9) translateY(-8px);
  }
  .algo-loop[data-phase="3"] .algo-popup {
    transform: scale(1) translateY(0);
  }

  .how-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .how-conductor { order: -1; }
  .how-conductor img { max-width: 340px; }
  .how-side { flex-direction: column; }

  .locker-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .locker-hero-logo { order: -1; }
  .locker-hero-logo img { max-width: 220px; }
  .locker-hero-product { text-align: center; }
  .locker-hero-wordmark { margin: 0 auto 16px; }
  .locker-hero-subtitle { margin-left: auto; margin-right: auto; }
  .locker-hero-metrics { justify-content: center; }
  .locker-problems-layout { grid-template-columns: 1fr; gap: 30px; }
  .locker-problems-visual { min-height: 240px; }
  .locker-features { grid-template-columns: 1fr; }

  .faq-grid { grid-template-columns: 1fr; gap: 40px; }

  .main-nav { gap: 22px; }
  .main-nav a { font-size: 14px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }

  .main-nav.active { display: flex; }
  .mobile-toggle { display: block; }
  .header-right .btn-contact-header { display: none; }
  .product-switch { padding: 5px 10px; font-size: 13px; }

  .hero { padding: 40px 0 60px; }
  .hero.hero--split { padding: 50px 0 60px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-copy { gap: 26px; align-items: center; }
  .hero-copy-block-3 {
    border-left: none;
    border-top: 3px solid var(--teal);
    padding: 16px 0 0 0;
    max-width: 380px;
  }
  .hero-logo-vertical { order: -1; }
  .hero-logo-vertical img { max-height: 320px; }
  .pitch-section { padding: 50px 0 70px; }
  .hero-ctas { flex-direction: column; align-items: stretch; gap: 10px; width: 100%; max-width: 320px; margin-left: auto; margin-right: auto; margin-bottom: 40px; }
  .hero-ctas .btn { width: 100%; }

  .section,
  .mission-section,
  .how-section,
  .benefits-section,
  .positioning-section,
  .final-cta,
  .faq-section,
  .locker-hero,
  .locker-problems,
  .locker-solution,
  .locker-testimonial { padding: 60px 0; }

  .locker-hero-metrics { flex-direction: column; gap: 20px; }

  .benefits-grid { grid-template-columns: 1fr; gap: 36px; }
  .how-hero { margin-bottom: 40px; }
  .how-conductor img { max-width: 260px; }

  .hero-flow {
    flex-direction: column;
    gap: 6px;
    max-width: 340px;
    margin-bottom: 40px;
  }
  .hero-flow-step,
  .hero-flow-step--first {
    padding: 22px 26px 36px;
    min-height: auto;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), 50% 100%, 0 calc(100% - 20px));
  }

  .process-steps {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-width: 460px;
  }
  .process-step { min-height: auto; }
  .process-separator {
    transform: rotate(90deg);
    align-self: center;
  }

  .team { grid-template-columns: 1fr; gap: 24px; max-width: 360px; }

  .footer-inner { flex-direction: column; text-align: center; gap: 20px; }
  .footer-meta { align-items: center; text-align: center; }
  .footer-contact { justify-content: center; }

  .form-row { grid-template-columns: 1fr; }
  .contact-section { padding: 60px 0 70px; }
  .contact-title { font-size: 32px; }
  .contact-follow { flex-direction: row; margin-top: 30px; }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}
