* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: #000;
  scroll-behavior: smooth;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

body.intro-active {
  overflow: hidden;
  background: #F1F3F6;
}

img {
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

/* INTRO / LANGUAGE OVERLAY */

.intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: #F1F3F6;
  opacity: 1;
  visibility: visible;
  transition: opacity 900ms ease, visibility 0s linear 900ms;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.layer,
.layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.layer img {
  object-fit: cover;
}

.intro-bg {
  z-index: 1;
}

.intro-symbol {
  z-index: 2;
  opacity: 0.98;
  transform-origin: 50% 50%;
  animation: symbolBreath 9s ease-in-out infinite;
}

.intro-language {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.divider-glow {
  z-index: 1;
  opacity: 0;
  transform-origin: 50% 50%;
  animation: dividerGlow 8s ease-in-out infinite;
  pointer-events: none;
}

.language-state {
  z-index: 2;
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.language-normal {
  opacity: 1;
}

.intro-language.is-english .language-normal,
.intro-language.is-espanol .language-normal {
  opacity: 0;
}

.intro-language.is-english .language-english-on,
.intro-language.is-espanol .language-espanol-on {
  opacity: 1;
}

.language-hit-area {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 8.5vh;
  width: min(560px, 58vw);
  height: 130px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.language-choice {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes symbolBreath {
  0%, 100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.018);
    opacity: 1;
  }
}

@keyframes dividerGlow {
  0%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  34% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  66% {
    opacity: 1;
    transform: scale(1);
  }
  86% {
    opacity: 0;
    transform: scale(1);
  }
}

/* SITE */

.site {
  position: relative;
  width: 100%;
  opacity: 0;
  transform: scale(0.996);
  transition: opacity 850ms ease, transform 1050ms ease;
}

body.has-language .site {
  opacity: 1;
  transform: scale(1);
}

.section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
  line-height: 0;
  isolation: isolate;
}

.section-bg,
.section-bg img {
  position: relative;
  width: 100%;
  height: auto;
}

.section-bg {
  z-index: 1;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity 1100ms ease, transform 1500ms ease;
}

.section-bg img {
  object-fit: contain;
}

.section-content,
.section-content img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.section-content {
  z-index: 2;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 900ms ease 130ms, transform 1200ms ease 130ms;
  pointer-events: none;
}

.section-content img {
  object-fit: fill;
}

html[data-lang="en"] .section-content-en,
html[data-lang="es"] .section-content-es {
  opacity: 1;
}

html[data-lang="en"] .section-content-es,
html[data-lang="es"] .section-content-en,
html[data-lang=""] .section-content-en,
html[data-lang=""] .section-content-es {
  opacity: 0;
}

.section.in-view .section-bg {
  opacity: 1;
  transform: scale(1);
}

.section.in-view .section-content {
  transform: scale(1);
}

.section.anim-fade .section-content {
  transform: none;
  transition-duration: 950ms;
}

.section.anim-parallax .section-bg {
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.035);
  transition: opacity 1100ms ease;
  will-change: transform;
}

.section.anim-parallax.in-view .section-bg {
  opacity: 1;
}

.section.anim-parallax .section-content {
  transform: scale(0.988);
}

.section.anim-parallax.in-view .section-content {
  transform: scale(1);
}

.cta-section.in-view .section-content {
  animation: ctaBreath 7s ease-in-out 1.2s infinite;
}

@keyframes ctaBreath {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.006);
  }
}

/* LANGUAGE TOGGLE AFTER ENTRY */

.language-toggle {
  position: fixed;
  top: 31px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255,255,255,0.74);
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 350ms ease, transform 350ms ease;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
}

body.has-language.menu-visible .language-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.language-toggle button {
  color: currentColor;
  opacity: 0.58;
  transition: opacity 180ms ease;
}

.language-toggle button:hover,
html[data-lang="en"] .language-toggle [data-lang-choice="en"],
html[data-lang="es"] .language-toggle [data-lang-choice="es"] {
  opacity: 1;
}

@media (max-width: 1024px) {
  .language-hit-area {
    bottom: 8vh;
    width: min(560px, 72vw);
    height: 128px;
    gap: 32px;
  }

  .language-toggle {
    top: 25px;
    right: 18px;
  }
}

