/* =========================================================
   Verde Arquitectura — estudio de arquitectura sostenible
   Estilo: aireado y editorial · salvia, blanco cálido, roble,
   carbón · DM Serif Display + DM Sans
   ========================================================= */

:root {
  --sage: #8A9B84;
  --sage-dark: #6F8069;
  --sage-pale: #E9EDE5;
  --paper: #FAFAF7;
  --paper-2: #F2F2EC;
  --oak: #B98B5E;
  --oak-soft: #F1E6D8;
  --charcoal: #2F3330;
  --ink: #2F3330;
  --muted: #6D726E;
  --line: #DADBD3;
  --white: #FFFFFF;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --wrap: 1280px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow: 0 30px 60px -36px rgba(47, 51, 48, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-weight: 300; font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0 0 .5em; color: var(--charcoal); letter-spacing: -.01em; }
h1 { font-size: clamp(2.7rem, 5.6vw, 4.8rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.45rem; }
h1 em, h2 em { font-style: italic; color: var(--sage-dark); }
p { margin: 0 0 1.1em; }
.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--charcoal); color: #fff; padding: .6rem 1rem; z-index: 999; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--oak); outline-offset: 3px; }

/* Iconos: línea fina arquitectónica */
.ic { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: butt; stroke-linejoin: miter; flex-shrink: 0; vertical-align: -.22em; }
.ic--lg { width: 2.2rem; height: 2.2rem; stroke-width: .9; }
.ic--xl { width: 3rem; height: 3rem; stroke-width: .8; }

.eyebrow { display: block; font-size: .74rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--oak); margin-bottom: 1.1rem; }
.head { max-width: 760px; margin-bottom: 3.5rem; }
.head p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; }
.head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.head--row h2 { margin-bottom: 0; max-width: 680px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: 1rem 1.9rem; border-radius: 2px; font-weight: 500; font-size: .92rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid transparent; cursor: pointer; font-family: var(--sans); transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s; }
.btn:hover { transform: translateY(-2px); }
.btn--dark { background: var(--charcoal); color: var(--paper); }
.btn--dark:hover { background: var(--sage-dark); }
.btn--link { padding: 1rem 0; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--charcoal); border-bottom: 1px solid var(--charcoal); border-radius: 0; }
.btn--link:hover { color: var(--oak); border-color: var(--oak); transform: none; gap: .9rem; }
.btn--block { width: 100%; }

/* Header: transparente con desenfoque */
.header { position: sticky; top: 0; z-index: 100; background: rgba(250,250,247,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.header.is-scrolled { border-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 1.5rem; }
.logo { display: inline-flex; align-items: center; gap: .7rem; color: var(--charcoal); position: relative; z-index: 101; }
.logo__mark { width: 40px; height: 40px; }
.logo__text { font-family: var(--serif); font-size: 1.35rem; letter-spacing: .01em; }
.logo__text em { font-style: italic; color: var(--sage-dark); }
.nav ul { display: flex; gap: 2rem; align-items: center; }
.nav a { white-space: nowrap; font-size: .9rem; font-weight: 400; position: relative; padding: .3rem 0; color: var(--ink); }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--oak); transition: width .3s var(--ease); }
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.nav__cta { border: 1px solid var(--charcoal); padding: .5rem 1.1rem !important; border-radius: 2px; }
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--charcoal); color: var(--paper); }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 7px; cursor: pointer; padding: 8px; position: relative; z-index: 101; }
.burger span { display: block; height: 1.5px; background: var(--charcoal); transition: transform .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }

