/* =========================================================
   ARQ TÉCNICA 360 · Hoja de estilos
   Colores y tipografías editables en :root
   ========================================================= */

@font-face { font-family: "Urbanist"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/urbanist-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/urbanist-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Urbanist"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/urbanist-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #0f0f10;          /* titulares */
  --text: #414145;         /* texto */
  --muted: #6f6f74;
  --paper: #ffffff;
  --off: #fcfcf7;          /* blanco cálido */
  --sand: #e5e1d1;         /* beige principal (pie, filtros) */
  --sand-soft: #f3f1ea;    /* fondos de sección */
  --wood: #a88b63;         /* acento madera */
  --line: #e7e5dc;         /* bordes */
  --line-strong: #d6d1bd;

  --f-head: "Urbanist", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --container-wide: 1500px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(80px, 11vw, 150px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 84px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-body); font-size: 17.6px; line-height: 1.5; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 500; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
strong { font-weight: 700; color: var(--ink); }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: calc(var(--container-wide) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: calc(760px + var(--gutter) * 2); }
.section { padding: var(--section) 0; }

.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 999; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 10px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 14px; font-family: var(--f-body); font-weight: 500; font-size: 16px; padding: 16px 28px; border-radius: 0; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); border: 1px solid transparent; }
.btn-arrow { transition: transform .3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(5px); }
.btn-light { background: var(--off); color: var(--ink); }
.btn-light:hover { background: var(--sand); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2a2c; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* "+" decorativo */
.plus { position: relative; display: inline-block; width: 42px; height: 42px; flex: none; }
.plus::before, .plus::after { content: ""; position: absolute; background: var(--line-strong); transition: transform .35s var(--ease), background .3s; }
.plus::before { left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%); }
.plus::after { top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); }
.plus--sm { width: 16px; height: 16px; }
.plus--sm::before, .plus--sm::after { background: var(--wood); }

.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--wood); margin-bottom: 18px; }

