/* Oli's Joinery site-v4: service pages A (fitted-kitchens, media-walls, bookcases-libraries).
   Linked only from those three pages, after styles.css. Prefix sa- keeps it apart from the shared sheet. */

/* ---------- hero variations ---------- */
.page-hero.sa-flip .ph-grid {
  grid-template-columns: 0.92fr 1.08fr;
}
.page-hero.sa-flip .ph-grid > div:first-of-type {
  order: 2;
}
.page-hero.sa-flip .ph-frame {
  order: 1;
}
.page-hero .award-tag {
  margin-top: 30px;
}
.award-tag .seal {
  width: 58px;
  height: 58px;
  flex: none;
  box-shadow:
    inset 0 0 0 4px #0f0f14,
    inset 0 0 0 5px rgba(199, 201, 209, 0.4);
  border-width: 1.5px;
}
.award-tag .seal b {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
}
.award-tag a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(231, 233, 239, 0.35);
  text-underline-offset: 4px;
}
.award-tag a:hover {
  text-decoration-color: currentColor;
}
.award-tag .at-gold {
  color: var(--gold-bright);
}
.sa-glow {
  position: absolute;
  inset: -12% -8% auto auto;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(199, 201, 209, 0.2), transparent 70%);
  animation: sa-breathe 7s ease-in-out infinite alternate;
}
@keyframes sa-breathe {
  from {
    opacity: 0.55;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

/* ---------- three kinds of job (kitchens) ---------- */
.sa-kinds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: sak;
}
.sa-kind {
  position: relative;
  padding: 38px 30px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}
.sa-kind::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease) 0.25s;
}
.sa-kind.in::before {
  transform: scaleX(1);
}
.sa-kind:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -40px rgba(20, 28, 45, 0.45);
}
.sa-kind .sa-n {
  font-family: var(--roman);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--navy);
}
.sa-kind h3 {
  font-family: var(--display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.1;
  margin: 16px 0 12px;
}
.sa-kind p {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.sa-kind .sa-src {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}
.sa-kind .sa-src a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(39, 64, 110, 0.35);
}

/* ---------- offset pair of photos (kitchens) ---------- */
.svc-gallery.sa-duo {
  column-count: auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(18px, 3vw, 44px);
  align-items: start;
  margin-top: clamp(8px, 2vw, 24px);
}
.sa-duo .sg-item {
  margin: 0;
}
.sa-duo .sg-item:nth-child(2) {
  margin-top: clamp(0px, 6vw, 96px);
}
.section.dark .sg-item button {
  border-color: var(--line-d);
  background: var(--ink-700);
}
.section.dark .sg-item figcaption {
  color: var(--on-dark-soft);
}
.section.dark .sg-item figcaption b {
  color: #fff;
}
.sa-note {
  max-width: 60ch;
  color: var(--on-dark-soft);
  margin-top: 18px;
}

/* ---------- Oli band (kitchens) ---------- */
.sa-oli .split-media {
  max-width: 430px;
  margin-inline: auto;
  width: 100%;
}
.sa-oli .ph-frame .ph-clip {
  aspect-ratio: 3/4;
}
.sa-oli .ph-frame img {
  object-position: 50% 20%;
}
.sa-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin-top: 26px;
}

/* ---------- parts of a media wall ---------- */
.sa-parts {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  counter-reset: sap;
}
.sa-parts li {
  position: relative;
  padding: 22px 0 22px 64px;
  counter-increment: sap;
}
.sa-parts li::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease);
}
.sa-parts li:last-child::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
}
.sa-parts.in li::before {
  transform: scaleX(1);
}
.sa-parts li:nth-child(2)::before {
  transition-delay: 0.15s;
}
.sa-parts li:nth-child(3)::before {
  transition-delay: 0.3s;
}
.sa-parts li b::before {
  content: '0' counter(sap);
  position: absolute;
  left: 0;
  top: 23px;
  font-family: var(--roman);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--navy);
  font-weight: 600;
}
.sa-parts li b {
  display: block;
  font-family: var(--display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 6px;
}
.sa-parts li span {
  display: block;
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 50ch;
}
.sa-shot {
  position: relative;
  margin: 0;
}
.sa-shot .ph-clip {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--cloud);
  aspect-ratio: 4/3;
}
.sa-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.sa-shot:hover img {
  transform: scale(1.04);
}
.sa-shot figcaption {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 2px 0;
  line-height: 1.5;
}
.section.dark .sa-shot .ph-clip {
  border-color: var(--line-d);
  background: var(--ink-700);
}
.section.dark .sa-shot figcaption {
  color: var(--on-dark-soft);
}
.sa-shot.tall .ph-clip {
  aspect-ratio: 4/5;
}
.sa-shot.tall .ph-clip img {
  object-position: 50% 40%;
}
.sa-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 2px;
  background: rgba(21, 21, 26, 0.78);
  backdrop-filter: blur(4px);
  font-family: var(--roman);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-bright);
  line-height: 1.3;
}