@media (max-width: 1120px) {
  .header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .burger { display: flex; }
  .nav { position: fixed; inset: 0; background: var(--paper); padding: 7rem 2rem 2rem; transform: translateY(-100%); opacity: 0; transition: transform .45s var(--ease), opacity .3s; z-index: 90; overflow-y: auto; }
  .nav.is-open { transform: translateY(0); opacity: 1; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .nav a { font-family: var(--serif); font-size: 2rem; }
  .nav__cta { font-family: var(--sans); font-size: 1rem; margin-top: 1rem; }
}

/* Hero */
.hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: center; }
.hero h1 { margin-bottom: 1.4rem; }
.hero__lede { font-size: 1.15rem; color: var(--muted); max-width: 540px; margin-bottom: 2.2rem; }
.hero__actions { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; margin-bottom: 3rem; }
.hero__facts { display: flex; gap: 2.5rem; margin: 0; border-top: 1px solid var(--line); padding-top: 1.6rem; flex-wrap: wrap; }
.hero__facts div { display: grid; }
.hero__facts dt { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); order: 2; }
.hero__facts dd { margin: 0; font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--charcoal); order: 1; }
.hero__media { position: relative; margin: 0; padding: 2.5rem 0 0 2.5rem; }
.hero__grid-pattern { position: absolute; left: 0; top: 0; width: 72%; height: 72%; color: var(--sage); opacity: .6; }
.hero__media img { position: relative; width: 100%; aspect-ratio: 4/5; object-fit: cover; box-shadow: var(--shadow); }
.hero__caption { position: absolute; right: 0; bottom: -1.2rem; background: var(--charcoal); color: var(--paper); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; padding: .55rem .9rem; }
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero__media { padding: 1.5rem 0 0 1.5rem; }
  .hero__media img { aspect-ratio: 4/3; }
}

/* Filosofía */
.filosofia { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filosofia__head { max-width: 820px; margin-bottom: 3.5rem; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-left: 1px solid var(--line); }
.pillar { padding: 0 2rem; border-right: 1px solid var(--line); }
.pillar .ic { color: var(--sage-dark); margin-bottom: 1.4rem; }
.pillar h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.pillar p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 960px) { .pillars { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; border-left: 0; } .pillar { border-right: 0; border-left: 1px solid var(--line); } }

/* Proyectos */
.filters { display: flex; gap: .4rem; border: 1px solid var(--line); padding: .3rem; border-radius: 999px; background: var(--white); }
.filter { background: transparent; border: 0; padding: .5rem 1.1rem; border-radius: 999px; font-family: var(--sans); font-size: .85rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); cursor: pointer; transition: all .3s; }
.filter:hover { color: var(--charcoal); }
.filter.is-active { background: var(--charcoal); color: var(--paper); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 300px; grid-auto-flow: dense; gap: 1.25rem; }
.work { position: relative; overflow: hidden; display: block; background: var(--paper-2); }
.work--tall { grid-row: span 2; }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .5s; }
.work:hover img { transform: scale(1.04); }
.work__meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem; background: linear-gradient(0deg, rgba(47,51,48,.85), rgba(47,51,48,0)); color: var(--paper); opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s var(--ease); }
.work:hover .work__meta, .work:focus-visible .work__meta { opacity: 1; transform: none; }
.work__type { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--oak-soft); }
.work__meta h3 { color: var(--paper); font-size: 1.4rem; margin: .2rem 0 .1rem; }
.work__meta span:last-child { font-size: .8rem; opacity: .85; }
.work.is-hidden { display: none; }
.gallery__empty { text-align: center; color: var(--muted); padding: 3rem 0; }
@media (max-width: 960px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 240px; } }
@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .work--tall { grid-row: span 1; }
  .work__meta { opacity: 1; transform: none; }
  .head--row { margin-bottom: 2rem; }
}

/* Proceso */
.proceso { background: var(--sage-pale); }
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem; counter-reset: tl; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: var(--sage); }
.tl { position: relative; padding-top: 3.2rem; }
.tl::before { content: ""; position: absolute; left: 0; top: 16px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 1px solid var(--sage-dark); }
.tl__num { position: absolute; left: 22px; top: 11px; font-family: var(--serif); font-size: 1.2rem; color: var(--sage-dark); }
.tl h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.tl p { color: var(--muted); font-size: .92rem; margin-bottom: .8rem; }
.tl__out { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--oak); border-top: 1px solid var(--sage); padding-top: .6rem; }
@media (max-width: 1000px) { .timeline { grid-template-columns: repeat(3, 1fr); } .timeline::before { display: none; } }
@media (max-width: 640px) { .timeline { grid-template-columns: 1fr; gap: 1rem; } .tl { padding-top: 0; padding-left: 3rem; } .tl::before { top: 8px; } .tl__num { left: 22px; top: 2px; } }

