/* Aligned photo rows with complete image proportions and shared caption starts. */
.roof-jump {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px;
  border-bottom: 1px solid var(--gold); color: var(--gold); font-size: .875rem; line-height: 1.6;
}
.roof-jump:hover { color: var(--paper); border-color: var(--paper); }
.rooftop-heading { padding-top: clamp(45px, 7vw, 100px); scroll-margin-top: 105px; }
.rooftop-heading > .eyebrow { color: var(--gold); font-size: .75rem; }
.photo-story #roofs-track .story-photo { grid-column: span 6; padding-top: 0; }
.photo-story #roofs-track :is(.story-photo--1, .story-photo--2, .story-photo--3, .story-photo--10) { grid-column: 1 / -1; }
.photo-story #roofs-track .story-photo--9 { width: calc(100% * 8 / 9); justify-self: end; }
@media (max-width: 600px) {
  .photo-story #roofs-track .story-photo { grid-column: span 1; }
  .photo-story #roofs-track :is(.story-photo--1, .story-photo--2, .story-photo--3, .story-photo--10) { grid-column: 1 / -1; }
}
#galeria.photo-story {
  padding-block: clamp(65px,7vw,108px) 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  overflow: clip;
}
.photo-story .story-heading .section-index { font-size: .75rem; line-height: 1.6; }
.photo-story .gallery-heading {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,.42fr);
  align-items: end; gap: clamp(30px,6vw,85px); margin: 42px 0 58px;
}
.photo-story .gallery-heading h2 {
  max-width: 19ch; margin: 0; font-size: clamp(44px,5.2vw,78px);
  line-height: 1.08; letter-spacing: -.045em; hyphens: auto;
}
.story-heading-copy p { font-size: 1rem; line-height: 1.85; color: var(--muted); max-width: 32ch; }
.story-heading-copy > span { display: block; margin-top: 22px; color: var(--gold); font-size: .875rem; line-height: 1.6; }
.photo-story :is(#gallery-track, #roofs-track) {
  display: grid; grid-template-columns: repeat(12,minmax(0,1fr));
  align-items: start; gap: clamp(35px,5vw,76px) clamp(20px,3.2vw,48px);
  height: auto; margin: 0; padding-block: 0 55px;
  perspective: none; overflow: visible; scroll-snap-type: none;
  touch-action: auto; cursor: auto; user-select: auto;
}
.story-photo {
  min-width: 0; margin: 0; padding-top: 0; grid-column: span 4;
  opacity: 1; transform: none;
  transition: opacity .7s ease,transform .85s cubic-bezier(.22,.68,.18,1);
  scroll-margin-top: 110px;
}
.story-photo--waiting { opacity: 0; transform: translateY(25px); }
.story-photo--1 { grid-column: span 8; }
.story-photo--6 { grid-column: span 5; }
.story-photo--7 { grid-column: span 7; }
.story-photo--8 { grid-column: 2 / span 10; }
.story-image {
  position: relative; display: block; width: 100%; height: auto;
  padding: 0; border: 0; border-radius: 3px;
  background: var(--panel); overflow: hidden; text-align: left; cursor: zoom-in;
}
.photo-story .story-image img {
  position: static; display: block; width: 100%; max-width: none; height: auto;
  object-fit: contain; object-position: center; filter: none;
  transition: transform .75s cubic-bezier(.22,.68,.18,1);
}
.story-image:hover img { transform: scale(1.015); }
.story-image:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.story-expand {
  position: absolute; display: grid; place-items: center;
  right: 15px; bottom: 15px; width: 44px; height: 44px;
  border: 1px solid #f4f0e7a1; border-radius: 3px;
  background: #262923b8; color: var(--ivory);
  opacity: .8; transition: opacity .25s,background .25s,color .25s;
}
.story-expand svg { width: 21px; height: 21px; }
.story-image:is(:hover,:focus-visible) .story-expand { opacity: 1; background: var(--gold); color: var(--bg); border-color: var(--gold); }
.story-photo figcaption { padding-top: 17px; }
.story-photo figcaption > span { display: block; font-size: .75rem; line-height: 1.65; letter-spacing: .1em; color: var(--gold); }
.story-photo figcaption h3 { margin-top: 6px; font-size: clamp(21px,1.9vw,29px); line-height: 1.28; font-weight: 500; letter-spacing: -.03em; color: var(--paper); }
.story-footer { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-block: 25px 50px; border-top: 1px solid var(--line); }
.story-footer > span { font-size: .875rem; line-height: 1.6; color: var(--muted); }
.story-footer > a { min-height: 44px; display: inline-flex; align-items: center; border-bottom: 1px solid var(--gold); font-size: .875rem; color: var(--gold); }
.story-footer > a:hover { color: var(--paper); border-color: var(--paper); }
/* These secondary images now show electrical details, not a rooftop cable tray. */
.power-connection-copy h3 { font-size: clamp(34px,3.9vw,58px); }
.power-connection-description { font-size: 1rem; }
.power-connection-image img { max-height: 660px; }
@media (max-width:900px) {
  .photo-story .gallery-heading { grid-template-columns: minmax(0,1fr); gap: 25px; margin-bottom: 42px; }
  .story-heading-copy { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
  .story-heading-copy > span { max-width: 19ch; margin-top: 0; }
  .story-heading-copy p { max-width: 44ch; }
  .photo-story :is(#gallery-track, #roofs-track) { column-gap: 22px; row-gap: 42px; }
  .story-photo--1 { grid-column: span 7; }
  .story-photo--2 { grid-column: span 5; }
  .story-photo--6 { grid-column: span 6; }
  .story-photo--7 { grid-column: span 6; }
  .story-photo figcaption > span { letter-spacing: .05em; }
  .story-photo figcaption h3 { font-size: 23px; }
}
@media (max-width:600px) {
  #galeria.photo-story { padding-top: 48px; }
  .photo-story .story-heading .section-index { font-size: .75rem; align-items: start; gap: 20px; }
  .photo-story .story-heading .section-index > span:last-child { display: none; }
  .photo-story .gallery-heading { margin: 30px 0 34px; gap: 24px; }
  .photo-story .gallery-heading h2 { font-size: clamp(39px,10.8vw,53px); line-height: 1.1; }
  .story-heading-copy { display: block; }
  .story-heading-copy p { max-width: none; }
  .story-heading-copy > span { max-width: none; margin-top: 15px; }
  .photo-story :is(#gallery-track, #roofs-track) { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 14px; row-gap: 35px; padding-bottom: 36px; }
  .story-photo { grid-column: span 1; padding-top: 0; }
  .story-photo--1,.story-photo--6,.story-photo--7,.story-photo--8 { grid-column: 1 / -1; }
  .story-photo figcaption { padding-top: 12px; }
  .story-photo figcaption > span { font-size: .75rem; line-height: 1.5; letter-spacing: .025em; }
  .story-photo figcaption h3 { margin-top: 6px; font-size: 20px; line-height: 1.25; }
  .story-expand { right: 9px; bottom: 9px; width: 38px; height: 38px; }
  .story-expand svg { width: 18px; height: 18px; }
  .story-footer { padding-block: 20px 32px; gap: 20px; }
  .story-footer > span { max-width: 21ch; font-size: .8125rem; }
  .story-footer > a { flex-shrink: 0; font-size: .8125rem; }
}
@media (prefers-reduced-motion:reduce) {
  .story-photo,.photo-story .story-image img,.story-expand { transition: none; }
  .story-photo--waiting { opacity: 1; transform: none; }
  .story-image:hover img { transform: none; }
}
