/**
 * Factory v1 — Minotti-style factory showcase page.
 */

/* ─── Stats bar ─────────────────────────────────────────────────────────── */
.fv1-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.fv1-stat {
  text-align: center;
  padding: clamp(1.25rem, 2.5vw, 2rem) 1rem;
  border: 1px solid var(--ink-10);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.fv1-stat:hover {
  border-color: rgba(30, 84, 71, 0.35);
  transform: translateY(-4px);
}

.fv1-stat__value {
  display: block;
  font-family: var(--ff-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--gold);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.fv1-stat__label {
  font-size: 0.82rem;
  color: var(--ink-60);
  letter-spacing: 0.04em;
}

/* ─── Mission cards ─────────────────────────────────────────────────────── */
.fv1-mission {
  padding: var(--section-v) 0;
  background: var(--cream);
}

.fv1-mission__header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.fv1-mission__title {
  font-family: var(--ff-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 300;
  color: var(--ink);
  margin: 0.75rem 0 0;
}

.fv1-mission__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.fv1-mission__card {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--ivory);
  border: 1px solid var(--ink-10);
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.fv1-mission__card:hover {
  border-color: rgba(30, 84, 71, 0.3);
  box-shadow: 0 16px 48px rgba(14, 14, 12, 0.06);
  transform: translateY(-6px);
}

.fv1-mission__card h3 {
  font-family: var(--ff-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--gold) !important;
  margin: 0 0 0.85rem;
}

.fv1-mission__card p {
  font-size: 0.95rem;
  color: var(--ink-60);
  line-height: 1.85;
  margin: 0;
}

/* ─── Process ───────────────────────────────────────────────────────────── */
.fv1-process {
  padding: var(--section-v) 0;
  background: var(--ivory);
}

.fv1-process__header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.fv1-process__title {
  font-family: var(--ff-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 300;
  color: var(--ink);
  margin-top: 0.75rem;
}

.fv1-process__list {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 6vw, 5rem);
}

.fv1-process__step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.fv1-process__step:nth-child(even) .fv1-process__media {
  order: 2;
}

.fv1-process__step:nth-child(even) .fv1-process__copy {
  order: 1;
}

.fv1-process__num {
  display: inline-block;
  font-family: var(--ff-sc);
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #1E5447 !important;
  margin-bottom: 1rem;
  opacity: 1;
}

.fv1-process__step h3 {
  font-family: var(--ff-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 300;
  color: var(--gold) !important;
  margin: 0 0 1rem;
}

.fv1-process__step p {
  color: var(--ink-60);
  line-height: 1.85;
  margin: 0;
  max-width: 42ch;
}

.fv1-process__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.fv1-process__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.fv1-process__step:hover .fv1-process__media img {
  transform: scale(1.04);
}

/* ─── Gallery ───────────────────────────────────────────────────────────── */
.fv1-gallery {
  padding: var(--section-v) 0;
  background: var(--ink);
  color: var(--white);
}

.fv1-gallery__header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.fv1-gallery__title {
  font-family: var(--ff-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 300;
  color: var(--white);
  margin-top: 0.75rem;
}

.fv1-gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(0.5rem, 1vw, 0.75rem);
}

.fv1-gallery__cell {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
  color: inherit;
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.fv1-gallery__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), opacity 0.4s;
}

.fv1-gallery__cell:hover img {
  transform: scale(1.06);
  opacity: 0.88;
}

.fv1-gallery__cell--wide  { grid-column: span 6; aspect-ratio: 16 / 10; }
.fv1-gallery__cell--tall  { grid-column: span 3; aspect-ratio: 3 / 4; }
.fv1-gallery__cell--square { grid-column: span 3; }

.fv1-gallery__cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(14, 14, 12, 0.45) 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.fv1-gallery__cell:hover::after {
  opacity: 1;
}

/* ─── Values ────────────────────────────────────────────────────────────── */
.fv1-values {
  padding: var(--section-v) 0;
  background: var(--cream-dark);
}

.fv1-values__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.fv1-value {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--ivory);
  border: 1px solid var(--ink-10);
  text-align: center;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.fv1-value:hover {
  border-color: rgba(30, 84, 71, 0.3);
  transform: translateY(-4px);
}

.fv1-value h4 {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gold) !important;
  margin: 0 0 0.5rem;
}

.fv1-value p {
  font-size: 0.88rem;
  color: var(--ink-60);
  line-height: 1.7;
  margin: 0;
}

/* ─── Timeline ──────────────────────────────────────────────────────────── */
.fv1-timeline {
  padding: var(--section-v) 0;
  background: var(--ivory);
}

.fv1-timeline__track {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-right: 2rem;
}

.fv1-timeline__track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

.fv1-timeline__item {
  position: relative;
  padding: 0 0 3rem 0;
  padding-right: 2.5rem;
}

.fv1-timeline__item:last-child {
  padding-bottom: 0;
}

.fv1-timeline__year {
  position: absolute;
  right: -0.55rem;
  top: 0;
  transform: translateX(50%);
  font-family: var(--ff-sc);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  background: var(--ivory);
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(30, 84, 71, 0.25);
}

.fv1-timeline__item h3 {
  font-family: var(--ff-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink) !important;
  margin: 0 0 0.5rem;
}

.fv1-timeline__item p {
  color: var(--ink-60);
  line-height: 1.8;
  margin: 0;
  font-size: 0.95rem;
}

/* ─── CTA ───────────────────────────────────────────────────────────────── */
.fv1-cta {
  padding: var(--section-v) 0;
  background: var(--cream);
  text-align: center;
}

.fv1-cta__title {
  font-family: var(--ff-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 300;
  color: var(--gold) !important;
  margin: 0.75rem 0 1rem;
}

.fv1-cta__text {
  color: var(--ink-60);
  max-width: 52ch;
  margin: 0 auto 2rem;
  line-height: 1.85;
}

/* ─── Lightbox ──────────────────────────────────────────────────────────── */
.fv1-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(14, 14, 12, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

.fv1-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.fv1-lightbox__img {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  object-fit: contain;
}

.fv1-lightbox__close,
.fv1-lightbox__prev,
.fv1-lightbox__next {
  position: absolute;
  color: var(--white);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s, color 0.3s;
}

.fv1-lightbox__close:hover,
.fv1-lightbox__prev:hover,
.fv1-lightbox__next:hover {
  color: var(--gold-light);
}

.fv1-lightbox__close {
  top: 1.25rem;
  left: 1.25rem;
}

.fv1-lightbox__prev {
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.fv1-lightbox__next {
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.fv1-lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-sc);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--white-50);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .fv1-mission__grid {
    grid-template-columns: 1fr;
  }

  .fv1-values__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fv1-gallery__cell--wide {
    grid-column: span 12;
  }

  .fv1-gallery__cell--tall,
  .fv1-gallery__cell--square {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .fv1-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .fv1-process__step,
  .fv1-process__step:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .fv1-process__step:nth-child(even) .fv1-process__media,
  .fv1-process__step:nth-child(even) .fv1-process__copy {
    order: unset;
  }

  .fv1-values__grid {
    grid-template-columns: 1fr;
  }

  .fv1-gallery__cell--tall,
  .fv1-gallery__cell--square {
    grid-column: span 6;
    aspect-ratio: 1;
  }
}