/* Servicios */
.servicios__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5rem; align-items: start; }
.servicios__intro { position: sticky; top: 110px; }
.servicios__intro p:not(.eyebrow) { color: var(--muted); }
.seal { width: 160px; height: 160px; margin-top: 2.5rem; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.serv-list { display: grid; }
.serv { display: grid; grid-template-columns: 56px 1fr; gap: 1.4rem; padding: 1.8rem 0; border-top: 1px solid var(--line); align-items: start; transition: padding-left .3s var(--ease); }
.serv:last-child { border-bottom: 1px solid var(--line); }
.serv:hover { padding-left: .6rem; }
.serv .ic { color: var(--sage-dark); margin-top: .2rem; }
.serv h3 { font-size: 1.4rem; margin-bottom: .3rem; }
.serv p { color: var(--muted); margin: 0; font-size: .96rem; }
@media (max-width: 900px) { .servicios__grid { grid-template-columns: 1fr; gap: 2rem; } .servicios__intro { position: static; } .seal { display: none; } }

/* Equipo */
.equipo { background: var(--white); border-top: 1px solid var(--line); }
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.person img { width: 100%; aspect-ratio: 4/5; object-fit: cover; margin-bottom: 1.2rem; filter: saturate(.8); transition: filter .5s; }
.person:hover img { filter: saturate(1); }
.person h3 { font-size: 1.5rem; margin-bottom: .3rem; }
.person p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 800px) { .team { grid-template-columns: 1fr; max-width: 460px; } }

/* Testimonios */
.testimonios { background: var(--charcoal); color: var(--paper); }
.testimonios__grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 4rem; align-items: center; }
.testimonios h2 { color: var(--paper); }
.testimonios .eyebrow { color: var(--oak); }
.rating { font-size: .85rem; letter-spacing: .05em; color: var(--sage-pale); }
.rating span { color: var(--oak); margin-right: .6rem; letter-spacing: .15em; }
.slider { overflow: hidden; position: relative; }
.slider__track { display: flex; transition: transform .6s var(--ease); }
.quote { flex: 0 0 100%; margin: 0; padding: 0 .5rem; }
.quote blockquote { margin: 0 0 1.5rem; font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.45; color: var(--paper); }
.quote figcaption strong { display: block; font-weight: 500; }
.quote figcaption span { font-size: .82rem; color: var(--sage-pale); opacity: .8; }
.slider__controls { display: flex; align-items: center; gap: 1.2rem; margin-top: 2rem; }
.slider__btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(250,250,247,.35); background: transparent; color: var(--paper); cursor: pointer; display: grid; place-items: center; transition: all .3s; }
.slider__btn:hover { background: var(--paper); color: var(--charcoal); }
.slider__dots { display: flex; gap: .5rem; }
.slider__dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(250,250,247,.35); cursor: pointer; padding: 0; transition: all .3s; }
.slider__dots button[aria-selected="true"] { background: var(--oak); width: 24px; border-radius: 4px; }
@media (max-width: 900px) { .testimonios__grid { grid-template-columns: 1fr; gap: 2rem; } }

/* Publicaciones */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.post img { aspect-ratio: 4/3; object-fit: cover; width: 100%; margin-bottom: 1.2rem; transition: transform .6s var(--ease); }
.post:hover img { transform: translateY(-4px); }
.post__tag { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--oak); }
.post h3 { font-size: 1.4rem; margin: .5rem 0 .5rem; }
.post p { color: var(--muted); font-size: .95rem; }
.post__link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; font-size: .9rem; border-bottom: 1px solid var(--charcoal); transition: gap .3s, color .3s; }
.post__link:hover { gap: .8rem; color: var(--oak); border-color: var(--oak); }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr; max-width: 520px; } }

