/* =========================================
   ANIMATIONS — Loader, Hero Slider, Scroll
   Reveals, Before/After, Popup, Cursor, 
   Progress Bar, Wave
   ========================================= */

/* ══════════════════════════════════════════
   LOADING SCREEN
   ══════════════════════════════════════════ */

.loader {
  position: fixed;
  inset: 0;
  background: var(--color-graphite);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  z-index: 99999;
  transition: opacity 0.6s var(--ease-out),
              visibility 0.6s var(--ease-out);
}

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

.loader__icon {
  width: 50px;
  height: 65px;
  color: var(--color-gold);
  animation: loaderPulse 1.8s ease-in-out infinite;
}

.loader__text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-white);
  opacity: 0.7;
}

.loader__bar {
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: var(--space-xs);
}

.loader__bar-fill {
  width: 0%;
  height: 100%;
  background: var(--color-gold);
  animation: loaderFill 1.5s var(--ease-out) forwards;
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.08); opacity: 1; }
}

@keyframes loaderFill {
  0%   { width: 0%; }
  100% { width: 100%; }
}

/* ══════════════════════════════════════════
   SCROLL PROGRESS
   ══════════════════════════════════════════ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  z-index: 99998;
  transition: width 0.1s linear;
}

/* ══════════════════════════════════════════
   HERO SLIDER
   ══════════════════════════════════════════ */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 500px;
  overflow: hidden;
  background: var(--color-graphite);
}

@media (min-width: 768px) {
  .hero {
    min-height: 600px;
  }
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 1.8s var(--ease-in-out);
  overflow: hidden;
  width: 100%;
}

.hero__slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

/* Ken Burns - slower, more cinematic */
.hero__slide.is-active .hero__bg {
  animation: kenBurns 8s linear forwards;
}

@keyframes kenBurns {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26,26,26,0.88) 0%,
    rgba(26,26,26,0.5) 50%,
    rgba(26,26,26,0.3) 100%
  );
}

/* Slide Content */
.hero__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  width: 100%;
  max-width: 750px;
  padding: 0 var(--gutter);
  margin: 0 auto 0 max(var(--gutter), calc((100% - var(--container-max)) / 2 + var(--gutter)));
}

@media (max-width: 768px) {
  .hero__content {
    margin: 0;
    padding: 0 var(--gutter);
    max-width: 100%;
    width: 100%;
    justify-content: flex-end;
    padding-bottom: 140px;
    overflow: hidden;
  }
}

.hero__content h1 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out) 0.3s,
              transform 0.8s var(--ease-out) 0.3s;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero__content p {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  max-width: 550px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out) 0.5s,
              transform 0.8s var(--ease-out) 0.5s;
}

@media (min-width: 768px) {
  .hero__content p {
    font-size: 1.15rem;
  }
}

.hero__buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out) 0.7s,
              transform 0.8s var(--ease-out) 0.7s;
}

.hero__slide.is-active .hero__content h1,
.hero__slide.is-active .hero__content p,
.hero__slide.is-active .hero__buttons {
  opacity: 1;
  transform: translateY(0);
}

/* Slide Indicators */
.hero__indicators {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

@media (min-width: 768px) {
  .hero__indicators {
    bottom: 100px;
  }
}

@media (max-width: 480px) {
  .hero__indicators {
    bottom: 110px;
  }
}

.hero__dot {
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  border: none;
  padding: 0;
}

.hero__dot.is-active {
  background: var(--color-gold);
  width: 60px;
}

/* Scroll Indicator */
.hero__scroll {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
}

@media (min-width: 768px) {
  .hero__scroll {
    display: flex;
    bottom: 35px;
  }
}

.hero__scroll-text {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero__scroll-mouse {
  width: 22px;
  height: 34px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 11px;
  position: relative;
}

.hero__scroll-wheel {
  width: 3px;
  height: 7px;
  background: var(--color-gold);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0%   { top: 6px; opacity: 1; }
  100% { top: 18px; opacity: 0; }
}

/* Wave Divider */
.wave-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 10;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 50px;
}

@media (min-width: 768px) {
  .wave-divider svg {
    height: 70px;
  }
}

/* ══════════════════════════════════════════
   GSAP REVEAL CLASSES
   ══════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(50px);
}

.reveal--left {
  opacity: 0;
  transform: translateX(-50px);
}

.reveal--right {
  opacity: 0;
  transform: translateX(50px);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.95);
}

/* ══════════════════════════════════════════
   BEFORE & AFTER SLIDER
   ══════════════════════════════════════════ */

.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: col-resize;
  user-select: none;
}