/* ---------- proof row on dark (media walls) ---------- */
.sa-proof .aw-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sa-proof .aw-item,
.sa-proof .aw-item:nth-child(n) {
  grid-column: auto;
}
.sa-proof .aw-item:last-child {
  grid-column: auto;
}
.sa-proof .sec-head {
  margin-bottom: clamp(28px, 4vw, 44px);
}
@media (max-width: 900px) {
  .sa-proof .aw-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* ---------- shelf rhythm (bookcases) ---------- */
.sa-shelf {
  position: relative;
  margin: 0;
  padding: 26px 26px 14px;
  border: 1px solid var(--line-d);
  border-radius: 6px;
  background: linear-gradient(180deg, #1b1c22, #15151a);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.9);
}
.sa-shelf .sa-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 112px;
  padding: 0 6px 0 0;
  border-bottom: 3px solid var(--silver-dim);
}
.sa-shelf .sa-row + .sa-row {
  margin-top: 30px;
}
.sa-shelf .sa-row i {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  max-width: 26px;
  height: calc(var(--h) * 100%);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 40%), var(--c, #3c5c97);
  border-radius: 2px 2px 0 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.8s var(--ease) calc(var(--k, 0) * 55ms);
}
.sa-shelf.in .sa-row i {
  transform: none;
}
.sa-shelf .sa-lab {
  position: absolute;
  left: 0;
  top: -20px;
  font-family: var(--roman);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-dim);
}
.sa-shelf .sa-row.cd i {
  max-width: 12px;
}
.sa-shelf-cap {
  margin-top: 14px;
  font-size: 13px;
  color: var(--on-dark-soft);
  text-align: center;
}

/* ---------- mosaic gallery (bookcases) ---------- */
.svc-gallery.sa-mosaic {
  column-count: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2vw, 24px);
  align-items: start;
}
.sa-mosaic .sg-item {
  margin: 0;
}
.sa-mosaic .sg-item:first-child {
  grid-row: 1/3;
}
.sa-mosaic .sg-item:nth-child(3) button {
  aspect-ratio: 16/10;
}
.sa-mosaic .sg-item:nth-child(3) img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 70%;
}

/* ---------- stacked kinds list (bookcases) ---------- */
.sa-ticks-lg li {
  font-size: 17.5px;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .sa-kinds {
    grid-template-columns: 1fr;
  }
  .svc-gallery.sa-duo {
    grid-template-columns: 1fr 1fr;
  }
  .page-hero.sa-flip .ph-grid {
    grid-template-columns: 1fr;
  }
  .page-hero.sa-flip .ph-grid > div:first-of-type,
  .page-hero.sa-flip .ph-frame {
    order: 0;
  }
  .sa-glow {
    display: none;
  }
}
@media (max-width: 680px) {
  .svc-gallery.sa-duo,
  .svc-gallery.sa-mosaic {
    grid-template-columns: 1fr;
  }
  .sa-duo .sg-item:nth-child(2) {
    margin-top: 0;
  }
  .sa-mosaic .sg-item:first-child {
    grid-row: auto;
  }
  .sa-parts li {
    padding-left: 52px;
  }
  .sa-shelf {
    padding: 24px 14px 12px;
  }
  .sa-shelf .sa-row {
    height: 92px;
  }
  .page-hero .award-tag {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sa-glow {
    animation: none;
  }
  .sa-kind::before,
  .sa-parts li::before {
    transform: none;
    transition: none;
  }
  .sa-shelf .sa-row i {
    transform: none;
    transition: none;
  }
  .sa-kind,
  .sa-shot img {
    transition: none;
  }
}
