/* SQIZ Arquitectos — hoja de estilos del sitio */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6f5;
  --ink: #1b1d1e;
  --muted: #62676a;
  --line: #e2e4e3;
  --grey: #8c8f91;          /* gris del logo */
  --brand: #079aa6;         /* cian del logo, oscurecido para contraste */
  --brand-dark: #057a84;
  --brand-bright: #12e3ee;  /* cian original del logo */
  --brand-soft: #e4f8f9;
  --dark: #141718;
  --radius: 14px;
  --max: 1180px;
  --header-h: 76px;
  --font-display: "Jost", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--font-body);
}
img { max-width: 100%; display: block; }
picture { display: contents; } /* <picture> no altera el layout: los estilos siguen aplicando al <img> */
:where(img[width][height]) { height: auto; } /* especificidad 0: no pisa los height:100% de hero/proyectos */
a { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 400; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 400; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--brand-bright); outline-offset: 3px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: #e9ecec; }
.section-dark .eyebrow { color: var(--brand-bright); }
.eyebrow {
  display: inline-block;
  font: 600 .75rem/1 var(--font-body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1rem;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 680px; }
.section-dark .lead { color: #b3babc; }
.accent { color: var(--brand); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font: 600 .92rem/1 var(--font-body);
  padding: 1em 1.6em; border-radius: 99px;
  text-decoration: none; border: 1.5px solid transparent;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand img { height: 42px; width: auto; }
.intro-text { max-width: 820px; color: var(--muted); margin-bottom: 32px; }
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font: 500 1.08rem var(--font-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 300 1.6rem var(--font-body); color: var(--brand); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-right: 40px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 34px; }
.main-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; position: relative; padding: 6px 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--brand); transition: right .25s; }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { right: 0; }
.main-nav a[aria-current="page"] { color: var(--brand); }
.main-nav .btn { padding: .8em 1.3em; color: #fff; }
.main-nav .btn::after { display: none; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: #fff; padding: 32px 24px;
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
    overflow-y: auto;
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 6px; }
  .main-nav a { font-size: 1.4rem; font-family: var(--font-display); display: block; padding: 10px 0; }
  .main-nav li:last-child { margin-top: 18px; }
  body.nav-open { overflow: hidden; }
}

/* Hero de inicio */
.hero { position: relative; min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; transform: scale(1.04); }
.hero-media img.active { opacity: 1; animation: hero-zoom 9s ease-out forwards; }
@keyframes hero-zoom { to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,16,18,.55) 0%, rgba(12,16,18,0) 65%), linear-gradient(180deg, rgba(12,16,18,.05) 20%, rgba(12,16,18,.82) 100%); }
.hero .container { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(48px, 9vh, 96px); }
.hero h1 { max-width: 820px; margin-bottom: .45em; }
.hero h1 strong { font-weight: 500; color: var(--brand-bright); }
.hero p { font-size: 1.15rem; max-width: 560px; color: rgba(255,255,255,.88); }
.hero .eyebrow { color: var(--brand-bright); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-dots { position: absolute; right: 24px; bottom: 28px; z-index: 2; display: flex; gap: 8px; }
.hero-dots button { width: 28px; height: 3px; border: 0; padding: 0; background: rgba(255,255,255,.4); cursor: pointer; }
.hero-dots button.active { background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .hero-media img.active { animation: none; transform: none; }
  html { scroll-behavior: auto; }
}

/* Cabecera de página interior */
.page-hero { position: relative; padding: clamp(80px, 13vw, 150px) 0 clamp(48px, 7vw, 80px); color: #fff; overflow: hidden; }
.page-hero > img, .page-hero > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,16,18,.85) 0%, rgba(12,16,18,.45) 100%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero .eyebrow { color: var(--brand-bright); }
.page-hero p { max-width: 620px; font-size: 1.1rem; color: rgba(255,255,255,.88); margin: 0; }

/* Grillas */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split-media img { width: 100%; border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }

/* Servicios */
.service-card { padding: 34px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .25s, box-shadow .25s, transform .25s; height: 100%; }
.service-card:hover { border-color: var(--brand); box-shadow: 0 18px 40px -24px rgba(7,154,166,.55); transform: translateY(-3px); }
.service-card .num { font: 500 .85rem var(--font-display); color: var(--brand); letter-spacing: .1em; }
.service-card h3 { margin-top: 14px; }
.service-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.service-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.service-icon svg { width: 24px; height: 24px; }

.service-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); }
.service-detail:last-child { border-bottom: 0; }
.service-detail:nth-child(even) .service-detail-media { order: 2; }
.service-detail-media img { border-radius: var(--radius); aspect-ratio: 16/11; object-fit: cover; width: 100%; }
.service-detail ul { padding-left: 1.1rem; color: var(--muted); }
.service-detail li { margin-bottom: .4em; }
.service-detail li::marker { color: var(--brand); }
@media (max-width: 860px) {
  .service-detail { grid-template-columns: 1fr; }
  .service-detail:nth-child(even) .service-detail-media { order: 0; }
}

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat strong { display: block; font: 400 clamp(2.4rem, 5vw, 3.4rem)/1 var(--font-display); color: var(--brand-bright); margin-bottom: .3em; }
.stat span { color: #b3babc; font-size: .95rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Proyectos */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head h2 { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filters button { font: 500 .9rem var(--font-body); padding: .6em 1.2em; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: all .2s; }
.filters button:hover { border-color: var(--brand); color: var(--brand); }
.filters button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.projects.featured { grid-template-columns: 1.4fr 1fr 1fr; grid-auto-rows: 260px; }
.projects.featured .project:first-child { grid-row: span 2; }
@media (max-width: 960px) { .projects, .projects.featured { grid-template-columns: repeat(2, 1fr); } .projects.featured .project:first-child { grid-row: auto; } }
@media (max-width: 600px) { .projects, .projects.featured { grid-template-columns: 1fr; grid-auto-rows: auto; } }
.project { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); cursor: zoom-in; }
.project[hidden] { display: none; }
.project img { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .6s ease; }
.projects.featured .project img { aspect-ratio: auto; }
.project:hover img { transform: scale(1.05); }
.project figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 48px 20px 18px; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(10,13,14,.82));
}
.project figcaption strong { display: block; font: 500 1.08rem var(--font-display); }
.project figcaption span { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-bright); }
.project button { position: absolute; inset: 0; opacity: 0; cursor: zoom-in; border: 0; background: none; }