/* ---------- Cabecera ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); color: var(--off); transition: background .35s var(--ease), color .35s var(--ease), box-shadow .35s, height .35s var(--ease); }
.site-header.is-solid { background: rgba(255,255,255,.96); color: var(--ink); box-shadow: 0 1px 0 var(--line); --header-h: 70px; backdrop-filter: saturate(1.2) blur(8px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: var(--f-head); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; display: inline-flex; align-items: baseline; gap: 2px; line-height: 1; }
.logo-num { font-weight: 400; font-size: .62em; padding: 3px 5px; border: 1px solid currentColor; margin-left: 4px; letter-spacing: 0; transform: translateY(-3px); }
.main-nav ul { display: flex; align-items: center; gap: 30px; }
.main-nav a { font-family: var(--f-head); font-size: 17px; font-weight: 500; position: relative; padding: 6px 0; }
.main-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.main-nav a:not(.nav-cta):hover::after, .main-nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.main-nav .nav-cta { border: 1px solid currentColor; padding: 10px 18px; transition: background .3s, color .3s; }
.main-nav .nav-cta:hover { background: var(--off); color: var(--ink); }
.site-header.is-solid .nav-cta:hover { background: var(--ink); color: #fff; }
.menu-toggle { display: none; align-items: center; gap: 12px; font-family: var(--f-head); font-size: 17px; }
.menu-toggle-icon { width: 26px; height: 12px; position: relative; display: block; }
.menu-toggle-icon span { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
.menu-toggle-icon span:first-child { top: 0; }
.menu-toggle-icon span:last-child { top: 10px; }
.menu-open .menu-toggle-icon span:first-child { top: 5px; transform: rotate(45deg); }
.menu-open .menu-toggle-icon span:last-child { top: 5px; transform: rotate(-45deg); }

/* páginas interiores: cabecera siempre sólida */
body:not(.is-home) .site-header { background: #fff; color: var(--ink); box-shadow: 0 1px 0 var(--line); }

/* ---------- Portada ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; color: var(--off); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 2.2s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,15,16,.35) 0%, rgba(15,15,16,.05) 30%, rgba(15,15,16,.15) 55%, rgba(15,15,16,.62) 100%); }
.hero-content { position: relative; z-index: 2; padding-bottom: clamp(70px, 12vh, 130px); padding-top: 140px; }
.hero-kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(252,252,247,.85); margin-bottom: 22px; opacity: 0; animation: up 1s .15s var(--ease) forwards; }
.hero-title { color: var(--off); font-size: clamp(40px, 5.6vw, 82px); line-height: 1.02; max-width: 17ch; letter-spacing: -0.02em; opacity: 0; transform: translateY(30px); animation: up 1s .3s var(--ease) forwards; }
.hero-sub { max-width: 560px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; margin: 28px 0 36px; color: rgba(252,252,247,.9); opacity: 0; transform: translateY(30px); animation: up 1s .5s var(--ease) forwards; }
.hero .btn { opacity: 0; transform: translateY(30px); animation: up 1s .7s var(--ease) forwards; }
@keyframes up { to { opacity: 1; transform: none; } }
.hero-scroll { position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(70px, 12vh, 130px); width: 1px; height: 70px; background: rgba(252,252,247,.35); overflow: hidden; }
.hero-scroll span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--off); animation: scrollLine 2s infinite var(--ease); }
@keyframes scrollLine { to { top: 100%; } }

/* ---------- Intro ---------- */
.statement { font-size: clamp(34px, 4.4vw, 70px); line-height: 1.1; letter-spacing: -0.02em; max-width: 22ch; }
.intro-row { display: flex; justify-content: space-between; align-items: center; gap: 40px; margin-top: 56px; }
.intro-text { max-width: 650px; font-size: 17.6px; line-height: 1.5; margin: 0; }
.plus-link { display: inline-flex; align-items: center; gap: 14px; font-size: 16px; line-height: 1.3; color: var(--text); flex: none; margin-right: 8%; }
.plus-link:hover .plus::before, .plus-link:hover .plus::after { background: var(--wood); }
.plus-link:hover .plus { transform: rotate(90deg); }
.plus-link .plus { transition: transform .5s var(--ease); }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 80px; border-top: 1px solid var(--line); }
.pillars li { padding: 26px 24px 0 0; font-family: var(--f-head); font-size: 20px; color: var(--ink); line-height: 1.25; }
.pillar-num { display: block; font-family: var(--f-body); font-size: 13px; color: var(--muted); margin-bottom: 10px; }

/* ---------- Cabeceras de sección ---------- */
.section-head { display: grid; grid-template-columns: 1.6fr 1fr; align-items: end; gap: 40px; margin-bottom: 56px; }
.section-title { font-size: clamp(42px, 6vw, 88px); line-height: 1; letter-spacing: -0.025em; }
.section-title--sm { font-size: clamp(34px, 4vw, 56px); line-height: 1.05; }
.section-title--center { text-align: center; margin-bottom: 40px; font-size: clamp(38px, 5vw, 70px); }
.section-lead { font-size: 15.5px; line-height: 1.6; margin: 0 0 10px; max-width: 340px; }

/* ---------- Cómo trabajamos ---------- */
.method { background: var(--paper); padding-top: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { border: 1px solid var(--line); padding: 26px 24px 30px; display: flex; flex-direction: column; background: #fff; transition: border-color .4s var(--ease), box-shadow .4s var(--ease); }
.step:hover { border-color: var(--line-strong); box-shadow: 0 20px 50px -30px rgba(15,15,16,.25); }
.step-top { display: flex; justify-content: space-between; align-items: flex-start; }
.step-num { font-size: 14px; color: var(--text); }
.step-icon { width: 44px; height: 44px; fill: none; stroke: var(--wood); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.step-title { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; margin: 26px 0 26px; }
.step-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand-soft); margin-bottom: 24px; }
.step-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.step:hover .step-media img { transform: scale(1.04); }
.step-media--duo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: transparent; }
.step-text { font-size: 15.5px; line-height: 1.6; margin: auto 0 0; }

