.factory-page {
  background: #f3f6f8;
  color: #10222f;
}

.factory-hero {
  position: relative;
  min-height: 610px;
  display: flex;
  align-items: center;
  padding: 74px clamp(24px, 7vw, 110px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 18, 28, 0.96) 0%, rgba(5, 18, 28, 0.88) 42%, rgba(5, 18, 28, 0.28) 72%, rgba(5, 18, 28, 0.08) 100%),
    url("assets/factory/workshop-line.jpg") center / cover no-repeat;
  color: #ffffff;
}

.factory-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.factory-hero h1 {
  max-width: 680px;
  margin: 12px 0 20px;
  font-size: clamp(46px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: 0;
}

.factory-hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  color: #d4e0e8;
  font-size: 18px;
  line-height: 1.7;
}

.factory-hero-actions,
.factory-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.factory-photo-note {
  position: absolute;
  right: 24px;
  bottom: 20px;
  padding: 8px 10px;
  background: rgba(5, 18, 28, 0.72);
  color: #d4e0e8;
  font-size: 11px;
}

.factory-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1360px;
  margin: -38px auto 0;
  position: relative;
  z-index: 2;
  border: 1px solid #cbd7df;
  background: #ffffff;
}

.factory-proof div {
  padding: 24px 28px;
  border-right: 1px solid #dce5eb;
}

.factory-proof div:last-child {
  border-right: 0;
}

.factory-proof strong,
.factory-proof span {
  display: block;
}

.factory-proof strong {
  color: #087ec9;
  font-size: 28px;
}

.factory-proof span {
  margin-top: 5px;
  color: #607382;
  font-size: 13px;
}

.factory-section {
  max-width: 1360px;
  margin: 0 auto;
  padding: 86px 40px;
}

.factory-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 60px;
  align-items: end;
  margin-bottom: 32px;
}

.factory-section-head.compact {
  grid-template-columns: 1fr;
}

.factory-section-head h2,
.oem-intro h2,
.factory-cta h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.factory-section-head > p,
.oem-intro > p:not(.eyebrow),
.factory-cta p {
  margin: 0;
  color: #607382;
  line-height: 1.7;
}

.identity-section {
  scroll-margin-top: 84px;
}

.identity-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
  border: 1px solid #cad6df;
  background: #ffffff;
}

.identity-summary {
  padding: 34px;
  background: #102837;
  color: #ffffff;
}

.identity-kicker {
  color: #73c6f5;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.identity-summary h3 {
  margin: 18px 0 14px;
  font-size: 25px;
  line-height: 1.25;
}

.identity-summary p {
  margin: 0;
  color: #c7d6df;
  font-size: 14px;
  line-height: 1.7;
}

.identity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.identity-tags span {
  padding: 7px 9px;
  border: 1px solid #496271;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.identity-record {
  margin: 0;
}

.identity-record div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 68px;
  border-bottom: 1px solid #dce5eb;
}

.identity-record div:last-child {
  border-bottom: 0;
}

.identity-record dt,
.identity-record dd {
  margin: 0;
  padding: 20px 22px;
  line-height: 1.55;
}

.identity-record dt {
  border-right: 1px solid #dce5eb;
  color: #607382;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.identity-record dd {
  color: #1c3341;
  font-size: 14px;
  font-weight: 700;
}

.identity-record a {
  color: #087ec9;
}

.equipment-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.65fr);
  grid-template-rows: repeat(2, minmax(220px, 1fr));
  gap: 18px;
}

.equipment-gallery figure {
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #0b1a25;
}

.equipment-gallery .equipment-main {
  grid-row: 1 / 3;
}

.equipment-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.equipment-gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 42px 20px 18px;
  background: linear-gradient(transparent, rgba(5, 18, 28, 0.9));
  color: #ffffff;
}

.equipment-gallery figcaption strong,
.equipment-gallery figcaption span {
  display: block;
}

.equipment-gallery figcaption span {
  margin-top: 5px;
  color: #ccdae3;
  font-size: 12px;
}

.capability-section,
.manufacturing-section,
.document-section {
  max-width: none;
  padding-left: max(40px, calc((100vw - 1280px) / 2));
  padding-right: max(40px, calc((100vw - 1280px) / 2));
  background: #ffffff;
}

.manufacturing-section {
  scroll-margin-top: 84px;
}

.capability-table-wrap {
  overflow-x: auto;
  border: 1px solid #cad6df;
}

.capability-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #ffffff;
}

.capability-table th,
.capability-table td {
  padding: 19px 20px;
  border-right: 1px solid #dce5eb;
  border-bottom: 1px solid #dce5eb;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.6;
}

.capability-table th:last-child,
.capability-table td:last-child {
  border-right: 0;
}

.capability-table tr:last-child td {
  border-bottom: 0;
}

.capability-table th {
  background: #102837;
  color: #ffffff;
  font-size: 12px;
  text-transform: uppercase;
}

.capability-table td:first-child {
  width: 170px;
  color: #087ec9;
  font-weight: 900;
}

.verification-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #cad6df;
  border-left: 1px solid #cad6df;
}

.verification-grid article {
  min-height: 240px;
  padding: 26px;
  border-right: 1px solid #cad6df;
  border-bottom: 1px solid #cad6df;
}

.verification-grid article > span {
  display: block;
  margin-bottom: 36px;
  color: #087ec9;
  font-weight: 900;
}

.verification-grid strong {
  font-size: 18px;
}

.verification-grid p,
.quality-flow p,
.oem-steps p {
  color: #607382;
  font-size: 13px;
  line-height: 1.65;
}

.activity-section {
  border-top: 1px solid #d8e1e7;
  border-bottom: 1px solid #d8e1e7;
  background: #f4f7f9;
}

