/* ============================================================
   Reformas Santiago — sistema de diseño
   Fuentes: Inter Tight (display) + Inter (cuerpo/UI)
   ============================================================ */

:root {
  /* Neutros — blanco real y grises, sin beige */
  --bg: #ffffff;
  --bg-subtle: #f5f5f7;
  --bg-dark: #1d1d1f;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border: #d2d2d7;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --white: #ffffff;

  /* Acento único — cobre oxidado, el hilo real con la identidad de la marca */
  --accent: #c1502e;
  --accent-hover: #a3401f;
  --accent-tint: #fbe9e1;
  --text-muted: var(--text-secondary);

  /* Tipografía */
  --font-display: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Espaciado */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-6: 56px;
  --sp-8: 96px;
  --sp-12: 140px;

  /* Radios y sombras */
  --radius: 24px;
  --radius-sm: 14px;
  --radius-pill: 980px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 24px 64px rgba(0, 0, 0, 0.14);

  --container-max: 1200px;
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Tipografía escalada ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); letter-spacing: -0.03em; line-height: 1.04; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); margin-bottom: var(--sp-3); line-height: 1.08; }
h3 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); margin-bottom: var(--sp-1); letter-spacing: -0.01em; }
p { margin-bottom: var(--sp-2); }
.lead { font-size: 1.25rem; font-weight: 400; color: var(--text-secondary); line-height: 1.5; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-3);
}
.grid { display: grid; gap: var(--sp-3); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.flex { display: flex; align-items: center; }
section { padding: var(--sp-8) 0; }
section + section { border-top: 1px solid var(--border-subtle); }
.section-alt { background: var(--bg-subtle); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

@media (max-width: 1024px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  section { padding: var(--sp-6) 0; }
}

/* ---------- Divisor fino (antes: textura de sillería) ---------- */
.ashlar-divider {
  height: 1px;
  background: var(--border-subtle);
  border: none;
}

/* ---------- Botones — píldora ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 1.03rem;
  letter-spacing: -0.01em;
  transition: transform 200ms cubic-bezier(.2,.8,.2,1), background 200ms ease, opacity 200ms ease, box-shadow 200ms ease;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-secondary { background: var(--text); color: var(--white); }
.btn-secondary:hover { background: #000; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text); }
.btn-link { color: var(--accent); font-weight: 500; }
.btn-link:hover { opacity: 0.72; }

/* ---------- Paneles / tarjetas ---------- */
.card {
  background: var(--bg-subtle);
  border: none;
  border-radius: var(--radius);
  padding: var(--sp-4);
}
.section-alt .card { background: var(--white); }
.card img { border-radius: var(--radius-sm); margin-bottom: var(--sp-2); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-tint);
  color: var(--accent-hover);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
}

/* ---------- Header — barra fina de contacto + nav flotante en píldora ---------- */
.topbar {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; padding-bottom: 6px; flex-wrap: wrap; gap: 8px; }
.topbar a { color: var(--text-secondary); }
.topbar a:hover { color: var(--accent); }
.topbar-info { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

header[role="banner"] {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  padding-bottom: 10px;
}
.nav-main {
  justify-content: space-between;
  padding: 10px 10px 10px 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  max-width: var(--container-max);
  margin: 0 auto;
}
.logo { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: var(--sp-4); }
.nav-links a { font-weight: 500; font-size: 0.92rem; color: var(--text); }
.nav-links a:hover { color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: var(--sp-2); }

/* Desplegables de Servicios / Zonas */
.has-dropdown { position: relative; }
.has-dropdown > a::after {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-right: 1.5px solid var(--text-tertiary); border-bottom: 1.5px solid var(--text-tertiary);
  transform: rotate(45deg); margin-left: 6px; margin-bottom: 2px;
}
.dropdown {
  position: absolute; top: calc(100% + 14px); left: -12px; min-width: 230px;
  background: var(--white); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 8px; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 0.88rem; font-weight: 500; color: var(--text); white-space: nowrap; }
.dropdown a:hover { background: var(--bg-subtle); color: var(--accent); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px;
  align-items: center; justify-content: center; background: var(--bg-subtle); border-radius: 50%;
}
.nav-toggle span { display: block; height: 2px; width: 16px; background: var(--text); }

@media (max-width: 640px) {
  .topbar-info span { display: none; }
}

@media (max-width: 900px) {
  .nav-main { padding: 8px 8px 8px 20px; }
  .nav-links {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    background: var(--white); flex-direction: column; gap: 0;
    border: 1px solid var(--border-subtle); border-radius: var(--radius);
    box-shadow: var(--shadow-md); overflow: hidden;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px var(--sp-3); border-top: 1px solid var(--border-subtle); width: 100%; }
  .nav-links li:first-child a { border-top: none; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-outline { display: none; }
  .nav-cta .btn { padding: 10px 18px; font-size: 0.85rem; white-space: nowrap; }
  .nav-main { gap: var(--sp-2); }

  .has-dropdown > a::after { display: none; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-radius: 0; margin: 0; padding: 0;
    background: var(--bg-subtle);
  }
  .dropdown a { padding: 12px var(--sp-3) 12px calc(var(--sp-3) + 14px); font-weight: 400; font-size: 0.9rem; border-top: 1px solid var(--border-subtle); }
}

/* ---------- Botones — micro-interacción de texto que rueda + flecha que gira ---------- */
.btn-primary, .btn-secondary {
  overflow: hidden;
  padding-top: 6px; padding-bottom: 6px; padding-right: 6px;
}
.btn-roll {
  display: flex; flex-direction: column; overflow: hidden;
  height: 20px; line-height: 20px;
}
.btn-roll span { display: block; transition: transform 500ms cubic-bezier(.25,.1,.25,1); }
.btn:hover .btn-roll span { transform: translateY(-20px); }
.btn-arrow-circle {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.9); color: var(--accent);
  font-size: 0.95rem; transition: transform 500ms cubic-bezier(.25,.1,.25,1);
}
.btn-secondary .btn-arrow-circle { color: var(--text); }
.btn:hover .btn-arrow-circle { transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .btn-roll span, .btn-arrow-circle { transition: none; }
}

/* ---------- Hero — foto real a sangre + conversión above the fold ---------- */
.hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0;
  border-top: none;
  color: var(--white);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(10, 10, 10, 0.82) 0%, rgba(10, 10, 10, 0.62) 45%, rgba(10, 10, 10, 0.4) 100%);
}
.hero-content { position: relative; z-index: 1; padding: var(--sp-8) 0; width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--sp-6); align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white); font-size: 0.82rem; font-weight: 500;
  padding: 7px 16px; border-radius: 999px; margin-bottom: var(--sp-3);
  backdrop-filter: blur(8px);
}
/* H1 pequeño (exact-match SEO), el titular grande visual es un <p> */
.hero .hero-kicker {
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  letter-spacing: 0.01em; line-height: 1.4; text-transform: none;
  color: rgba(255, 255, 255, 0.72); margin-bottom: var(--sp-1);
}
.hero-headline {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.04; font-size: clamp(2.2rem, 4.6vw, 3.75rem);
  color: var(--white); max-width: 21ch; margin-bottom: var(--sp-2);
}
.hero-headline span { color: #ff9f7a; }
.hero-services {
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72); margin: var(--sp-3) 0 var(--sp-1); font-weight: 500;
}
.hero-subtitle { font-size: 1.15rem; color: rgba(255, 255, 255, 0.86); max-width: 46ch; font-weight: 400; }
.hero-ctas { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); flex-wrap: wrap; }
.hero-ctas .btn-outline { color: var(--white); border-color: rgba(255, 255, 255, 0.4); }
.hero-ctas .btn-outline:hover { border-color: var(--white); }

