/* R-GDB-F2: equal 4:3 frames within repeated photo components.
   A photo is contained in its frame. Single heroes and split photos keep G1. */

html body #main :is(.photo-slide, .area-service-card, .area-story-photos > figure) img:not([src*="poster"]),
html body #main :is(.service-card-photo, .scard__ph, .ocard__ph, .blog__ph, .wk__photo) img {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
  background: transparent !important;
}

/* These wrappers previously inherited the single-photo auto-ratio reset. */
html body #main :is(.service-card-photo, .scard__ph, .ocard__ph, .blog__ph, .wk__photo, .area-story-photos > figure) {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 4 / 3 !important;
  background: transparent !important;
}
html body #main :is(.service-card-photo, .scard__ph, .ocard__ph, .blog__ph, .wk__photo, .area-story-photos > figure) picture {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 4 / 3 !important;
  background: transparent !important;
}

/* A project caption sits below its image frame, outside the 4:3 area. */
html body #main .photo-slide > :is(figure, picture),
html body #main .photo-slide > figure > picture {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  background: transparent !important;
}

/* Existing guide thumbnails use positioned images inside their frames. */
html body.homepage #main .home-guides-editorial .guide .guide-thumbnail {
  aspect-ratio: 4 / 3 !important;
}

/* The new storefront photograph in the About gallery is part of its row. */
html body #main .photo-slide img[data-gdb-storefront="about"] {
  aspect-ratio: 4 / 3 !important;
  background: transparent !important;
}

/* Allen 17:36: realistic-glass storefront and steady option B lettering, four spots. */
html body #main .gdb-storefront-media{position:relative;display:block;width:100%;isolation:isolate}
html body #main .gdb-storefront-media > picture{display:block;width:100%;height:auto!important;aspect-ratio:auto!important}
html body #main .gdb-storefront-media .gdb-storefront-glow{position:absolute;left:calc(50% + min(2.538314176245%, 1.494691439947svh));top:43.928334439283%;display:block;width:min(76.532567049808%, 45.066357000664svh);height:auto;aspect-ratio:799/188;pointer-events:none;mix-blend-mode:normal;opacity:1;animation:none;transform:translateX(-50%);overflow:hidden}
html body #main :is(.showroom-photo,.hero-photo,.contact-photo) .gdb-storefront-media img[data-gdb-storefront]{display:block;width:100%;height:auto!important;aspect-ratio:auto!important;min-height:0!important;max-height:85svh!important;object-fit:contain!important;object-position:center!important;background:transparent!important}
html body #main .photo-slide .gdb-storefront-media img[data-gdb-storefront="about"]{aspect-ratio:4/3!important;max-height:none!important}

/* Keep the compositing surface confined to the sign, including portrait-in-row letterboxing. */
html body #main .gdb-storefront-media > picture{transform:translateZ(0)}
html body #main .photo-slide .gdb-storefront-media .gdb-storefront-glow{left:51.318845388188%;width:39.764432647644%}

/* Single storefront boxes follow the portrait photo within the viewport cap. */
html body #main :is(.showroom-photo,.hero-photo,.contact-photo) .gdb-storefront-media{width:min(100%,58.885202388852svh);margin-inline:auto}

/* A row frame fills its card even when its existing align-self is start. */
html body #main :is(.service-card-photo,.scard__ph,.ocard__ph,.blog__ph,.wk__photo,.area-story-photos>figure){width:100%}

/* R-GDB-F2 blank columns: desktop-only placement; original phone galleries remain intact. */
html body #main .gdb-f2-column-photo{display:none}
@media(min-width:900px){
  html body #main .gdb-f2-sticky-column{position:sticky!important;top:var(--gdb-f2-sticky-top,96px)!important;align-self:start!important}
  html body #main .gdb-f2-column-photo{display:block;margin:24px 0 0;padding:0;max-width:100%;background:transparent}
  html body #main .gdb-f2-column-photo>picture{display:block;width:auto;height:auto!important;aspect-ratio:auto!important;background:transparent!important}
  html body #main .gdb-f2-column-photo img{display:block;position:static!important;width:auto!important;max-width:100%!important;height:auto!important;max-height:var(--gdb-f2-photo-cap,40svh)!important;min-height:0!important;aspect-ratio:auto!important;object-fit:contain!important;object-position:center!important;transform:none!important;margin-inline:auto;background:transparent!important}
  html body #main .gdb-f2-column-caption{position:static!important;transform:none!important;opacity:1!important;background:transparent!important;color:inherit!important;padding:8px 0 0!important;font-size:13px;line-height:1.4}
  html body #main .gdb-f2-gallery-source,html body #main .gdb-f2-desktop-empty-gallery{display:none!important}
  /* Existing homepage words and photo retained; full-width intro above a balanced two-column list. */
  html body.homepage #main .home-restored-planning{display:block}
  html body.homepage #main .home-restored-planning>div:first-child{max-width:none}
  html body.homepage #main .home-restored-planning .service-story-photo{margin-inline:auto!important}
  html body.homepage #main .home-planning-copy{margin-top:32px}
  html body.homepage #main .home-planning-points{display:block;column-count:2;column-gap:48px}
  html body.homepage #main .home-planning-points>li{break-inside:avoid}
}

