:root {
  --bg: #efefef;
  --bg-deep: #04607b;
  --surface: rgba(239, 239, 239, 0.82);
  --surface-strong: #efefef;
  --surface-dark: rgba(4, 96, 123, 0.88);
  --text: #043c4f;
  --muted: #4f6971;
  --forest: #043c4f;
  --forest-deep: #043c4f;
  --sage: #678893;
  --clay: #678893;
  --blush: #F7B4A2;
  --sand: #efefef;
  --line: rgba(4, 60, 79, 0.12);
  --shadow: 0 28px 70px rgba(4, 60, 79, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: min(1180px, calc(100vw - 3rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(239, 239, 239, 0.9), rgba(239, 239, 239, 0.95)),
    url("https://safebuildcorp.com.mx/wp-content/uploads/2024/11/Fondo2.webp") center top / cover no-repeat fixed;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: clip;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(28px);
}

.page-shell::before {
  top: -14rem;
  right: -10rem;
  background: rgba(103, 136, 147, 0.18);
}

.page-shell::after {
  bottom: 6rem;
  left: -12rem;
  background: rgba(81, 40, 125, 0.12);
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: var(--container);
  padding: 0.95rem 1.2rem 0.95rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(4, 60, 79, 0.1);
  background: rgba(239, 239, 239, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(4, 60, 79, 0.12);
  z-index: 20;
}

.brand img {
  width: auto;
  height: 3rem;
  max-width: min(12rem, 32vw);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  color: var(--text);
  font-size: 0.92rem;
}

.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: rgba(4, 96, 123, 0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 1.4rem;
  height: 2px;
  margin: 0.28rem auto;
  background: currentColor;
  transition: transform 220ms ease, opacity 220ms ease;
}

.button,
.button-ghost,
.button-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.3rem;
  padding: 0 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease, color 220ms ease;
}

.button {
  color: #efefef;
  background: linear-gradient(135deg, #678893 0%, #4f6d77 100%);
  box-shadow: 0 16px 40px rgba(103, 136, 147, 0.28);
}

.button-ghost,
.button-small {
  color: var(--text);
  border-color: rgba(4, 60, 79, 0.18);
  background: rgba(239, 239, 239, 0.9);
}

.button-small {
  min-height: 2.7rem;
  padding: 0 1.05rem;
}

.wa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.wa-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.button:hover,
.button:focus-visible,
.button-ghost:hover,
.button-ghost:focus-visible,
.button-small:hover,
.button-small:focus-visible,
.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-2px);
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: 8rem 0 3rem;
  display: grid;
  align-items: end;
}

.hero-backdrop,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-backdrop {
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 900ms ease, transform 7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(4, 60, 79, 0.12) 0%, rgba(4, 96, 123, 0.62) 58%, rgba(4, 60, 79, 0.88) 100%),
    linear-gradient(100deg, rgba(4, 96, 123, 0.3) 0%, rgba(81, 40, 125, 0.18) 100%);
}

.hero-bloom {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
  border: 1px solid rgba(239, 239, 239, 0.2);
}

.hero-bloom-a {
  width: 16rem;
  height: 16rem;
  right: 12%;
  top: 18%;
}

.hero-bloom-b {
  width: 28rem;
  height: 28rem;
  right: -4rem;
  top: 10%;
}

.hero-content,
.hero-card {
  position: relative;
  z-index: 2;
}

.hero-content {
  width: var(--container);
  margin: 0 auto;
  padding-bottom: 9rem;
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blush);
}

.hero h1,
.section h2,
.section h3,
.faq-item summary {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 1.02;
}

.hero h1 {
  max-width: 48rem;
  font-size: clamp(3rem, 5.4vw, 5.2rem);
  color: #efefef;
  text-wrap: balance;
}

.hero-copy {
  max-width: 42rem;
  margin: 1.45rem 0 0;
  font-size: 1.05rem;
  line-height: 1.9;
  color: rgba(239, 239, 239, 0.9);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-card {
  width: min(100% - 3rem, 72rem);
  margin: -4.5rem auto 0;
  padding: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border: 1px solid rgba(4, 60, 79, 0.08);
  border-radius: var(--radius-xl);
  background: rgba(239, 239, 239, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-card > div,
.card,
.amenity-card,
.infra-card,
.financing-card,
.faq-item,
.cta-card {
  border-radius: var(--radius-lg);
}

.hero-card > div {
  padding: 1rem 1.15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 239, 239, 0.96));
}

.hero-card span {
  display: block;
  margin-bottom: 0.4rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--forest);
}

.hero-card p,
.intro-copy p,
.copy-panel p,
.location-copy p,
.amenity-card p,
.infra-card p,
.financing-copy p,
.faq-item p,
.cta-copy p,
.footer-shell p {
  margin: 0;
  line-height: 1.8;
  color: var(--muted);
}

.intro-copy,
.copy-panel,
.location-copy,
.financing-copy,
.cta-copy {
  display: grid;
}

