:root {
  --bg: #f5efe6;
  --bg-soft: #fbf8f3;
  --sand: #dcc4a1;
  --terracotta: #b75a34;
  --terracotta-deep: #8d4023;
  --pine: #17352f;
  --pine-soft: #2e5148;
  --ink: #1f2528;
  --text: #425158;
  --line: rgba(23, 53, 47, 0.12);
  --white: #ffffff;
  --shadow: 0 18px 46px rgba(31, 37, 40, 0.08);
  --radius: 26px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(220, 196, 161, 0.38), transparent 32%),
    linear-gradient(180deg, #fcfaf6 0%, var(--bg) 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--pine);
  text-decoration: none;
}

p {
  margin: 0 0 1rem;
  line-height: 1.74;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 1rem;
  line-height: 1.08;
  color: var(--ink);
}

h1,
h2 {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
}

h2 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

h3 {
  font-size: 1.3rem;
}

ul {
  margin: 0;
  padding-left: 1.15rem;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.topbar,
.header .container,
.hero-grid,
.split,
.cards-2,
.cards-3,
.cards-4,
.service-grid,
.zones-grid,
.contact-grid,
.footer-grid,
.button-row,
.hero-actions,
.mini-list,
.topbar-actions,
.nav-links,
.stats-grid,
.cta-panel,
.highlight-grid {
  display: grid;
  gap: 22px;
}

.topbar {
  background: var(--pine);
  color: var(--white);
  font-size: 0.95rem;
}

.topbar .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
}

.topbar-actions,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.topbar a,
.footer a,
.header a {
  color: inherit;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(23, 53, 47, 0.08);
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: blur(18px);
}

.header.scrolled {
  box-shadow: 0 10px 30px rgba(31, 37, 40, 0.08);
}

.header .container {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand img {
  width: 64px;
  height: 64px;
}

.brand strong {
  display: block;
  color: var(--ink);
  font-size: 1.04rem;
}

.brand span span {
  color: #6a756f;
  font-size: 0.92rem;
}

.nav-links {
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(183, 90, 52, 0.12);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--pine);
  font-size: 1.8rem;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--terracotta);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--terracotta-deep);
}

.btn-secondary {
  background: var(--pine);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--pine-soft);
}

.btn-ghost {
  border-color: rgba(23, 53, 47, 0.18);
  color: var(--pine);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(23, 53, 47, 0.05);
}

.hero,
.page-hero {
  padding: 54px 0 24px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  align-items: center;
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 999px;
  margin-bottom: 18px;
  background: rgba(183, 90, 52, 0.12);
  color: var(--terracotta-deep);
  font-weight: 700;
}

.hero-copy p {
  font-size: 1.08rem;
  max-width: 62ch;
}

.hero-actions,
.button-row {
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  justify-content: start;
}

.mini-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.mini-list li {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 53, 47, 0.08);
  font-weight: 700;
}

.hero-frame,
.hero-panel,
.card,
.service-card,
.zone-card,
.contact-card,
.map-card,
.quote-card,
.faq-item,
.stat-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 30px;
  background:
    linear-gradient(160deg, rgba(23, 53, 47, 0.96), rgba(46, 81, 72, 0.92)),
    var(--pine);
  color: rgba(255, 255, 255, 0.92);
}

.hero-panel h2,
.hero-panel h3,
.hero-panel p,
.hero-panel li,
.hero-panel a {
  color: inherit;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(220, 196, 161, 0.14);
}

.hero-frame {
  overflow: hidden;
}

.hero-frame img {
  width: 100%;
  min-height: 520px;
  object-fit: cover;
}

.stats-grid,
.service-grid,
.zones-grid,
.cards-2,
.cards-3,
.cards-4,
.split,
.contact-grid,
.footer-grid,
.highlight-grid {
  margin-top: 28px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.card,
.service-card,
.zone-card,
.faq-item,
.contact-card {
  padding: 26px;
}

.highlight-grid {
  grid-template-columns: 1.05fr 0.95fr;
}

.split,
.contact-grid {
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: start;
}

.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-4,
.service-grid,
.zones-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card h3 a,
.zone-card h3 a {
  color: var(--ink);
}

.quote-card {
  padding: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(220, 196, 161, 0.24));
}

