:root {
  --ivory: #F6EFE6;
  --ivory-soft: #FBF8F3;
  --forest: #242D20;
  --forest-deep: #1B2218;
  --sage: #4E6851;
  --sage-soft: #DCE4DC;
  --gold: #D9A760;
  --gold-dark: #B5833E;
  --ink: #242D20;
  --muted: #586355;
  --border: rgba(36, 45, 32, 0.14);
  --shadow: 0 18px 45px rgba(36, 45, 32, 0.08);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--ivory);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, .serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  line-height: 1.18;
  margin: 0;
  color: var(--forest);
}

.container {
  width: min(1140px, 100% - 2.5rem);
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Barra de usuario logueado
   ========================================================================== */
.user-bar {
  background: var(--forest);
  color: var(--ivory);
  border-bottom: 1px solid rgba(217, 167, 96, 0.28);
  padding: 0.75rem 0;
  font-size: 0.88rem;
}

.user-bar[hidden] {
  display: none;
}

.user-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

.user-bar-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-badge.is-free {
  background: rgba(246, 239, 230, 0.14);
  color: var(--ivory);
  border: 1px solid rgba(246, 239, 230, 0.28);
}

.plan-badge.is-member {
  background: var(--gold);
  color: var(--forest-deep);
}

.user-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.user-bar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid rgba(246, 239, 230, 0.25);
  color: var(--ivory);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.user-bar-link:hover {
  background: rgba(246, 239, 230, 0.12);
  border-color: var(--gold);
}

.user-bar-link.primary {
  background: var(--gold);
  color: var(--forest-deep);
  border-color: var(--gold);
  font-weight: 600;
}

.user-bar-link.primary:hover {
  background: #e4b674;
}

.user-bar-optin {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: rgba(246, 239, 230, 0.86);
  cursor: pointer;
}

.user-bar-optin input {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Header & Navegación
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 239, 230, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--forest);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--forest);
}

.nav-cta {
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--ivory) !important;
  font-weight: 500;
}

.nav-cta:hover {
  background: var(--sage);
}

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--ivory-soft);
  color: var(--forest);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

/* ==========================================================================
   Botones generales
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  text-align: center;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary:hover {
  background: var(--sage);
}

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

.btn-gold:hover {
  background: #e2b470;
}

.btn-outline {
  background: transparent;
  color: var(--forest);
  border-color: rgba(36, 45, 32, 0.28);
}

.btn-outline:hover {
  border-color: var(--forest);
  background: rgba(36, 45, 32, 0.05);
}

.btn-ghost {
  background: var(--ivory-soft);
  color: var(--forest);
  border-color: var(--border);
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   Hero Principal
   ========================================================================== */
.hero {
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(3rem, 5vw, 4.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  margin-bottom: 1.4rem;
}

.hero-bio p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-bio strong {
  color: var(--forest);
}

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

.hero-photo-wrap {
  position: relative;
}

.photo-frame {
  border-radius: 26px;
  overflow: hidden;
  background: var(--sage-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.photo-caption {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Pilares
   ========================================================================== */
.pillars-section {
  padding: clamp(3rem, 5vw, 4.5rem) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--ivory-soft);
}

.section-header {
  max-width: 680px;
  margin: 0 auto 2.8rem;
  text-align: center;
}

.section-header h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  margin-bottom: 0.8rem;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.pillar-card {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}

.pillar-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.65rem;
}

.pillar-card h3 {
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
}

.pillar-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ==========================================================================
   Comparativa de Planes
   ========================================================================== */
.plans-section {
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem;
  align-items: stretch;
}

.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  padding: clamp(1.8rem, 3vw, 2.5rem);
  border: 1px solid var(--border);
  background: var(--ivory-soft);
  box-shadow: var(--shadow);
}

.plan-card.is-featured {
  background: var(--forest);
  color: var(--ivory);
  border-color: rgba(217, 167, 96, 0.45);
}

.plan-card.is-featured h3,
.plan-card.is-featured .plan-price {
  color: var(--ivory);
}

.plan-card.is-featured .eyebrow {
  color: var(--gold);
}

.plan-card h3 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.plan-price {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--sage);
}