.section {
  padding: 7rem 0;
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.section-heading.centered {
  max-width: 50rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section h2 {
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  color: var(--forest-deep);
  text-wrap: balance;
  margin-bottom: 0.35rem;
}

.card {
  padding: 2rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(239, 239, 239, 0.9), rgba(239, 239, 239, 0.9)),
    url("https://safebuildcorp.com.mx/wp-content/uploads/2024/11/Fondo1.webp") center / cover no-repeat;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.handwritten {
  font-family: "Caveat", cursive;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--blush);
  white-space: nowrap;
}

.intro-grid,
.location-grid,
.financing-grid {
  display: grid;
  gap: 1.6rem;
}

.intro-grid {
  grid-template-columns: 1.2fr 1.05fr 0.75fr;
  align-items: start;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.pill-list span,
.location-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: rgba(103, 136, 147, 0.12);
  color: var(--forest);
  font-size: 0.92rem;
  font-weight: 600;
}

.seal-mark {
  width: 6rem;
  margin-bottom: 1rem;
  opacity: 0.95;
}

.split-section {
  width: min(100% - 3rem, 72rem);
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(rgba(239, 239, 239, 0.9), rgba(239, 239, 239, 0.9)),
    url("https://safebuildcorp.com.mx/wp-content/uploads/2024/11/Fondo1.webp") center / cover no-repeat;
  border: 1px solid rgba(4, 60, 79, 0.08);
  box-shadow: var(--shadow);
}

.media-panel img,
.location-visual img {
  width: 100%;
  height: 100%;
  min-height: 30rem;
  object-fit: cover;
}

.copy-panel {
  padding: 3rem;
  align-content: center;
  gap: 1.35rem;
}

.masterplan-actions {
  margin-top: 0.9rem;
}

.feature-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
  color: var(--muted);
}

.location-copy,
.financing-copy,
.cta-copy,
.intro-copy {
  gap: 1rem;
}

.location-grid {
  grid-template-columns: 1fr;
}

.financing-grid {
  grid-template-columns: 1fr 0.95fr;
  align-items: center;
}

.location-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.location-map-card {
  overflow: hidden;
  margin-top: 2rem;
  padding: 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(4, 60, 79, 0.08);
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    url("https://safebuildcorp.com.mx/wp-content/uploads/2024/11/Fondo1.webp") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.location-map-card img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-xl) - 10px);
}

.amenities-grid,
.infrastructure-grid {
  display: grid;
  gap: 1.2rem;
}

.amenities-grid {
  grid-template-columns: repeat(5, 1fr);
}

.amenity-card {
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
    url("https://safebuildcorp.com.mx/wp-content/uploads/2024/11/Fondo1.webp") center / cover no-repeat;
  border: 1px solid rgba(4, 60, 79, 0.1);
  box-shadow: var(--shadow);
}

.amenity-card img {
  width: 100%;
  aspect-ratio: 1.05;
  object-fit: cover;
}

.amenity-card div {
  padding: 1.1rem;
}

.amenity-card h3,
.infra-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.55rem;
  color: var(--forest-deep);
}