@media (max-width: 640px) {
  .language-hit-area {
    bottom: 13vh;
    width: min(360px, 86vw);
    height: 110px;
    gap: 20px;
  }

  .language-toggle {
    top: 23px;
    right: 14px;
    font-size: 11px;
    padding: 7px 10px;
  }
}

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

  .section.anim-parallax .section-bg {
    transform: none !important;
  }
}

/* --- FIXES: menu, hotspots and section-triggered animations --- */

/* Keep intro hit areas aligned with the original Illustrator composition */
.language-hit-area {
  position: absolute;
  z-index: 20;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  display: block;
  gap: 0;
}

.language-choice {
  position: absolute;
  display: block;
  height: 9vh;
  min-height: 54px;
  max-height: 86px;
  top: 70%;
  opacity: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.language-choice-en {
  left: 38.5%;
  width: 10.5%;
}

.language-choice-es {
  left: 51%;
  width: 11.5%;
}

/* Top menu appears after leaving the Hero */
.top-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 100%;
  height: 90px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity 420ms ease, transform 520ms ease, visibility 0s linear 520ms;
}

body.has-language.menu-visible .top-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 520ms ease, visibility 0s linear 0s;
}

.top-menu-art,
.top-menu-art img {
  display: block;
  width: 100%;
  height: 100%;
}

.top-menu-art img {
  object-fit: cover;
  object-position: center top;
}

/* Language toggle appears only with the menu and stays above it.
   Top values align the selector vertically with the menu logo center. */
.language-toggle {
  z-index: 120;
}

/* Section animation must wait until each section enters viewport */
.section-content {
  opacity: 0 !important;
}

.section.in-view .section-content {
  opacity: 0 !important;
}

html[data-lang="en"] .section.in-view .section-content-en,
html[data-lang="es"] .section.in-view .section-content-es {
  opacity: 1 !important;
}

html[data-lang="en"] .section.in-view .section-content-es,
html[data-lang="es"] .section.in-view .section-content-en {
  opacity: 0 !important;
}

/* Prevent previous in-view state from showing immediately when language changes */
body:not(.has-language) .section-bg,
body:not(.has-language) .section-content {
  opacity: 0 !important;
}

