/* ========= Construcciones Alfredo e Hijos ========= */

:root {
  --bg: #F3EDE3;
  --bg-alt: #EBE2D2;
  --ink: #2E2620;
  --ink-soft: #5A4F44;
  --brown: #3B2E26;
  --terracotta: #B5502A;
  --terracotta-light: #D97A4C;
  --cream: #F4EEE4;
  --border: rgba(59,46,38,0.14);
  --shadow: 0 24px 60px rgba(46,38,32,0.16);
  --radius: 4px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; color: var(--brown); }
p { margin: 0; }
section { position: relative; }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 700;
  margin: 0 0 10px;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: #9c3f1f; }
.btn-ghost { border-color: var(--brown); color: var(--brown); background: transparent; }
.btn-ghost:hover { background: var(--brown); color: #fff; }
.btn-ghost-light { border-color: rgba(244,238,228,0.6); color: var(--cream); background: transparent; }
.btn-ghost-light:hover { background: rgba(244,238,228,0.12); }
.btn-call { border-color: var(--brown); color: var(--brown); background: transparent; padding: 10px 18px; font-size: 0.85rem; }
.btn-call:hover { background: var(--brown); color: #fff; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(243,237,227,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-icon { width: 42px; height: 42px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; color: var(--brown); text-transform: uppercase; letter-spacing: 0.03em; }
.brand-sub { font-size: 0.62rem; letter-spacing: 0.16em; color: var(--terracotta); font-weight: 700; text-transform: uppercase; }
.main-nav { display: flex; gap: 26px; }
.main-nav a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brown);
  position: relative;
  padding: 4px 2px 8px;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s ease;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 2px; right: 2px; bottom: 2px;
  height: 3px;
  border-radius: 2px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a:active {
  color: var(--terracotta);
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a:active::after {
  transform: scaleX(1);
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--brown); display: block; }

/* ===== Hero ===== */
.hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(30,22,17,0.88) 0%, rgba(30,22,17,0.42) 48%, rgba(30,22,17,0.28) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 780px; padding: 0 28px 80px; color: var(--cream); }
.hero-content .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #F5C24D;
  background: rgba(20,15,11,0.5);
  border: 1px solid rgba(245,194,77,0.45);
  padding: 8px 18px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-content .eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #F5C24D;
  flex-shrink: 0;
}
.hero-content h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.1; margin-bottom: 20px; }
.hero-text { font-size: 1.08rem; color: rgba(244,238,228,0.9); max-width: 620px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Intro strip ===== */
.intro-strip { padding: 72px 28px; background: var(--bg-alt); }
.intro-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.intro-text { font-size: 1.2rem; color: var(--ink); font-family: var(--serif); line-height: 1.55; }
.intro-stats { display: flex; flex-direction: column; gap: 22px; }
.stat { display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--terracotta); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-text { font-size: 0.98rem; color: var(--ink-soft); }
.stat-num { font-family: var(--serif); font-size: 2.1rem; font-weight: 700; color: var(--terracotta); min-width: 46px; flex-shrink: 0; }
.stat-label { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.3; }
.intro-stats .stat:not(:first-child) { display: flex; align-items: baseline; gap: 14px; }

/* ===== Section head ===== */
.section-head { max-width: 1240px; margin: 0 auto; padding: 0 28px; text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }

/* ===== Services ===== */
.services { padding: 96px 0; }
.services-grid {
  max-width: 1240px; margin: 0 auto; padding: 0 28px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.service-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 28px; transition: transform .3s ease, box-shadow .3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.service-icon { display: inline-flex; color: var(--terracotta); margin-bottom: 18px; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ===== Transform banner ===== */
.transform-banner { min-height: 68vh; display: flex; align-items: center; overflow: hidden; }
.transform-media { position: absolute; inset: 0; }
.transform-media img { width: 100%; height: 100%; object-fit: cover; }
.transform-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(30,22,17,0.92) 0%, rgba(30,22,17,0.55) 55%, rgba(30,22,17,0.25) 100%); }
.transform-content { position: relative; z-index: 2; max-width: 620px; padding: 80px 28px; color: var(--cream); }
.transform-content h2 { color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin-bottom: 18px; }
.transform-content p { color: rgba(244,238,228,0.88); font-size: 1.02rem; }

/* ===== Process ===== */
.process { padding: 96px 0; background: var(--bg-alt); }
.process-layout { max-width: 1240px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.process-steps { display: flex; flex-direction: column; gap: 30px; }
.process-step { display: flex; gap: 20px; align-items: flex-start; }
.step-num { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--terracotta); min-width: 46px; }
.process-step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.process-step p { color: var(--ink-soft); font-size: 0.95rem; }
.process-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/5; position: sticky; top: 100px; }
.process-media img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Gallery ===== */
.gallery { padding: 96px 0; }
.gallery-grid {
  max-width: 1240px; margin: 0 auto; padding: 0 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.gallery-item { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.06); }

