/* Engineering Cycle — Figma 612:11 + scroll-scrubbed Lottie */

html.page-engineering,
body.page-engineering {
  overflow-x: hidden;
  max-width: 100%;
  overscroll-behavior-x: none;
}

html.page-engineering {
  touch-action: pan-y;
}

body.page-engineering {
  padding-top: 64px;
  background: #fdf9f3;
  color: #1a1208;
}

body.page-engineering > .container {
  width: 100%;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.eng-page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  background: #fdf9f3;
}

/* Hero */
.eng-hero {
  position: relative;
  min-height: calc(100vh - 64px);
  padding: 72px 82px 80px;
}

.eng-hero-title {
  margin: 0;
  max-width: 18ch;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6.6vw, 96px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #1a1208;
}

.eng-hero-sub {
  margin: 28px 0 0;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.8vw, 40px);
  font-weight: 400;
  color: #c5a059;
}

.eng-hero-people {
  position: absolute;
  top: 72px;
  right: 62px;
  width: min(423px, 36vw);
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Three-column Lab / IHP / Education cluster */
.eng-block {
  position: relative;
  scroll-margin-top: 64px;
}

.eng-stage {
  width: 100%;
  background: #fdf9f3;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.eng-board {
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

.eng-section-line {
  display: block;
  width: 100%;
  height: 81px;
  margin: 0 0 12px;
  object-fit: contain;
  object-position: left center;
}

.eng-cluster {
  display: grid;
  grid-template-columns: 297px 424px 633px;
  grid-template-areas:
    "title title head"
    "sidebar cycle frame"
    ". . stepper";
  column-gap: 12px;
  row-gap: 16px;
  align-items: end;
  justify-content: start;
}

.eng-section-title {
  grid-area: title;
  align-self: end;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding-bottom: 4px;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 80px;
  font-weight: 400;
  line-height: 1;
  color: #1a1208;
}

.eng-head {
  grid-area: head;
  align-self: end;
  width: 100%;
  min-height: 0;
}

.eng-head-title,
.eng-head-cycle {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.15;
}

.eng-head-title {
  font-size: 36px;
  color: #1a1208;
}

.eng-head-cycle {
  margin-top: 6px;
  font-size: 28px;
  color: #c5a059;
}

.eng-sidebar {
  grid-area: sidebar;
  align-self: start;
  box-sizing: border-box;
  width: 297px;
  height: 500px;
  padding: 18px 10px 18px 8px;
  overflow: auto;
  background: #ffffff;
  border-radius: 31px;
}

.eng-topic + .eng-topic {
  margin-top: 4px;
}

.eng-topic-btn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 12px 8px 14px;
  color: #3c3226;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.eng-topic-btn:hover,
.eng-topic-btn:focus-visible {
  background: rgba(197, 160, 89, 0.14);
  outline: none;
}

.eng-topic.is-current > .eng-topic-btn {
  color: #1a1208;
  background: rgba(197, 160, 89, 0.18);
}

.eng-topic-chevron {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.eng-topic-label {
  flex: 1 1 auto;
}

.eng-sublist {
  display: none;
  margin: 0 0 6px;
  padding: 2px 8px 6px 28px;
  list-style: none;
}

.eng-topic.is-current > .eng-sublist {
  display: block;
}

.eng-topic.is-current > .eng-topic-btn .eng-topic-chevron {
  margin-top: 8px;
  transform: rotate(-135deg);
}

@media (hover: hover) and (pointer: fine) {
  .eng-topic:hover > .eng-sublist,
  .eng-topic:focus-within > .eng-sublist {
    display: block;
  }

  .eng-topic:hover > .eng-topic-btn .eng-topic-chevron,
  .eng-topic:focus-within > .eng-topic-btn .eng-topic-chevron {
    margin-top: 8px;
    transform: rotate(-135deg);
  }
}

@media (hover: none), (pointer: coarse) {
  .eng-topic.is-open > .eng-sublist {
    display: block;
  }

  .eng-topic.is-open > .eng-topic-btn .eng-topic-chevron {
    margin-top: 8px;
    transform: rotate(-135deg);
  }
}

.eng-sub-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 10px 6px 8px;
  color: #5a4e3e;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  border-left: 2px solid transparent;
}

.eng-sub-btn:hover,
.eng-sub-btn:focus-visible {
  color: #1a1208;
  background: rgba(197, 160, 89, 0.1);
  outline: none;
}

.eng-sub-btn.is-active {
  color: #1a1208;
  font-weight: 600;
  background: rgba(197, 160, 89, 0.16);
  border-left-color: #c5a059;
}

.eng-cycle-col {
  grid-area: cycle;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 424px;
}

.eng-lottie {
  width: 424px;
  height: 412px;
  overflow: hidden;
  line-height: 0;
}

.eng-lottie svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
  transform: scale(1.55);
  transform-origin: center center;
}

.eng-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(320px, 100%);
  margin-top: 6px;
}

