/* ==========================================================================
   LINKTREE WARM EDITORIAL — SALUD & BIENESTAR
   ========================================================================== */

/* 1. TIPOGRAFÍAS AUTO-HOSPEDADAS WOFF2 (Zero Round-trip) */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Sacramento';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/sacramento-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 2. TOKENS DE DISEÑO & VARIABLES */
:root {
  /* Paleta Warm Editorial */
  --color-bg-outer: #EDECE7;
  --color-bg: #FAF9F5;
  --color-bg-alt: #F4F3EE;
  --color-card-bg: #FFFFFF;
  --color-card-border: rgba(43, 92, 67, 0.08);

  /* Tonos Verdes Salvia */
  --color-primary: #334E3C;
  --color-primary-dark: #273D2F;
  --color-sage-card: #5B7261;
  --color-sage-card-hover: #4F6454;
  --color-sage-light: #EBF0EC;
  --color-sage-subtle: #8FA695;

  /* Tipografías & Textos */
  --color-title: #1C1B19;
  --color-body: #4F4E4A;
  --color-muted: #78756E;
  --color-quote-border: #D6D3C8;
  --color-gold: #9E8262;

  /* Fuentes */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Sacramento', cursive;

  /* Sombras y radios */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;
  --shadow-card: 0 4px 20px -2px rgba(35, 50, 40, 0.08);
  --shadow-hover: 0 10px 25px -3px rgba(35, 50, 40, 0.15);
  --shadow-outer: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

/* 3. RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-bg-outer);
}

body {
  font-family: var(--font-sans);
  color: var(--color-body);
  background-color: var(--color-bg-outer);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 0;
}

/* 4. CONTENEDOR PRINCIPAL EDITORIAL (Mobile Viewport & Desktop Centered) */
.page-container {
  width: 100%;
  max-width: 480px;
  container-type: inline-size;
  background-color: var(--color-bg);
  min-height: 100vh;
  position: relative;
  box-shadow: var(--shadow-outer);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 768px) {
  body {
    padding: 32px 16px;
    align-items: flex-start;
  }
  .page-container {
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin: auto;
  }
}

/* 5. SECCIÓN 1: HEADER / HERO */
.hero-section {
  position: relative;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px;
  overflow: hidden;
  isolation: isolate;
}

/* Capa 1: la foto ocupa todo el hero */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 2%;
  display: block;
}

/* Capa 2: velo crema. Disuelve a la paciente de la izquierda y deja
   la pared del consultorio fundiéndose con el fondo de la página. */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(250, 249, 245, 0) 78%,
      var(--color-bg) 100%),
    linear-gradient(90deg,
      var(--color-bg) 0%,
      var(--color-bg) 34%,
      rgba(250, 249, 245, 0.94) 48%,
      rgba(250, 249, 245, 0.24) 60%,
      rgba(250, 249, 245, 0) 76%);
}

/* Monograma caligráfico de marca de agua (justifica el preload de Sacramento) */
.hero-monogram {
  position: absolute;
  top: 6px;
  left: 16px;
  z-index: 2;
  font-family: var(--font-script);
  font-size: 4.2rem;
  line-height: 1;
  color: rgba(51, 78, 60, 0.15);
  pointer-events: none;
  user-select: none;
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 52%;
  padding: 0;
}

.doctor-name {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 8.6vw, 2.6rem);
  line-height: 1.05;
  font-weight: 400;
  color: var(--color-title);
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-bottom: 6px;
}

.doctor-role {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  text-wrap: balance;
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}

.doctor-tagline {
  font-family: var(--font-sans);
  font-size: 0.84rem;
  color: var(--color-body);
  line-height: 1.45;
  font-weight: 400;
}

.doctor-tagline strong {
  font-weight: 600;
  color: var(--color-title);
}

/* 6. SECCIÓN 2: ACTION CARDS (Links) */
.links-section {
  padding: 16px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-sage-card);
  border-radius: 20px;
  padding: 10px 16px 10px 12px;
  text-decoration: none;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 12px rgba(43, 92, 67, 0.12);
  min-height: 78px;
}

.action-card:hover, .action-card:focus-visible {
  background: var(--color-sage-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(43, 92, 67, 0.22);
}

.action-card:active {
  transform: translateY(0);
}

.card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.card-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card-icon-circle svg {
  width: 22px;
  height: 22px;
}

.card-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.15;
  color: #FFFFFF;
  letter-spacing: 0.01em;
}

.card-subtitle {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.01em;
}

.card-right {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.card-chevron {
  width: 20px;
  height: 20px;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.2;
  transition: transform 0.25s ease;
}

.action-card:hover .card-chevron {
  transform: translateX(3px);
  stroke: #FFFFFF;
}

/* Card Background Photo Accent (as in design) */
.card-bg-accent {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 64%;
  opacity: 0.95;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent, black 72%);
  -webkit-mask-image: linear-gradient(to right, transparent, black 72%);
  overflow: hidden;
  z-index: 0;
}

.card-bg-accent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* La foto se oscurece por debajo del verde: suma textura y SUBE el contraste del texto */
  filter: brightness(0.38) saturate(1.1);
}

.action-card--feature .card-bg-accent img {
  filter: none;
}

/* Card destacada: la foto ocupa toda la tarjeta bajo un velo verde */
.action-card--feature {
  min-height: 108px;
  align-items: flex-end;
  padding: 14px 16px 16px 12px;
}

.action-card--feature .card-bg-accent {
  width: 100%;
  opacity: 1;
  mask-image: none;
  -webkit-mask-image: none;
}

.action-card--feature::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg,
    rgba(41, 62, 48, 0.94) 0%,
    rgba(41, 62, 48, 0.84) 45%,
    rgba(41, 62, 48, 0.48) 100%);
}

.action-card--feature .card-title {
  font-size: 1.42rem;
}

/* 7. SECCIÓN 3: CALLOUT / CITA INSPIRADORA */
.quote-section {
  padding: 12px 20px 24px 20px;
}

.quote-box {
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-quote-border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  position: relative;
  text-align: left;
}

.quote-text {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-body);
  font-weight: 400;
}

.quote-text strong {
  font-weight: 600;
  color: var(--color-title);
}

/* 8. SECCIÓN 4: SOBRE MÍ (Editorial Portrait & Story) */
.about-section {
  background-color: #25392C;
  color: #FFFFFF;
  padding: 250px 22px 40px 22px;
  position: relative;
  overflow: hidden;
  border-top-left-radius: 60px;
}

.about-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.about-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 90% 20%;
  display: block;
}

.about-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(34, 53, 41, 0.10) 0%,
    rgba(34, 53, 41, 0.58) 34%,
    rgba(34, 53, 41, 0.93) 62%,
    rgba(34, 53, 41, 0.99) 100%);
}

.about-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  position: relative;
  z-index: 2;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 400px;
}

.about-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: #FFFFFF;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.about-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 22px;
  font-weight: 400;
}

.about-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(245, 244, 239, 0.95);
  color: var(--color-primary-dark);
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.about-btn:hover {
  background-color: #FFFFFF;
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

/* 9. SECCIÓN 5: DÚVIDAS / FAQS (Acordeón) */
.faq-section {
  padding: 54px 22px 24px 22px;
  margin-top: -30px;
  background-color: var(--color-bg);
  border-top-right-radius: 60px;
  position: relative;
  z-index: 2;
}

.faq-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-title);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.faq-button {
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--color-title);
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-button:hover {
  color: var(--color-primary);
}

.faq-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-muted);
  transition: transform 0.25s ease, color 0.2s ease;
  line-height: 1;
  margin-left: 12px;
  flex-shrink: 0;
}

.faq-button[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  color: var(--color-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  padding: 0 4px;
}

.faq-answer-inner {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--color-body);
  padding-bottom: 16px;
}

/* 10. SECCIÓN 6: STATS / SOCIAL PROOF STRIP */
.stats-section {
  background-color: var(--color-primary);
  color: #FFFFFF;
  padding: 22px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.3fr;
  align-items: center;
  text-align: center;
}

.stat-item {
  padding: 0 8px;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.2);
}

.stat-value {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* 11. SECCIÓN 7: FOOTER & FIRMA */
.footer-section {
  background-color: var(--color-primary-dark);
  color: #FFFFFF;
  padding: 28px 22px 36px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-social-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
}

.social-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-icon-btn:hover {
  background-color: #FFFFFF;
  color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copy {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.5;
  min-width: 0;
}

.signature {
  font-family: var(--font-script);
  font-size: clamp(1.75rem, 7cqi, 2.3rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

/* Solo cuando el contenedor da el ancho, firma y copyright conviven en una fila */
@container (min-width: 430px) {
  .footer-bottom {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
  }
}

/* 12. ACCESSIBILITY & UTILITIES */
:focus-visible {
  outline: 2px solid var(--color-sage-subtle);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
