/* ========== About ========== */
.about.factory-about {
  display: block;
  min-height: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

/* Six differently sized tiles; full uncropped photographs open in the dialog. */
.about-factory {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  min-width: 0;
  padding: 32px clamp(24px, 4vw, 64px) 0;
}
.factory-gallery-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.factory-gallery-heading h3 { font-size: 1.1rem; }
.factory-since { font-size: .82rem; font-style: italic; color: var(--clay-dark); white-space: nowrap; }
.factory-mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(24, minmax(0, 1fr));
  gap: 12px;
  height: clamp(420px, 42vw, 560px);
}
.factory-photo {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-warm);
  isolation: isolate;
  cursor: zoom-in;
}
.factory-photo--building { grid-area: 1 / 1 / 15 / 6; }
.factory-photo--showroom { grid-area: 1 / 6 / 17 / 9; }
.factory-photo--workshop { grid-area: 1 / 9 / 12 / 13; }
.factory-photo--storage { grid-area: 15 / 1 / 25 / 6; }
.factory-photo--buttons { grid-area: 17 / 6 / 25 / 9; }
.factory-photo--press { grid-area: 12 / 9 / 25 / 13; }
.factory-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s var(--ease-out);
}
.factory-photo--showroom img { object-position: 50% 60%; }
.factory-photo--workshop img { object-position: 50% 65%; }
.factory-photo-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 32px 12px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .76));
  color: #fff;
  font-size: .8rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.factory-photo-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, .48);
}
.factory-photo-zoom svg { width: 15px; height: 15px; }
.factory-gallery-hint { margin-top: 14px; color: var(--brown-soft); font-size: .82rem; }
@media (hover: hover) and (pointer: fine) {
  .factory-photo:hover img { transform: scale(1.035); }
}
.factory-photo:focus-visible { outline: 3px solid var(--clay-dark); outline-offset: 3px; }

/* Native modal dialog keeps the rest of the page inert while viewing photos. */
.factory-lightbox {
  inset: 0;
  margin: 0;
  border: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(20, 17, 15, .97);
  color: white;
}
.factory-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px; }
.factory-lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.factory-lightbox-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.factory-lightbox-title { font-size: 1rem; color: white; }
.factory-lightbox-stage { min-height: 0; display: flex; justify-content: center; align-items: center; }
.factory-lightbox-image { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.factory-lightbox-footer {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 20px;
  align-items: center;
  width: min(100%, 640px);
  margin: 0 auto;
}
.factory-lightbox-info { min-width: 0; text-align: center; line-height: 1.4; }
.factory-lightbox-caption { font-size: .95rem; }
.factory-lightbox-count { display: block; margin-top: 5px; color: #d7cabb; font-size: .8rem; font-variant-numeric: tabular-nums; }
.factory-lightbox-control {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: white;
  cursor: pointer;
  transition: background-color .2s var(--ease-out);
}
.factory-lightbox-control svg { width: 22px; height: 22px; }
.factory-lightbox-control:hover { background: rgba(255, 255, 255, .2); }
.factory-lightbox-control:focus-visible { outline: 3px solid white; outline-offset: 3px; }
@media (max-width: 720px) {
  .factory-lightbox { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
  .factory-lightbox[open] { gap: 12px; }
  .factory-lightbox-footer { gap: 12px; }
}

.factory-about .about-inner {
  display: block;
  flex: none;
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px clamp(24px, 4vw, 64px) 80px;
}

.factory-about .about-text {
  max-width: none;
  margin: 0;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(32px, 6vw, 80px);
}

.factory-about .about-text > .section-tag { grid-column: 1 / -1; }
.factory-about .about-text h2 { grid-area: 2 / 1 / 5 / 2; margin-bottom: 28px; }
.factory-about .about-text p { grid-column: 2; color: var(--brown-soft); margin-bottom: 18px; }
.factory-about .about-stats {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  margin-top: 24px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.factory-about .about-stats div { display: flex; flex-direction: column; gap: 4px; }
.factory-about .about-stats strong {
  font-family: "Noto Serif SC", serif;
  font-size: 2.2rem;
  color: var(--clay);
}
.factory-about .about-stats span { font-size: 0.85rem; color: var(--brown-soft); }


@media (max-width: 1024px) {
  .about-factory { padding: 32px 24px 0; }
  .factory-about .about-inner { padding: 48px 24px 64px; }
}
@media (max-width: 720px) {
  .about.factory-about { padding: 56px 0; }
  .factory-about .about-inner { padding: 40px 20px 0; }
  .factory-about .about-text { display: block; }
  .about-factory { padding: 0 20px; }
  .factory-mosaic { grid-template-rows: repeat(12, minmax(0, 1fr)); height: clamp(420px, 115vw, 650px); gap: 8px; }
  .factory-photo--building { grid-area: 1 / 1 / 5 / 8; }
  .factory-photo--showroom { grid-area: 1 / 8 / 6 / 13; }
  .factory-photo--workshop { grid-area: 5 / 1 / 10 / 8; }
  .factory-photo--storage { grid-area: 6 / 8 / 10 / 13; }
  .factory-photo--buttons { grid-area: 10 / 1 / 13 / 6; }
  .factory-photo--press { grid-area: 10 / 6 / 13 / 13; }
  .factory-photo { border-radius: 8px; }
  .factory-photo-caption { font-size: .75rem; padding: 24px 8px 8px; }
  .factory-photo-zoom { top: 6px; right: 6px; width: 24px; height: 24px; }
  .factory-about .about-text h2 { margin-bottom: 18px; }
  .factory-about .about-stats { gap: 20px; margin-top: 28px; padding-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .factory-photo img, .factory-lightbox-control { transition: none; }
}