.plan-desc {
  margin: 0 0 1.4rem;
  font-size: 0.94rem;
  opacity: 0.9;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 0.7rem;
  font-size: 0.92rem;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.plan-features li::before {
  content: "✓";
  color: var(--sage);
  font-weight: 700;
  flex-shrink: 0;
}

.plan-card.is-featured .plan-features li::before {
  color: var(--gold);
}

.plan-features li.is-locked::before {
  content: "—";
  color: var(--muted);
}

.plan-features li.is-locked {
  opacity: 0.65;
}

.payment-methods {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(246, 239, 230, 0.16);
}

.payment-methods-title {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.pay-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 167, 96, 0.45);
  background: rgba(246, 239, 230, 0.08);
  color: var(--ivory);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pay-btn small {
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.8;
}

.pay-btn:hover {
  background: rgba(217, 167, 96, 0.2);
  border-color: var(--gold);
}

/* ==========================================================================
   Sección de Acceso (Registro / Login)
   ========================================================================== */
.auth-section {
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
  background: var(--ivory-soft);
  border-top: 1px solid var(--border);
}

.auth-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.auth-intro h2 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  margin-bottom: 1rem;
}

.auth-intro p {
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.auth-card {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.35rem;
  background: rgba(36, 45, 32, 0.07);
  border-radius: 999px;
  margin-bottom: 1.6rem;
}

.auth-tab {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-tab.is-active {
  background: var(--forest);
  color: var(--ivory);
}

.auth-form {
  display: grid;
  gap: 1.1rem;
}

.auth-form[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--forest);
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(36, 45, 32, 0.22);
  background: var(--ivory-soft);
  color: var(--forest);
  font-family: inherit;
  font-size: 0.95rem;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--sage);
  outline-offset: 1px;
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(78, 104, 81, 0.45);
  background: rgba(78, 104, 81, 0.06);
  cursor: pointer;
}

.checkbox-card input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--sage);
  flex-shrink: 0;
}

.checkbox-card span {
  font-size: 0.85rem;
  color: var(--forest);
  line-height: 1.5;
}

.checkbox-card small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-feedback {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.auth-feedback[hidden] {
  display: none;
}

.auth-feedback.is-error {
  background: #f8e5e2;
  color: #7c2d23;
  border: 1px solid rgba(124, 45, 35, 0.25);
}

.auth-feedback.is-success {
  background: #e5efe6;
  color: #214528;
  border: 1px solid rgba(33, 69, 40, 0.25);
}

/* ==========================================================================
   Redes & Footer
   ========================================================================== */
.social-section {
  padding: 3.5rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.social-section h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  margin-bottom: 1.4rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--ivory-soft);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.social-pill:hover {
  border-color: var(--sage);
  background: var(--sage-soft);
}

.site-footer {
  background: var(--forest);
  color: rgba(246, 239, 230, 0.82);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.86rem;
}

/* ==========================================================================
   Pantalla de Bloqueo (/acceso-membresia.html) y Portal (/membresia/)
   ========================================================================== */
.gate-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.gate-wrapper {
  width: min(640px, 100%);
}

.gate-card {
  background: var(--ivory-soft);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.2rem);
  box-shadow: var(--shadow);
  text-align: center;
}

.gate-card h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin-bottom: 1rem;
}

.gate-lead {
  font-size: 1rem;
  color: var(--forest);
  margin: 0 0 0.9rem;
}

.gate-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.hub-card {
  background: var(--ivory-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.2rem;
}

.hub-card.is-accent {
  background: var(--forest);
  color: var(--ivory);
  border-color: rgba(217, 167, 96, 0.45);
}

.hub-card.is-accent h3 {
  color: var(--ivory);
}

.hub-card h3 {
  font-size: 1.75rem;
}

.hub-card p {
  margin: 0;
  font-size: 0.92rem;
  opacity: 0.88;
}

/* ==========================================================================
   Modal de instrucciones de pago (Prex / PayPal / Mercado Pago)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(27, 34, 24, 0.65);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-box {
  width: min(500px, 100%);
  background: var(--ivory-soft);
  border-radius: 22px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-box h3 {
  font-size: 1.85rem;
  margin-bottom: 0.75rem;
}

.modal-box p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 920px) {
  .hero-grid,
  .plans-grid,
  .auth-layout,
  .pillars-grid,
  .hub-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo-wrap {
    max-width: 440px;
    margin-inline: auto;
    width: 100%;
  }

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.4rem;
    background: var(--ivory-soft);
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
  }

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

  .nav-links a {
    padding: 0.45rem 0;
  }
}

@media (max-width: 540px) {
  .payment-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn,
  .gate-actions .btn {
    width: 100%;
  }
}