/* ===== Coverage ===== */
.coverage { min-height: 64vh; display: flex; align-items: center; overflow: hidden; }
.coverage-media { position: absolute; inset: 0; }
.coverage-media img { width: 100%; height: 100%; object-fit: cover; }
.coverage-overlay { position: absolute; inset: 0; background: linear-gradient(280deg, rgba(30,22,17,0.92) 0%, rgba(30,22,17,0.5) 55%, rgba(30,22,17,0.22) 100%); }
.coverage-content { position: relative; z-index: 2; max-width: 560px; margin-left: auto; padding: 72px 28px; color: var(--cream); text-align: right; }
.coverage-content h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.coverage-content p { color: rgba(244,238,228,0.88); margin-bottom: 26px; }

/* ===== Contact ===== */
.contact { padding: 110px 28px; background: var(--brown); text-align: center; }
.contact-inner { max-width: 620px; margin: 0 auto; }
.contact .eyebrow { color: var(--terracotta-light); }
.contact h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.contact-text { color: rgba(244,238,228,0.85); margin-bottom: 34px; font-size: 1.05rem; }
.contact-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.social-icons { display: flex; gap: 14px; justify-content: center; margin-top: 28px; }
.social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%; color: #fff;
  transition: transform .25s ease, box-shadow .25s ease, filter .2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.social-icon:hover, .social-icon:focus-visible { transform: translateY(-3px); filter: brightness(1.08); }
.social-whatsapp { background: #25D366; }
.social-facebook { background: #1877F2; }

/* ===== Footer ===== */
.site-footer { background: #241C16; color: rgba(244,238,228,0.75); padding: 64px 28px 0; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(244,238,228,0.12); }
.footer-logo { width: 220px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.92rem; color: rgba(244,238,228,0.6); max-width: 300px; }
.footer-col h4 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta-light); margin-bottom: 16px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col span { font-size: 0.92rem; color: rgba(244,238,228,0.72); }
.footer-col a:hover { color: var(--terracotta-light); }
.footer-bottom { max-width: 1240px; margin: 0 auto; padding: 22px 0; font-size: 0.8rem; color: rgba(244,238,228,0.45); text-align: center; }

/* ===== Lightbox ===== */
.lightbox { position: fixed; inset: 0; background: rgba(20,15,11,0.95); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 40px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 4px; }
.lightbox-close { position: absolute; top: 24px; right: 32px; background: none; border: none; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .intro-inner { grid-template-columns: 1fr; gap: 36px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-layout { grid-template-columns: 1fr; }
  .process-media { position: static; aspect-ratio: 16/9; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .coverage-content { margin-left: 0; text-align: left; }
}

@media (max-width: 640px) {
  .header-inner { padding: 12px 18px; }
  .btn-call span, .btn-call { font-size: 0.8rem; padding: 9px 14px; }
  .hero-content { padding: 0 20px 56px; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .intro-strip, .services, .process, .gallery { padding: 64px 0; }
  .services-grid { grid-template-columns: 1fr; padding: 0 20px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); padding: 0 20px; }
  .transform-content, .coverage-content { padding: 56px 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .contact-actions .btn { width: 100%; justify-content: center; }
  .intro-inner, .section-head { padding-left: 20px; padding-right: 20px; }
}
