/* =====================================
   PAGES.CSS - Styles voor subpagina's
   over.html / diensten.html / cases.html
   ===================================== */

/* ---------- PAGE HERO (compact) ---------- */
.page-hero {
  position: relative;
  padding: 200px 0 80px;
  contain: paint;
}
.page-hero-content {
  max-width: 920px;
}
.page-hero-title {
  font-size: clamp(40px, 5.4vw, 72px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
  color: var(--fm-text);
  text-wrap: balance;
}
.page-hero-subtitle {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--fm-text-soft);
  max-width: 640px;
  line-height: 1.6;
}

/* ---------- JOURNEY TIMELINE (over) ---------- */
.journey-section {
  position: relative;
  padding: 80px 0 120px;
  contain: paint;
}

/* Vertical timeline with alternating left/right content (desktop default) */
.journey-timeline {
  position: relative;
  margin-top: 72px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.journey-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.journey-line-fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, #0A398C 0%, #1794A3 30%, #58BA64 65%, #87D545 100%);
  /* Keep gradient at full timeline height so colours don't compress as fill grows.
     The --journey-line-h custom property is set by JS based on rect height. */
  background-size: 100% var(--journey-line-h, 100%);
  background-repeat: no-repeat;
  border-radius: 2px;
  /* No CSS transition: JS already updates per scroll frame via rAF.
     A long ease here makes the fill lag behind scroll. */
  transition: none;
  box-shadow: 0 0 14px rgba(25, 148, 164, 0.45);
}
.journey-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 28px 0;
  min-height: 180px;
}
/* Dot absolutely positioned at exact center of the step, lining up perfectly
   with the vertical line (also at left: 50%). */
.journey-step-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fm-dark);
  border: 2px solid rgba(255, 255, 255, 0.32);
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(10, 9, 21, 1);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.journey-step.active .journey-step-dot {
  background: #ffffff;
  border-color: #ffffff;
  box-shadow:
    0 0 0 4px rgba(10, 9, 21, 1),
    0 0 0 7px rgba(94, 181, 101, 0.18),
    0 0 22px rgba(25, 148, 164, 0.65);
  transform: translate(-50%, -50%) scale(1.15);
}

/* Content side-block with a horizontal connector arm */
.journey-step-content {
  position: relative;
  padding: 24px 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background .35s ease, border-color .35s ease, transform .35s ease;
}
.journey-step.active .journey-step-content {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
}

/* The horizontal arm connecting the dot to the content block */
.journey-step-content::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 36px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-50%);
  transition: background .45s ease;
}
.journey-step.active .journey-step-content::before {
  background: linear-gradient(90deg, rgba(25, 148, 164, 0.7), rgba(94, 181, 101, 0.7));
}

/* Odd steps: content on the RIGHT, arm reaches LEFT toward the centerline */
.journey-step:nth-child(odd) .journey-step-content {
  grid-column: 2;
  margin-left: 36px;
  text-align: left;
}
.journey-step:nth-child(odd) .journey-step-content::before {
  left: -36px;
}

/* Even steps: content on the LEFT, arm reaches RIGHT toward the centerline */
.journey-step:nth-child(even) .journey-step-content {
  grid-column: 1;
  margin-right: 36px;
  text-align: right;
}
.journey-step:nth-child(even) .journey-step-content::before {
  right: -36px;
}

.journey-step-label {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--fm-text-mute);
  margin-bottom: 10px;
}
.journey-step-title {
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  color: var(--fm-text);
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  line-height: 1.25;
}
.journey-step-desc {
  font-size: 14.5px;
  color: var(--fm-text-soft);
  line-height: 1.6;
}

/* ---------- PRINCIPLES (over) ---------- */
.principles-section {
  position: relative;
  padding: 60px 0 100px;
  contain: paint;
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.principle-card {
  padding: 36px 32px 32px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .35s ease, background .35s ease;
}
.principle-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
}
.principle-num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--fm-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 4px;
}
.principle-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--fm-text);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.principle-desc {
  font-size: 14px;
  color: var(--fm-text-soft);
  line-height: 1.6;
}

/* ---------- TOOLS SHOWCASE (over) ---------- */
.tools-section {
  position: relative;
  padding: 60px 0 100px;
  contain: paint;
}
.tools-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 48px;
}
.tool-pill {
  padding: 22px 24px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform .3s ease, background .3s ease;
}
.tool-pill:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.05);
}
.tool-pill-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--fm-text);
  letter-spacing: -0.01em;
}
.tool-pill-context {
  font-size: 12px;
  color: var(--fm-text-mute);
}

/* ---------- CONNECT BLOCK (over) ---------- */
.connect-section {
  position: relative;
  padding: 40px 0 100px;
  contain: paint;
}
.connect-card {
  padding: 56px 48px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.connect-text-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--fm-text);
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.connect-text-desc {
  font-size: 15px;
  color: var(--fm-text-soft);
  line-height: 1.6;
  max-width: 480px;
}

