/* ─────────────────────────────────────────────
   LIMA DEEP PLANE ACADEMY — style.css
   Fondo: textura pergamino/cuero oscuro con canvas
   ───────────────────────────────────────────── */

:root {
  --black:        #0a0807;
  --black-card:   #100d0b;
  --black-modal:  #0e0c0a;
  --gold:         #b8922a;
  --gold-light:   #d4a843;
  --gold-dim:     #7a5e1a;
  --gold-border:  rgba(184, 146, 42, 0.40);
  --font-display: 'Cinzel', serif;
  --font-body:    'Cormorant Garamond', serif;
  --radius:       4px;
  --transition:   0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--gold);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ── Canvas de fondo ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Page sobre el canvas ── */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  padding: 48px 28px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Hero ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 40px;
}

.logo-wrap {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(184,146,42,0.35));
  transition: filter var(--transition);
}
.logo-img:hover { filter: drop-shadow(0 0 32px rgba(212,168,67,0.55)); }

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  text-align: center;
  line-height: 1.15;
  margin-bottom: 10px;
  text-shadow: 0 2px 30px rgba(184,146,42,0.30);
}

.brand-sub {
  font-family: var(--font-display);
  font-size: clamp(0.55rem, 2.4vw, 0.72rem);
  letter-spacing: 0.22em;
  color: var(--gold-dim);
  text-align: center;
  margin-bottom: 24px;
}

.divider { display: flex; align-items: center; gap: 10px; width: 60%; }
.divider-line { flex: 1; height: 1px; background: var(--gold-border); }
.divider-diamond { font-size: 0.6rem; color: var(--gold); }

/* ── Menu ── */
.menu {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin-bottom: 44px;
}

.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  /* Efecto pergamino en las tarjetas */
  background:
    linear-gradient(135deg, rgba(184,146,42,0.04) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(255,255,255,0.015), rgba(0,0,0,0.2));
  backdrop-filter: blur(2px);
  color: var(--gold);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.menu-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(184,146,42,0.07) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.menu-item:hover,
.menu-item:focus-visible {
  border-color: var(--gold-light);
  box-shadow: 0 0 20px rgba(184,146,42,0.15), inset 0 0 0 1px rgba(184,146,42,0.10);
  outline: none;
}
.menu-item:hover::before { opacity: 1; }
.menu-item:active { background: rgba(184,146,42,0.10); }

.menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-width: 64px;
  height: 56px;
}
.menu-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(62%) sepia(40%) saturate(600%) hue-rotate(5deg) brightness(95%);
  transition: filter var(--transition);
}
.menu-item:hover .menu-icon img {
  filter: brightness(0) saturate(100%) invert(75%) sepia(50%) saturate(700%) hue-rotate(5deg) brightness(105%);
}

.menu-divider {
  display: block;
  width: 1px;
  height: 32px;
  background: var(--gold-border);
  flex-shrink: 0;
  transition: background var(--transition);
}
.menu-item:hover .menu-divider { background: rgba(184,146,42,0.55); }

.menu-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 3vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold);
  padding: 0 20px;
  text-align: left;
  transition: color var(--transition);
}
.menu-item:hover .menu-label { color: var(--gold-light); }

.menu-arrow {
  font-size: 1.3rem;
  color: var(--gold-dim);
  padding: 0 20px;
  line-height: 1;
  transition: color var(--transition), transform var(--transition);
}
.menu-item:hover .menu-arrow { color: var(--gold-light); transform: translateX(3px); }

/* ── Tagline ── */
.tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(0.5rem, 2vw, 0.6rem);
  letter-spacing: 0.28em;
  color: var(--gold-dim);
  position: relative;
  z-index: 1;
}
.tag-diamond { font-size: 0.45rem; color: var(--gold); }