/* Tarjeta de presupuesto — la conversión, al lado del copy */
.hero-form-card {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: var(--shadow-md);
}
/* Titulo de tarjeta de formulario — es chrome de UI, no jerarquia de contenido, por eso es <p> no <h*> */
.form-card-title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.1; color: var(--text); font-size: 1.3rem; margin-bottom: 6px;
}
.hero-form-card .hero-form-note { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: var(--sp-3); }
.hero-form-card .form-group { margin-bottom: var(--sp-2); }
.hero-form-card .form-check { margin: var(--sp-2) 0 var(--sp-3); }
.hero-form-card button[type="submit"] { width: 100%; justify-content: center; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
}

/* ---------- Page hero (interiores) ---------- */
.page-hero { background: var(--bg-dark); color: var(--white); padding: var(--sp-8) 0; border-top: none; }
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: rgba(255, 255, 255, 0.78); }
.breadcrumb { font-size: 0.85rem; color: var(--text-tertiary); margin-bottom: var(--sp-2); }
.breadcrumb a { color: rgba(255, 255, 255, 0.7); }
.breadcrumb a:hover { color: var(--white); }
.page-hero .btn-outline { color: var(--white); border-color: rgba(255, 255, 255, 0.3); }
.page-hero .btn-outline:hover { border-color: var(--white); }

/* ---------- Proceso ---------- */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); counter-reset: step; }
.process-step { position: relative; padding-top: var(--sp-4); }
.process-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--accent);
  display: block; margin-bottom: var(--sp-1);
}
@media (max-width: 900px) { .process-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process-steps { grid-template-columns: 1fr; } }