.section {
  padding: 80px 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(220, 196, 161, 0.16), rgba(251, 248, 243, 0));
}

.section.dark {
  background:
    linear-gradient(145deg, rgba(23, 53, 47, 0.98), rgba(14, 30, 26, 0.98)),
    var(--pine);
  color: rgba(255, 255, 255, 0.92);
}

.section.dark h2,
.section.dark h3,
.section.dark p,
.section.dark li,
.section.dark a {
  color: inherit;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: #6c756f;
  font-size: 0.95rem;
}

.breadcrumbs a {
  color: inherit;
}

.map-card iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 24px;
}

.cta-panel {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 34px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(183, 90, 52, 0.96), rgba(141, 64, 35, 0.96)),
    var(--terracotta);
  color: var(--white);
  box-shadow: 0 24px 60px rgba(141, 64, 35, 0.22);
}

.cta-panel h2,
.cta-panel p {
  color: inherit;
}

.contact-list,
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li + li,
.footer-links li + li {
  margin-top: 12px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] {
  border-color: rgba(183, 90, 52, 0.35);
}

.faq-item p {
  margin-top: 14px;
}

.footer {
  padding: 30px 0 18px;
  background: #18211f;
  color: rgba(255, 255, 255, 0.82);
}

.footer-grid {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  align-items: start;
}

.footer .brand strong,
.footer h3 {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  margin-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

strong {
  color: var(--ink);
}

@media (max-width: 1040px) {
  .hero-grid,
  .split,
  .contact-grid,
  .highlight-grid,
  .stats-grid,
  .cards-2,
  .cards-3,
  .cards-4,
  .service-grid,
  .zones-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .header .container {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-actions {
    display: none;
  }

  .nav {
    grid-column: 1 / -1;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 14px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero-actions,
  .button-row {
    grid-template-columns: 1fr;
  }

  .mini-list {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 2.6rem;
  }

  h2 {
    font-size: 2.05rem;
  }

  .topbar .container {
    grid-template-columns: 1fr;
  }

  .hero,
  .page-hero,
  .section {
    padding: 56px 0;
  }

  .brand img {
    width: 56px;
    height: 56px;
  }

  .hero-frame img {
    min-height: 420px;
  }
}


/* Corrección de contraste en tarjetas claras dentro de secciones oscuras */
.section.dark .card,
.section.dark .service-card,
.section.dark .zone-card,
.section.dark .faq-item,
.section.dark .contact-card,
.section.dark .quote-card,
.section.dark .stat-card {
  color: var(--text);
}

.section.dark .card p,
.section.dark .card li,
.section.dark .card small,
.section.dark .service-card p,
.section.dark .service-card li,
.section.dark .zone-card p,
.section.dark .zone-card li,
.section.dark .faq-item p,
.section.dark .faq-item li,
.section.dark .contact-card p,
.section.dark .contact-card li,
.section.dark .quote-card p,
.section.dark .stat-card p {
  color: var(--text);
}

.section.dark .card h2,
.section.dark .card h3,
.section.dark .card h4,
.section.dark .service-card h2,
.section.dark .service-card h3,
.section.dark .service-card h4,
.section.dark .zone-card h2,
.section.dark .zone-card h3,
.section.dark .zone-card h4,
.section.dark .faq-item h2,
.section.dark .faq-item h3,
.section.dark .faq-item h4,
.section.dark .contact-card h2,
.section.dark .contact-card h3,
.section.dark .contact-card h4,
.section.dark .quote-card h2,
.section.dark .quote-card h3,
.section.dark .quote-card h4,
.section.dark .stat-card h2,
.section.dark .stat-card h3,
.section.dark .stat-card h4,
.section.dark .card h3 a,
.section.dark .service-card h3 a,
.section.dark .zone-card h3 a {
  color: var(--ink);
}