/* ════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 3, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background:
    /* vetas de cuero/pergamino */
    repeating-linear-gradient(
      92deg,
      transparent,
      transparent 120px,
      rgba(184,146,42,0.012) 121px,
      rgba(184,146,42,0.012) 122px
    ),
    repeating-linear-gradient(
      178deg,
      transparent,
      transparent 80px,
      rgba(255,255,255,0.008) 81px,
      rgba(255,255,255,0.008) 82px
    ),
    linear-gradient(160deg, #141008 0%, #0c0a07 40%, #0e0b08 100%);
  border: 1px solid var(--gold-border);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  width: 100%;
  max-width: 480px;
  padding-bottom: 32px;
  transform: translateY(60px);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    0 -8px 48px rgba(184,146,42,0.10),
    0 -1px 0 rgba(184,146,42,0.25);
}
.modal-overlay.is-open .modal-box { transform: translateY(0); }

/* Drag handle decorativo */
.modal-box::before {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--gold-border);
  border-radius: 2px;
  margin: 10px auto 0;
}

@media (min-height: 700px) and (min-width: 500px) {
  .modal-overlay { align-items: center; }
  .modal-box {
    border: 1px solid var(--gold-border);
    border-radius: 10px;
    max-width: 460px;
    transform: translateY(24px) scale(0.97);
  }
  .modal-box::before { display: none; }
  .modal-overlay.is-open .modal-box { transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 16px;
  border-bottom: 1px solid var(--gold-border);
}
.modal-header-left { display: flex; align-items: center; gap: 10px; }
.modal-diamond { font-size: 0.55rem; color: var(--gold); }
.modal-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold-light);
}

.modal-close {
  background: none;
  border: 1px solid var(--gold-border);
  color: var(--gold-dim);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.modal-close:hover {
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(184,146,42,0.08);
}

/* Video iframe */
.modal-video-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
}
.modal-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* Botones */
.modal-actions {
  display: flex;
  gap: 12px;
  padding: 18px 20px 0;
}

.modal-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: clamp(0.58rem, 2.4vw, 0.7rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}
.modal-btn-icon { font-size: 0.85rem; line-height: 1; }

.modal-btn--outline {
  border: 1px solid var(--gold-border);
  background: transparent;
  color: var(--gold);
}
.modal-btn--outline:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
  background: rgba(184,146,42,0.07);
}

.modal-btn--gold {
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, #c9a030, #a07820);
  color: #0a0807;
  font-weight: 700;
}
.modal-btn--gold:hover {
  background: linear-gradient(135deg, #d4a843, #b8922a);
  box-shadow: 0 4px 20px rgba(184,146,42,0.35);
}

/* ── Animaciones entrada ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.logo-wrap   { animation: fadeUp 0.7s ease both 0.05s; }
.brand-title { animation: fadeUp 0.7s ease both 0.20s; }
.brand-sub   { animation: fadeUp 0.7s ease both 0.30s; }
.divider     { animation: fadeUp 0.6s ease both 0.38s; }
.menu-item:nth-child(1) { animation: fadeUp 0.55s ease both 0.45s; }
.menu-item:nth-child(2) { animation: fadeUp 0.55s ease both 0.52s; }
.menu-item:nth-child(3) { animation: fadeUp 0.55s ease both 0.59s; }
.menu-item:nth-child(4) { animation: fadeUp 0.55s ease both 0.66s; }
.menu-item:nth-child(5) { animation: fadeUp 0.55s ease both 0.73s; }
.menu-item:nth-child(6) { animation: fadeUp 0.55s ease both 0.80s; }
.tagline     { animation: fadeUp 0.6s ease both 0.90s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── Responsive ── */
@media (min-width: 600px) {
  .page { padding: 60px 40px 44px; }
  .logo-wrap { width: 240px; height: 240px; }
}
@media (max-width: 360px) {
  .page { padding: 36px 18px 28px; }
  .menu-icon { width: 54px; min-width: 54px; }
  .brand-title { font-size: 1.25rem; }
  .modal-actions { flex-direction: column; }
}
