/* Correcciones ópticas y componente único de galería. */
.service-card p,.hero-copy>p,.page-intro>p,.section-heading p,.project-dialog-info>p,.contact-page>div>p{ text-wrap:balance }
.service-card p{min-height:3.2em}
.gallery-track{padding:10px 0 18px;align-items:start;scroll-padding-inline:0}
.gallery-photo{overflow:visible;border-radius:0;align-self:start;min-width:0}
.gallery-photo:after{content:none;display:none}
.gallery-photo .gallery-photo-frame{display:block;position:relative;margin:0;overflow:hidden;border-radius:22px}
.gallery-photo-frame img{width:100%;height:auto;aspect-ratio:4/5;border-radius:0}
.gallery-photo .project-expand{position:absolute;right:18px;bottom:18px;margin:0;width:44px;height:44px;display:grid;place-items:center;border:1px solid #ffffff4d;border-radius:50%;background:#161b20b3;backdrop-filter:blur(10px)}
.project-expand svg{width:20px;height:20px}
.gallery-photo .gallery-photo-title{display:block;font-size:22px;line-height:1.2;letter-spacing:-.02em;margin:20px 0 10px;text-wrap:balance}
.gallery-photo .gallery-photo-description{display:block;font-size:15px;line-height:1.6;color:#b7bab8;margin:0;min-height:3.2em;text-wrap:balance}
.nocturno .porsche-compare{aspect-ratio:1672/941;border:0;border-radius:22px}
.porsche-compare>img{object-fit:fill;width:100%;height:100%}
.porsche-compare .glass-tint{width:100%;height:100%}
.porsche-compare .compare-handle{top:50%;left:clamp(27px,var(--split),calc(100% - 27px));width:54px;height:54px;display:grid;place-items:center;z-index:2;border:1px solid #ffffff65;background:linear-gradient(145deg,#ffffff20,#ffffff05),#242926;box-shadow:inset 0 1px #fff5,0 6px 20px #0006;border-radius:50%}
.porsche-compare .compare-handle:before{display:none;content:none}
.porsche-compare .compare-handle svg{display:block;width:24px;height:24px;stroke:#f4f5ef;stroke-width:1.65;fill:none;stroke-linecap:round;stroke-linejoin:round;margin:0}
.compare-divider{position:absolute;left:var(--split);top:0;bottom:0;width:1px;background:#ffffff80;pointer-events:none;z-index:1;mask-image:linear-gradient(to bottom,#000 calc(50% - 27px),transparent calc(50% - 27px),transparent calc(50% + 27px),#000 calc(50% + 27px))}
/* Identical modal on home and gallery. */
.project-dialog{position:fixed;inset:0;margin:auto;display:none;width:min(1180px,94vw);max-width:94vw;max-height:92dvh;padding:18px;gap:32px;border:1px solid #ffffff26;border-radius:26px;background:#151817;color:#f2f2ed;box-shadow:0 30px 100px #0009;overflow:auto}
.project-dialog[open]{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr)}
.project-dialog::backdrop{background:#080b0bd9;backdrop-filter:blur(12px)}
.project-dialog-photo{display:flex;align-items:center;justify-content:center;background:#0e1110;min-height:340px;border-radius:16px;overflow:hidden}
.project-dialog #gallery-image{display:block;width:100%;height:76dvh;max-height:76dvh;object-fit:cover;filter:none}
.project-dialog .gallery-close{position:absolute;right:28px;top:28px;z-index:3}
.project-dialog-info{min-width:0;align-self:center;padding:54px 20px 28px 0}
.project-dialog .project-tag{font-size:13px;line-height:1.4;color:#c5c1a4;margin:0 0 16px}
.project-dialog #gallery-caption{font-size:clamp(28px,3vw,38px);line-height:1.1;letter-spacing:-.035em;margin:0 0 20px;text-wrap:balance}
.project-dialog #gallery-description{font-size:16px;line-height:1.7;color:#bfc5c0;min-height:3.4em;text-wrap:balance}
.project-dialog #gallery-service{margin-top:28px;font-size:15px;width:fit-content;max-width:100%;white-space:normal}
.project-dialog .gallery-navigation{display:flex;align-items:center;gap:18px;margin-top:36px}
.project-dialog .icon-button{display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #ffffff30;border-radius:50%;color:#edf0ed;background:#252b28;cursor:pointer}
.project-dialog .icon-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5}
.project-dialog #gallery-count{font-size:14px;color:#b7bdb9;font-variant-numeric:tabular-nums}
@media(max-width:700px){.nocturno .porsche-compare{aspect-ratio:1672/941}.porsche-compare .compare-handle{width:44px;height:44px;left:clamp(22px,var(--split),calc(100% - 22px))}.compare-divider{mask-image:linear-gradient(to bottom,#000 calc(50% - 22px),transparent calc(50% - 22px),transparent calc(50% + 22px),#000 calc(50% + 22px))}.porsche-compare .compare-label{top:10px;padding:5px 9px;font-size:11px}.project-dialog[open]{grid-template-columns:1fr;gap:0}.project-dialog{padding:12px;border-radius:20px}.project-dialog-photo{min-height:0}.project-dialog #gallery-image{height:48dvh;max-height:48dvh;object-fit:cover}.project-dialog-info{padding:24px 12px 16px}.project-dialog .gallery-close{right:22px;top:22px}.project-dialog #gallery-caption{font-size:28px}.project-dialog .gallery-navigation{margin-top:24px}.gallery-photo .gallery-photo-title{font-size:21px}}

.page-intro>p,.closing-feature-copy>p{max-width:48ch;text-wrap:balance;min-height:3.2em}

/* Encuadre trasero y pie completo, noviembre 2026. */
.nocturno .closing>img{object-position:center 65%;opacity:.66}
.nocturno .closing:after{background:linear-gradient(90deg,rgba(8,10,9,.82),rgba(8,10,9,.35) 52%,rgba(8,10,9,.08))}
.nocturno footer{flex-wrap:wrap}
footer .footer-legal{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px 32px;flex-basis:100%;grid-column:1/-1;width:100%;border-top:1px solid #ffffff20;padding-top:26px;margin-top:24px;font-size:13px;line-height:1.6;color:#b7bab8}
footer .footer-legal nav{display:flex;flex-wrap:wrap;gap:12px 22px;font-size:13px}
footer .footer-legal a{display:inline-block;color:inherit;transition:color .2s}
footer .footer-legal a:hover{color:#fff}
footer .footer-credit a{text-decoration:underline;text-underline-offset:4px}
@media(max-width:700px){.nocturno .closing>img{object-position:62% 65%}.nocturno .closing:after{background:linear-gradient(90deg,#080a09bf,#080a0930)}footer .footer-legal{flex-direction:column;align-items:flex-start;gap:18px}footer .footer-legal nav a:nth-child(2){display:inline-block}}

/* Sitemap: enlaces reconocibles y footer al pie de páginas cortas. */
body.sitemap-page{min-height:100svh;display:flex;flex-direction:column}
.sitemap-page>main{flex:1}
.sitemap-page>.site-footer{margin-top:auto;padding-bottom:28px}
 .sitemap-content a{cursor:pointer;transition:color .2s}
.sitemap-content a:hover,.sitemap-content a:focus-visible{color:#fff}
@media(min-width:1001px){.cinematic .hero-layout{grid-template-columns:minmax(0,1fr) 390px}}
@media(min-width:701px) and (max-width:1000px){.cinematic .hero-layout{grid-template-columns:minmax(0,1fr) 340px;gap:24px}.cinematic h1{font-size:clamp(48px,6.5vw,68px)}}
.quote-fields{display:grid;gap:16px;margin-top:16px}
.quote-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.quote-row>div{min-width:0}
.quote-space{display:grid;gap:16px}
.quote input,.quote select{min-width:0;width:100%}
@media(prefers-reduced-motion:reduce){.sitemap-content a{transition:none}}

/* Composición móvil: fotografía integrada y pie legal centrado. */
@media(max-width:700px){
 .cinematic{background:#111}
 .cinematic>.hero-photo{top:0;bottom:auto;height:640px;min-height:0;object-fit:cover;object-position:52% center;border-radius:18px;opacity:.9;background:none;mask-image:none}
 .cinematic:after{height:640px;min-height:0;background:linear-gradient(180deg,#080a0970,transparent 38%,#080a0920 58%,#080a09e6 85%);pointer-events:none}
 .cinematic .hero-copy{height:640px;min-height:0;padding:28px 22px;justify-content:flex-start}
 .cinematic h1{font-size:clamp(46px,13vw,58px);max-width:11ch;line-height:1.04}
 .cinematic .hero-copy p{margin: auto 0 20px;max-width:26ch}
 .cinematic .hero-copy>.button{flex-shrink:0}
 footer .footer-legal{align-items:center;justify-content:center;text-align:center;gap:20px}
 footer .footer-legal>span,footer .footer-legal>p{width:100%;max-width:none;text-align:center}
 footer .footer-legal nav{margin-inline:0;width:100%;justify-content:center;gap:12px 20px}
 footer .footer-credit{text-align:center}
}

/* Visor sin franjas y borde móvil definido; fotos conservan su proporción. */
.project-dialog-photo{height:76dvh;min-height:0}
.project-dialog #gallery-image{height:100%;max-height:none;object-position:center}
.project-dialog #gallery-service svg{fill:none;stroke:currentColor;stroke-width:1.6;flex-shrink:0}
@media(max-width:700px){
 .project-dialog-photo{height:48dvh}
 .project-dialog #gallery-image{height:100%;max-height:none}
 .cinematic:after{border-radius:18px;background:linear-gradient(180deg,#080a0970,transparent 38%,#080a0920 58%,#080a09b3 100%)}
 .cinematic .hero-copy{border:1px solid #ffffff26;border-radius:18px}
}

/* Contenido aprobado por el cliente: ritmo de lectura. */
.service-client-copy > h3{margin-top:28px;font-size:18px;line-height:1.4}
.service-client-copy > .text-link{margin-top:22px;text-decoration:underline;text-underline-offset:5px;line-height:1.6;transition:color .2s}
.service-client-copy > .text-link:hover,.service-client-copy > .text-link:focus-visible{color:#f5e202}

