/* ===================================================
   MAGO URDAIZ — Premium Design System
   =================================================== */

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

:root {
  --bg: #0f1114;
  --bg-surface: #181b20;
  --white: #ffffff;
  --blue: #4866ff;
  --cyan: #6fe5f3;
  --purple: #a258ff;
  --gold: #d4a44a;
  --gradient-main: linear-gradient(135deg, #4968ff, #6fe5f3);
  --gradient-purple: linear-gradient(180deg, #a258ff, #308cff);
  --gradient-card: linear-gradient(135deg, rgba(72,102,255,0.15), rgba(111,229,243,0.08));
  --gradient-text: linear-gradient(135deg, #6fe5f3, #a258ff, #4968ff);
  --font-heading: 'Trispace', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --max-width: 1200px;
  --header-h: 72px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 50px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ===== SKIP-TO-CONTENT (a11y) ===== */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--blue);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: top 0.2s;
}

.skip-to-content:focus {
  top: 16px;
}

/* ===== FOCUS STATES (a11y) ===== */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 17, 20, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.4s, box-shadow 0.4s, border-color 0.4s;
}

.site-header.scrolled {
  background: rgba(15, 17, 20, 0.92);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
  border-bottom-color: rgba(255,255,255,0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.75);
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width 0.3s;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(15, 17, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  flex-direction: column;
  gap: 20px;
  z-index: 99;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.8);
  padding: 8px 0;
  transition: color 0.3s;
}

.mobile-menu a:hover {
  color: var(--cyan);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(72,102,255,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(162,88,255,0.1) 0%, transparent 50%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(15,17,20,0.9) 100%),
    url('assets/img/hero-bg.jpg') center/cover no-repeat;
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + 20px);
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  font-variant: small-caps;
  letter-spacing: 0.08em;
  line-height: 1.05;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-divider {
  width: 100px;
  height: 3px;
  background: var(--gradient-main);
  margin: 24px 0;
  border-radius: 3px;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-weight: 600;
  font-variant: small-caps;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: 3px;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
}

.hero-tagline {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  display: inline-block;
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 300;
  color: rgba(255,255,255,0.85);
}

/* Hero entrance animation */
.hero [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
}

.hero [data-reveal].revealed {
  animation: heroEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroEntrance {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: var(--gradient-main);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.95rem;
  padding: 18px 48px;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-top: 36px;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(72,102,255,0.45), 0 0 60px rgba(72,102,255,0.15);
}

.btn-secondary {
  display: inline-block;
  background: var(--gradient-main);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  padding: 16px 40px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-secondary:hover::before {
  left: 100%;
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(72,102,255,0.4);
}

/* ===== WAVE SEPARATORS ===== */
.wave-separator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 3;
}

.wave-separator svg {
  display: block;
  width: 100%;
  height: clamp(60px, 8vw, 120px);
}

.wave-separator path {
  fill: var(--bg);
}

.wave-flip {
  transform: scaleX(-1);
}

.wave-top {
  top: 0;
  bottom: auto;
}

.wave-top path {
  fill: var(--bg);
}

/* ===== REVEAL ANIMATIONS ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ABOUT SECTION ===== */
.about {
  position: relative;
  padding: clamp(60px, 8vw, 100px) 0;
  padding-bottom: clamp(100px, 12vw, 160px);
}

.section-label {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--cyan);
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 12px;
  opacity: 0.7;
}

.about-intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 60px;
}

.about-intro h2 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  line-height: 1.5;
  margin-bottom: 24px;
}

.about-intro p {
  font-weight: 300;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.9;
  color: rgba(255,255,255,0.8);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: clamp(60px, 8vw, 100px);
}

.about-story h2 {
  font-family: var(--font-body);
  font-weight: 500;
  font-variant: small-caps;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  line-height: 1.4;
  margin-bottom: 16px;
}

.about-story-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-main);
  margin-bottom: 24px;
  border-radius: 3px;
}

.about-story p {
  font-weight: 300;
  font-size: clamp(0.95rem, 1.5vw, 1.02rem);
  line-height: 1.9;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.82);
}

.about-story p strong {
  font-weight: 500;
  color: var(--white);
}

.about-image img {
  border-radius: var(--radius-lg) var(--radius-sm) var(--radius-lg) var(--radius-sm);
  box-shadow: 0 25px 60px -15px rgba(0,0,0,0.5);
  margin: -40px 0 40px -40px;
}

/* ===== VIDEO / SHOW SECTION ===== */
.show-section {
  padding: clamp(40px, 6vw, 70px) 0;
}

.show-video {
  max-width: 80%;
  margin: 0 auto;
  padding-bottom: 20px;
}

.show-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5);
}

/* Glassmorphism CTA card */
.show-cta {
  background: linear-gradient(135deg, rgba(162,88,255,0.25), rgba(48,140,255,0.2));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  max-width: 80%;
  margin: 24px auto 0;
  position: relative;
  z-index: 2;
  padding: clamp(32px, 5vw, 60px) clamp(24px, 5vw, 70px);
}

.show-cta h2 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  margin-bottom: 20px;
  line-height: 1.4;
}