/* ---------- SERVICE BLOCK (diensten) ---------- */
.service-block {
  position: relative;
  padding: 90px 0;
  contain: paint;
}
.service-block-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.service-block.reverse .service-block-grid {
  grid-template-columns: 1fr 1fr;
}
.service-block.reverse .service-block-visual {
  order: -1;
}
.service-block-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fm-text-mute);
  margin-bottom: 18px;
}
.service-block-title {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--fm-text);
  text-wrap: balance;
}
.service-block-desc {
  font-size: 16px;
  color: var(--fm-text-soft);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 560px;
}
.service-block-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}
.service-block-list li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--fm-text-soft);
  line-height: 1.5;
}
.service-block-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fm-gradient);
  box-shadow: 0 0 12px rgba(94, 181, 101, 0.35);
}
.service-block-visual {
  aspect-ratio: 4 / 3.2;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-block-visual::after {
  content: '';
  position: absolute;
  inset: 15%;
  background: var(--fm-gradient);
  opacity: 0.18;
  filter: blur(80px);
  z-index: 0;
  border-radius: 50%;
}
.service-block-visual svg {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  opacity: 0.7;
  stroke: rgba(255, 255, 255, 0.85);
}

/* Aanpak section reused on diensten page — restore process-section styling */
.diensten-aanpak {
  padding-top: 60px;
}

/* ---------- DETAILED CASE (cases) ---------- */
.detailed-case {
  position: relative;
  padding: 90px 0;
  contain: paint;
}
.detailed-case-head {
  margin-bottom: 56px;
  max-width: 820px;
}
.detailed-case-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fm-text-mute);
  margin-bottom: 18px;
}
.detailed-case-title {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--fm-text);
  text-wrap: balance;
}
.detailed-case-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.detailed-case-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items: start;
}
.detailed-case-section {
  margin-bottom: 36px;
}
.detailed-case-section:last-child {
  margin-bottom: 0;
}
.detailed-case-section h3 {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fm-text-mute);
  margin-bottom: 16px;
}
.detailed-case-section p {
  font-size: 15.5px;
  color: var(--fm-text-soft);
  line-height: 1.7;
  margin-bottom: 12px;
}
.detailed-case-section p:last-child {
  margin-bottom: 0;
}
.detailed-case-aside {
  position: sticky;
  top: 120px;
  padding: 36px 32px;
  border-radius: 24px;
}
.detailed-case-aside-title {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fm-text-mute);
  margin-bottom: 24px;
}
.detailed-case-result-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.detailed-case-result-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.detailed-case-result-item:first-child {
  padding-top: 0;
}
.detailed-case-result-num {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.025em;
  background: var(--fm-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
  line-height: 1;
}
.detailed-case-result-num .case-suffix {
  font-size: 0.4em;
  color: var(--fm-text-soft);
  font-weight: 500;
  -webkit-text-fill-color: var(--fm-text-soft);
}
.detailed-case-result-label {
  font-size: 13px;
  color: var(--fm-text-soft);
  line-height: 1.5;
}

/* ---------- BEFORE / AFTER (cases) ---------- */
.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
  margin: 32px 0;
}
.before-after-col {
  padding: 24px 24px 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.before-after-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fm-text-mute);
  margin-bottom: 12px;
}
.before-after-col.after .before-after-label {
  background: var(--fm-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.before-after-text {
  font-size: 14px;
  color: var(--fm-text-soft);
  line-height: 1.6;
}
.before-after-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--fm-text-mute);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .principles-grid { grid-template-columns: 1fr; }
  .service-block-grid { grid-template-columns: 1fr; gap: 40px; }
  .service-block.reverse .service-block-visual { order: 0; }
  .detailed-case-body { grid-template-columns: 1fr; gap: 40px; }
  .detailed-case-aside { position: static; }
  .before-after { grid-template-columns: 1fr; }
  .before-after-arrow { transform: rotate(90deg); padding: 8px 0; }
}

/* ---------- REDUCED MOTION (journey) ---------- */
@media (prefers-reduced-motion: reduce) {
  .journey-line-fill { height: 100% !important; width: 100% !important; }
  .journey-step .journey-step-dot {
    background: #ffffff;
    border-color: #ffffff;
  }
  .journey-step .journey-step-content::before {
    background: linear-gradient(90deg, rgba(25, 148, 164, 0.7), rgba(94, 181, 101, 0.7));
  }
}

@media (max-width: 900px) {
  .page-hero { padding: 140px 0 60px; }
  /* Journey: line moves to left, all content stacks on the right */
  .journey-timeline {
    margin-top: 40px;
    max-width: none;
    padding-left: 44px;
  }
  .journey-line {
    top: 0;
    bottom: 0;
    left: 12px;
    right: auto;
    width: 2px;
    height: auto;
    transform: none;
  }
  .journey-step {
    display: block;
    padding: 16px 0;
    min-height: 0;
    position: relative;
  }
  .journey-step-dot {
    position: absolute;
    top: 36px;
    left: -38px;
    grid-column: auto;
    justify-self: auto;
  }
  /* All content blocks on the right of the line on mobile */
  .journey-step-content,
  .journey-step:nth-child(odd) .journey-step-content,
  .journey-step:nth-child(even) .journey-step-content {
    grid-column: auto;
    margin: 0;
    padding: 20px 22px;
    text-align: left;
  }
  .journey-step:nth-child(odd) .journey-step-content::before,
  .journey-step:nth-child(even) .journey-step-content::before {
    left: -20px;
    right: auto;
    width: 20px;
    top: 36px;
    transform: none;
  }
  .journey-step-title {
    font-size: 18px;
  }
  .journey-step-desc {
    font-size: 14.5px;
    line-height: 1.6;
  }
  .principles-section,
  .tools-section,
  .connect-section,
  .service-block,
  .detailed-case { padding: 60px 0; }
  .connect-card { grid-template-columns: 1fr; padding: 40px 28px; text-align: left; }
  .service-block-visual { aspect-ratio: 5 / 3; }
  .service-block-visual svg { width: 80px; height: 80px; }
  .detailed-case-aside { padding: 28px 24px; }
}