/* ---------- Proyectos ---------- */
.projects { padding-top: var(--section); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 30px; margin: 0 auto 70px; }
.filter { font-size: 16px; padding: 8px 12px; color: var(--text); transition: background .3s, color .3s; }
.filter:hover { color: var(--ink); }
.filter.is-active { background: var(--sand); color: var(--ink); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(22px, 2.6vw, 40px); row-gap: clamp(48px, 5vw, 72px); align-items: start; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.project-grid.is-switching { opacity: 0; transform: translateY(12px); }
.project.is-hidden { display: none; }
.project.is-entering { animation: projectIn .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes projectIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (max-width: 960px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.project-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand-soft); }
.project-title { font-size: clamp(24px, 2vw, 28.8px); line-height: 1.1; margin-top: 22px; }
.project-meta { font-size: 15px; margin: 10px 0 6px; }
.project-desc { font-size: 15px; line-height: 1.55; max-width: 520px; margin: 0; color: var(--muted); }

/* ---------- Comparador antes/después ---------- */
.compare-section { background: var(--sand-soft); }
.compare { position: relative; aspect-ratio: 16 / 9; overflow: hidden; user-select: none; touch-action: pan-y; cursor: ew-resize; background: var(--sand); --pos: 50%; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare-before-wrap { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--off); z-index: 3; }
.compare-handle span { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--off); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.compare-handle span::before, .compare-handle span::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.compare-handle span::before { left: 15px; transform: translateY(-50%) rotate(-45deg); }
.compare-handle span::after { right: 15px; transform: translateY(-50%) rotate(135deg); }
.compare-label { position: absolute; top: 18px; z-index: 2; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: rgba(252,252,247,.92); color: var(--ink); padding: 7px 12px; pointer-events: none; }
.compare-label--before { left: 18px; }
.compare-label--after { right: 18px; }

/* ---------- Servicios ---------- */
.service-list { border-top: 1px solid var(--line-strong); }
.service { border-bottom: 1px solid var(--line-strong); }
.service summary { list-style: none; display: grid; grid-template-columns: 70px 1fr 42px; align-items: center; gap: 20px; padding: 30px 0; cursor: pointer; }
.service summary::-webkit-details-marker, .faq-item summary::-webkit-details-marker { display: none; }
.service-num { font-size: 14px; color: var(--muted); }
.service-title { font-family: var(--f-head); font-size: clamp(24px, 3vw, 40px); line-height: 1.1; color: var(--ink); transition: transform .4s var(--ease); }
.service summary:hover .service-title { transform: translateX(8px); }
.service .plus { width: 30px; height: 30px; justify-self: end; }
.service[open] .plus::after, .faq-item[open] .plus::after { transform: translateX(-50%) scaleY(0); }
.service-body { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 20px; padding: 0 0 36px; }
.service-body p { grid-column: 2; margin: 0; max-width: 460px; line-height: 1.6; }
.service-body ul { grid-column: 3; }
.service-body li { padding: 8px 0 8px 22px; position: relative; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.service-body li::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 1px; background: var(--wood); }
.service[open] .service-body { animation: fadeIn .5s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Estudio ---------- */
.about { background: var(--off); }
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.about-media { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--sand); }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { margin-bottom: 28px; }
.about-text p { line-height: 1.65; max-width: 540px; }
.about-list { margin-top: 34px; border-top: 1px solid var(--line-strong); }
.about-list li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-strong); color: var(--ink); font-size: 16px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--sand); }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; cursor: pointer; font-size: 16px; color: var(--ink); font-weight: 500; }
.faq-item summary .plus::before, .faq-item summary .plus::after { background: #b8b38c; }
.faq-item p { padding: 0 40px 22px 0; margin: 0; font-size: 15.5px; line-height: 1.65; animation: fadeIn .4s var(--ease); }

/* ---------- Contacto ---------- */
.contact { background: var(--paper); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.contact-info .section-title { font-size: clamp(40px, 4.8vw, 68px); margin-bottom: 26px; }
.contact-info > p { max-width: 420px; line-height: 1.6; }
.contact-data { margin-top: 40px; border-top: 1px solid var(--line); }
.contact-data li { display: flex; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink); }
.contact-data span { width: 90px; flex: none; color: var(--muted); font-size: 14px; padding-top: 2px; }
.contact-data a:hover { color: var(--wood); }
.contact-form { background: var(--sand-soft); padding: clamp(26px, 4vw, 50px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.field { display: flex; flex-direction: column; margin-bottom: 22px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 0; padding: 13px 14px; transition: border-color .25s, box-shadow .25s; width: 100%; -webkit-appearance: none; appearance: none; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f0f10' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15,15,16,.06); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: 13px; margin-top: 6px; }
.field-file input { padding: 11px; background: #fff; font-size: 14px; }
.field-file input::file-selector-button { font: inherit; font-size: 14px; border: 0; background: var(--sand); color: var(--ink); padding: 8px 14px; margin-right: 12px; cursor: pointer; }
.field-hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.field-captcha { margin-bottom: 18px; }
.field-captcha[hidden] { display: none; }
.field-captcha .cf-turnstile { min-height: 65px; }
.field-check { flex-direction: row; align-items: flex-start; gap: 12px; }
.field-check input { width: 18px; height: 18px; padding: 0; flex: none; margin-top: 2px; -webkit-appearance: checkbox; appearance: auto; accent-color: var(--ink); }
.field-check label { font-weight: 400; font-size: 14px; margin: 0; color: var(--text); }
.field-check label a { text-decoration: underline; color: var(--ink); }
.field-check.has-error label { color: #b3261e; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 18px 0 0; font-size: 15px; min-height: 1.5em; }
.form-status.ok { color: #1f6b3a; }
.form-status.err { color: #b3261e; }

/* ---------- Pie ---------- */
.site-footer { background: var(--sand); color: var(--ink); padding: clamp(60px, 8vw, 90px) 0 40px; font-size: 15px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-tagline { margin: 0; }
.social { display: flex; gap: 18px; }
.social svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.social svg .fill { fill: var(--ink); stroke: none; }
.social a { display: block; transition: opacity .3s; }
.social a:hover { opacity: .6; }
.footer-logo { display: inline-block; margin: 36px 0 30px; font-family: var(--f-head); font-weight: 500; font-size: clamp(54px, 10vw, 140px); line-height: .9; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1.4px var(--ink); }
.footer-logo span { font-weight: 400; margin-left: .06em; }
.footer-mid { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding-bottom: 34px; border-bottom: 1px solid rgba(15,15,16,.15); }
.footer-mid p { margin: 0 0 6px; }
.footer-mail { font-family: var(--f-head); font-size: clamp(22px, 2.4vw, 32px); }
.footer-mail:hover { text-decoration: underline; text-underline-offset: 5px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px 30px; padding-top: 26px; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-bottom a:hover { text-decoration: underline; }
.footer-bottom .legal { font-size: 13px; }

/* Volver arriba */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 90; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .35s, transform .35s var(--ease); }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Páginas legales ---------- */
.page-legal main { padding: calc(var(--header-h) + 70px) 0 100px; }
.page-legal h1 { font-size: clamp(38px, 5vw, 64px); margin-bottom: 40px; }
.page-legal h2 { font-size: 26px; margin: 44px 0 14px; }
.page-legal p, .page-legal li { line-height: 1.7; }
.page-legal main ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.page-legal .ph { background: #fff3c4; padding: 0 4px; }
.page-legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 10px 0 20px; }
.page-legal th, .page-legal td { border: 1px solid var(--line-strong); padding: 10px; text-align: left; vertical-align: top; }
.page-simple main { min-height: 75vh; display: grid; place-items: center; text-align: center; padding: calc(var(--header-h) + 40px) var(--gutter) 80px; }
.page-simple h1 { font-size: clamp(42px, 6vw, 80px); margin-bottom: 20px; }
.page-simple p { max-width: 520px; margin: 0 auto 34px; }

/* ---------- Tarjetas de proyecto (inicio) ---------- */
.project-link { display: block; color: inherit; }
.project-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.project-link:hover .project-media img { transform: scale(1.04); }
.card-cat, .card-badge { position: absolute; top: 16px; z-index: 2; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 7px 11px; }
.card-cat { left: 16px; background: rgba(252,252,247,.94); color: var(--ink); }
.card-badge { right: 16px; background: var(--ink); color: #fff; }
.card-badge--inline { position: static; display: inline-block; margin: 0 0 18px 12px; vertical-align: top; }
.card-more { position: absolute; left: 16px; bottom: 16px; z-index: 2; background: var(--ink); color: #fff; font-size: 14px; padding: 10px 16px; opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.project-link:hover .card-more, .project-link:focus-visible .card-more { opacity: 1; transform: none; }
.project-link:hover .project-title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.compare-link { margin: 22px 0 0; text-align: right; font-size: 15px; }
.compare-link a { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.compare-link a:hover { color: var(--wood); }
@media (hover: none) { .card-more { opacity: 1; transform: none; } }

/* ---------- Página de proyecto ---------- */
.page-project main { padding-top: var(--header-h); }
.phero { padding: clamp(40px, 6vw, 80px) 0 0; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 34px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.phero-title { font-size: clamp(34px, 4.4vw, 64px); line-height: 1.06; letter-spacing: -0.02em; max-width: 24ch; margin-bottom: clamp(36px, 5vw, 60px); }
.phero-media { margin: 0; }
.phero-media img { width: 100%; max-height: 82vh; object-fit: cover; background: var(--sand-soft); cursor: zoom-in; }
.phero-media figcaption, .pfig figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.psection { padding: clamp(60px, 8vw, 110px) 0; }
.psection--first { padding-top: clamp(50px, 7vw, 90px); }
.psection--sand { background: var(--sand-soft); }
.psection-title { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.05; margin-bottom: 30px; }
.pintro { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.pintro-text p { font-size: 18px; line-height: 1.7; }
.pficha { border: 1px solid var(--line-strong); padding: 28px 28px 10px; background: #fff; }
.pficha-title { font-size: 22px; margin-bottom: 14px; }
.pficha dl { margin: 0; }
.pficha dl > div { padding: 14px 0; border-top: 1px solid var(--line); }
.pficha dt { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--wood); margin-bottom: 4px; }
.pficha dd { margin: 0; color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.prs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 90px); }
.prs h2 { font-size: clamp(28px, 3vw, 40px); margin: 8px 0 20px; }
.prs p { line-height: 1.7; }
.prs-num { font-size: 14px; color: var(--muted); }
.plist { border-top: 1px solid var(--line-strong); }
.plist li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line-strong); color: var(--ink); font-size: 15.5px; line-height: 1.5; }
.plist .plus { margin-top: 3px; }
.phase { padding: 34px 0 44px; border-top: 1px solid var(--line-strong); }
.phase-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 14px; }
.phase-head h3 { font-size: clamp(24px, 2.4vw, 32px); }
.phase-num { font-size: 14px; color: var(--muted); }
.phase-text { max-width: 760px; line-height: 1.7; margin-bottom: 26px; }
.pgrid { display: grid; gap: 22px; }
.pgrid--1 { grid-template-columns: minmax(0, 860px); }
.pgrid--2 { grid-template-columns: 1fr 1fr; }
.pgrid--3 { grid-template-columns: repeat(3, 1fr); }
.pfig { margin: 0; }
.pfig a { display: block; overflow: hidden; background: var(--sand-soft); cursor: zoom-in; }
.pgrid .pfig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1s var(--ease); }
.pfig a:hover img { transform: scale(1.04); }
.pgallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 22px; }
.pgallery .pfig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1s var(--ease); }
.phero-media--portrait img { object-position: center top; }
.pcta { background: var(--ink); color: rgba(252,252,247,.85); padding: clamp(60px, 8vw, 100px) 0; }
.pcta-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.pcta h2 { color: var(--off); font-size: clamp(32px, 4vw, 56px); margin-bottom: 16px; }
.pcta p { max-width: 640px; line-height: 1.65; margin: 0; }
.pcta .btn-dark { background: var(--off); color: var(--ink); flex: none; }
.pcta .btn-dark:hover { background: var(--sand); }
.pnav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; padding-top: 50px; padding-bottom: 60px; }
.pnav a { font-family: var(--f-head); font-size: 20px; color: var(--ink); }
.pnav a span { display: block; font-family: var(--f-body); font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pnav a:hover { color: var(--wood); }
.pnav-next { text-align: right; }
.pnav-all { font-size: 15px !important; border: 1px solid var(--line-strong); padding: 12px 18px; }

/* Visor de imágenes */
.lbx { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 60px 70px; }
.lbx[hidden] { display: none; }
.lbx-backdrop { position: absolute; inset: 0; background: rgba(15,15,16,.94); }
.lbx-fig { position: relative; margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; animation: fadeIn .35s var(--ease); }
.lbx-img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; }
.lbx-cap { color: rgba(252,252,247,.85); font-size: 14px; margin-top: 14px; text-align: center; max-width: 760px; }
.lbx-count { position: absolute; top: 22px; left: 26px; color: rgba(252,252,247,.7); font-size: 14px; }
.lbx-btn { position: absolute; z-index: 2; color: var(--off); width: 48px; height: 48px; font-size: 22px; background: rgba(252,252,247,.08); transition: background .3s; }
.lbx-btn:hover { background: rgba(252,252,247,.2); }
.lbx-close { top: 12px; right: 14px; font-size: 32px; }
.lbx-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lbx-next { right: 12px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }

@media (max-width: 960px) {
  .pintro, .prs { grid-template-columns: 1fr; }
  .pgrid--3, .pgallery { grid-template-columns: 1fr 1fr; }
  .pcta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
  .pgrid--2, .pgrid--3 { grid-template-columns: 1fr; }
  .pgallery { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .pgallery .pfig figcaption { font-size: 12px; }
  .pnav { grid-template-columns: 1fr 1fr; }
  .pnav-all { display: none; }
  .pnav a { font-size: 16px; }
  .lbx { padding: 56px 8px; }
  .lbx-prev, .lbx-next { top: auto; bottom: 10px; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .main-nav ul { gap: 22px; }
  .main-nav a { font-size: 16px; }
}
@media (max-width: 960px) {
  :root { --header-h: 70px; }
  .menu-toggle { display: inline-flex; position: relative; z-index: 102; }
  .main-nav { position: fixed; inset: 0; z-index: 101; background: var(--off); color: var(--ink); display: flex; align-items: center; padding: 100px var(--gutter) 40px; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 6px; }
  .main-nav a { font-size: clamp(34px, 8vw, 52px); }
  .main-nav .nav-cta { display: inline-block; font-size: 18px; margin-top: 28px; padding: 14px 22px; }
  .menu-open .main-nav { opacity: 1; visibility: visible; }
  .menu-open .site-header { color: var(--ink); }
  .menu-open .logo { position: relative; z-index: 102; }
  body.menu-open { overflow: hidden; }

  .section-head { grid-template-columns: 1fr; gap: 22px; }
  .section-lead { max-width: 560px; }
  .steps { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
  .pillars { grid-template-columns: 1fr 1fr; row-gap: 30px; }
  .intro-row { flex-direction: column; align-items: flex-start; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { aspect-ratio: 4 / 3; }
  .service-body { grid-template-columns: 1fr; padding-left: 0; }
  .service-body p, .service-body ul { grid-column: 1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .project-grid { grid-template-columns: 1fr; }
  .filters { gap: 6px 10px; margin-bottom: 44px; }
  .filter { font-size: 15px; }
  .form-row { grid-template-columns: 1fr; }
  .service summary { grid-template-columns: 44px 1fr 26px; gap: 12px; padding: 24px 0; }
  .service .plus { width: 22px; height: 22px; }
  .compare { aspect-ratio: 4 / 3; }
  .compare-handle span { width: 46px; height: 46px; }
  .hero-scroll { display: none; }
    .footer-top { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .pillars { grid-template-columns: 1fr; }
  .logo { font-size: 22px; }
  .menu-toggle-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
