/*
 * Eventos Tio — Main Stylesheet
 * Design system: dark stage theme
 */

/* ========== CSS VARIABLES ========== */
:root {
  /* Brand */
  --red: #C41E3A;
  --red-glow: rgba(196, 30, 58, 0.4);
  --red-light: #E8294A;
  --blue: #2B72BC;
  --blue-glow: rgba(43, 114, 188, 0.3);
  --blue-light: #3A8ADE;

  /* Backgrounds */
  --bg-deep: #050507;
  --bg-surface: #0A0A0E;
  --bg-elevated: #111118;
  --bg-card: #0E0E14;

  /* Text */
  --text-primary: #F0EEE8;
  --text-secondary: #7A7880;
  --text-dim: #4A4850;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Spacing */
  --section-gap: clamp(5rem, 12vw, 9rem);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* WhatsApp */
  --wa-green: #25D366;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Noise texture 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: 9999;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ========== UTILITIES ========== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-label::before {
  content: '';
  width: 2rem;
  height: 1px;
  background: var(--red);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background 0.4s var(--ease-smooth), padding 0.4s var(--ease-smooth);
}

.nav.scrolled {
  background: rgba(5, 5, 7, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo-mark {
  width: 42px;
  height: 42px;
  background: var(--red);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: white;
  letter-spacing: 0.05em;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.nav-logo-text span {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.65rem;
  display: block;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--red);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

/* Nav items with children — dropdown trigger */
.nav-links > li {
  position: relative;
}

.nav-links > li.menu-item-has-children > a {
  padding-right: 12px;
}

.nav-links > li.menu-item-has-children > a::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Hide mobile-only CTA on desktop */
.nav-links .menu-cta-mobile {
  display: none;
}

/* Dropdown submenu */
.nav-links .sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.25s var(--ease-smooth), visibility 0.25s, transform 0.25s var(--ease-smooth);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.nav-links .sub-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-links > li:hover > .sub-menu,
.nav-links > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-links .sub-menu li {
  border-bottom: 1px solid var(--border-subtle);
}

.nav-links .sub-menu li:last-child {
  border-bottom: none;
}

.nav-links .sub-menu a {
  display: block;
  padding: 0.65rem 1.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
}

.nav-links .sub-menu a::after { display: none; }

.nav-links .sub-menu a:hover {
  color: var(--text-primary);
  background: rgba(196, 30, 58, 0.08);
  padding-left: 1.5rem;
}

.nav-cta {
  background: var(--red);
  color: white;
  padding: 0.65rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}

.nav-cta:hover {
  background: var(--red-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--red-glow);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--red);
  color: white;
  padding: 1rem 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 2px;
  transition: all 0.4s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--red-light), var(--red));
  opacity: 0;
  transition: opacity 0.4s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--red-glow);
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary span,
.btn-primary svg { position: relative; z-index: 1; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s;
}

.btn-secondary:hover { color: var(--text-primary); }

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--wa-green);
  color: white;
  padding: 1.1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 2px;
  transition: all 0.4s var(--ease-smooth);
  letter-spacing: 0.02em;
}

.btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.3);
}

.btn-wa svg { width: 22px; height: 22px; }

/* ========== WHATSAPP FLOAT ========== */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wa-float-label {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 2px;
  border: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}

.wa-float:hover .wa-float-label {
  opacity: 1;
  transform: translateX(0);
}

.wa-float-btn {
  width: 56px;
  height: 56px;
  background: var(--wa-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
  position: relative;
}

.wa-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.4);
}

.wa-float-btn svg { width: 28px; height: 28px; fill: white; }

.wa-float-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--wa-green);
  animation: waPulse 2.5s ease-in-out infinite;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ========== FOOTER ========== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 300;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s;
}

.footer-social a:hover {
  border-color: var(--red);
  background: rgba(196, 30, 58, 0.1);
}

.footer-social svg { width: 16px; height: 16px; fill: var(--text-secondary); }

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

/* ========== SHARED KEYFRAMES ========== */
@keyframes slideUp {
  to { transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ========== RESPONSIVE — Global Elements ========== */
@media (max-width: 768px) {
  /* --- NAV MOBILE --- */
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; } /* Hide top CTA — WhatsApp is inside mobile menu */

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-deep);
    padding: 6rem 2rem 2rem;
    gap: 0;
    z-index: 998;
    animation: menuSlideIn 0.35s var(--ease-out-expo);
  }

  @keyframes menuSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .nav-links.open li {
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links.open a {
    display: block;
    padding: 1.15rem 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    color: var(--text-primary);
  }

  .nav-links.open a:hover,
  .nav-links.open a:focus {
    color: var(--red);
  }

  .nav-links.open a::after { display: none; }
  .nav-links.open a::before { display: none; } /* Hide dropdown arrow on mobile */

  /* Mobile submenus — inline, not dropdown */
  .nav-links.open .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 0.5rem 1.5rem;
  }

  .nav-links.open .sub-menu li {
    border-bottom: none;
  }

  .nav-links.open .sub-menu a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    padding: 0.5rem 0;
  }

  .nav-links.open .sub-menu a:hover {
    color: var(--red);
    background: transparent;
    padding-left: 0;
  }

  /* Overflow scroll for long menus */
  .nav-links.open {
    overflow-y: auto;
  }

  /* Show WhatsApp CTA inside mobile menu */
  .nav-links .menu-cta-mobile {
    display: block;
  }

  .nav-links.open .menu-cta-mobile {
    margin-top: 2rem;
    border-bottom: none;
  }

  /* Hamburger → X animation */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Keep toggle above fullscreen menu */
  .nav { z-index: 1001; }

  /* Smaller logo on mobile */
  .nav-logo-mark {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .nav-logo-text {
    font-size: 1.1rem;
  }

  .nav-logo-text span {
    font-size: 0.55rem;
  }

  /* --- FOOTER --- */
  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .wa-float-label { display: none; }

  .wa-float {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}
