/* ── Variables ── */
:root {
  --gold: #d4af37;
  --gold-light: #f0d060;
  --copper: #977a5a;
  --dark: #0a0806;
  --dark2: #120f0a;
  --cream: #f9e3ba;
  --white: #EEEDEB;
  --text-muted: rgba(238, 237, 235, 0.6);
}

/* ── Reset ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ── Body ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 900;
  opacity: 0.4;
}

/* ── HEADER ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 0 5%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 8, 6, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.logo {
  width: 180px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.3));
}

nav ul {
  list-style: none;
  display: flex;
  gap: 6px;
  align-items: center;
}

nav ul li a {
  color: rgba(238, 237, 235, 0.75);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

nav ul li a:hover {
  color: var(--gold);
}

/* ── HERO ── */
/* ↓↓ MODIFICADO: justify-content flex-start, la band ahora va ANTES del hero ↓↓ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: 60px 5% 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("../img/palma.jpg") center/cover no-repeat;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 8, 6, 0.55) 0%, rgba(10, 8, 6, 0.15) 40%, rgba(10, 8, 6, 0.7) 80%, var(--dark) 100%),
    radial-gradient(ellipse at 20% 50%, rgba(212, 175, 55, 0.06) 0%, transparent 60%);
}

/* ↓↓ MODIFICADO: hero-inner ahora es flex column con el label al tope ↓↓ */
.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  animation: fadeUp 1s 0.1s both;
  order: 0;
  /* garantiza que sea el primer elemento */
}

.hero-label span {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 14vw, 12rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-shadow: 0 0 120px rgba(212, 175, 55, 0.12);
  animation: fadeUp 1s 0.2s both;
  margin-bottom: 20px;
  order: 1;
}

.hero-title em {
  display: block;
  font-style: normal;
  -webkit-text-stroke: 1px rgba(212, 175, 55, 0.5);
  color: transparent;
  font-size: 0.65em;
}

.hero-sub {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(249, 227, 186, 0.75);
  letter-spacing: 0.04em;
  animation: fadeUp 1s 0.4s both;
  max-width: 540px;
  margin: 0 auto 48px;
  order: 2;
}

.hero-scroll {
  animation: fadeUp 1s 0.6s both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  order: 3;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scaleY(1);
  }

  50% {
    opacity: 1;
    transform: scaleY(1.1);
  }
}

/* ── DECORATIVE BAND ── */
.band {
  position: relative;
  z-index: 5;
  background: var(--gold);
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
  margin-top: 72px;
  /* altura exacta del header fijo */
}

.band-track {
  display: inline-flex;
  gap: 48px;
  animation: marquee 22s linear infinite;
}

.band-track span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--dark);
}

.band-dot {
  width: 5px;
  height: 5px;
  background: var(--dark);
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ── SECCIÓN HISTORIA ── */
.historia-wrapper {
  position: relative;
  z-index: 5;
  background: linear-gradient(to bottom, var(--dark), var(--dark2));
}

.historia {
  padding: 100px 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.historia-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.historia-left.visible {
  opacity: 1;
  transform: none;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.section-tag::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.historia-left h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 32px;
}

.historia-left h2 span {
  display: block;
  color: var(--gold);
  font-style: italic;
}

.historia-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.9s 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.historia-right.visible {
  opacity: 1;
  transform: none;
}

.historia-right .lead {
  font-size: 1rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.8;
  margin-bottom: 20px;
  padding-left: 20px;
  border-left: 2px solid var(--gold);
}

.historia-right p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.85;
}

.historia-year {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.year-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: rgba(212, 175, 55, 0.15);
  line-height: 1;
}

.year-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  letter-spacing: 0.05em;
}

/* ── GENERALIDADES ── */
.generalidades {
  position: relative;
  z-index: 5;
  padding: 40px 5% 120px;
  max-width: 1200px;
  margin: 0 auto;
}

.gen-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 60px;
  gap: 20px;
}

.gen-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--cream);
}

.gen-title span {
  color: var(--gold);
}

.gen-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.4), transparent);
  margin-bottom: 12px;
}

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(18, 15, 10, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.1);
  cursor: default;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s,
    box-shadow 0.4s;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.05);
}

.card-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s ease;
  filter: brightness(0.85) saturate(0.9);
}

.card:hover .card-img img {
  transform: scale(1.08);
  filter: brightness(0.9) saturate(1);
}

.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(18, 15, 10, 0.9) 100%);
}

.card-num {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: rgba(212, 175, 55, 0.2);
  line-height: 1;
  z-index: 2;
}

.card-content {
  padding: 24px 28px 28px;
}

.card-label {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 3px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

.card-content h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 10px;
}

.card-content p {
  font-size: 0.855rem;
  color: var(--text-muted);
  line-height: 1.72;
}

.card-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover .card-accent {
  transform: scaleX(1);
}

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 5;
  background: linear-gradient(to bottom,
      rgba(10, 8, 6, 0.0) 0%,
      rgba(10, 8, 6, 0.82) 18%,
      #0a0806 55%,
      #0a0806 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  padding: 52px 8% 26px;
  box-shadow: 0 -1px 40px rgba(212, 175, 55, 0.04);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(238, 237, 235, 0.50);
  line-height: 1.7;
}

.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-col p,
.footer-col a {
  display: block;
  color: rgba(238, 237, 235, 0.50);
  font-size: 0.85rem;
  line-height: 2;
  text-decoration: none;
  transition: color 0.3s, padding-left 0.3s;
}

.footer-col a:hover {
  color: var(--gold);
  padding-left: 5px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(212, 175, 55, 0.08);
}

.footer-bottom p {
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  color: rgba(238, 237, 235, 0.22);
}

.footer-divider {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-divider span {
  width: 4px;
  height: 4px;
  background: rgba(212, 175, 55, 0.3);
  border-radius: 50%;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .historia {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 5%;
  }
  .historia-left h2 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
  }
  .historia-right .lead {
    font-size: 0.9rem;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .card-content {
    padding: 20px 22px 24px;
  }
  .card-content h4 {
    font-size: 1.15rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .gen-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .generalidades {
    padding: 20px 5% 80px;
  }

  header {
    padding: 0 4%;
    height: 64px;
  }
  header .logo {
    width: 110px;
    height: 44px;
  }

  .hero {
    padding-top: 40px;
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: clamp(4rem, 18vw, 7rem);
  }
  .hero {
    padding-top: 30px;
    padding-bottom: 40px;
  }
  .hero-label {
    font-size: 0.6rem;
    margin-bottom: 18px;
  }
  .hero-sub {
    font-size: 0.9rem;
    margin-bottom: 32px;
  }
  .historia {
    padding: 40px 5%;
    gap: 28px;
  }
  .historia-year {
    margin-top: 24px;
  }
  .year-num {
    font-size: 3rem;
  }
  .card-img {
    height: 180px;
  }
  .card {
    transform: none;
  }
  .card-num {
    font-size: 2rem;
  }
  .band {
    margin-top: 64px;
    padding: 10px 0;
  }
  .band-track {
    gap: 32px;
  }
  .band-track span {
    font-size: 0.72rem;
  }
  .gen-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }
  footer {
    padding: 36px 5% 20px;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: clamp(3rem, 20vw, 4rem);
  }
  .historia-left h2 {
    font-size: 1.5rem;
  }
}