/* Korestudio · Dos atmósferas, una misma identidad. */
:root {
  --header-bg:rgba(6,16,29,.94); --footer-bg:#040b14;
  --soft-bg:#081525; --field-bg:#071321; --hero-glow:#113777;
  --focus:#b9d8ff; --strong-line:#486384;
}
:root[data-theme="light"] {
  color-scheme:light;
  --bg:#f6f5f1; --surface:#fff; --surface-2:#e9eef5;
  --text:#12243a; --muted:#526174; --accent:#215fba; --blue:#185bc5;
  --line:#d2dae2; --strong-line:#9aaec5;
  --header-bg:rgba(246,245,241,.95); --footer-bg:#eaece8;
  --soft-bg:#eeefeb; --field-bg:#fff; --hero-glow:#dce7f6; --focus:#195ebb;
}
::selection{background:var(--accent);color:var(--bg)}
:where(a,button,input,select,textarea,summary):focus-visible{outline-color:var(--focus)}
.site-header{background:var(--header-bg)}
.nav{gap:22px}
.brand>span:first-child{color:var(--accent)}
.nav-links a{color:var(--muted)}
.nav-links a:hover,.nav-links a[aria-current=page]{color:var(--text)}
.theme-toggle{display:inline-flex;gap:8px;align-items:center;justify-content:center;flex-shrink:0;min-height:44px;padding:9px 13px;background:var(--surface);border:1px solid var(--line);border-radius:99px;color:var(--text);font-size:12px;font-weight:500;transition:border-color .2s,background .2s}
.theme-toggle:hover{border-color:var(--accent);background:var(--surface-2)}
.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .theme-sun{display:none}
[data-theme=light] .theme-toggle .theme-sun{display:block}
[data-theme=light] .theme-toggle .theme-moon{display:none}
.section-dark{background:var(--soft-bg)}
.home-hero{background:radial-gradient(ellipse at 85% 25%,var(--hero-glow) 0,transparent 60%)}
.page-hero,.catalog-hero{background:radial-gradient(ellipse at 90% 35%,var(--hero-glow),transparent 65%)}
.subnav{background:var(--surface)}
.subnav a:hover{color:var(--text)}
.site-footer{background:var(--footer-bg)}
.footer-brand>p,.footer-col a,.footer-bottom{color:var(--muted)}
.footer-col h3{color:var(--accent)}
.footer-col a:hover{color:var(--text)}
/* El texto sobre las fotografías conserva su contraste en los dos modos. */
.featured-inner,.hero-feature,.arq-panorama,.arq-project{--text:#f4f7fc;--muted:#d2deec;--accent:#a2c7ff;color:var(--text)}
.featured-label p:last-child{color:#d2deec}
.arq-panorama-caption{color:#e3eaf3}
.arq-project-info{background:linear-gradient(transparent,rgba(3,12,23,.93))}
.arq-panorama-section{padding-bottom:clamp(48px,6vw,88px)}
.arq-gallery{grid-template-columns:1.15fr .85fr;gap:24px}
.arq-gallery-side{gap:24px}
.arq-project{min-width:0;min-height:295px;border-radius:14px;isolation:isolate}
.arq-project--main{min-height:614px}
.project-link{position:absolute;inset:0;z-index:2;border-radius:inherit}
.project-link:focus-visible{outline:3px solid #b9d8ff;outline-offset:-7px}
.arq-project-info{padding:100px 28px 28px;align-items:end;display:flex;justify-content:space-between;gap:16px;pointer-events:none;z-index:1}
.arq-project-info h3{font:500 clamp(24px,2.4vw,34px)/1.08 var(--sans);letter-spacing:-.035em;margin:0}
.arq-project-info .project-kicker{display:flex;gap:9px;color:#d2deec;font-size:11px;text-transform:uppercase;letter-spacing:.09em;margin:0 0 12px}
.project-kicker span{font:inherit;color:inherit;margin:0}
.project-number{position:absolute;top:22px;left:24px;z-index:1;display:grid;place-items:center;width:38px;height:38px;border-radius:50%;border:1px solid #ffffff60;background:#06101d55;backdrop-filter:blur(8px);font-size:12px;color:#fff;pointer-events:none}
.project-more{display:flex;align-items:center;gap:10px;font-size:12px;white-space:nowrap;color:#fff;padding-bottom:2px}
.project-more b{font-size:21px;font-weight:400;transition:transform .3s}
.arq-project:hover .project-more b,.arq-project:focus-within .project-more b{transform:translate(3px,-3px)}
.arq-projects-head .eyebrow{display:flex;align-items:center;gap:12px}
.arq-projects-head .eyebrow::before{content:'';width:28px;height:1px;background:currentColor}
/* Galería amplia: las imágenes se muestran completas, sin recorte. */
body.gallery-open{overflow:hidden}
.project-gallery{width:min(1180px,calc(100% - 48px));max-width:none;max-height:calc(100dvh - 48px);padding:0;background:var(--bg);border-color:var(--line);border-radius:18px;overscroll-behavior:contain}
.project-gallery::backdrop{background:#020811d9;backdrop-filter:blur(12px)}
.gallery-top{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 30px;border-bottom:1px solid var(--line)}
.gallery-top .eyebrow{font-size:10px;margin:0 0 7px}
.gallery-top h2{font-size:clamp(26px,3vw,38px);margin:0;font-weight:500}
.gallery-close{width:46px;height:46px;flex-shrink:0;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--text);font-size:27px;display:grid;place-items:center}
.gallery-close:hover,.gallery-arrow:hover{border-color:var(--accent)}
.gallery-body{display:grid;grid-template-columns:minmax(0,1fr) 250px}
.gallery-view{min-width:0;padding:22px}
.gallery-stage{position:relative;display:grid;place-items:center;height:min(53dvh,580px);min-height:220px;background:var(--surface);border-radius:9px;overflow:hidden;touch-action:pan-y pinch-zoom}
.gallery-stage>img{width:100%;height:100%;max-height:min(53dvh,580px);object-fit:contain;transition:opacity .25s}
.gallery-stage.is-loading>img{opacity:.35}
.gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);border:1px solid #ffffff75;background:#06101dd9;color:#fff;width:44px;height:44px;border-radius:50%;font-size:24px;display:grid;place-items:center;z-index:2}
.gallery-arrow--prev{left:12px}.gallery-arrow--next{right:12px}
.gallery-caption{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 1px 0;font-size:12px;color:var(--muted)}
.gallery-count{white-space:nowrap;letter-spacing:.1em;font-variant-numeric:tabular-nums;color:var(--text)}
.gallery-aside{border-left:1px solid var(--line);padding:28px 24px;display:flex;flex-direction:column;gap:20px}
.gallery-aside .eyebrow{font-size:10px;margin:0 0 12px}
.gallery-description{font-size:14px;line-height:1.75;color:var(--muted);margin:0}
.gallery-thumbs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.gallery-thumb{height:68px;min-width:0;padding:3px;border:1px solid transparent;background:var(--surface-2);border-radius:6px;color:var(--text)}
.gallery-thumb img{width:100%;height:100%;object-fit:cover;border-radius:3px;opacity:.65;transition:opacity .2s}
.gallery-thumb[aria-pressed=true]{border-color:var(--accent)}
.gallery-thumb[aria-pressed=true] img,.gallery-thumb:hover img{opacity:1}
.gallery-contact{margin-top:auto;font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:20px;border-top:1px solid var(--line);color:var(--accent)}
.gallery-error{max-width:360px;padding:28px;text-align:center;font-size:14px;color:var(--muted)}
/* Superficies claras: catálogo, formularios, navegación y consultas. */
[data-theme=light] .button--ghost{background:transparent;border-color:var(--strong-line);color:var(--text)}
[data-theme=light] .button--ghost:hover{background:var(--surface-2)}
[data-theme=light] .section-blue{background:linear-gradient(125deg,#e4ebf4,#dae5f2)}
[data-theme=light] .quote{background:linear-gradient(120deg,#e3eaf2,#e9eeed)}
[data-theme=light] .quote p{color:var(--text)}
[data-theme=light] .arq-cta{background:#e5ebf2}
[data-theme=light] .import-notice,[data-theme=light] .quote-import-note,[data-theme=light] .message-preview{background:var(--surface-2);border-color:var(--line)}
[data-theme=light] .import-delivery,[data-theme=light] .origin-logistics{border-color:var(--line)}
[data-theme=light] .origin-logistics-title{color:var(--text)!important}
[data-theme=light] .origin-cities span{background:var(--surface);color:var(--text);border-color:var(--line)}
[data-theme=light] label,[data-theme=light] .message-preview p{color:var(--text)}
[data-theme=light] input,[data-theme=light] textarea,[data-theme=light] select{background:var(--field-bg);color:var(--text);border-color:var(--strong-line)}
[data-theme=light] input::placeholder,[data-theme=light] textarea::placeholder{color:var(--muted)}
[data-theme=light] .pdf-download-card{background:var(--surface);border-color:var(--line)}
[data-theme=light] .pdf-download-card strong{color:var(--text)}
[data-theme=light] .catalog-toolbar{background:var(--header-bg)}
[data-theme=light] .catalog-search svg{stroke:var(--muted)}
[data-theme=light] .cat-chip{background:var(--surface);color:var(--text);border-color:var(--line)}
[data-theme=light] .cat-chip:hover{background:var(--surface-2)}
[data-theme=light] .cat-chip[aria-pressed=true]{background:var(--blue);color:white;border-color:var(--blue)}
[data-theme=light] .product-card{border-color:var(--line)}
[data-theme=light] .media-slot,[data-theme=light] .media-slot img{background:#eceeea;border-color:var(--line)}
[data-theme=light] .product-description,[data-theme=light] .finish-swatch{color:var(--muted)}
[data-theme=light] .product-features span,[data-theme=light] .sourcing-tags span{background:var(--surface-2);color:var(--muted)}
[data-theme=light] .product-details summary{color:var(--text)}
[data-theme=light] .quote-link{color:var(--accent)}
[data-theme=light] .quote-link:hover{color:var(--text)}
[data-theme=light] .add-quote{background:var(--surface-2);color:var(--text);border-color:var(--strong-line)}
[data-theme=light] .add-quote[aria-pressed=true]{background:var(--blue);color:#fff;border-color:var(--blue)}
[data-theme=light] .catalog-cta{background:linear-gradient(130deg,#e0e9f5,#edf0f1);border-color:var(--line)}
[data-theme=light] .quote-dock{background:var(--surface);border-color:var(--strong-line);box-shadow:0 12px 50px #17294520}
[data-theme=light] dialog{background:var(--bg);border-color:var(--line)}
[data-theme=light] .icon-button,[data-theme=light] .js .menu-button{background:var(--surface);color:var(--text);border-color:var(--strong-line)}
[data-theme=light] .remove-item{color:var(--accent)}
[data-theme=light] .circle-arrow{border-color:var(--strong-line)}
/* Movimiento: entrada, acercamiento al explorar y profundidad al desplazar. */
@media(prefers-reduced-motion:no-preference){
  body,.site-header,.site-footer,.service-card,.product-card{transition:background-color .3s,color .3s,border-color .3s}
  .motion-media>img{transition:transform 1.15s cubic-bezier(.2,.65,.2,1),filter .8s}
  .arq-project:hover>img,.arq-project:focus-within>img{transform:scale(1.045)}
  .product-card:hover .media-slot>img{transform:scale(1.025)}
  .arq-panorama>img,.featured-inner>img,.split-image-visual>img{transform:translateY(var(--photo-shift,0px)) scale(1.07);transition:transform .35s ease-out}
  .motion-media.media-entered>img{animation:photo-appear 1.1s ease both}
  .hero-logo img{animation:logo-float 7s ease-in-out infinite}
  .project-gallery[open]{animation:gallery-appear .3s ease both}
  .service-row .circle-arrow{transition:transform .25s,border-color .25s}
  .service-row:hover .circle-arrow{transform:rotate(45deg);border-color:var(--accent)}
}
@keyframes photo-appear{from{opacity:.5;filter:brightness(.8)}to{opacity:1;filter:brightness(1)}}
@keyframes logo-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
@keyframes gallery-appear{from{opacity:0;transform:translateY(12px) scale(.99)}to{opacity:1;transform:none}}
@media(max-width:1180px) and (min-width:901px){.nav{gap:16px}.nav-links{gap:16px}.nav-cta{display:none}.theme-toggle{padding-inline:10px}}
@media(max-width:900px){
  .nav{gap:0}.theme-toggle{margin-left:auto;margin-right:12px}
  .arq-gallery{grid-template-columns:1.1fr .9fr;gap:16px}.arq-gallery-side{gap:16px}
  .arq-project-info{padding:90px 20px 22px;display:block}.project-more{margin-top:16px}
  .arq-project-info h3{font-size:25px}.arq-project--main{min-height:606px}
  .gallery-body{grid-template-columns:1fr}.gallery-aside{border-left:0;border-top:1px solid var(--line);padding:18px 22px;gap:16px}
  .gallery-aside>.gallery-intro{display:none}.gallery-thumbs{display:flex;overflow-x:auto;padding:2px}.gallery-thumb{width:84px;height:60px;flex-shrink:0}
  .gallery-contact{margin-top:0;padding-top:14px}.gallery-stage{height:48dvh}.gallery-stage>img{max-height:48dvh}
}
@media(max-width:620px){
  .theme-toggle{width:42px;min-height:42px;padding:10px}.theme-toggle [data-theme-label]{display:none}
  .arq-gallery,.arq-gallery-side{grid-template-columns:1fr;gap:18px}
  .arq-project--main,.arq-project{min-height:360px}.arq-project-info{display:flex;align-items:end;padding:95px 22px 24px}.arq-project-info h3{font-size:27px}.project-more{margin:0;font-size:11px;gap:7px}
  .project-number{top:20px;left:20px}
  .project-gallery{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:13px}
  .gallery-top{padding:18px;gap:12px}.gallery-top h2{font-size:28px}.gallery-top .eyebrow{font-size:9px}.gallery-close{width:44px;height:44px}
  .gallery-view{padding:10px}.gallery-stage{height:44dvh;min-height:180px}.gallery-stage>img{max-height:44dvh}
  .gallery-caption{padding:13px 5px 5px;gap:12px;font-size:11px}.gallery-aside{padding:14px}
  .gallery-arrow--prev{left:8px}.gallery-arrow--next{right:8px}
}
@media(prefers-reduced-motion:reduce){.motion-media>img,.hero-logo img{transform:none!important;filter:none!important}}

/* Ajustes de lectura, alineación y superficies del catálogo. */
.product-card{border-color:var(--line);box-shadow:0 8px 28px #0208110a}
.product-info{padding:26px;gap:0}
.product-info h3{line-height:1.2;letter-spacing:-.025em;margin-bottom:14px}
.product-description{margin-top:0;line-height:1.7}
.product-features{gap:8px}
.product-actions{padding-top:8px}
.product-card .media-slot{flex-shrink:0;background:var(--surface-2)}
.product-card .media-slot img{background:var(--surface-2)}
.media-unavailable{font:500 14px/1.5 var(--sans);color:var(--muted);padding:24px;text-align:center}
.product-details summary{min-height:44px;padding-block:10px}
.add-quote,.cat-chip{min-height:44px}
.quote-link{line-height:1.5}
.gallery-top>div,.arq-project-info>div:first-child{min-width:0}
.gallery-top h2{overflow-wrap:anywhere;line-height:1.15}
.arq-project-info h3{text-wrap:balance}
.arq-project-info{column-gap:20px}
.product-card:focus-within{border-color:var(--accent)}
@media(min-width:621px){.product-info h3{min-height:2.4em}.product-description{min-height:5.1em}}
@media(prefers-reduced-motion:no-preference){.product-card{transition:border-color .2s,box-shadow .2s,background-color .2s}.product-card:hover{border-color:var(--accent);box-shadow:0 12px 32px #02081112}}
@media(max-width:620px){.product-info{padding:22px}.gallery-top h2{font-size:25px}.arq-project-info h3{font-size:clamp(23px,6vw,27px)}.arq-project-info{align-items:flex-end;gap:12px}.project-more{flex-shrink:0}}
@media(max-width:380px){.quote-dock{gap:8px;padding-left:14px;font-size:12px}.quote-dock .button{padding-inline:14px}.arq-project-info{display:block}.project-more{margin-top:12px}}
