/* ============================================================
   PAGE — FACTORY & CERTIFICATIONS
   File: assets/css/page-factory.css
   Rules: No :root. No hardcoded values. No !important.
   ============================================================ */


/* ============================================================
   FA-1 — HERO
   ============================================================ */

.fc-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.fc-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.fc-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.fc-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(215,25,32,.20), transparent 35%),
    linear-gradient(135deg, rgba(11,13,16,.93) 0%, rgba(23,26,31,.82) 60%, rgba(36,39,46,.72) 100%);
}

.fc-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  padding: var(--sp-8) var(--sp-5);
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

.fc-hero__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-mid);
  background: rgba(215,25,32,.12);
  border: 1px solid rgba(215,25,32,.25);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: var(--sp-2);
}

.fc-hero__title {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--sp-3);
  max-width: 640px;
}

.fc-hero__title em {
  font-style: normal;
  color: rgba(255,255,255,.40);
}

.fc-hero__subtitle {
  font-size: var(--text-md);
  color: rgba(255,255,255,.58);
  line-height: 1.75;
  max-width: 560px;
}

/* Stats bar */
.fc-hero__stats {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r-lg);
  backdrop-filter: blur(8px);
}

.fc-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-hero__stat-num {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.fc-hero__stat-unit {
  font-size: var(--text-lg);
  color: var(--brand-mid);
}

.fc-hero__stat-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.42);
}

.fc-hero__divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.10);
  flex-shrink: 0;
}


/* ============================================================
   FA-2 — FACTORY TOUR
   ============================================================ */

.fc-tour {
  padding: var(--sp-8) var(--sp-5);
}

/* Main image */
.fc-tour__main-img {
  position: relative;
  margin-top: var(--sp-6);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

.fc-tour__main-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.fc-tour__main-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--sp-2) var(--sp-3);
  background: linear-gradient(transparent, rgba(11,13,16,.75));
  font-size: var(--text-sm);
  color: rgba(255,255,255,.70);
}

/* Zone cards */
.fc-tour__zones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.fc-tour__zone-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.fc-tour__zone-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--brand);
}

.fc-tour__zone-card--accent {
  border-color: rgba(215,25,32,.22);
}

.fc-tour__zone-img {
  height: 180px;
  overflow: hidden;
  background: var(--gray-50);
}

.fc-tour__zone-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.fc-tour__zone-card:hover .fc-tour__zone-img img {
  transform: scale(1.04);
}

.fc-tour__zone-body {
  padding: var(--sp-3);
}

.fc-tour__zone-area {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.fc-tour__zone-body h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.fc-tour__zone-body p {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.6;
}

/* Stats row */
.fc-tour__stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-lg);
}

.fc-tour__stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.fc-tour__stat-icon {
  width: 40px;
  height: 40px;
  background: var(--brand-tint);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 4px;
}

.fc-tour__stat-val {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1;
}

.fc-tour__stat-desc {
  font-size: var(--text-xs);
  color: var(--gray-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ============================================================
   FA-3 — 72-HOUR FAT
   ============================================================ */

.fc-fat {
  padding: var(--sp-8) var(--sp-5);
  background:
    radial-gradient(circle at 20% 15%, rgba(215,25,32,.24), transparent 32%),
    radial-gradient(circle at 85% 25%, rgba(255,255,255,.06), transparent 34%),
    linear-gradient(135deg, #0B0D10 0%, #171A1F 55%, #24272E 100%);
  position: relative;
}

.fc-fat::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px,
      rgba(255,255,255,0.025) 59px, rgba(255,255,255,0.025) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px,
      rgba(255,255,255,0.025) 59px, rgba(255,255,255,0.025) 60px);
  pointer-events: none;
}

.fc-fat .container {
  position: relative;
  z-index: 1;
}

.fc-fat__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-7);
  align-items: start;
  margin-top: var(--sp-6);
}

/* Video / image */
.fc-fat__video-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
}

.fc-fat__poster {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.fc-fat__video-badge {
  position: absolute;
  bottom: var(--sp-3);
  left: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  background: rgba(215,25,32,.90);
  color: #fff;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: var(--text-sm);
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.fc-fat__media-note {
  margin-top: var(--sp-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.40);
  line-height: 1.6;
}

/* Compare block */
.fc-fat__compare {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  padding: var(--sp-3);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-lg);
}

.fc-fat__compare-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.fc-fat__compare-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.40);
}

.fc-fat__compare-val {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1;
}

.fc-fat__compare-col--industry .fc-fat__compare-val {
  color: rgba(255,255,255,.35);
}

.fc-fat__compare-col--lq .fc-fat__compare-val {
  color: var(--brand-mid);
}

.fc-fat__compare-divider {
  font-size: var(--text-sm);
  font-weight: 700;
  color: rgba(255,255,255,.25);
  flex-shrink: 0;
}

/* Steps */
.fc-fat__steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.fc-fat__step {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}

