:root {
  --forest: #1f3a2b;
  --forest-deep: #15291e;
  --moss: #3f6b4a;
  --leaf: #6f8f5e;
  --sage: #d6dcc6;
  --cream: #f6f3ea;
  --paper: #fffdf8;
  --ink: #18201b;
  --muted: #56625a;
  --line: #e1ddcf;
  --radius: 14px;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  padding-bottom: 76px; /* hueco para la barra fija de contacto en móvil */
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); color: var(--forest); }
h3 { font-size: 1.2rem; color: var(--forest); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.eyebrow {
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--moss); font-weight: 600; margin-bottom: .75rem;
}
.lead { font-size: 1.125rem; color: var(--muted); max-width: 46ch; }

/* Cabecera y wordmark */
.header {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  padding: 18px 0;
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark {
  font-family: var(--serif); color: var(--cream); text-decoration: none;
  line-height: 1.05; display: inline-flex; flex-direction: column;
}
.wordmark strong { font-size: 1.5rem; letter-spacing: .01em; }
.wordmark span { font-family: var(--sans); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.header .header-call { display: none; }

/* Hero */
.hero {
  position: relative; color: var(--cream);
  background-color: var(--forest);
  background-image:
    linear-gradient(180deg, rgba(21,41,30,.55) 0%, rgba(21,41,30,.85) 100%),
    var(--hero-img, radial-gradient(120% 80% at 80% 0%, #2f5a3e 0%, var(--forest) 60%));
  background-size: cover; background-position: center;
  padding: 132px 0 72px;
}
.hero h1 { font-size: clamp(2.1rem, 8vw, 3.75rem); max-width: 16ch; margin-bottom: .4em; }
.hero p { font-size: 1.125rem; max-width: 40ch; color: #e6e9dd; }
.hero .eyebrow { color: var(--sage); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--cream); color: var(--forest); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border-color: rgba(246,243,234,.6); color: var(--cream); }
.btn-ghost:hover { background: rgba(246,243,234,.1); }
.btn-solid { background: var(--forest); color: var(--cream); }
.btn-solid:hover { background: var(--moss); }
.btn-outline { border-color: var(--forest); color: var(--forest); }
.btn-outline:hover { background: var(--sage); }

/* Servicios */
.services-grid { display: grid; gap: 16px; margin-top: 32px; }
.service {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column;
}
.service-media {
  aspect-ratio: 4 / 3; border-radius: 10px; margin: -8px -8px 18px;
  background: var(--sage) center / cover no-repeat;
}
.service-media:empty { display: none; }
.service p { color: var(--muted); margin: 0; }
@media (min-width: 640px) { .service:last-child { grid-column: 1 / -1; } }

/* Por qué nosotros */
.why { background: var(--forest); color: var(--cream); }
.why h2, .why h3 { color: var(--cream); }
.why .eyebrow { color: var(--sage); }
.why-grid { display: grid; gap: 28px; margin-top: 32px; }
.why-item { border-top: 1px solid rgba(214,220,198,.35); padding-top: 20px; }
.why-item p { color: #d3d9c9; margin: 0; }
.why-num { font-family: var(--serif); font-size: 1rem; color: var(--sage); display: block; margin-bottom: 6px; }

/* Contacto */
.contact-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; margin-top: 28px;
}
.contact-actions { display: grid; gap: 12px; margin-top: 8px; }
.contact-actions .btn { width: 100%; }
.contact-line { color: var(--muted); font-size: .95rem; margin-top: 20px; }
.contact-line a { color: var(--forest); font-weight: 600; word-break: break-word; }

/* Pie */
.footer { padding: 32px 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }

/* Barra fija de contacto (solo móvil) */
.mobile-bar {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,253,248,.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.mobile-bar .btn { min-height: 48px; padding: 0 12px; }

:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-actions { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }
  .section { padding: 96px 0; }
  .header .header-call { display: inline-flex; min-height: 44px; }
  .hero { padding: 180px 0 120px; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .contact-card { padding: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Foto del hero: el escalador está a la izquierda de la imagen */
.hero { background-position: center, 12% center; }

/* Trabajos */
.works { padding-top: 0; }
.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.works-grid img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--sage); }

/* Pie */
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--forest); }

/* Páginas legales */
.header-static { position: static; background: var(--forest); }
.legal { padding: 48px 0 64px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); color: var(--forest); }
.legal h2 { font-size: 1.25rem; margin-top: 2em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .35em; }
.legal .updated { color: var(--muted); margin-top: 2.5em; font-size: .95rem; }
.legal-back { display: inline-block; margin-bottom: 24px; color: var(--moss); font-weight: 600; }
.legal-page { padding-bottom: 0; }

@media (min-width: 960px) {
  .works-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