/* Visor de imágenes */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8,10,11,.94); display: none; align-items: center; justify-content: center; padding: 60px 20px; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: min(1200px, 100%); text-align: center; color: #fff; }
.lightbox img { max-height: calc(100vh - 160px); margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { margin-top: 14px; font-size: .95rem; color: #cfd5d6; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lightbox button svg { width: 22px; height: 22px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* Clientes */
.clients { display: grid; grid-template-columns: repeat(7, 1fr); gap: 16px; align-items: center; }
.clients div { background: #fff; border: 1px solid var(--line); border-radius: 12px; height: 104px; padding: 18px; display: flex; align-items: center; justify-content: center; }
.clients img { max-height: 62px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.clients div:hover img { filter: none; opacity: 1; }
.split .clients { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.projects.featured .project { cursor: pointer; }
@media (max-width: 960px) { .clients { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .clients { grid-template-columns: repeat(2, 1fr); } }

/* Homologación */
.badge-card { display: flex; gap: 22px; align-items: center; padding: 28px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.badge-card svg { width: 54px; height: 54px; color: var(--brand); flex: none; }
.badge-card p { margin: 0; }

/* Valores */
.value { padding: 28px 0; border-top: 2px solid var(--ink); }
.value h3 { font-size: 1.15rem; }
.value p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Proceso */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.step { position: relative; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font: 400 2rem/1 var(--font-display); color: var(--brand-bright); margin-bottom: 14px; }
.step p { color: #b3babc; font-size: .95rem; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Llamado a la acción */
.cta-band { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; border-radius: calc(var(--radius) * 1.4); padding: clamp(40px, 6vw, 72px); display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .3em; }
.cta-band p { margin: 0; color: rgba(255,255,255,.88); }
.cta-band .btn { background: #fff; color: var(--brand-dark); }
.cta-band .btn:hover { background: var(--dark); color: #fff; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 5vw, 64px); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 22px; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.contact-list .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.contact-list .ico svg { width: 20px; height: 20px; }
.contact-list small { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.contact-list a { color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--brand); }
.form { background: var(--bg-alt); border-radius: calc(var(--radius) * 1.3); padding: clamp(24px, 4vw, 40px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .85em 1em; border: 1px solid #cfd3d2; border-radius: 10px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .82rem; color: var(--muted); margin: 12px 0 0; }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: .95rem; display: none; }
.alert.show { display: block; }
.alert-ok { background: #e6f5ec; color: #1e6b41; }
.alert-error { background: #fbe9e7; color: #9b2c22; }
.map { margin-top: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/7; background: var(--bg-alt); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .map { aspect-ratio: 4/3; } }

/* Pie */
.site-footer { background: var(--dark); color: #b3babc; padding: 72px 0 28px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; }
.footer-logo img { height: 38px; width: auto; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #b3babc; text-decoration: none; }
.site-footer a:hover { color: var(--brand-bright); }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.social a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.social svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px -8px rgba(0,0,0,.4); transition: transform .2s; }
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }
