/* Tema HVB: mint fotográfico, ondas, posts de servicios, componentes */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  min-height: var(--header);
  display: flex;
  align-items: center;
  background: rgb(247 255 252 / 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 1.5rem, var(--wrap));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--ink);
  line-height: var(--leading-tight);
}

.brand img {
  width: 4.75rem;
  height: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
}

.brand-text span {
  font-size: var(--text-sm);
  color: var(--mint-deep);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  border: 0;
  background: var(--forest);
  color: var(--white);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: var(--text-lg);
  line-height: 1;
}

.nav-toggle:active {
  transform: scale(0.97);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  list-style: none;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: var(--leading-tight);
  padding: 0.35rem 0.15rem;
}

.site-nav a.is-active,
.site-nav a[aria-current="page"] {
  color: var(--mint-deep);
  box-shadow: inset 0 -0.18rem 0 var(--lime);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 0;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: var(--leading-tight);
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease), background 180ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-forest:hover {
  background: var(--mint-deep);
  color: var(--white);
}

.btn-lime {
  background: var(--lime);
  color: var(--ink);
}

.btn-lime:hover {
  filter: brightness(1.04);
  color: var(--ink);
}

.btn-ghost {
  background: rgb(255 255 255 / 0.55);
  color: var(--forest);
  border: 1px solid var(--line);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88dvh, 48rem);
  display: grid;
  align-items: center;
  overflow: clip;
  background:
    radial-gradient(circle at 82% 18%, rgb(212 232 90 / 0.45), transparent 34%),
    linear-gradient(160deg, var(--mint-soft), var(--mint) 48%, #5fbdaf);
  color: var(--ink);
}

.hero-waves {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 10% 120%, var(--lime) 0 42%, transparent 43%),
    radial-gradient(90% 80% at 90% 130%, var(--forest) 0 38%, transparent 39%);
  opacity: 0.55;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: center;
  padding-block: 4.5rem 3rem;
}

.hero-copy {
  padding-bottom: 1.5rem;
}

.hero-brand {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(var(--text-5xl), 9vw, var(--text-7xl));
  line-height: var(--leading-display);
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 11ch;
}

.hero-support {
  margin: 0;
  font-size: var(--text-lg);
  max-width: 28rem;
}

.hero-photo {
  position: relative;
  justify-self: end;
  width: min(100%, 34rem);
}

.hero-photo img {
  width: 100%;
  border-radius: 2.75rem;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  box-shadow: 0 1.5rem 3rem rgb(20 51 44 / 0.18);
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: auto -8% -6% auto;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 40% 60% 55% 45%;
  background: var(--lime);
  z-index: -1;
  opacity: 0.85;
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: var(--space-xl) 0;
  overflow: clip;
}

.section-mint {
  background: var(--mint);
}

.section-paper {
  background: var(--paper);
}

.section-forest {
  background: var(--forest);
  color: var(--white);
}

.section-forest a {
  color: var(--lime);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}

.section-head h2 {
  max-width: 18ch;
  font-size: clamp(var(--text-4xl), 7.5vw, var(--text-6xl));
}

.page-hero h1 {
  max-width: 16ch;
  font-size: clamp(var(--text-5xl), 9vw, var(--text-7xl));
}

.stage-copy h2 {
  max-width: 14ch;
  font-size: clamp(var(--text-4xl), 7vw, var(--text-6xl));
}

.pill {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 1rem;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
}

.pill-forest {
  background: var(--forest);
  color: var(--white);
}

.panel {
  display: inline-block;
  padding: 0.85rem 1.1rem;
  border-radius: 1.1rem;
  background: var(--forest);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--leading-heading);
  letter-spacing: -0.02em;
}

.panel-lime {
  background: var(--lime);
  color: var(--ink);
}

/* ---------- Photo stages ---------- */
.stage {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.stage-flip {
  grid-template-columns: 0.9fr 1.1fr;
}

.stage-flip .stage-copy {
  order: 2;
}

.frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream);
  box-shadow:
    0 0 0 0.55rem var(--white),
    0 0 0 0.85rem var(--lime);
}

.frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.frame-tall img {
  aspect-ratio: 3 / 4;
}

.frame-pop {
  margin-bottom: 1.5rem;
}

.frame-pop img {
  transform: scale(1.04);
}

/* ---------- Service posts (estilo redes) ---------- */
.service-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.post-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(14rem, 48%) auto;
  min-height: 28rem;
  overflow: hidden;
  border-radius: 2rem;
  background: var(--mint-soft);
  box-shadow: 0 1.1rem 2.4rem rgb(20 51 44 / 0.12);
}

.post-card__waves {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90% 70% at 0% 100%, var(--mint-deep) 0 36%, transparent 37%),
    radial-gradient(70% 55% at 100% 0%, var(--lime) 0 28%, transparent 29%),
    linear-gradient(145deg, var(--mint-soft), var(--mint));
  opacity: 0.95;
}

