/* ─────────────────────────────────────────
   ÍTACA — style.css
   Paleta: negro profundo / teal / ocre dorado
   ───────────────────────────────────────── */

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

:root {
  --black:    #07070D;
  --navy:     #0D1020;
  --steel:    #6E7372;
  --steel-lt: #BFBFBF;
  --ocre:     #73551D;
  --ocre-lt:  #C9A84C;
  --teal-dk:  #1D2623;
  --teal:     #325259;
  --teal-lt:  #77A1A6;
  --white:    #F2F2F2;
  --fog:      rgba(242,242,242,0.55);
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

/* ─── CURSOR ─── */
#cur-dot {
  position: fixed; width: 7px; height: 7px;
  background: var(--white); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: background 0.2s;
}
#cur-ring {
  position: fixed; width: 36px; height: 36px;
  border: 1px solid rgba(242,242,242,0.3);
  border-radius: 50%; pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}
body.hovering #cur-dot  { background: var(--ocre-lt); }
body.hovering #cur-ring { width: 56px; height: 56px; border-color: rgba(201,168,76,0.6); }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 22px 48px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1.5rem;
  background: transparent;
  transition: background 0.4s ease;
}
nav.scrolled {
  background: rgba(7,7,13,0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-logo {
  height: 32px; width: auto; display: block;
  mix-blend-mode: screen;
  opacity: 0.9;
  transition: opacity 0.3s;
}
.nav-logo:hover { opacity: 1; }
.nav-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  align-items: center;
}
.nav-link {
  color: var(--steel);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  transition: color 0.25s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--white);
}
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  color: var(--white);
  background: var(--teal);
  border-radius: 999px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  border: 1px solid transparent;
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
}
.nav-button:hover {
  background: var(--teal-lt);
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.15);
}
.nav-label {
  font-size: 0.6rem; letter-spacing: 0.35em;
  color: var(--steel); text-transform: uppercase;
  opacity: 0; transition: opacity 0.5s;
}
.nav-label.show { opacity: 1; }

@media (max-width: 900px) {
  nav {
    padding: 18px 24px;
    justify-content: center;
    gap: 1rem;
  }
  .nav-links {
    justify-content: center;
    order: 3;
    width: 100%;
  }
  .nav-label { display: none; }
}

/* ─── HERO ─── */
.hero {
  position: relative; height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transform: scale(1.08);
  z-index: 0;
}
/* gradient overlay via sibling — applied through .hero::after */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(7,7,13,0.2)  0%,
    rgba(7,7,13,0.05) 40%,
    rgba(7,7,13,0.65) 85%,
    rgba(7,7,13,1)   100%
  );
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1.8rem;
}
.hero-eyebrow {
  font-size: 0.6rem; letter-spacing: 0.45em;
  color: var(--teal-lt); text-transform: uppercase;
  opacity: 0; transform: translateY(16px);
  animation: up 0.9s 0.4s forwards;
}
.hero-logo-img {
  width: clamp(260px, 48vw, 600px); height: auto;
  mix-blend-mode: screen;
  opacity: 0; transform: translateY(28px);
  animation: up 1.1s 0.7s forwards;
}
.hero-tagline {
  font-size: 0.82rem; letter-spacing: 0.12em; line-height: 1.9;
  color: rgba(242,242,242,0.82);
  max-width: 380px;
  opacity: 0; transform: translateY(16px);
  animation: up 0.9s 1.1s forwards, taglineFloat 5s 2.2s ease-in-out infinite;
  text-shadow:
    0 0 18px rgba(119,161,166,0.55),
    0 0 40px rgba(119,161,166,0.25),
    0 2px 12px rgba(7,7,13,0.7);
}
@keyframes taglineFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 1;
  opacity: 0; animation: up 0.8s 1.6s forwards;
}
.hero-scroll span {
  font-size: 0.55rem; letter-spacing: 0.38em;
  color: var(--steel); text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--steel), transparent);
  animation: pulse 2.2s 2s infinite;
}

/* ─── CHAPTERS ─── */
.chapter {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 12vh 10vw;
  overflow: hidden;
}
.chapter:nth-child(odd)  { justify-content: flex-start; }
.chapter:nth-child(even) { justify-content: flex-end; }

