/* IMG Arquitectos — estilos de la web */
@font-face { font-family: 'Inter Display'; src: url('InterDisplay-ExtraLight.woff') format('woff'); font-weight: 200; font-display: swap; }
@font-face { font-family: 'Inter Display'; src: url('../InterDisplay-Light.woff') format('woff'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Inter Display'; src: url('InterDisplay-Regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter Display'; src: url('InterDisplay-Medium.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('GeistMono-Regular.woff') format('woff'); font-weight: 400; font-display: swap; }

:root {
  --k: #0a0a0a; --wh: #ffffff; --cal: #f2efe9; --ink: #3c3a37; --mute: #96928a;
  --line: #d6d2ca; --dline: #343432; --soft: #c8c5be;
  --pl: clamp(22px, 7.3vw, 140px);           /* margen izquierdo */
  --pr: clamp(56px, 17.7vw, 340px);          /* margen derecho: columna del logo */
  --sans: 'Inter Display', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease: cubic-bezier(.65, 0, .35, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-weight: 300; color: var(--k); background: var(--wh); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
main { transition: opacity .32s var(--ease); }
body.leaving main, body.leaving footer { opacity: 0; }
body.entering main { opacity: 0; }

/* ------------------------------------------------ secciones */
.sec { position: relative; padding: clamp(80px, 11vw, 170px) var(--pr) clamp(80px, 11vw, 170px) var(--pl); }
.sec.tight { padding-top: clamp(50px, 6vw, 90px); padding-bottom: clamp(50px, 6vw, 90px); }
.dark { background: var(--k); color: var(--wh); }
.cal { background: var(--cal); }
.white { background: var(--wh); }
.grid-bg { background-image: linear-gradient(#e8e4dc 1px, transparent 1px), linear-gradient(90deg, #e8e4dc 1px, transparent 1px); background-size: 80px 80px; }
.screen { min-height: 100vh; min-height: 100svh; }

/* ------------------------------------------------ tipografía */
.label { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: var(--mute); margin: 0 0 28px; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: .02em; }
.mlabel { font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 0 0 24px; }
.cal .mlabel, .grid-bg .mlabel { color: var(--ink); }
h1, h2, h3 { font-weight: 300; margin: 0; letter-spacing: -.012em; }
.h-hero { font-size: clamp(54px, 7.8vw, 150px); line-height: .98; letter-spacing: -.02em; }
.h1 { font-size: clamp(48px, 6.4vw, 124px); line-height: 1.02; letter-spacing: -.02em; }
.h2 { font-size: clamp(36px, 3.8vw, 72px); line-height: 1.08; }
.h3 { font-size: clamp(26px, 2.1vw, 40px); line-height: 1.18; }
.lead { font-size: clamp(30px, 3.1vw, 60px); line-height: 1.18; max-width: 22ch; }
.body { font-size: clamp(17px, 1.2vw, 23px); line-height: 1.6; color: var(--ink); max-width: 38em; }
.dark .body { color: #c8c5be; }
.small { font-size: 15px; line-height: 1.5; }
.muted { color: var(--mute); }

/* ------------------------------------------------ enlaces y botones */
.link { font-weight: 500; font-size: 18px; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 4px; display: inline-block; }
.link::after, .btn::after { content: '   →'; white-space: pre; }
.btn { display: inline-flex; align-items: center; height: 58px; padding: 0 30px; font-weight: 500; font-size: 17px; text-decoration: none; border: 1px solid var(--k); background: var(--k); color: var(--wh); cursor: pointer; transition: background .25s, color .25s; }
.btn:hover { background: transparent; color: var(--k); }
.btn.light { background: var(--wh); color: var(--k); border-color: var(--wh); }
.btn.light:hover { background: transparent; color: var(--wh); }
.btn.ghost { background: transparent; color: var(--wh); border-color: var(--wh); }
.btn.ghost::after { content: none; }
.btn.ghost:hover { background: var(--wh); color: var(--k); }
.btns { display: flex; flex-wrap: wrap; gap: 16px; }
.chip { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; border-radius: 20px; border: 1px solid currentColor; font-size: 15px; font-weight: 400; background: transparent; cursor: pointer; transition: background .2s, color .2s; }
.dark .chip.on, .dark .chip:hover { background: var(--wh); color: var(--k); border-color: var(--wh); }
.chip.on, .chip:hover { background: var(--k); color: var(--wh); border-color: var(--k); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------ cabecera fija */
.head { position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 96px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pr) 0 var(--pl); color: var(--wh); transition: color .3s, background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.head.light { color: var(--k); }
.head.solid { border-bottom-color: rgba(128,128,128,.14); }
.brand { font-weight: 500; font-size: 16px; letter-spacing: .3em; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 46px; }
.nav a { font-weight: 400; font-size: 17px; text-decoration: none; padding-bottom: 6px; border-bottom: 1px solid transparent; }
.nav a.on, .nav a:hover { border-bottom-color: currentColor; }
.menu-btn { display: none; background: none; border: 0; font-weight: 500; font-size: 15px; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; padding: 10px 0; }
.overlay { position: fixed; inset: 0; z-index: 60; background: var(--k); color: var(--wh); display: flex; flex-direction: column; justify-content: center; padding: 0 var(--pl); gap: 18px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.overlay.open { opacity: 1; pointer-events: auto; }
.overlay a { font-size: 44px; font-weight: 300; text-decoration: none; }
.overlay .close { position: absolute; top: 30px; right: var(--pl); background: none; border: 0; font-weight: 500; letter-spacing: .2em; font-size: 15px; cursor: pointer; }

/* ------------------------------------------------ logo fijo (barra de desplazamiento) */
#ilogo { position: fixed; z-index: 40; top: 50%; right: clamp(14px, 4.6vw, 88px); height: 40vh; height: 40svh; width: auto; transform: translateY(-50%); overflow: visible; pointer-events: none; color: var(--wh); transition: color .35s; }
#ilogo.light { color: var(--k); }

/* ------------------------------------------------ héroe de inicio */
.hero { position: relative; overflow: hidden; color: var(--wh); background: var(--k); display: flex; align-items: flex-end; padding-bottom: clamp(60px, 9vh, 120px); }
.hero > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); animation: kb 9s var(--ease) forwards; }
@keyframes kb { to { transform: scale(1); } }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.15) 70%, rgba(0,0,0,0)), linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,0) 45%); }
.hero .in { position: relative; z-index: 2; }
.hero .label { color: #dedbd4; }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.vis { opacity: 1; transform: none; }

/* ------------------------------------------------ dos puertas */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.door { display: block; text-decoration: none; transition: transform .4s var(--ease); }
.door:hover { transform: translateY(-6px); }
.door .ph { aspect-ratio: 740 / 450; overflow: hidden; }
.door .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.door:hover .ph img { transform: scale(1.04); }
.door .tx { padding: 44px 48px 48px; min-height: 330px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.door.d1 { background: var(--k); color: var(--wh); }
.door.d2 { background: var(--wh); border: 1px solid var(--k); }
.door.d2 .h3 { font-family: var(--mono); font-size: clamp(20px, 1.45vw, 27px); line-height: 1.35; }

/* ------------------------------------------------ tarjetas de proyecto */
.pgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 40px; row-gap: 70px; }
.card { display: block; text-decoration: none; }
.card .ph { position: relative; overflow: hidden; background: #1a1a19; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .4s; }
.card .ph::after { content: 'VER PROYECTO  →'; position: absolute; left: 30px; bottom: 26px; font-family: var(--mono); font-size: 14px; letter-spacing: .06em; color: #fff; opacity: 0; transform: translateY(8px); transition: .35s var(--ease); }
.card:hover .ph img { transform: scale(1.035); filter: brightness(.72); }
.card:hover .ph::after { opacity: 1; transform: none; }
.card .t { font-size: 24px; font-weight: 400; margin-top: 22px; }
.card .m { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-top: 10px; }
.s12 { grid-column: span 12; } .s8 { grid-column: span 8; } .s7 { grid-column: span 7; } .s6 { grid-column: span 6; } .s5 { grid-column: span 5; } .s4 { grid-column: span 4; }
.r-a .ph { aspect-ratio: 1.6; } .r-b .ph { aspect-ratio: 1.143; } .r-m .ph { aspect-ratio: 1.37; } .r-p .ph { aspect-ratio: 2.375; }
.card.hide { display: none; }

/* ------------------------------------------------ pasos */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 70px; }
.step { border-top: 1px solid currentColor; position: relative; padding-top: 70px; }
.step::before { content: ''; position: absolute; left: 0; top: -7px; width: 13px; height: 13px; border-radius: 50%; background: currentColor; }
.step .n { font-weight: 200; font-size: clamp(64px, 5vw, 96px); color: #bebab2; line-height: 1; }
.step .n.m { font-family: var(--mono); font-weight: 400; font-size: 14px; color: var(--ink); }
.step .t { font-weight: 400; font-size: clamp(22px, 1.6vw, 30px); margin: 26px 0 14px; }
.step p { margin: 0; }

/* ------------------------------------------------ antes / después */
.ba { position: relative; overflow: hidden; user-select: none; touch-action: pan-y; --pos: 50%; background: #111; }
.ba img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.ba .a { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba .bar { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.ba .knob { position: absolute; top: 50%; left: var(--pos); width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: #fff; color: var(--k); display: grid; place-items: center; font-weight: 500; font-size: 18px; pointer-events: none; }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba .tag { position: absolute; top: 24px; background: var(--k); color: #fff; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; padding: 10px 14px; pointer-events: none; }
.ba .tag.l { left: 24px; } .ba .tag.r { right: 24px; }

/* ------------------------------------------------ formularios */
.form { display: grid; gap: 34px; }
.field label, .flabel { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.field input, .field textarea { width: 100%; border: 0; border-bottom: 1px solid var(--k); background: transparent; font: 300 22px var(--sans); padding: 10px 0 12px; color: inherit; border-radius: 0; outline: none; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-width: 2px; }
.check { display: flex; gap: 12px; align-items: center; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.check input { width: 18px; height: 18px; accent-color: var(--k); }
.notice { font-family: var(--mono); font-size: 14px; line-height: 1.6; padding: 16px 18px; border: 1px solid currentColor; display: none; }
.notice.show { display: block; }

/* ------------------------------------------------ tarjetas de servicio */
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.svc { background: var(--wh); border: 1px solid var(--k); padding: 44px; display: flex; flex-direction: column; text-decoration: none; min-height: 520px; transition: box-shadow .3s; position: relative; }
.svc:hover { box-shadow: inset 0 0 0 2px var(--k); }
.svc::before { content: ''; position: absolute; right: 44px; top: 50px; width: 18px; height: 18px; border-radius: 50%; background: var(--k); transition: transform .4s var(--ease); }
.svc:hover::before { transform: scale(1.5); }
.svc .n { font-family: var(--mono); font-size: 15px; color: var(--ink); }
.svc h3 { font-size: clamp(30px, 2.2vw, 40px); line-height: 1.18; margin: 60px 0 26px; max-width: 14em; }
.svc p { font-size: 19px; line-height: 1.55; color: var(--ink); margin: 0; flex: 1; }
.svc .meta { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 26px; display: flex; gap: 40px; font-family: var(--mono); font-size: 14px; letter-spacing: .04em; }
.svc .meta span:last-child { margin-left: auto; }

/* ------------------------------------------------ listas y tablas */
.datos { border-top: 1px solid var(--line); max-width: 640px; margin-top: 50px; }
.datos div { display: grid; grid-template-columns: 210px 1fr; border-bottom: 1px solid var(--line); padding: 20px 0; font-family: var(--mono); font-size: 16px; }
.datos dt, .datos .k { font-size: 13px; letter-spacing: .12em; color: var(--mute); }
.checklist { list-style: none; padding: 0; margin: 50px 0 0; max-width: 820px; }
.checklist li { display: flex; gap: 26px; align-items: center; border-top: 1px solid var(--line); padding: 22px 0; font-size: clamp(22px, 1.6vw, 30px); }
.checklist li::before { content: ''; flex: 0 0 12px; height: 12px; border-radius: 50%; background: var(--k); }
.checklist li.blur span { filter: blur(7px); }
.dots li::before { background: currentColor; }
.bul { list-style: none; padding: 0; margin: 26px 0 0; }
.bul li { display: flex; gap: 16px; align-items: center; font-size: 18px; font-weight: 400; padding: 8px 0; }
.bul li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ------------------------------------------------ disposición */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 120px); align-items: center; }
.split.top { align-items: start; }
.split.wide-l { grid-template-columns: 1.25fr 1fr; }
.split.wide-r { grid-template-columns: 1fr 1.25fr; }
.ph-cover { overflow: hidden; }
.ph-cover img { width: 100%; height: 100%; object-fit: cover; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 5vw, 80px); }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; row-gap: 70px; }
.item3 { border-top: 1px solid var(--k); padding-top: 30px; }
.item3 .n { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.item3 h3 { font-size: clamp(28px, 2vw, 36px); line-height: 1.15; margin: 50px 0 20px; }
.band { padding: 90px var(--pr) 90px var(--pl); }
.rule { border: 0; border-top: 1px solid var(--dline); margin: 0; }
.mt-s { margin-top: 24px; } .mt-m { margin-top: 44px; } .mt-l { margin-top: 80px; }
.quote { font-size: clamp(30px, 2.5vw, 46px); line-height: 1.28; color: #d7d4cd; max-width: 26ch; position: relative; padding-left: 90px; }
.quote::before { content: '“'; position: absolute; left: -6px; top: -40px; font-family: Georgia, serif; font-style: italic; font-size: 180px; color: #5a5854; line-height: 1; }

/* ------------------------------------------------ calculadora */
.calc { border: 1px solid var(--k); padding: 50px; }
.calc .v { font-size: clamp(48px, 3.4vw, 64px); margin: 18px 0 26px; }
.calc input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; background: transparent; height: 26px; --p: 14%; }
.calc input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--k) var(--p), var(--line) var(--p)); }
.calc input[type=range]::-moz-range-track { height: 2px; background: var(--line); }
.calc input[type=range]::-moz-range-progress { height: 2px; background: var(--k); }
.calc input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--k); margin-top: -11px; cursor: pointer; }
.calc input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--k); cursor: pointer; }
.calc .res { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 34px; }
.calc .big { font-size: clamp(60px, 4.4vw, 84px); line-height: 1; margin-top: 18px; }

/* ------------------------------------------------ pie */
.foot { background: var(--k); color: var(--wh); padding: 100px var(--pr) 50px var(--pl); border-top: 1px solid var(--dline); }
.foot .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot h4 { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .14em; color: var(--mute); margin: 0 0 22px; }
.foot a, .foot span.it { display: block; font-size: 19px; color: #e1ded8; text-decoration: none; padding: 5px 0; }
.foot a:hover { text-decoration: underline; }
.foot .bottom { border-top: 1px solid var(--dline); margin-top: 90px; padding-top: 30px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--mute); }
.foot .bottom a { display: inline; font-size: 13px; color: var(--mute); }

/* ------------------------------------------------ móvil */
@media (max-width: 1100px) {
  .nav { gap: 26px; }
  .nav a { font-size: 15px; }
}
@media (max-width: 860px) {
  :root { --pr: 58px; }
  .nav { display: none; }
  .menu-btn { display: block; }
  .head { height: 72px; padding-right: var(--pl); }
  #ilogo { height: 15vh; height: 15svh; right: 8px; }
  .foot { padding-right: var(--pl); }
  .foot .cols > div:first-child { grid-column: 1 / -1; }
  .foot a, .foot span.it { overflow-wrap: anywhere; font-size: 17px; }
  .doors, .cards2, .split, .split.wide-l, .split.wide-r, .cols2, .cols3, .steps { grid-template-columns: 1fr; }
  .pgrid { grid-template-columns: 1fr; row-gap: 56px; }
  .pgrid > * { grid-column: span 1 !important; }
  .r-b .ph, .r-p .ph, .r-a .ph, .r-m .ph { aspect-ratio: 4 / 3; }
  .foot .cols { grid-template-columns: 1fr 1fr; }
  .svc { min-height: 0; padding: 32px; }
  .svc h3 { margin-top: 40px; }
  .door .tx { padding: 32px; min-height: 0; }
  .calc { padding: 28px; }
  .datos div { grid-template-columns: 130px 1fr; }
  .quote { padding-left: 50px; }
  .quote::before { font-size: 120px; top: -26px; }
  .band { padding-right: var(--pl); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
