:root {
  --ink: #292c2a;
  --text: #555b57;
  --muted: #777d79;
  --green: #26312e;
  --green-2: #33413d;
  --sand: #b9a087;
  --sand-dark: #92785f;
  --paper: #f5f2ed;
  --white: #fff;
  --line: #ded8cf;
  --shadow: 0 22px 65px rgba(29, 35, 32, .12);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { display: block; width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.section { padding: 94px 0; }
.section-soft { background: var(--paper); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 999; padding: 10px 14px; background: #fff; color: #111; }
.skip-link:focus { top: 16px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--sand-dark);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.eyebrow.light { color: #e3d3c3; }
h1, h2, h3 { margin-top: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h2 { margin-bottom: 20px; font-size: clamp(2.25rem, 4.2vw, 3.85rem); line-height: 1.08; letter-spacing: -.03em; }
h3 { line-height: 1.18; }
p { margin-top: 0; }
.lead { color: #4f5652; font-size: 1.08rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(222,216,207,.85);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand img { width: 115px; height: 66px; object-fit: contain; }
.brand span { padding-left: 14px; border-left: 1px solid var(--line); color: #6a625b; font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { position: relative; color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 700; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; background: var(--sand); transition: right .2s ease; }
.main-nav a:hover::after, .main-nav a:focus-visible::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--ink); transition: .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid var(--sand);
  border-radius: 999px;
  background: var(--sand);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); background: var(--sand-dark); border-color: var(--sand-dark); }
.button-small { min-height: 44px; padding-inline: 19px; font-size: .88rem; }
.button-ghost { border-color: rgba(255,255,255,.62); background: transparent; color: #fff; }
.button-ghost:hover { background: #fff; border-color: #fff; color: var(--ink); }

.hero {
  position: relative;
  min-height: 700px;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  background: var(--green) url("assets/images/hero.jpg") center 54% / cover no-repeat;
  color: #fff;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(17,24,21,.88) 0%, rgba(17,24,21,.62) 50%, rgba(17,24,21,.18) 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; z-index: -1; height: 180px; background: linear-gradient(transparent, rgba(13,19,17,.50)); }
.hero-inner { padding: 110px 0 135px; }
.hero-copy { max-width: 730px; }
.hero h1 { max-width: 760px; margin-bottom: 25px; color: #fff; font-size: clamp(3.2rem, 6.1vw, 5.1rem); line-height: .98; letter-spacing: -.045em; }
.hero-text { max-width: 640px; margin-bottom: 0; color: rgba(255,255,255,.86); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.hero-meta { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; justify-content: flex-end; gap: 28px; color: rgba(255,255,255,.82); font-size: .88rem; }
.hero-meta a { color: #fff; text-decoration: none; }

.split-grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: 76px; align-items: center; }
.image-card { position: relative; }
.image-card::before { content: ""; position: absolute; left: -18px; bottom: -18px; width: 55%; height: 55%; border: 1px solid var(--sand); border-radius: var(--radius); }
.image-card img { position: relative; aspect-ratio: 4 / 4.25; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.content-block { max-width: 650px; }
.content-block > p:not(.eyebrow) { color: var(--text); }
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 34px; border: 1px solid var(--line); }
.feature-list div { min-height: 120px; padding: 22px 18px; border-right: 1px solid var(--line); }
.feature-list div:last-child { border-right: 0; }
.feature-list strong { display: block; margin-bottom: 9px; color: var(--sand-dark); font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.feature-list span { color: var(--ink); font-size: .88rem; font-weight: 700; line-height: 1.35; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 60px; margin-bottom: 44px; }
.section-heading > div { max-width: 730px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading .lead { max-width: 440px; margin-bottom: 4px; }
.section-heading.compact { margin-bottom: 36px; }
.image-note { flex: 0 0 auto; margin-bottom: 6px; color: var(--muted); font-size: .82rem; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service-card { min-height: 300px; padding: 30px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.55); transition: background .2s, transform .2s; }
.service-card:hover { z-index: 1; background: #fff; transform: translateY(-4px); box-shadow: 0 18px 45px rgba(38,49,46,.08); }
.service-card > span { color: var(--sand-dark); font-size: .78rem; font-weight: 900; letter-spacing: .14em; }
.service-card h3 { margin: 47px 0 13px; font-size: 1.52rem; }
.service-card p { margin-bottom: 0; color: var(--muted); font-size: .95rem; }

.process-section { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 650px; background: var(--green); color: #fff; }
.process-image { min-height: 570px; background: url("assets/images/rehabilitacion.jpg") center / cover no-repeat; }
.process-content { display: flex; flex-direction: column; justify-content: center; padding: 78px clamp(40px, 7vw, 105px); }
.process-content h2 { max-width: 650px; color: #fff; }
.process-content > p:not(.eyebrow) { max-width: 610px; color: rgba(255,255,255,.72); font-size: 1.04rem; }
.process-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 34px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.15); border-left: 1px solid rgba(255,255,255,.15); counter-reset: step; }
.process-list li { min-height: 130px; padding: 22px; border-right: 1px solid rgba(255,255,255,.15); border-bottom: 1px solid rgba(255,255,255,.15); }
.process-list strong { display: block; margin-bottom: 8px; color: #fff; font-family: Georgia, serif; font-size: 1.15rem; font-weight: 500; }
.process-list span { color: rgba(255,255,255,.66); font-size: .9rem; }

.projects { background: #fff; }
.project-grid { display: grid; grid-template-columns: 1.2fr .8fr; grid-template-rows: repeat(2, 275px); gap: 18px; }
.project { position: relative; overflow: hidden; border-radius: var(--radius); background: #ddd; }
.project-large { grid-row: 1 / 3; }
.project img { height: 100%; object-fit: cover; transition: transform .55s ease; }
.project:hover img { transform: scale(1.035); }
.project::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.68)); }
.project > div { position: absolute; left: 26px; right: 26px; bottom: 24px; z-index: 2; color: #fff; }
.project span { font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.project h3 { margin: 6px 0 0; color: #fff; font-size: 1.65rem; }

.contact-section { background: var(--green); color: #fff; }
.contact-grid { display: grid; grid-template-columns: .86fr 1.14fr; gap: 70px; align-items: start; }
.contact-copy { padding-top: 18px; }
.contact-copy h2 { color: #fff; }
.contact-copy > p:not(.eyebrow) { max-width: 550px; color: rgba(255,255,255,.74); }
.contact-copy strong { color: #fff; }
.contact-details { display: grid; gap: 18px; margin-top: 34px; }
.contact-details div { display: grid; gap: 4px; }
.contact-details small { color: #cdb9a5; font-size: .71rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.contact-details a, .contact-details span { color: #fff; text-decoration: none; font-size: 1.08rem; font-weight: 700; }
.form-card { padding: 34px; border-radius: var(--radius); background: #fff; color: var(--text); box-shadow: 0 25px 70px rgba(0,0,0,.20); }
.form-row { display: grid; gap: 18px; }
.form-row.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; color: var(--ink); font-size: .88rem; font-weight: 750; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid #d7d2ca;
  border-radius: 11px;
  background: #fbfaf8;
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input, .field select { min-height: 49px; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sand-dark); background: #fff; box-shadow: 0 0 0 3px rgba(185,160,135,.18); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.consent { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; color: #565d59; font-size: .84rem; cursor: pointer; }
.consent input { width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--sand-dark); }
.privacy-note { margin: 13px 0 22px; color: #777d79; font-size: .75rem; line-height: 1.5; }
.submit-button { min-width: 180px; }
.submit-button[disabled] { opacity: .65; cursor: wait; transform: none; }
.form-status { min-height: 24px; margin-top: 14px; font-size: .9rem; font-weight: 700; }
.form-status.success { color: #287348; }
.form-status.error { color: #b33a3a; }

.site-footer { padding: 29px 0; background: #1c2522; color: rgba(255,255,255,.68); font-size: .82rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

@media (max-width: 1020px) {
  .brand span { display: none; }
  .main-nav { gap: 22px; }
  .split-grid, .contact-grid { grid-template-columns: 1fr; }
  .split-grid { gap: 55px; }
  .image-card { max-width: 670px; }
  .content-block { max-width: 800px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .process-section { grid-template-columns: 1fr; }
  .process-image { min-height: 480px; }
  .contact-copy { max-width: 750px; }
}

@media (max-width: 800px) {
  html { scroll-padding-top: 74px; }
  .header-inner { min-height: 74px; }
  .brand img { width: 96px; height: 57px; }
  .header-actions .button { display: none; }
  .menu-toggle { display: block; }
  .main-nav { position: fixed; top: 74px; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 18px 20px 26px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.10); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 4px; }
  .main-nav a::after { display: none; }
  .hero { min-height: 650px; }
  .hero-inner { padding: 95px 0 120px; }
  .hero h1 { font-size: clamp(2.9rem, 11vw, 4.5rem); }
  .hero-meta { justify-content: flex-start; }
  .section { padding: 76px 0; }
  .section-heading { align-items: start; flex-direction: column; gap: 18px; }
  .section-heading .lead { max-width: 700px; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-list div { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-list div:last-child { border-bottom: 0; }
  .project-grid { grid-template-columns: 1fr; grid-template-rows: 460px 350px 350px; }
  .project-large { grid-row: auto; }
}

@media (max-width: 600px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .hero { min-height: 620px; background-position: 58% center; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 3.8rem); letter-spacing: -.04em; }
  .hero-text { font-size: 1rem; }
  .hero-meta { bottom: 22px; gap: 14px; justify-content: space-between; font-size: .78rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  h2 { font-size: 2.4rem; }
  .split-grid { gap: 42px; }
  .image-card::before { left: -10px; bottom: -10px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: auto; }
  .service-card h3 { margin-top: 30px; }
  .process-image { min-height: 390px; }
  .process-content { padding: 64px 24px; }
  .process-list { grid-template-columns: 1fr; }
  .project-grid { grid-template-rows: 390px 320px 320px; }
  .project h3 { font-size: 1.4rem; }
  .form-card { padding: 25px 20px; }
  .form-row.two-cols { grid-template-columns: 1fr; gap: 0; }
  .submit-button { width: 100%; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