.post-card__waves--warm {
  background:
    radial-gradient(85% 65% at 100% 100%, #3fa894 0 34%, transparent 35%),
    radial-gradient(75% 55% at 0% 10%, var(--lime) 0 30%, transparent 31%),
    linear-gradient(160deg, #9fdccf, var(--mint));
}

.post-card__media,
.post-card__content {
  position: relative;
  z-index: 1;
}

.post-card__media {
  margin: 1rem 1rem 0;
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow:
    0 0 0 0.35rem var(--white),
    0 0 0 0.55rem var(--lime);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
  object-position: center top;
}

.post-card__media--bleed {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 16rem;
}

.post-card--hero {
  grid-template-rows: minmax(16rem, 55%) auto;
}

.post-card--hero .post-card__media--bleed img {
  min-height: 17rem;
}

.post-card__content {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  padding: 1.15rem 1.2rem 1.35rem;
}

.post-card__content--overlay {
  margin-top: -2.5rem;
}

.post-card__title {
  margin: 0;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 0.55rem 0.9rem;
  border-radius: 1rem;
  font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
  line-height: var(--leading-heading);
  letter-spacing: -0.02em;
}

.post-card__title--forest {
  background: var(--forest);
  color: var(--white);
}

.post-card__title--lime {
  background: var(--lime);
  color: var(--ink);
}

.post-card__text {
  margin: 0;
  max-width: none;
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}

.post-card__text--forest {
  background: var(--forest);
  color: var(--white);
}

.post-card__text--lime {
  background: var(--lime);
  color: var(--ink);
}

.post-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.post-card__actions .btn {
  min-height: 2.55rem;
  padding-inline: 1rem;
}

@media (max-width: 900px) {
  .service-rail {
    grid-template-columns: 1fr;
  }
}

/* ---------- Values strip ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
  max-width: 28rem;
}

.value {
  padding: 1rem 1.05rem;
  border-radius: var(--radius);
  background: rgb(20 83 72 / 0.12);
  font-weight: 800;
  font-family: var(--font-display);
  font-size: clamp(var(--text-md), 2.4vw, var(--text-lg));
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  text-align: center;
  overflow-wrap: anywhere;
}

/* ---------- Doctor fichas ---------- */
.fichas {
  display: grid;
  gap: 1.25rem;
}

.ficha {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1.1rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}

.ficha img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius) - 0.35rem);
}

.ficha h3 {
  margin-bottom: 0.2em;
}

.role {
  margin: 0 0 0.75em;
  color: var(--mint-deep);
  font-weight: 700;
  font-size: var(--text-sm);
}

.note {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--lime);
  color: var(--ink);
  max-width: 46rem;
}

/* ---------- Tips accordion ---------- */
.tips {
  display: grid;
  gap: 0.75rem;
  max-width: 46rem;
}

.tip {
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
}

.tip summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: var(--leading-heading);
}

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

.tip[open] summary {
  background: var(--cream);
}

.tip-body {
  padding: 0 1.15rem 1.1rem;
  color: var(--ink);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.contact-card {
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}

.contact-card dl {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.contact-card dt {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--mint-deep);
  margin: 0;
}

.contact-card dd {
  margin: 0.15rem 0 0;
}

.contact-visual {
  position: relative;
}

.contact-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 1;
  object-fit: cover;
  box-shadow:
    0 0 0 0.45rem var(--white),
    0 0 0 0.75rem var(--mint);
}

/* ---------- Page hero (inner) ---------- */
.page-hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  background:
    linear-gradient(145deg, var(--mint-soft), var(--mint) 60%, #63c3b3);
  overflow: clip;
}

.page-hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: end;
}

.page-hero-photo img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: 0 1rem 2.5rem rgb(20 51 44 / 0.16);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2.5rem 0 2rem;
  background: var(--ink);
  color: rgb(247 255 252 / 0.86);
}

.site-footer a {
  color: var(--lime);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.5rem;
}

.site-footer h2 {
  font-size: var(--text-lg);
  color: var(--white);
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.site-footer a {
  text-decoration: none;
  font-size: var(--text-sm);
}

.footer-copy {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(247 255 252 / 0.12);
  font-size: var(--text-sm);
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

.hero-copy.reveal,
.hero-photo.reveal,
.page-hero .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap,
  .stage,
  .stage-flip,
  .page-hero .wrap,
  .contact-grid,
  .ficha,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .stage-flip .stage-copy {
    order: 0;
  }

  .hero {
    min-height: auto;
  }

  .hero .wrap {
    padding-top: 4.5rem;
  }

  .hero-photo {
    justify-self: center;
    width: min(100%, 26rem);
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: fixed;
    inset: var(--header) 0.75rem auto;
    z-index: var(--z-nav);
    display: none;
    padding: 0.85rem;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 1rem 2rem rgb(20 51 44 / 0.12);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .site-nav a {
    display: block;
    padding: 0.65rem 0.5rem;
  }
}

@media (max-width: 560px) {
  .brand-text span {
    display: none;
  }

  .hero-brand {
    max-width: 11ch;
  }

  h1,
  .page-hero h1 {
    max-width: 12ch;
  }

  h2,
  .stage-copy h2,
  .section-head h2 {
    max-width: 14ch;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--white);
    backdrop-filter: none;
  }
}
