/* =========================================================
   FINITUM PAVIMENTOS — estilos (independientes de la web de ventanas)
   ========================================================= */
:root {
  --brand: #006ba4;
  --brand-dark: #00507c;
  --brand-light: #4aa3d8;
  --accent: #f2a900;          /* amarillo obra, solo para avisos */
  --ink: #111111;
  --ink-2: #1b1d20;
  --text: #2b2d31;
  --grey: #6b6f76;
  --soft: #f3f3f1;
  --line: #e2e2df;
  --white: #ffffff;
  --ff: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-serif: 'Instrument Serif', Georgia, serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --sec: clamp(72px, 10vw, 140px);
  --header-h: 72px;
  --radius: 12px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--ff); color: var(--text); background: var(--white); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -.02em; }
em { font-family: var(--ff-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--ff); padding: 14px 22px; border-radius: 8px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-dark); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--lg { padding: 17px 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }

/* ---------- Etiquetas ---------- */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin: 0 0 14px; }
.eyebrow--light { color: var(--brand-light); }

/* ---------- Encabezado ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); transition: background .3s, box-shadow .3s; }
.header.is-scrolled, .header.is-open { background: rgba(17,17,17,.96); box-shadow: 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav ul a { color: rgba(255,255,255,.86); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav ul a:hover { color: #fff; }
.nav__alt { opacity: .7; }
.burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 2px; background: #fff; margin: 6px 0; transition: transform .25s; }
.header.is-open .burger span:first-child { transform: translateY(4px) rotate(45deg); }
.header.is-open .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Portada ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; background: var(--ink); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,10,.7) 0%, rgba(10,10,10,.25) 65%), linear-gradient(180deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,.3) 35%, rgba(10,10,10,.9) 100%); }
.hero__inner { position: relative; z-index: 1; padding-top: calc(var(--header-h) + 60px); padding-bottom: clamp(40px, 7vw, 80px); width: 100%; }
.hero h1 { color: #fff; font-size: clamp(40px, 6.4vw, 84px); max-width: 15ch; font-weight: 800; }
.hero h1 em { color: var(--brand-light); }
.hero__lead { max-width: 58ch; font-size: clamp(17px, 1.6vw, 20px); color: rgba(255,255,255,.88); margin: 22px 0 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts { list-style: none; padding: 28px 0 0; margin: 44px 0 0; border-top: 1px solid rgba(255,255,255,.2); display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hero__facts strong { display: block; font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; color: #fff; }
.hero__facts span { font-size: 14px; color: rgba(255,255,255,.72); }

/* ---------- Aviso de mínimo ---------- */
.minimo { background: var(--accent); color: var(--ink); }
.minimo__inner { display: flex; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.minimo__tag { flex: none; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--ink); color: var(--accent); padding: 6px 10px; border-radius: 4px; }
.minimo p { margin: 0; font-size: 16px; }

/* ---------- Secciones ---------- */
.section { padding: var(--sec) 0; }
.section--dark { background: var(--ink); color: rgba(255,255,255,.8); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--soft { background: var(--soft); }
.section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section__head h2 { font-size: clamp(32px, 4.4vw, 56px); }
.section__lead { font-size: 18px; margin: 18px 0 0; color: var(--grey); }
.section--dark .section__lead { color: rgba(255,255,255,.7); }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.service { background: #fff; padding: clamp(26px, 3vw, 40px); transition: background .25s; }
.service:hover { background: var(--soft); }
.service__num { font-size: 13px; font-weight: 700; color: var(--brand); letter-spacing: .1em; }
.service h3 { font-size: 22px; margin: 14px 0 10px; }
.service p { margin: 0; color: var(--grey); font-size: 16px; }

/* ---------- Proceso ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 28px); }
.step__img { margin: 0 0 20px; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--ink-2); }
.step__img img { width: 100%; height: 100%; object-fit: cover; }
.step__img--icon { display: grid; place-items: center; color: var(--brand-light); background: linear-gradient(135deg, #2a2d31, #1b1d20); }
.step__img--icon svg { width: 46%; }
.step__num { font-size: 13px; font-weight: 700; color: var(--brand-light); letter-spacing: .1em; }
.step h3 { font-size: 21px; margin: 8px 0 10px; }
.step p { margin: 0; font-size: 15.5px; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; gap: 10px; }
.gallery__item { position: relative; border: 0; padding: 0; margin: 0; cursor: zoom-in; border-radius: 10px; overflow: hidden; background: var(--soft); }
.gallery__item--big { grid-column: span 2; grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item span { position: absolute; left: 10px; bottom: 10px; background: rgba(17,17,17,.82); color: #fff; font: 600 13px/1 var(--ff); padding: 8px 10px; border-radius: 6px; }
.gallery__item:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ---------- Preguntas ---------- */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-weight: 700; color: var(--ink); font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 26px; font-weight: 400; color: var(--brand); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--grey); }