/* Claude18:26: two side-by-side narrative photos share one whole-photo frame. */
@media(min-width:900px){
 html body #main .gdb-f2-paired-media{width:var(--gdb-f2-frame-width)!important;max-width:100%!important;height:auto!important;aspect-ratio:auto!important;margin-top:var(--gdb-f2-photo-gap,24px)!important;margin-inline:auto!important;background:transparent!important}
 html body #main .gdb-f2-paired-media picture{display:block;width:100%!important;height:auto!important;aspect-ratio:auto!important}
 html body #main .gdb-f2-paired-media img{width:100%!important;max-width:100%!important;height:var(--gdb-f2-frame-height)!important;max-height:none!important;aspect-ratio:4/3!important;object-fit:contain!important;object-position:center!important;background:transparent!important}
}

/* Proposed no-photo fallback for the explicitly inventoried enquiry sections. */
@media(min-width:900px){
 html body #main .gdb-f2-stacked-enquiry{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:32px!important}
 html body #main .gdb-f2-stacked-enquiry>div{width:100%!important;max-width:760px!important;margin-inline:auto!important}
}

/* Align desktop enquiry copy to the embedded form field inset, without changing the form. */
@media(min-width:900px){html body #main .gdb-f2-stacked-enquiry>div:first-child{box-sizing:border-box;padding-inline:14px}}

/* Keep copied captions at their column width; only the paired image frames share the capped width. */
@media(min-width:900px){
 html body #main .gdb-f2-column-photo.gdb-f2-paired-media{width:100%!important}
 html body #main .gdb-f2-column-photo.gdb-f2-paired-media>picture{width:var(--gdb-f2-frame-width)!important;max-width:100%;margin-inline:auto}
}

/* Allen20:20 / Claude20:18–20:20: retain three gallery photos and balance the named sections. */
@media(min-width:900px){
 html body #main .gdb-f2-centred-story{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:1fr auto auto auto 1fr;column-gap:40px;row-gap:0;align-items:start!important}
 html body #main .gdb-f2-centred-story>div:first-child{display:contents!important}
 html body #main .gdb-f2-centred-story>div:first-child>.eyebrow{grid-column:2;grid-row:2}
 html body #main .gdb-f2-centred-story>div:first-child>h2{grid-column:2;grid-row:3;margin-bottom:20px}
 html body #main .gdb-f2-centred-story>div:first-child>figure,html body #main .gdb-f2-centred-story>figure{grid-column:1;grid-row:1/6;align-self:center!important;position:static!important;margin:0!important;width:100%;max-width:none!important}
 html body #main .gdb-f2-centred-story>div:nth-child(2){grid-column:2;grid-row:4;position:static!important;max-width:none!important;align-self:start!important;padding-top:0!important;margin-top:0!important}
 html body #main .gdb-f2-centred-story img{width:100%!important;height:auto!important;max-height:85svh;object-fit:contain!important}
 html body #main .gdb-f2-centred-split{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)!important;align-items:center!important;gap:40px!important}
 html body #main .gdb-f2-centred-split>div,html body #main .gdb-f2-centred-split>figure{position:static!important;align-self:center!important;width:100%;max-width:none!important;margin-top:0!important}
 html body #main .gdb-f2-centred-split img{max-height:85svh!important;object-fit:contain!important}
 html body #main .gdb-f2-stacked-band{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:24px!important}
 html body #main .gdb-f2-stacked-band>div{position:static!important;max-width:none!important}
 html body #main .gdb-f2-stacked-band .intro-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 40px}
 html body #main .gdb-f2-stacked-band .intro-body>p{margin:0}
 html body #main .gdb-f2-text-band{display:block!important}
 html body #main .gdb-f2-text-band>.qual__list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 40px}
 html body #main .gdb-f2-text-band>.qual__verdict{max-width:none;margin-top:32px}
}
@media(min-width:900px) and (max-width:1099px){
 html body #main .gdb-f2-natural-narrative{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:32px!important}
 html body #main .gdb-f2-natural-narrative>div,html body #main .gdb-f2-natural-narrative>figure{position:static!important;max-width:760px;width:100%;margin-inline:auto!important}
 html body #main .gdb-f2-natural-narrative .gdb-f2-column-photo{margin-inline:auto!important}
}

/* Keep centred narrative images within the text's visual band. */
@media(min-width:900px){
 html body #main .gdb-f2-centred-split img{display:block;width:auto!important;height:auto!important;max-width:100%!important;max-height:70svh!important;margin-inline:auto}
 html body #main .gdb-f2-centred-split>figure picture{height:auto!important;aspect-ratio:auto!important}
}
@media(min-width:900px) and (max-width:1099px){
 html body #main .gdb-f2-tablet-pair-rows{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:24px!important;align-items:start!important}
 html body #main .gdb-f2-tablet-pair-rows>.sx__col{display:contents!important}
 html body #main .gdb-f2-tablet-pair-rows>.sx__col>.sx__top{grid-column:1/-1;grid-row:1}
 html body #main .gdb-f2-tablet-pair-rows>.sx__col>.gdb-f2-column-photo{grid-column:1;grid-row:2}
 html body #main .gdb-f2-tablet-pair-rows>figure{grid-column:2;grid-row:2;position:static!important;align-self:start!important}
}
/* R-GDB-F3c: Allen22:12, all four letter-only overlays pulse on a two-second cycle. */
@keyframes gdb-storefront-soft-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
@media (prefers-reduced-motion: no-preference) {
  html body #main .gdb-storefront-media .gdb-storefront-glow {
    animation: gdb-storefront-soft-pulse 2s ease-in-out infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body #main .gdb-storefront-media .gdb-storefront-glow {
    animation: none;
    opacity: 1;
  }
}