/* Tonos por capítulo siguiendo la progresión de paleta */
.ch1 { background: linear-gradient(135deg, #0D0D14 0%, #1A1D20 100%); }
.ch2 { background: linear-gradient(135deg, #0A0F0E 0%, #1D2623 100%); }
.ch3 { background: linear-gradient(135deg, #0D1020 0%, #37403E 60%, #1D2623 100%); }
.ch4 { background: linear-gradient(135deg, #080810 0%, #1A1D20 100%); }

/* Imagen de fondo sutil por capítulo */
.ch-bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transition: opacity 1.2s;
}
.ch-bg.show { opacity: 0.1; }

/* Línea lateral teal */
.chapter::before {
  content: '';
  position: absolute; left: 6vw; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 0;
  background: linear-gradient(to bottom, transparent, var(--teal), transparent);
  transition: height 1s 0.3s ease;
}
.chapter.visible::before { height: 40%; }
.chapter:nth-child(even)::before { left: auto; right: 6vw; }

/* Contenido del capítulo */
.ch-inner {
  position: relative; z-index: 1;
  max-width: 520px;
  opacity: 0; transform: translateY(56px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.ch-inner.visible { opacity: 1; transform: translateY(0); }

.ch-num {
  font-size: 0.58rem; letter-spacing: 0.45em;
  color: var(--ocre-lt); text-transform: uppercase;
  margin-bottom: 1.4rem;
  display: flex; align-items: center; gap: 1rem;
}
.ch-num::after {
  content: ''; display: block;
  width: 36px; height: 1px; background: var(--ocre);
}
.ch-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 300; line-height: 1.08;
  color: var(--white); margin-bottom: 1.6rem;
}
.ch-title em { font-style: italic; color: var(--teal-lt); }

.ch-body {
  font-size: 0.88rem; line-height: 1.95;
  color: rgba(242,242,242,0.65);
}

/* ─── DIVISOR ─── */
.hr {
  width: 100%; height: 1px;
  background: linear-gradient(to right,
    transparent 0%, var(--teal) 30%,
    var(--ocre) 65%, transparent 100%);
  opacity: 0.2;
}

/* ─── MENÚ FINAL ─── */
.final {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 12vh 10vw;
  background: radial-gradient(ellipse at 50% 110%, #1D2623 0%, var(--black) 65%);
  overflow: hidden;
}
.final::before {
  content: ''; position: absolute; inset: 0;
  opacity: 0.05; z-index: 0;
}
.final-label {
  position: relative; z-index: 1;
  font-size: 0.58rem; letter-spacing: 0.45em;
  color: var(--teal-lt); text-transform: uppercase;
  margin-bottom: 3.5rem;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.7s, transform 0.7s;
}
.final-label.visible { opacity: 1; transform: translateY(0); }

.menu-list { list-style: none; position: relative; z-index: 1; }

.menu-list li {
  border-top: 1px solid rgba(255,255,255,0.07);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.65s, transform 0.65s;
}
.menu-list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.07); }
.menu-list li.visible { opacity: 1; transform: translateY(0); }
.menu-list li:nth-child(1) { transition-delay: 0.08s; }
.menu-list li:nth-child(2) { transition-delay: 0.18s; }
.menu-list li:nth-child(3) { transition-delay: 0.28s; }
.menu-list li:nth-child(4) { transition-delay: 0.38s; }

.menu-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2rem 0; text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.7rem, 3.5vw, 3rem);
  font-weight: 300; color: var(--white);
  position: relative; overflow: hidden;
  transition: color 0.35s, padding-left 0.35s;
}
.menu-link::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--teal-lt);
  transition: width 0.5s ease;
}
.menu-link:hover { color: var(--teal-lt); padding-left: 0.6rem; }
.menu-link:hover::after { width: 100%; }

.menu-link-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem; letter-spacing: 0.3em;
  color: var(--steel); text-transform: uppercase;
  margin-left: 1.2rem;
}
.menu-arrow {
  font-size: 1rem; opacity: 0.3;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-link:hover .menu-arrow { transform: translate(5px,-5px); opacity: 1; }

/* ─── FOOTER ─── */
footer {
  padding: 2.5rem 10vw;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.8rem;
}
.ft-logo img { height: 20px; width: auto; mix-blend-mode: screen; }
.ft-meta {
  font-size: 0.6rem; letter-spacing: 0.2em;
  color: var(--steel); text-transform: uppercase;
}

/* ─── ANIMACIONES ─── */
@keyframes up {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  nav { padding: 18px 24px; }
  .chapter { padding: 10vh 6vw; }
  .chapter:nth-child(even) { justify-content: flex-start; }
  .chapter::before, .chapter:nth-child(even)::before { display: none; }
  .final { padding: 10vh 6vw; }
  footer { padding: 2rem 6vw; }
  #cur-dot, #cur-ring { display: none; }
  body { cursor: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── HERO TITLE PNG ─── */
.hero-title-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
  cursor: none;
}
.hero-title-img {
  width: clamp(260px, 52vw, 660px);
  height: auto;
  mix-blend-mode: screen;
  opacity: 0;
  transform-style: preserve-3d;
  transform: translateY(28px);
  animation: up 1.1s 0.7s forwards;
  transition: transform 0.18s ease, filter 0.18s ease;
  position: relative; z-index: 1;
}
.hero-title-glow {
  position: absolute;
  width: 300px; height: 100px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.35) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, left 0.1s, top 0.1s;
  z-index: 0;
}