/* Clickable areas */
.hotspot {
  position: absolute;
  z-index: 70;
  display: block;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.hotspot:focus-visible,
.language-choice:focus-visible {
  outline: 1px solid rgba(255,255,255,0.5);
  outline-offset: 8px;
  border-radius: 999px;
  opacity: 1;
}

.contact-hotspot {
  left: 24.9%;
  bottom: 49%;
  transform: translateX(-50%);
  width: 172px;
  height: 58px;
}

.fausxy-hotspot {
  left: 34%;
  bottom: 14.5%;
  transform: translateX(-50%);
  width: 83px;
  height: 83px;
}

.adrian-hotspot {
  left: 47.5%;
  top: 43%;
  width: 310px;
  height: 30px;
}

@media (max-width: 1024px) {
  .top-menu {
    height: 75px;
  }

  .language-choice {
    top: 76.5%;
    height: 7vh;
    min-height: 50px;
  }

  .divider-glow {
    transform-origin: 50% 76.5%;
  }

  .language-choice-en {
    left: 36.5%;
    width: 12.5%;
  }

  .language-choice-es {
    left: 51%;
    width: 13%;
  }
}

@media (max-width: 640px) {
  .top-menu {
    height: 72px;
  }

  .language-choice {
    top: 75%;
    height: 7vh;
    min-height: 44px;
  }

  .divider-glow {
    transform-origin: 50% 75%;
  }

  .language-choice-en {
    left: 35%;
    width: 14%;
  }

  .language-choice-es {
    left: 51%;
    width: 15%;
  }

  .contact-hotspot {
    left: 33.5%;
    bottom: 57.7%;
    transform: translateX(-50%);
    width: 172px;
    height: 58px;
  }

  .fausxy-hotspot {
    left: 50%;
    bottom: 25.5%;
    transform: translateX(-50%);
    width: 83px;
    height: 83px;
  }

  .adrian-hotspot {
    left: 23%;
    top: 38%;
    transform: translateX(-50%);
    width: 324px;
    height: 30px;
  }
}


/* --- GLIAGLOW 3.0 MOTION UPDATE: HERO LAYERS + CROSS REVEAL --- */

/* Shared media layer geometry */
.section-logo,
.section-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.section-logo {
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 50%;
}

.section-logo img {
  object-fit: fill;
}

/* Default animation for sections 02–09:
   WEBP enters from bottom to top; SVG content enters from top to bottom. */
body.has-language .section:not(.section-01):not(.section-10) .section-bg {
  opacity: 0;
  transform: translate3d(0, 78px, 0);
  transition: opacity 1700ms ease, transform 2100ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

body.has-language .section:not(.section-01):not(.section-10) .section-content {
  opacity: 0 !important;
  transform: translate3d(0, -78px, 0);
  transition: opacity 1650ms ease 260ms, transform 2150ms cubic-bezier(0.16, 1, 0.3, 1) 260ms;
  will-change: opacity, transform;
}

body.has-language .section:not(.section-01):not(.section-10).in-view .section-bg {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

html[data-lang="en"] body.has-language .section:not(.section-01):not(.section-10).in-view .section-content-en,
html[data-lang="es"] body.has-language .section:not(.section-01):not(.section-10).in-view .section-content-es {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0);
}

html[data-lang="en"] body.has-language .section:not(.section-01):not(.section-10) .section-content-es,
html[data-lang="es"] body.has-language .section:not(.section-01):not(.section-10) .section-content-en {
  opacity: 0 !important;
}

/* Hero:
   Background fades in without movement.
   Logo fades while scaling down from slightly larger.
   Language content fades while scaling up from slightly smaller. */
body.has-language .section-01 .section-bg {
  opacity: 0;
  transform: none !important;
  transition: opacity 1650ms ease;
  will-change: opacity;
}

body.has-language .section-01 .section-logo {
  opacity: 0;
  transform: scale(1.14);
  transition: opacity 1500ms ease 360ms, transform 2200ms cubic-bezier(0.16, 1, 0.3, 1) 360ms;
  will-change: opacity, transform;
}

body.has-language .section-01 .section-content {
  opacity: 0 !important;
  transform: scale(0.92);
  transition: opacity 1500ms ease 620ms, transform 2200ms cubic-bezier(0.16, 1, 0.3, 1) 620ms;
  will-change: opacity, transform;
}

body.has-language .section-01.in-view .section-bg {
  opacity: 1;
}

body.has-language .section-01.in-view .section-logo {
  opacity: 1;
  transform: scale(1);
}

html[data-lang="en"] body.has-language .section-01.in-view .section-content-en,
html[data-lang="es"] body.has-language .section-01.in-view .section-content-es {
  opacity: 1 !important;
  transform: scale(1);
}

html[data-lang="en"] body.has-language .section-01 .section-content-es,
html[data-lang="es"] body.has-language .section-01 .section-content-en {
  opacity: 0 !important;
}

/* Footer:
   No reveal animation. It remains calm and static once language is selected. */
body.has-language .section-10 .section-bg {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

body.has-language .section-10 .section-content {
  transform: none !important;
  transition: none !important;
}

html[data-lang="en"] body.has-language .section-10 .section-content-en,
html[data-lang="es"] body.has-language .section-10 .section-content-es {
  opacity: 1 !important;
}

html[data-lang="en"] body.has-language .section-10 .section-content-es,
html[data-lang="es"] body.has-language .section-10 .section-content-en {
  opacity: 0 !important;
}

/* Prevent the previous CTA breathing from fighting the new motion system. */
.cta-section.in-view .section-content {
  animation: none !important;
}

/* Reduced motion keeps everything visible without movement. */
@media (prefers-reduced-motion: reduce) {
  body.has-language .section-bg,
  body.has-language .section-content,
  body.has-language .section-logo {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  html[data-lang="en"] body.has-language .section-content-es,
  html[data-lang="es"] body.has-language .section-content-en {
    opacity: 0 !important;
  }
}