/* ---------- FAQ acordeón ---------- */
.accordion-item { border-bottom: 1px solid var(--border-subtle); }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: var(--sp-3) 0; text-align: left; font-weight: 500; font-size: 1.05rem;
}
.accordion-trigger .icon { transition: transform 200ms ease; flex-shrink: 0; margin-left: var(--sp-2); color: var(--text-secondary); }
.accordion-item.open .accordion-trigger .icon { transform: rotate(45deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height 250ms ease; }
.accordion-item.open .accordion-panel { max-height: 500px; }
.accordion-panel p { padding-bottom: var(--sp-3); color: var(--text-secondary); }

/* ---------- Reseñas ---------- */
.reviews-summary { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); font-size: 1.05rem; }
.rating-stars { color: var(--accent); font-size: 1.3rem; letter-spacing: 2px; }
.reviews-cta { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }

/* ---------- Formularios ---------- */
.form-group { margin-bottom: var(--sp-3); }
.form-group label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 6px; }
.form-input, .form-textarea {
  width: 100%; padding: 13px 16px; border: 1px solid transparent;
  border-radius: var(--radius-sm); background: var(--bg-subtle);
}
.form-input:focus, .form-textarea:focus, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent-tint); outline-offset: 2px; border-color: var(--accent);
}
.form-check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text-secondary); }
.form-check input { margin-top: 4px; }
.form-note { font-size: 0.85rem; color: var(--text-tertiary); margin-top: var(--sp-1); }
.form-status { display: none; padding: var(--sp-2); border-radius: var(--radius-sm); margin-top: var(--sp-2); font-weight: 500; }
.form-status.show { display: block; }
.form-status.ok { background: #e3f5e9; color: #1c7a3e; }
.form-status.error { background: var(--accent-tint); color: var(--accent-hover); }

/* ---------- Zonas / barrios chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--bg-subtle); border: none; padding: 8px 16px; border-radius: 999px; font-size: 0.9rem; color: var(--text-secondary); }
.chip-link { background: var(--bg-subtle); }
.chip-link:hover { background: var(--accent-tint); color: var(--accent-hover); }

/* ---------- Antes y después ---------- */
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-radius: var(--radius); overflow: hidden; }
.before-after figure { position: relative; margin: 0; }
.before-after figcaption {
  position: absolute; top: 12px; left: 12px; background: rgba(29, 29, 31, 0.72);
  color: var(--white); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(6px);
}
.before-after figure:last-child figcaption { background: var(--accent); }
@media (max-width: 640px) { .before-after { grid-template-columns: 1fr; } }

/* ---------- Galería de obras (masonry por columnas, fotos completas sin recortar) ---------- */
.gallery { column-count: 3; column-gap: var(--sp-2); }
.gallery figure { position: relative; margin: 0 0 var(--sp-2); border-radius: var(--radius-sm); overflow: hidden; break-inside: avoid; }
.gallery img { width: 100%; height: auto; display: block; transition: transform 600ms cubic-bezier(.2,.8,.2,1); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  color: var(--white); font-size: 0.82rem; font-weight: 500;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  opacity: 0; transition: opacity 300ms ease;
}
.gallery figure:hover figcaption { opacity: 1; }
@media (max-width: 768px) { .gallery { column-count: 2; } }
@media (max-width: 480px) { .gallery { column-count: 1; } }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }

/* ---------- Footer — claro, minimal ---------- */
footer[role="contentinfo"] { background: var(--bg-subtle); color: var(--text-secondary); padding-top: var(--sp-8); border-top: 1px solid var(--border-subtle); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: var(--sp-4); padding-bottom: var(--sp-6); }
/* Etiquetas de columna del footer — es navegacion/chrome, no jerarquia de contenido, por eso es <p> */
.footer-col-title { color: var(--text); font-family: var(--font-body); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; font-size: 0.85rem; margin-bottom: var(--sp-2); }
.footer-grid a, .footer-grid li { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 10px; display: block; }
.footer-grid a:hover { color: var(--accent); }
.footer-logo { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--text); margin-bottom: var(--sp-2); }
.footer-logo span { color: var(--accent); }
.footer-map { padding-bottom: var(--sp-4); }
.footer-map iframe { width: 100%; height: 280px; border-radius: var(--radius); border: 1px solid var(--border); display: block; }

.sub-footer {
  border-top: 1px solid var(--border-subtle); padding: var(--sp-3) 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.8rem; color: var(--text-tertiary);
}
.sub-footer a:hover { color: var(--accent); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.mt-4 { margin-top: var(--sp-4); }
.mb-0 { margin-bottom: 0; }
.max-w-prose { max-width: 68ch; }
article.post p, article.post li { color: var(--text); }
article.post h2 { margin-top: var(--sp-6); }
article.post h3 { margin-top: var(--sp-4); }
article.post table { width: 100%; border-collapse: collapse; margin: var(--sp-3) 0; }
article.post th, article.post td { border: 1px solid var(--border-subtle); padding: 10px 12px; text-align: left; font-size: 0.92rem; }
article.post th { background: var(--bg-subtle); }