.eng-progress-track {
  flex: 1 1 auto;
  height: 12px;
  overflow: hidden;
  background: #f6f0e4;
  border: 1.5px solid #c5a059;
  border-radius: 999px;
}

.eng-progress-fill {
  width: 0%;
  height: 100%;
  background: #c5a059;
  border-radius: inherit;
}

.eng-progress-label {
  flex: 0 0 auto;
  min-width: 3.2em;
  color: #8a7355;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1;
  text-align: right;
}

.eng-progress-caption {
  margin: 2px 0 0;
  max-width: 100%;
  color: #c5a059;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
}

.eng-frame {
  grid-area: frame;
  align-self: start;
  position: relative;
  box-sizing: border-box;
  width: 633px;
  height: 563px;
  overflow: hidden;
  background: #ffffff;
  border-radius: 31px;
}

.eng-stepper {
  grid-area: stepper;
  justify-self: end;
  align-self: start;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.eng-stepper-cue {
  margin: 0;
  color: #8a7355;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}

.eng-stepper-cue strong {
  color: #1a1208;
  font-weight: 400;
}

.eng-step {
  min-width: 96px;
  padding: 8px 18px;
  color: #1a1208;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.1;
  background: #fdf9f3;
  border: 2px solid #c5a059;
  border-radius: 999px;
}

.eng-step:hover,
.eng-step:focus-visible {
  color: #1a1208;
  background: rgba(197, 160, 89, 0.22);
  outline: none;
}

.eng-step:disabled {
  opacity: 0.4;
}

.eng-step-next {
  color: #fdf9f3;
  background: #c5a059;
}

.eng-step-next:hover,
.eng-step-next:focus-visible {
  color: #fdf9f3;
  background: #b08d4a;
}

.eng-phase {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.eng-phase h4 {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  color: #1a1208;
}

.eng-phase-body {
  max-width: 36ch;
  margin: 18px 0 0;
  color: #5a4e3e;
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
}

.eng-phase-body:empty {
  display: none;
}

.eng-block[data-eng-section="education"] .eng-phase {
  align-items: stretch;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 32px 36px 28px;
  text-align: left;
}

.eng-block[data-eng-section="education"] .eng-phase-body {
  max-width: none;
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}

.eng-block[data-eng-section="education"] .eng-phase-body p {
  margin: 0 0 14px;
}

.eng-block[data-eng-section="education"] .eng-phase[data-phase="intro"] h4 {
  color: #4d7552;
}

.eng-hmw {
  margin: 6px 0 0;
  padding: 14px 16px;
  color: #1a1208;
  font-weight: 650;
  background: #fcf9f3;
  border-left: 4px solid #c5a059;
}

@media (max-width: 1100px) {
  .eng-hero {
    padding: 48px 32px 24px;
  }

  .eng-hero-people {
    position: static;
    display: block;
    width: min(360px, 80vw);
    margin: 24px 0 0 auto;
  }

  .eng-cluster {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "head"
      "sidebar"
      "cycle"
      "frame"
      "stepper";
    justify-items: start;
  }

  .eng-section-title {
    font-size: 56px;
  }

  .eng-sidebar,
  .eng-cycle-col,
  .eng-lottie,
  .eng-frame {
    width: min(100%, 633px);
  }

  .eng-cycle-col {
    min-height: 0;
  }

  .eng-lottie {
    height: auto;
    aspect-ratio: 424 / 412;
  }

  .eng-frame {
    height: auto;
    min-height: 420px;
    aspect-ratio: 633 / 563;
  }

  .eng-stepper {
    justify-self: end;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .eng-phase[data-phase="design"] {
    opacity: 1;
    pointer-events: auto;
  }
}
