:root {
  --bg: #f3efe8;
  --surface: #fffdf8;
  --surface-2: #f8f2e7;
  --text: #1f2a30;
  --muted: #4b5d66;
  --primary: #0f4c5c;
  --primary-strong: #0a3945;
  --accent: #d9a441;
  --border: #d5cab8;
  --shadow: 0 14px 40px rgba(15, 76, 92, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(15, 76, 92, 0.1), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(217, 164, 65, 0.1), transparent 35%),
    var(--bg);
  line-height: 1.5;
}

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

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
  background: rgba(255, 253, 248, 0.88);
  border-bottom: 1px solid rgba(213, 202, 184, 0.55);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(15, 76, 92, 0.2);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.site-nav a:hover {
  color: var(--primary);
  background: rgba(15, 76, 92, 0.08);
}

.site-nav a.btn {
  color: #fcfaf6;
  padding: 0.56rem 0.95rem;
}

.site-nav a.btn:hover {
  color: #fcfaf6;
  background: var(--primary-strong);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
}

.hero {
  position: relative;
  min-height: min(82vh, 820px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(10, 57, 69, 0.78), rgba(10, 57, 69, 0.45)),
    image-set(
      url("../contenido/hero-640.webp") 1x,
      url("../contenido/hero-1280.webp") 2x
    ) center/cover no-repeat;
  transform: scale(1.03);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #f7f4ef;
  max-width: 760px;
  padding: 3rem 0;
}

.eyebrow {
  margin: 0 0 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: "Literata", serif;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4.1vw, 3.45rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
}

.lead {
  margin-top: 1rem;
  color: #f0ebe2;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
}

.hero-actions,
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.78rem 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  color: #fcfaf6;
  background: var(--primary);
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--primary-strong);
}

.btn-ghost {
  border-color: rgba(248, 242, 231, 0.85);
  background: transparent;
  border-width: 2px;
}

.btn-ghost:hover {
  background: rgba(248, 242, 231, 0.1);
  border-color: rgba(248, 242, 231, 1);
}

.btn-small {
  padding: 0.56rem 0.95rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.hero-meta {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  font-size: 0.93rem;
}

.section {
  padding: clamp(3.5rem, 6vw, 5.6rem) 0;
}

.highlight {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(248, 242, 231, 0.85));
}

.section-head {
  max-width: 800px;
  margin-bottom: 1.4rem;
}

.section-head p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

.card,
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.card p,
.service-card p {
  color: var(--muted);
}

.card ul {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--text);
}

.banner-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.2rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.banner-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.banner-wrap picture {
  display: block;
  width: 100%;
}

.service-card a,
.service-card span {
  display: inline-flex;
  margin-top: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.mosaic {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 0.8rem;
}

.mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(213, 202, 184, 0.8);
}

.mosaic img:first-child {
  grid-row: span 2;
}

.site-footer {
  padding: 2.4rem 0 3.4rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-grid p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.footer-actions .btn-ghost {
  color: var(--primary);
  border-color: var(--primary);
}

.footer-actions .btn-ghost:hover {
  background: rgba(15, 76, 92, 0.08);
  color: var(--primary-strong);
  border-color: var(--primary-strong);
}

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

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 761px) {
  .hero-bg {
    background-position: center, center 20%;
  }
}

@media (min-width: 981px) {
  .banner-wrap img {
    aspect-ratio: 1 / 1;
    height: auto;
  }
}

@media (max-width: 980px) {

  .cards-3,
  .cards-2,
  .banner-wrap,
  .mosaic {
    grid-template-columns: 1fr;
  }

  .mosaic {
    grid-template-rows: repeat(4, 220px);
  }

  .mosaic img:first-child {
    grid-row: auto;
  }
}

/* PWA Installation & Notifications */
#install-button {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: #fcfaf6;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 76, 92, 0.2);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-family: "Sora", sans-serif;
}

#install-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(15, 76, 92, 0.3);
}

#update-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primary);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 76, 92, 0.3);
  z-index: 10000;
  max-width: 300px;
  font-family: "Sora", sans-serif;
}

#update-notification p {
  margin: 0 0 12px 0;
  font-weight: 600;
}

#update-notification button {
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-family: "Sora", sans-serif;
}

#update-notification #update-btn {
  background: white;
  color: var(--primary);
  margin-right: 8px;
}

#update-notification #dismiss-btn {
  background: transparent;
  color: white;
  border: 1px solid white;
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

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

  .site-nav a {
    padding: 0.5rem 0;
  }

  .hero {
    min-height: 78vh;
  }
}