/* Allen20:53: desktop/tablet rows show natural-ratio photos with identical visible heights. */
@media(min-width:768px){
 html body #main#main .gdb-f2-row-card .gdb-f2-row-img{
  display:block!important;position:static!important;inset:auto!important;
  width:var(--gdb-f2-row-width)!important;height:var(--gdb-f2-row-height)!important;
  min-width:0!important;min-height:0!important;max-width:100%!important;max-height:none!important;
  aspect-ratio:auto!important;object-fit:contain!important;object-position:center!important;
  transform:none!important;margin-inline:auto!important;background:transparent!important;
 }
 html body #main#main .gdb-f2-row-card .gdb-f2-row-media{
  display:block!important;position:static!important;inset:auto!important;
  width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
  aspect-ratio:auto!important;overflow:visible!important;background:transparent!important;
 }
 html body #main#main .gdb-f2-row-card .gdb-storefront-media{
  position:relative!important;width:var(--gdb-f2-row-width)!important;margin-inline:auto!important;
 }
 html body #main#main .gdb-f2-row-card .gdb-storefront-media .gdb-storefront-glow{
  left:52.538314176245%;width:76.532567049808%;
 }
 html body #main#main .gdb-f2-natural-strip>.gdb-f2-row-card{
  flex:0 0 var(--gdb-f2-row-width)!important;width:var(--gdb-f2-row-width)!important;
  min-width:0!important;max-width:none!important;
 }
}
@media(min-width:900px){
 html body #main#main .gdb-f2-paired-media img{aspect-ratio:auto!important}
}
/* Two tablet notes accepted for a simple correction by Claude20:53. */
@media(min-width:900px) and (max-width:1099px){
 html body #main#main .gdb-f2-tablet-heading-list{grid-template-columns:minmax(0,1fr)!important;gap:24px!important}
 html body #main#main .gdb-f2-tablet-heading-list h2{max-width:none!important}
 html body #main#main .gdb-f2-tablet-intro-top{align-items:flex-start!important}
}