/* FAQ */
.faq { background: var(--paper-2); }
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
.faq__intro { position: sticky; top: 110px; }
.faq__intro p:not(.eyebrow) { color: var(--muted); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; padding: 1.3rem 3rem 1.3rem 0; font-family: var(--serif); font-size: 1.35rem; color: var(--charcoal); position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: ""; position: absolute; right: .5rem; top: 50%; width: 12px; height: 12px; border-right: 1px solid var(--charcoal); border-bottom: 1px solid var(--charcoal); transform: translateY(-70%) rotate(45deg); transition: transform .3s; }
.faq__item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq__answer { padding: 0 0 1.5rem; color: var(--muted); max-width: 92%; }
.faq__answer p { margin: 0; }
@media (max-width: 900px) { .faq__grid { grid-template-columns: 1fr; gap: 2rem; } .faq__intro { position: static; } }

/* Contacto */
.contacto__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 5rem; align-items: start; }
.contacto__text p:not(.eyebrow) { color: var(--muted); }
.contacto__details { display: grid; gap: 1rem; margin: 2rem 0; }
.contacto__details li { display: flex; align-items: flex-start; gap: .8rem; font-size: .96rem; }
.contacto__details .ic { color: var(--sage-dark); margin-top: .25rem; }
.contacto__details a:hover { color: var(--oak); }
.map { position: relative; border: 1px solid var(--line); overflow: hidden; }
.map svg { width: 100%; height: auto; display: block; }
.map span { position: absolute; right: .8rem; bottom: .8rem; background: var(--charcoal); color: var(--paper); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; padding: .45rem .8rem; }
.form { background: var(--white); border: 1px solid var(--line); padding: 2.5rem; display: grid; gap: 1.2rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form label { display: grid; gap: .4rem; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.form input, .form select, .form textarea { font-family: var(--sans); font-size: 1rem; font-weight: 300; padding: .85rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); transition: border .3s; width: 100%; border-radius: 0; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-bottom-color: var(--charcoal); }
.form__note { font-size: .9rem; margin: 0; color: var(--sage-dark); min-height: 1.4em; font-weight: 400; }
@media (max-width: 900px) { .contacto__grid { grid-template-columns: 1fr; gap: 3rem; } }
@media (max-width: 560px) { .form { padding: 1.5rem; } .form__row { grid-template-columns: 1fr; } }

/* Footer */
.footer { background: var(--paper); color: var(--ink); padding: 0 0 2rem; font-size: .9rem; }
.footer__divider { display: block; width: 100%; height: 24px; color: var(--line); margin: 0 auto 3rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line); }
.footer__brand p { color: var(--muted); margin: 1.2rem 0; max-width: 360px; }
.footer__social { display: flex; gap: .5rem; }
.footer__social a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; transition: all .3s; }
.footer__social a:hover { background: var(--charcoal); color: var(--paper); border-color: var(--charcoal); }
.footer h3 { font-family: var(--sans); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--oak); margin-bottom: 1.1rem; }
.footer__nav li { margin-bottom: .55rem; color: var(--muted); }
.footer__nav a:hover { color: var(--charcoal); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1.5rem; font-size: .78rem; color: var(--muted); }
@media (max-width: 960px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 80; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--charcoal); color: var(--paper); box-shadow: 0 14px 30px -12px rgba(0,0,0,.4); transition: transform .3s var(--ease), background .3s; }
.wa-float .ic { width: 26px; height: 26px; stroke-width: 1.3; }
.wa-float:hover { transform: translateY(-3px); background: var(--sage-dark); }

/* Aparición */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal--delay { transition-delay: .2s; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .seal { animation: none; }
  html { scroll-behavior: auto; }
  .work img, .btn, .post img { transition: none; }
}
