/* =========================================================
   IRVING SORIA - OFFICIAL WEB EXPERIENCE
/* --- CSS Variables & Design Tokens --- */
:root {
  --color-sky-deep: #163659;
  --color-sky: #24527d;
  --color-sky-light: #5289ba;
  --color-chalk: #f4f6fa;
  --color-chalk-dim: rgba(244, 246, 250, 0.75);
  --color-chalk-faint: rgba(244, 246, 250, 0.35);
  --color-dark-surface: #0a1320;
  --color-card-bg: rgba(13, 24, 40, 0.85);
  --color-card-border: rgba(255, 255, 255, 0.15);
  --color-card-border-hover: rgba(255, 255, 255, 0.45);
  
  /* Platform Signature Colors */
  --color-spotify: #1DB954;
  --color-apple: #FA243C;
  --color-soundcloud: #FF5500;
  --color-tidal: #00FFFF;

  /* Typography */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Impact", "Arial Black", -apple-system, sans-serif;

  /* Animations */
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-sky-deep);
  color: var(--color-chalk);
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* --- Hero Section Container --- */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-sky-deep);
}

/* Responsive Background Picture */
.hero-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  opacity: 0;
  transition: opacity 0.6s var(--transition-smooth);
}

.hero-img.loaded {
  opacity: 1;
}

/* Subtle Film Grain / Vignette Overlay for Depth */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    transparent 50%,
    rgba(10, 20, 35, 0.25) 100%
  );
}

/* Animated Global Film Grain Overlay */
.grain-overlay {
  position: absolute;
  top: -150%;
  left: -150%;
  width: 400%;
  height: 400%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.0' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0, 1 0 0 0 0, 1 0 0 0 0, 0 0 0 15 -6' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.2'/%3E%3C/svg%3E");
  z-index: 3;
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: overlay;
  animation: grain-noise 0.5s steps(3) infinite;
}

/* --- Interactive "Escuchar" Button (Text Only) --- */
.listen-btn {
  position: absolute;
  z-index: 10;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.3s var(--transition-smooth);
}

/* Button Typography Image */
.listen-btn-text {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  /* Ensure it is white and add a drop shadow for visibility over the background */
  filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s var(--transition-smooth), filter 0.3s var(--transition-smooth);
}
/* Animated Soundwave Indicator */
.sound-indicator {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.sound-bar {
  width: 3px;
  background-color: var(--color-chalk);
  border-radius: 3px;
  animation: sound-bounce 1.4s ease-in-out infinite alternate;
}

.sound-bar:nth-child(1) { height: 8px; animation-delay: 0.1s; }
.sound-bar:nth-child(2) { height: 16px; animation-delay: 0.35s; }
.sound-bar:nth-child(3) { height: 11px; animation-delay: 0.2s; }
.sound-bar:nth-child(4) { height: 18px; animation-delay: 0.45s; }

/* Button Active State */
.listen-btn:active {
  transform: translate(-50%, -50%) scale(0.98);
}

/* --- Popout Modal Overlay --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(22, 54, 89, 0.4); /* Lighter blue overlay */
  backdrop-filter: blur(6px); /* Reduced blur so the rest of the page is visible */
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--transition-smooth), visibility 0.35s var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Content Card - Premium Glassmorphism */
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  border-left: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  padding: 36px 32px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  transition: 
    transform 0.4s var(--transition-smooth),
    opacity 0.4s var(--transition-smooth);
  overflow: hidden;
}

/* Subtle noise texture for depth */
.modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  z-index: -1; 
  pointer-events: none;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Close Button Fix */
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px; /* Larger clickable area */
  height: 44px;
  background: transparent;
  border: none;
  color: var(--color-chalk);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  font-size: 20px;
  transition: all 0.25s var(--transition-fast);
  z-index: 10;
}

.modal-close-btn::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.2s;
}

.modal-close-btn:hover::before {
  opacity: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

/* Modal Header */
.modal-header {
  text-align: center;
  margin-top: 16px; /* Space for close button */
  margin-bottom: 30px;
  padding: 0 20px; /* Prevent text from hitting edges */
  position: relative;
  z-index: 10;
}

.modal-subtitle {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
}

/* Platform Links List */
.platform-list {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 10;
}

/* Individual Platform Item */
.platform-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.platform-item img {
  width: 32px;
  height: 32px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.3s;
}

.platform-item:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.platform-item:hover img {
  transform: scale(1.1);
}



/* --- Keyframe Animations --- */
@keyframes pulse-aura {
  0%, 100% {
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.45),
      0 0 18px rgba(255, 255, 255, 0.15),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  }
  50% {
    box-shadow: 
      0 10px 38px rgba(0, 0, 0, 0.55),
      0 0 30px rgba(255, 255, 255, 0.35),
      0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  }
}

@keyframes sound-bounce {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.2); }
}

@keyframes grain-noise {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -4%); }
  20% { transform: translate(-6%, 2%); }
  30% { transform: translate(3%, -10%); }
  40% { transform: translate(-2%, 10%); }
  50% { transform: translate(-6%, 4%); }
  60% { transform: translate(6%, 0%); }
  70% { transform: translate(0%, 6%); }
  80% { transform: translate(1%, 14%); }
  90% { transform: translate(-4%, 4%); }
}

/* --- Responsive Media Queries --- */

/* Mobile Portrait Layout */
@media (max-width: 768px), (orientation: portrait) {
  .listen-btn {
    left: 50% !important;
    top: auto !important;
    bottom: 6vh !important;
    padding: 0;
  }

  .listen-btn-text {
    height: 32px;
  }

  .modal-card {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .modal-subtitle {
    font-size: 13px; /* Smaller font on mobile */
    letter-spacing: 1px;
  }

  .modal-header {
    margin-top: 10px;
    padding: 0 10px;
  }

  .platform-list {
    gap: 16px;
  }

  .platform-item {
    width: 56px;
    height: 56px;
  }

  .platform-item img {
    width: 28px;
    height: 28px;
  }
}

/* Ultra small mobile screens */
@media (max-width: 380px) {
  .listen-btn-text {
    height: 28px;
  }
  .listen-btn {
    bottom: 4vh !important;
    padding: 6px 16px;
  }
  .platform-list {
    gap: 12px;
  }
  .platform-item {
    width: 48px;
    height: 48px;
  }
  .platform-item img {
    width: 24px;
    height: 24px;
  }

  .modal-subtitle {
    font-size: 12px;
  }
}