@media (min-width: 768px) {
  .ba-slider {
    min-height: 350px;
    border-radius: var(--radius-lg);
  }
}

.ba-slider__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.ba-slider__image--before {
  z-index: 1;
  filter: grayscale(70%) brightness(0.7);
}

.ba-slider__image--after {
  z-index: 2;
  width: 50%;
  overflow: hidden;
}

.ba-slider__divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: var(--color-gold);
  z-index: 3;
  transform: translateX(-50%);
}

.ba-slider__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: var(--color-gold);
  border-radius: var(--radius-full);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.1rem;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.ba-slider__label {
  position: absolute;
  bottom: var(--space-md);
  z-index: 5;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-white);
  background: rgba(0,0,0,0.5);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.ba-slider__label--before {
  right: var(--space-md);
}

.ba-slider__label--after {
  left: var(--space-md);
}

/* ══════════════════════════════════════════
   POPUP / MODAL
   ══════════════════════════════════════════ */

.popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) var(--ease-out),
              visibility var(--duration-base) var(--ease-out);
}

.popup.is-active {
  opacity: 1;
  visibility: visible;
}

.popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.popup__container {
  position: relative;
  background: var(--color-white);
  width: 100%;
  max-width: 700px;
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  max-height: 92vh;
  max-height: 92svh;
  overflow-y: auto;
  transform: translateY(30px) scale(0.97);
  transition: transform var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-xl);
}

@media (min-width: 600px) {
  .popup__container {
    padding: var(--space-xl) var(--space-lg);
  }
}

.popup.is-active .popup__container {
  transform: translateY(0) scale(1);
}

.popup__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-charcoal);
  font-size: 1.3rem;
  transition: all var(--duration-fast) var(--ease-out);
  background: none;
}

.popup__close:hover {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

.popup__header {
  margin-bottom: var(--space-lg);
}

.popup__header h2 {
  margin-bottom: var(--space-xs);
}

.popup__header p {
  margin-bottom: 0;
}

/* Success overlay inside popup */
.popup__success {
  display: none;
  text-align: center;
  padding: var(--space-xl) 0;
}

.popup__success.is-visible {
  display: block;
}

.popup__success-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--space-md);
}

/* ══════════════════════════════════════════
   CUSTOM CURSOR (Desktop only)
   ══════════════════════════════════════════ */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition: width var(--duration-fast) var(--ease-out),
              height var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
  mix-blend-mode: difference;
  opacity: 0;
}

.cursor.is-visible {
  opacity: 1;
}

.cursor.is-hovering {
  width: 44px;
  height: 44px;
  background: rgba(197,168,128,0.15);
  border-color: var(--color-gold-light);
}

@media (hover: none), (max-width: 1024px) {
  .cursor { display: none !important; }
}

/* ══════════════════════════════════════════
   EMERGENCY BANNER
   ══════════════════════════════════════════ */

.emergency-banner {
  position: relative;
  overflow: hidden;
}

.emergency-banner__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.3);
}

.emergency-banner__content {
  position: relative;
  z-index: 2;
}

/* ══════════════════════════════════════════
   MAP SECTION
   ══════════════════════════════════════════ */

.map-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 280px;
  border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .map-wrapper {
    height: 400px;
    border-radius: var(--radius-lg);
  }
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ══════════════════════════════════════════
   CONTACT INFO LIST
   ══════════════════════════════════════════ */

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-info__item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.contact-info__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
}

.contact-info__icon svg {
  width: 20px;
  height: 20px;
}

.contact-info__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-info__value {
  font-size: 1rem;
  color: var(--color-graphite);
  font-weight: 500;
  margin: 0;
}

.contact-info__value a {
  color: var(--color-graphite);
}

.contact-info__value a:hover {
  color: var(--color-gold);
}