.activity-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: #c8d4dc;
}

.activity-timeline article {
  position: relative;
  min-height: 255px;
  padding: 28px 26px 26px;
  background: #ffffff;
}

.activity-timeline article::before {
  position: absolute;
  top: 0;
  left: 26px;
  width: 42px;
  height: 4px;
  background: #087ec9;
  content: "";
}

.activity-timeline time {
  display: block;
  color: #526876;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-type {
  display: inline-block;
  margin-top: 28px;
  color: #087ec9;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-timeline h3 {
  margin: 10px 0 0;
  color: #102837;
  font-size: 19px;
  line-height: 1.3;
}

.activity-timeline p {
  margin: 13px 0 0;
  color: #607382;
  font-size: 13px;
  line-height: 1.65;
}

.activity-note {
  margin: 20px 0 0;
  padding-left: 18px;
  border-left: 3px solid #d4a22f;
  color: #4f6573;
  font-size: 13px;
}

.quality-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  background: #cbd6de;
}

.quality-flow li {
  display: flex;
  gap: 18px;
  min-height: 176px;
  padding: 26px;
  background: #ffffff;
}

.quality-flow li > span,
.oem-steps article > span {
  flex: 0 0 auto;
  color: #d4a22f;
  font-size: 17px;
  font-weight: 900;
}

.quality-flow strong,
.oem-steps strong {
  font-size: 17px;
}

.approval-section {
  max-width: none;
  padding-left: max(40px, calc((100vw - 1280px) / 2));
  padding-right: max(40px, calc((100vw - 1280px) / 2));
  border-top: 1px solid #d8e1e7;
  background: #eaf0f4;
}

.approval-gates {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: #c7d4dc;
}

.approval-gates article {
  min-height: 215px;
  padding: 26px 22px;
  background: #ffffff;
}

.approval-gates span,
.approval-gates strong {
  display: block;
}

.approval-gates span {
  margin-bottom: 38px;
  color: #d4a22f;
  font-size: 16px;
  font-weight: 900;
}

.approval-gates strong {
  color: #102837;
  font-size: 17px;
}

.approval-gates p {
  margin: 10px 0 0;
  color: #607382;
  font-size: 13px;
  line-height: 1.65;
}

.oem-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 80px;
  max-width: none;
  padding-left: max(40px, calc((100vw - 1280px) / 2));
  padding-right: max(40px, calc((100vw - 1280px) / 2));
  background: #0c1c28;
  color: #ffffff;
}

.oem-intro > p:not(.eyebrow) {
  margin-top: 20px;
  color: #c5d4de;
}

.oem-steps {
  display: grid;
  gap: 1px;
  padding: 1px;
  background: #314552;
}

.oem-steps article {
  display: flex;
  gap: 18px;
  padding: 20px 22px;
  background: #132a39;
}

.oem-steps p {
  margin: 6px 0 0;
  color: #b9cad5;
}

.document-table-wrap {
  overflow-x: auto;
  border: 1px solid #cad6df;
}

.document-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.document-table th,
.document-table td {
  padding: 18px 20px;
  border-bottom: 1px solid #dce4ea;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.55;
}

.document-table th {
  background: #102837;
  color: #ffffff;
}

.document-table td:first-child {
  color: #087ec9;
  font-weight: 900;
}

.factory-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  max-width: 1280px;
  margin: 0 auto 70px;
  padding: 46px;
  border-left: 5px solid #d4a22f;
  background: #ffffff;
}

.factory-cta > div:first-child {
  max-width: 760px;
}

.factory-cta p:not(.eyebrow) {
  margin-top: 15px;
}

.factory-cta-actions {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 980px) {
  .factory-proof,
  .verification-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factory-proof div:nth-child(2) {
    border-right: 0;
  }

  .factory-section-head,
  .oem-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .quality-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .identity-layout {
    grid-template-columns: 1fr;
  }

  .approval-gates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factory-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .factory-page .nav {
    gap: 18px;
    overflow: hidden;
    padding-bottom: 0;
    white-space: nowrap;
  }

  .factory-page .nav a:nth-child(n + 4):not(:last-child) {
    display: none;
  }

  .factory-hero {
    min-height: 570px;
    align-items: end;
    padding: 48px 18px 74px;
    background-position: 58% center;
  }

  .factory-hero h1 {
    font-size: 43px;
  }

  .factory-photo-note {
    left: 18px;
    right: auto;
  }

  .factory-proof {
    grid-template-columns: 1fr 1fr;
    margin-left: 18px;
    margin-right: 18px;
  }

  .factory-proof div {
    padding: 18px;
  }

  .factory-section,
  .capability-section,
  .manufacturing-section,
  .document-section,
  .approval-section,
  .oem-section {
    padding: 58px 18px;
  }

  .equipment-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: 330px 220px 220px;
  }

  .equipment-gallery .equipment-main {
    grid-row: auto;
  }

  .verification-grid,
  .quality-flow,
  .activity-timeline,
  .approval-gates {
    grid-template-columns: 1fr;
  }

  .identity-record div {
    grid-template-columns: 1fr;
  }

  .identity-record dt {
    padding-bottom: 4px;
    border-right: 0;
  }

  .identity-record dd {
    padding-top: 4px;
  }

  .approval-gates article {
    min-height: 0;
  }

  .activity-timeline article {
    min-height: 0;
  }

  .verification-grid article {
    min-height: 0;
  }

  .factory-cta {
    margin: 0 18px 50px;
    padding: 30px 24px;
  }

  .factory-cta-actions,
  .factory-cta-actions .button {
    width: 100%;
  }
}