.gallery-carousel {
  --carousel-gap: 1.2rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gallery-viewport {
  flex: 1;
  overflow-x: auto;
  padding: 0.35rem 0.1rem 1rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.gallery-viewport::-webkit-scrollbar {
  display: none;
}

.gallery-track {
  display: flex;
  gap: var(--carousel-gap);
}

.gallery-item {
  flex: 0 0 calc((100% - (var(--carousel-gap) * 2)) / 3);
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: transparent;
  cursor: pointer;
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1.08;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border: 1px solid rgba(4, 60, 79, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--forest-deep);
  box-shadow: 0 12px 26px rgba(4, 60, 79, 0.12);
  cursor: pointer;
  transition: transform 220ms ease, background-color 220ms ease, opacity 220ms ease;
}

.gallery-nav span {
  font-size: 2rem;
  line-height: 1;
}

.gallery-nav:hover,
.gallery-nav:focus-visible {
  transform: translateY(-2px);
  background: #ffffff;
}

.gallery-nav.is-disabled {
  opacity: 0.45;
  cursor: default;
}

.infrastructure-shell {
  position: relative;
  padding: 3rem;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(rgba(4, 96, 123, 0.94), rgba(4, 96, 123, 0.94)),
    url("https://safebuildcorp.com.mx/wp-content/uploads/2024/11/Fondo1.webp") center / cover no-repeat;
  color: #efefef;
  box-shadow: 0 30px 80px rgba(4, 60, 79, 0.24);
}

.infrastructure-shell .eyebrow,
.infrastructure-shell h2,
.infrastructure-shell .infra-card p,
.infrastructure-shell .infra-card h3,
.infrastructure-shell .infra-card span {
  color: inherit;
}

.infrastructure-shell h2 {
  color: #efefef;
}

.section-seal {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 6rem;
  opacity: 0.2;
  filter: brightness(0) invert(1);
}

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

.infra-card {
  min-height: 100%;
  padding: 1.35rem;
  border: 1px solid rgba(239, 239, 239, 0.18);
  background: rgba(239, 239, 239, 0.08);
}

.infra-card span {
  display: inline-flex;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  opacity: 0.72;
}

.financing-card {
  padding: 2rem;
  display: grid;
  gap: 1rem;
  border: 1px solid rgba(4, 60, 79, 0.1);
  background:
    linear-gradient(rgba(239, 239, 239, 0.95), rgba(239, 239, 239, 0.95)),
    url("https://safebuildcorp.com.mx/wp-content/uploads/2024/11/Fondo2.webp") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.financing-card div {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.financing-card small {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--blush);
  font-weight: 600;
}

.financing-card strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  color: var(--forest-deep);
}

.financing-card p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(4, 60, 79, 0.12);
  background:
    linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
    url("https://safebuildcorp.com.mx/wp-content/uploads/2024/11/Fondo1.webp") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-size: 1.5rem;
  color: var(--forest-deep);
}

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

.faq-item p {
  margin-top: 1rem;
}

.cta-card {
  width: min(100% - 3rem, 72rem);
  margin: 0 auto;
  padding: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  border: 1px solid rgba(4, 60, 79, 0.1);
  background:
    linear-gradient(rgba(239, 239, 239, 0.94), rgba(239, 239, 239, 0.94)),
    url("https://safebuildcorp.com.mx/wp-content/uploads/2024/11/Fondo1.webp") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.cta-copy {
  max-width: 46rem;
}

.cta-copy h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.site-footer {
  padding: 0 0 3rem;
}

.footer-shell {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(4, 60, 79, 0.12);
}

.footer-logo {
  width: 11rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
  text-align: right;
  color: var(--forest);
  font-weight: 600;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(4, 60, 79, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  z-index: 40;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox figure {
  margin: 0;
  width: min(70rem, 100%);
}

.lightbox-panel {
  width: min(78rem, 100%);
  height: min(86vh, 56rem);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.masterplan-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.lightbox img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.lightbox figcaption {
  margin-top: 0.9rem;
  text-align: center;
  color: #efefef;
}

.lightbox-close {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@media (max-width: 1100px) {
  .intro-grid,
  .amenities-grid,
  .infrastructure-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .location-grid,
  .financing-grid,
  .split-section {
    grid-template-columns: 1fr;
  }

  .gallery-carousel {
    gap: 0.75rem;
  }
}

@media (max-width: 860px) {
  .site-header {
    padding-right: 0.85rem;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.8rem);
    left: 0;
    right: 0;
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
    border-radius: 1.5rem;
    background: rgba(239, 239, 239, 0.97);
    border: 1px solid rgba(4, 60, 79, 0.1);
    box-shadow: 0 18px 46px rgba(4, 60, 79, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 220ms ease, transform 220ms ease;
  }

  .site-header.is-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-header.is-open .nav-toggle span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .site-header.is-open .nav-toggle span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero-card,
  .intro-grid,
  .amenities-grid,
  .infrastructure-grid,
  .gallery-grid,
  .footer-shell,
  .cta-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-card {
    width: min(100% - 2rem, 40rem);
  }

  .copy-panel,
  .infrastructure-shell,
  .cta-card {
    padding: 2rem;
  }

  .section-seal {
    top: 1.4rem;
    right: 1.4rem;
    width: 4.8rem;
  }

  .footer-links {
    text-align: left;
  }
}

@media (max-width: 640px) {
  :root {
    --container: min(calc(100vw - 30px), 100%);
  }

  .site-header {
    top: 0.7rem;
  }

  .hero {
    padding-top: 7rem;
  }

  .hero-content {
    padding-bottom: 7rem;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 12vw, 3.8rem);
  }

  .hero-actions,
  .location-tags {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .button-ghost {
    width: 100%;
  }

  .section {
    padding: 5.25rem 0;
  }

  .location-section {
    padding-bottom: 1.2rem;
  }

  .amenities-section {
    padding-top: 1.2rem;
  }

  .location-map-card {
    margin-top: 1.2rem;
    margin-bottom: 0;
  }

  .amenities-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .amenities-section .section-heading {
    margin-bottom: 1.2rem;
  }

  .copy-panel,
  .card,
  .financing-card,
  .infrastructure-shell,
  .cta-card {
    padding: 1.4rem;
  }

  .cta-copy h2 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }

  .gallery-item {
    flex-basis: calc(100% - 4.5rem);
  }

  .lightbox {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .gallery-carousel {
    gap: 0.4rem;
  }

  .gallery-viewport {
    padding-bottom: 0.75rem;
  }

  .gallery-item {
    flex-basis: calc(100% - 3.4rem);
    aspect-ratio: 0.92 / 1;
  }

  .gallery-nav {
    width: 2.6rem;
    height: 2.6rem;
  }
}