.fc-fat__step-num {
  font-family: 'DM Mono', monospace;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--brand-mid);
  background: rgba(215,25,32,.15);
  border-radius: var(--r-sm);
  padding: 3px 8px;
  flex-shrink: 0;
  margin-top: 2px;
}

.fc-fat__step strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 700;
  color: rgba(255,255,255,.88);
  margin-bottom: 4px;
}

.fc-fat__step p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.48);
  line-height: 1.6;
}

/* Visit note */
.fc-fat__visit-note {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding: var(--sp-4);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r-lg);
  flex-wrap: wrap;
}

.fc-fat__visit-icon {
  width: 48px;
  height: 48px;
  background: rgba(215,25,32,.15);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand-mid);
}

.fc-fat__visit-note > div {
  flex: 1;
  min-width: 200px;
}

.fc-fat__visit-note strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 700;
  color: rgba(255,255,255,.88);
  margin-bottom: 4px;
}

.fc-fat__visit-note p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.48);
  line-height: 1.6;
}


/* ============================================================
   FA-4 — CERTIFICATIONS
   ============================================================ */

.fc-certs {
  padding: var(--sp-8) var(--sp-5);
}

/* Primary certs — 2 col large */
.fc-certs__primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.fc-certs__primary-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.fc-certs__primary-card:hover {
  box-shadow: var(--shadow-lift);
  border-color: var(--brand);
}

.fc-certs__primary-img {
  height: 220px;
  background: var(--gray-50);
  overflow: hidden;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-certs__primary-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-4);
}

.fc-certs__primary-body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}

.fc-certs__cert-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 3px 10px;
  border-radius: var(--r-sm);
  align-self: flex-start;
}

.fc-certs__primary-body h3 {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
}

.fc-certs__primary-body p {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.65;
  flex: 1;
}

.fc-certs__primary-meta {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.fc-certs__primary-meta span {
  font-size: var(--text-xs);
  color: var(--gray-400);
  font-weight: 600;
}

/* Secondary certs — 4 col compact */
.fc-certs__secondary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.fc-certs__sec-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.fc-certs__sec-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--brand);
}

.fc-certs__sec-img {
  height: 100px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fc-certs__sec-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--sp-2);
}

.fc-certs__sec-body {
  padding: var(--sp-2) var(--sp-3);
}

.fc-certs__sec-body h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
  line-height: 1.35;
}

.fc-certs__sec-body p {
  font-size: var(--text-xs);
  color: var(--gray-600);
  line-height: 1.55;
}

/* Differentiator note */
.fc-certs__diff-note {
  margin-top: var(--sp-5);
  padding: var(--sp-4);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-lg);
}

.fc-certs__diff-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.fc-certs__diff-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-tint);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand);
}

.fc-certs__diff-text strong {
  display: block;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.fc-certs__diff-text p {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.65;
}


/* ============================================================
   FA-5 — CTA
   ============================================================ */

.fc-cta {
  padding: var(--sp-8) var(--sp-5);
  background:
    radial-gradient(circle at 20% 15%, rgba(215,25,32,.24), transparent 32%),
    radial-gradient(circle at 85% 25%, rgba(255,255,255,.06), transparent 34%),
    linear-gradient(135deg, #0B0D10 0%, #171A1F 55%, #24272E 100%);
  position: relative;
}

.fc-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px,
      rgba(255,255,255,0.025) 59px, rgba(255,255,255,0.025) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px,
      rgba(255,255,255,0.025) 59px, rgba(255,255,255,0.025) 60px);
  pointer-events: none;
}

.fc-cta__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.fc-cta__actions {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-3);
}

.fc-cta__contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.38);
}

.fc-cta__email {
  color: var(--brand-mid);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.fc-cta__email:hover { color: #fff; }
.fc-cta__email:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}


/* ============================================================
   RESPONSIVE — 960px
   ============================================================ */

@media (max-width: 960px) {

  .fc-hero__title { font-size: var(--text-3xl); }

  .fc-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-3);
  }

  .fc-hero__divider { display: none; }

  .fc-tour__zones {
    grid-template-columns: 1fr 1fr;
  }

  .fc-tour__stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .fc-fat__layout {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  .fc-certs__primary {
    grid-template-columns: 1fr;
  }

  .fc-certs__secondary {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ============================================================
   RESPONSIVE — 600px
   ============================================================ */

@media (max-width: 600px) {

  .fc-hero__title { font-size: var(--text-2xl); }

  .fc-hero__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .fc-tour__main-img img { height: 240px; }

  .fc-tour__zones {
    grid-template-columns: 1fr;
  }

  .fc-tour__stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .fc-fat__compare {
    flex-direction: column;
    text-align: center;
  }

  .fc-fat__visit-note {
    flex-direction: column;
  }

  .fc-certs__secondary {
    grid-template-columns: 1fr 1fr;
  }

  .fc-certs__diff-inner {
    flex-direction: column;
  }

  .fc-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .fc-cta__actions .btn {
    text-align: center;
    justify-content: center;
  }
}
