:root {
  --paper: #f7f6f4;
  --surface: #ffffff;
  --soft-gray: #ece9e6;
  --warm-gray: #d8d3cf;
  --ink: #171717;
  --charcoal: #2b2b2b;
  --muted: #6a6662;
  --red: #9f2f2c;
  --red-soft: #c9655f;
  --red-wash: #f4e3e0;
  --line: rgba(23, 23, 23, 0.12);
  --shadow: 0 24px 70px rgba(23, 23, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(159, 47, 44, 0.06), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--paper) 46%, #ffffff 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  transition: background 180ms ease, box-shadow 180ms ease, padding 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(23, 23, 23, 0.08);
  backdrop-filter: blur(16px);
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(23, 23, 23, 0.7);
  font-size: 0.94rem;
  font-weight: 600;
}

.site-nav a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(23, 23, 23, 0.3);
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.site-nav a:hover {
  color: var(--red);
}

.hero {
  position: relative;
  min-height: 92vh;
  max-height: 980px;
  display: grid;
  align-items: center;
  padding: 108px clamp(18px, 5vw, 76px) 64px;
  overflow: hidden;
}

.hero::before,
.hero::after,
.section::before,
.contact-section::before {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(159, 47, 44, 0.14);
  border-color: rgba(159, 47, 44, 0.14) transparent transparent rgba(23, 23, 23, 0.08);
  border-radius: 48% 52% 42% 58%;
  transform: rotate(-12deg);
}

.hero::before {
  width: min(56vw, 760px);
  height: min(30vw, 380px);
  right: -12vw;
  top: 18vh;
}

.hero::after {
  width: min(42vw, 560px);
  height: min(24vw, 320px);
  left: -16vw;
  bottom: 5vh;
  transform: rotate(16deg);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 246, 244, 0.5) 0%, rgba(247, 246, 244, 0.38) 38%, rgba(247, 246, 244, 0.12) 62%, transparent 82%),
    url("assets/web/hero-consultorio.jpg");
  background-size: cover;
  background-position: 62% top;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(4.5rem, 14vw, 11rem);
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2.4rem, 6vw, 5rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.hero-lead {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  line-height: 1.65;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 22px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--ink);
  color: #ffffff;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(23, 23, 23, 0.22);
  box-shadow: 0 6px 16px rgba(23, 23, 23, 0.06);
}

.scroll-cue {
  position: absolute;
  z-index: 1;
  right: clamp(18px, 4vw, 56px);
  bottom: 24px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  color: rgba(23, 23, 23, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
}

.intro-band {
  padding: 26px clamp(18px, 5vw, 76px);
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.6fr);
  gap: 24px;
  align-items: stretch;
  max-width: 1180px;
  margin: 0 auto;
}

.intro-grid p {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.65;
}

.intro-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.intro-stat strong,
.intro-stat span {
  display: block;
}

.intro-stat strong {
  margin-bottom: 6px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  font-variant-numeric: lining-nums;
}

.intro-stat span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.section,
.location-section,
.contact-section {
  position: relative;
  padding: clamp(72px, 10vw, 132px) clamp(18px, 5vw, 76px);
}

.section::before {
  width: min(42vw, 560px);
  height: min(20vw, 260px);
  right: -18vw;
  top: 80px;
  opacity: 0.8;
}

.section > *,
.contact-section > * {
  position: relative;
  z-index: 1;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-heading.compact {
  max-width: 650px;
}

.consultorios-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.consultorio-card {
  display: grid;
  grid-template-rows: auto min-content;
  margin: 0;
}

.photo-placeholder {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft-gray);
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.photo-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.consultorio-card:nth-child(1) img {
  object-position: center 58%;
}

.consultorio-card:nth-child(2) img {
  object-position: center 62%;
}

.consultorio-card:nth-child(3) img {
  object-position: center 60%;
}

.consultorio-card:nth-child(4) img {
  object-position: center 56%;
}

figcaption {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
}

figcaption strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.section-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.section-note p {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
}

.section-note .text-link {
  margin-top: 0;
}

.amenities-section {
  position: relative;
  background: linear-gradient(180deg, rgba(244, 227, 224, 0.22), rgba(255, 255, 255, 0));
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.amenities-grid article,
.info-panel,
.contact-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 44px rgba(23, 23, 23, 0.07);
}

.amenities-grid article {
  padding: 24px;
}

.amenities-grid p,
.info-panel li,
.contact-copy p,
.location-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.icon {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--red-soft);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 2.5rem;
}

.details-copy {
  padding: clamp(72px, 10vw, 132px) clamp(18px, 5vw, 76px) 0;
}

.details-copy h2,
.details-copy p {
  max-width: 760px;
}

.details-strip {
  display: grid;
  grid-template-columns: 0.9fr 1.15fr 0.9fr;
  grid-auto-rows: 230px;
  gap: 16px;
  padding: 0 clamp(18px, 5vw, 76px) clamp(72px, 10vw, 132px);
}

.detail-card {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 16px 44px rgba(23, 23, 23, 0.07);
}

.detail-card.tall {
  grid-row: span 2;
}

.detail-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 0 clamp(18px, 5vw, 76px) clamp(72px, 10vw, 132px);
}

.info-panel {
  padding: clamp(28px, 5vw, 54px);
}

.info-panel.light {
  background: rgba(244, 227, 224, 0.28);
}

.info-panel h2,
.location-copy h2,
.contact-copy h2 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.check-list {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
}

.location-section {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 24px;
  align-items: stretch;
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.location-copy {
  align-self: center;
}

.text-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--red);
  font-weight: 800;
  border-bottom: 1px solid currentColor;
}

.map-frame {
  min-height: 390px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.72fr);
  gap: clamp(24px, 5vw, 76px);
  align-items: start;
}

.contact-section::before {
  width: min(46vw, 620px);
  height: min(22vw, 290px);
  left: -16vw;
  top: 90px;
  opacity: 0.72;
  transform: rotate(18deg);
}

.contact-copy {
  max-width: 680px;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(23, 23, 23, 0.72);
  font-size: 0.88rem;
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 13px 14px;
}

.contact-form textarea {
  resize: vertical;
}

.form-button {
  width: 100%;
  margin-top: 4px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 76px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  color: var(--red);
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 23, 23, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.4rem;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

@media (max-width: 560px) {
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 900px) {
  .site-nav {
    gap: 16px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 88vh;
  }

  .intro-grid,
  .consultorios-grid,
  .amenities-grid,
  .details-strip,
  .info-section,
  .location-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .photo-placeholder {
    min-height: 260px;
    aspect-ratio: 4 / 3;
  }

  .consultorio-card .photo-placeholder {
    aspect-ratio: 4 / 5;
  }

  .details-strip {
    grid-auto-rows: 230px;
  }

  .detail-card.tall {
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 16px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .site-nav {
    gap: 10px;
    font-size: 0.68rem;
  }

  .hero {
    padding: 96px 16px 70px;
  }

  h1 {
    font-size: clamp(4rem, 22vw, 6.8rem);
  }

  .button {
    width: 100%;
  }

  .intro-band,
  .section,
  .details-strip,
  .location-section,
  .contact-section,
  .info-section {
    padding-inline: 16px;
  }

  .intro-stat {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .map-frame {
    min-height: 320px;
  }

  .site-footer {
    flex-direction: column;
    padding-inline: 16px;
  }
}