/* ---------- Contacto / formulario ---------- */
.contact { background: var(--ink); color: rgba(255,255,255,.8); }
.contact__grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact h2 { color: #fff; font-size: clamp(32px, 4.4vw, 54px); }
.contact__intro p { font-size: 18px; margin: 18px 0 26px; }
.contact__list { list-style: none; padding: 0; margin: 0; }
.contact__list li { padding: 12px 0 12px 30px; border-top: 1px solid rgba(255,255,255,.12); position: relative; }
.contact__list li::before { content: ""; position: absolute; left: 0; top: 19px; width: 14px; height: 8px; border-left: 2px solid var(--brand-light); border-bottom: 2px solid var(--brand-light); transform: rotate(-45deg); }
.contact__list strong { color: #fff; }

.form { background: #fff; color: var(--text); border-radius: 16px; padding: clamp(22px, 3.4vw, 40px); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; display: flex; flex-direction: column; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field abbr { color: #c0392b; text-decoration: none; }
.opt { font-weight: 400; color: var(--grey); }
.field input[type=text], .field input[type=tel], .field input[type=email], .field input[type=number], .field select, .field textarea {
  font: 16px/1.4 var(--ff); padding: 13px 14px; border: 1.5px solid #cfd2d6; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,107,164,.15); }
.field__hint { font-size: 13px; color: var(--grey); margin-top: 6px; }
.field__hint.is-warn { color: #a05a00; font-weight: 600; }
.field__error { font-size: 13px; color: #c0392b; margin-top: 4px; min-height: 0; }
.field__error:empty { display: none; }
.field.is-invalid input, .field.is-invalid select { border-color: #c0392b; }
.field--check label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.field--check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.form__more { margin: 0 0 16px; border: 1px dashed #cfd2d6; border-radius: 8px; padding: 12px 14px; }
.form__more summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--brand); }
.form__more .field { margin: 12px 0 0; }
.form__status { margin: 14px 0 0; font-size: 15px; color: #c0392b; }
.form__status:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pie ---------- */
.footer { background: #0b0b0b; color: rgba(255,255,255,.65); padding: 64px 0 28px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__logo { width: 120px; height: auto; margin-bottom: 16px; }
.footer h4 { color: #fff; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 22px; font-size: 13px; }

/* ---------- Barra móvil ---------- */
.mobilebar { display: none; }

/* ---------- Visor de fotos ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(5,5,5,.94); display: flex; align-items: center; justify-content: center; padding: 60px 70px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: calc(100vh - 160px); max-width: 100%; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: rgba(255,255,255,.85); margin-top: 14px; font-size: 15px; text-align: center; }
.lightbox__close, .lightbox__nav { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 24px; cursor: pointer; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: 16px; right: 16px; font-size: 30px; }
.lightbox__nav--prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- Aparición suave ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step__img { aspect-ratio: 4 / 3; }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .burger { display: block; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; background: rgba(17,17,17,.98); flex-direction: column; align-items: stretch; gap: 18px; padding: 24px var(--gutter) 32px; transform: translateY(-120%); transition: transform .35s var(--ease); }
  .header.is-open .nav { transform: none; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 17px; }
  .services { grid-template-columns: 1fr 1fr; }
  .faq-wrap, .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .logo img { height: 32px; }
  .hero { min-height: 92svh; }
  .hero__facts { grid-template-columns: 1fr; gap: 12px; margin-top: 32px; padding-top: 20px; }
  .hero__facts li { display: flex; align-items: baseline; gap: 10px; }
  .hero__facts strong { font-size: 19px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .minimo__inner { align-items: flex-start; }
  .services { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step__img { aspect-ratio: 16 / 10; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; gap: 8px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .lightbox { padding: 60px 10px 90px; }
  .lightbox__nav { top: auto; bottom: 18px; transform: none; }
  .mobilebar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(17,17,17,.96); transform: translateY(110%); transition: transform .3s var(--ease); }
  .mobilebar.is-visible { transform: none; }
}

/* ---------- Página de gracias ---------- */
.thanks { min-height: 100svh; display: flex; align-items: center; background: var(--ink); color: rgba(255,255,255,.8); padding: calc(var(--header-h) + 40px) 0 60px; }
.thanks__box { max-width: 640px; }
.thanks__mark { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; margin-bottom: 24px; }
.thanks__mark svg { width: 28px; }
.thanks h1 { color: #fff; font-size: clamp(32px, 5vw, 52px); }
.thanks h1 em { color: var(--brand-light); }
.thanks p { font-size: 18px; }
.thanks ol { list-style: none; padding: 0; margin: 28px 0 32px; }
.thanks li { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.12); }
.thanks li span { color: var(--brand-light); font-weight: 700; margin-right: 12px; }
.thanks__actions { display: flex; gap: 12px; flex-wrap: wrap; }
