.site-gallery {
  --photo-height: clamp(330px, 33vw, 470px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(180deg, #faf6f0 0%, #ffffff 100%);
  padding-top: clamp(24px, 3vw, 38px);
  padding-bottom: 12px;
}

.site-gallery figure {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  opacity: 0;
  transition: opacity .65s ease-in-out;
  pointer-events: none;
}

.site-gallery figure[aria-hidden="false"] {
  opacity: 1;
  z-index: 1;
}

.site-gallery figure[aria-hidden="true"] figcaption {
  opacity: 0;
}

.site-gallery figcaption {
  padding: 0 0 clamp(18px, 2vw, 24px);
}

.slide-kicker {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.site-gallery figcaption strong {
  display: block;
  font-size: clamp(26px, 2.85vw, 44px);
  letter-spacing: -.03em;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}

.slide-sub {
  display: block;
  margin-top: 8px;
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--ink-soft);
  font-weight: 400;
  line-height: 1.55;
}

.site-photos {
  display: flex;
  width: min(1280px, calc(100% - 80px));
  margin-inline: auto;
  height: var(--photo-height);
  flex: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(28, 25, 23, .1);
  box-shadow: 0 22px 48px -26px rgba(28, 25, 23, .26);
  background: #1c1816;
}

.site-photos img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: 50% 49%;
}

.photo-cell {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

[data-site="daehyeon"] .site-photos {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 5px;
  background: #fff;
}
[data-site="daehyeon"] .photo-cell:first-child img { object-position: 50% 60%; }
[data-site="daehyeon"] .photo-cell:last-child img {
  object-position: 50% 36%;
  transform: translateX(4.6%) rotate(-2.7deg) scale(1.15);
  transform-origin: center center;
}
[data-site="balkhoorma"] img { object-position: 50% 64%; }
[data-site="peeling-work"] img { object-position: 50% 66%; }

.gallery-bar {
  position: absolute;
  z-index: 3;
  bottom: 28px;
  right: calc(max(40px, (100% - 1280px) / 2) + 16px);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(28, 24, 22, .8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}

.gallery-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, .2);
  margin-right: 4px;
}

.gallery-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
  transition: all .22s var(--ease);
}

.gallery-dots button[aria-current="true"] {
  width: 22px;
  background: #fff;
}

.gallery-count {
  font: 600 .9rem/1.2 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-right: 6px;
}

.gallery-bar button[data-step],
.gallery-bar [data-toggle] {
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font: normal 1.45rem/1 system-ui, sans-serif;
  transition: background-color .18s var(--ease);
}

.gallery-bar [data-toggle] {
  font-size: .95rem;
}

.gallery-bar button[data-step]:hover,
.gallery-bar button[data-step]:focus-visible,
.gallery-bar [data-toggle]:hover,
.gallery-bar [data-toggle]:focus-visible {
  background: rgba(255, 255, 255, .16);
}

@media (max-width: 1000px) {
  .site-photos {
    width: calc(100% - 48px);
  }
  .gallery-bar {
    right: 40px;
  }
}

@media (max-width: 720px) {
  .site-gallery {
    --photo-height: clamp(320px, 86vw, 460px);
    padding-top: 20px;
  }
  .site-photos {
    width: calc(100% - 32px);
    border-radius: var(--radius-md);
  }
  [data-site="daehyeon"] .site-photos { display: block; }
  [data-site="daehyeon"] .photo-cell:last-child { display: none; }
  [data-site="daehyeon"] .photo-cell:first-child img { object-position: 50% 58%; }
  [data-site="peeling-work"] img { object-position: 33% 63%; }
  .site-gallery figcaption { padding: 0 0 14px; }
  .site-gallery figcaption strong { font-size: clamp(23px, 5.8vw, 32px); }
  .slide-sub { font-size: 1rem; margin-top: 6px; }
  .gallery-bar {
    position: static;
    grid-area: 2 / 1;
    justify-self: center;
    margin: 12px auto 0;
    background: var(--pale);
    color: var(--ink);
    border-color: var(--line);
    box-shadow: none;
    padding: 3px 6px 3px 14px;
  }
  .gallery-dots {
    border-right-color: var(--line-strong);
  }
  .gallery-dots button {
    background: rgba(20, 24, 33, .25);
  }
  .gallery-dots button[aria-current="true"] {
    background: var(--blue);
  }
  .gallery-bar button[data-step],
  .gallery-bar [data-toggle] {
    width: 44px;
    height: 44px;
  }
  .gallery-bar button[data-step]:hover,
  .gallery-bar button[data-step]:focus-visible,
  .gallery-bar [data-toggle]:hover,
  .gallery-bar [data-toggle]:focus-visible {
    background: rgba(20, 24, 33, .08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-gallery figure { transition: none; }
}

/* Give the installation and fruit demonstrations the same footprint. */
.company.company-showcase {
  --company-gutter: clamp(16px, 2.3vw, 32px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "story story" "field fruits";
  align-items: start;
  gap: clamp(22px, 2.5vw, 36px) var(--company-gutter);
}
.company-story {
  grid-area: story;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--company-gutter);
  align-items: center;
}
.company-story .company-facts { margin: 0 0 16px; }
.company-field { grid-area: field; margin: 0; }
.company-showcase .company-field img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: none;
  object-fit: contain;
}
.company-showcase .company-fruits-panel {
  grid-area: fruits;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  gap: clamp(8px, 1vw, 16px);
  padding: clamp(12px, 1.5vw, 22px);
}
.company-showcase .company-fruits-panel h3 {
  margin: 0;
  font-size: clamp(1.18rem, 1.7vw, 1.5rem);
  line-height: 1.25;
}
.company-showcase .company-fruit-grid {
  min-height: 0;
  grid-template: repeat(2, minmax(0,1fr)) / repeat(3, minmax(0,1fr));
  gap: clamp(6px, .8vw, 12px);
}
.company-showcase .fruit-tile {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  min-height: 0;
  gap: 4px;
  padding: clamp(6px, .8vw, 12px);
}
.company-showcase .fruit-tile img {
  width: min(100%, clamp(48px, 11vw - 48px, 110px));
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
.company-showcase .fruit-tile strong { overflow-wrap: anywhere; }
.company-showcase .fruit-tile strong::after {
  content: "›";
  margin-inline-start: .3em;
  color: var(--brand);
}
@media (max-width: 900px) {
  .company.company-showcase { grid-template-columns: minmax(0,1fr); grid-template-areas: "story" "fruits" "field"; }
  .company-showcase .company-fruits-panel { aspect-ratio: auto; }
  .company-showcase .company-fruit-grid { grid-template-rows: repeat(2,1fr); }
  .company-showcase .fruit-tile img { width: min(100%, clamp(56px, 17vw, 112px)); }
}
@media (max-width: 720px) {
  .company-story { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .company-showcase .fruit-tile strong { font-size: .93rem; }
}