.show-cta p {
  font-weight: 300;
  font-size: clamp(0.92rem, 1.5vw, 1rem);
  line-height: 1.9;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.88);
}

.show-cta .cta-accent {
  font-size: 1.05rem;
  color: var(--cyan);
  font-weight: 400;
}

/* ===== GALLERY SECTION ===== */
.gallery-section {
  padding: clamp(60px, 8vw, 100px) 0;
}

.gallery-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 48px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  aspect-ratio: 1 / 1;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item--wide img {
  aspect-ratio: 2 / 1;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .gallery-item--wide {
    grid-column: span 2;
  }

  .gallery-item--wide img {
    aspect-ratio: 16 / 9;
  }
}

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

  .gallery-item--wide {
    grid-column: span 1;
  }

  .gallery-item img,
  .gallery-item--wide img {
    aspect-ratio: 4 / 3;
  }
}

/* ===== YOUTUBE SECTION ===== */
.youtube-section {
  padding: clamp(40px, 6vw, 70px) 0;
  text-align: center;
}

.subscribe-btn {
  display: inline-block;
  background-color: #cc0000;
  color: white;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 36px;
  letter-spacing: 0.5px;
}

.subscribe-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(204,0,0,0.4);
}

/* YouTube facade pattern */
.youtube-facade {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.4);
}

.youtube-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s, filter 0.4s;
}

.youtube-facade:hover img {
  transform: scale(1.03);
  filter: brightness(0.7);
}

.youtube-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s, opacity 0.3s;
  opacity: 0.9;
  padding: 0;
}

.youtube-facade:hover .youtube-play {
  transform: translate(-50%, -50%) scale(1.12);
  opacity: 1;
}

.youtube-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== CREDENTIALS ===== */
.credentials {
  background: linear-gradient(135deg, #a258ff, #308cff);
  padding: clamp(100px, 12vw, 140px) 0 clamp(60px, 8vw, 90px);
  position: relative;
}

.credentials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
}

.credentials-text h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.6;
  margin-bottom: 16px;
}

.credentials-text p {
  font-weight: 300;
  font-size: clamp(0.92rem, 1.5vw, 1rem);
  line-height: 1.9;
  margin-bottom: 16px;
}

.credentials-text .venue {
  font-weight: 300;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  opacity: 0.85;
}

.credentials-image img {
  border-radius: var(--radius-sm) var(--radius-lg) var(--radius-sm) var(--radius-lg);
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.3);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-surface);
  padding: 50px 0 32px;
  text-align: center;
  position: relative;
}

.footer-top-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 28px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer-links a {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.6);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.footer-legal a {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  transition: color 0.3s;
}

.footer-legal a:hover {
  color: rgba(255,255,255,0.6);
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.2);
  margin-top: 24px;
}

/* ===== SCROLL-TO-TOP ===== */
.scroll-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--gradient-main);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s, transform 0.4s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(72,102,255,0.3);
}

.scroll-to-top[hidden] {
  display: flex;
  pointer-events: none;
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-to-top:hover {
  box-shadow: 0 6px 28px rgba(72,102,255,0.5);
  transform: translateY(-3px);
}

/* ===== LEGAL PAGES ===== */
.legal-page {
  padding: calc(var(--header-h) + 48px) 0 80px;
  min-height: 100vh;
}

.legal-page h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 32px;
}

.legal-page h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--cyan);
}

.legal-page p, .legal-page li {
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 24px;
  list-style: disc;
}

.legal-page a {
  color: var(--cyan);
  text-decoration: underline;
}

.legal-page a:hover {
  color: var(--white);
}

/* ===== PREFERS-REDUCED-MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero-particles {
    display: none;
  }
}

/* ===== RESPONSIVE — MOBILE FIRST ===== */

/* Small phones */
@media (max-width: 479px) {
  .hero h1 {
    font-size: 2.8rem;
    letter-spacing: 0.04em;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-tagline {
    font-size: 0.85rem;
    padding: 10px 16px;
  }

  .btn-primary {
    padding: 16px 36px;
    font-size: 0.9rem;
  }

  .about-grid { margin-top: 40px; }

  .show-cta {
    padding: 28px 20px;
  }

  .credentials-grid {
    gap: 24px;
  }

  .footer-links {
    gap: 16px;
  }

  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* Tablets and small desktops */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero h1 {
    font-size: clamp(2.8rem, 10vw, 3.8rem);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image img {
    margin: 0;
    border-radius: var(--radius-md);
  }

  .show-video,
  .show-cta {
    max-width: 100%;
  }

  .show-cta {
    margin-top: 16px;
    padding: 32px 24px;
  }

  .credentials-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .youtube-facade {
    max-width: 100%;
  }
}

/* Between tablets and larger screens */
@media (min-width: 768px) and (max-width: 1023px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .about-grid {
    gap: 40px;
  }

  .credentials-grid {
    padding: 0 clamp(24px, 4vw, 48px);
  }
}

/* Large screens */
@media (min-width: 1024px) {
  .hamburger { display: none; }
  .nav-links { display: flex; }
}
