/* ==========================================================================
   VORTEX — Core Design System & Stylesheet (Integrated for Nudge)
   ========================================================================== */

:root {
  --vortex-color-bg: #000000;
  --vortex-color-fg: #ffffff;
  --vortex-color-accent: #d4af37; /* Luxury Gold */
  --vortex-color-text-muted: rgba(255, 255, 255, 0.4);
  --vortex-color-border: rgba(255, 255, 255, 0.1);
  --vortex-color-border-hover: rgba(255, 255, 255, 0.3);
  
  --vortex-font-display: 'Fredoka', sans-serif;
  --vortex-font-serif: 'Playfair Display', serif;
  --vortex-font-sans: 'Outfit', sans-serif;
  --vortex-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Canvas styling mapped specifically to #vortexCanvas */
#vortexCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* ==========================================================================
   Ambient Atmospheric Background Styling
   ========================================================================== */
#bg-atmosphere {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-color: #000000;
  overflow: hidden;
}

/* Base Dark Midnight Navy backdrop overlay */
.bg-base-navy {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 50%,
    #050814 0%, /* Deep Midnight Navy core */
    #020308 60%,
    #000000 100%
  );
  opacity: 0.85;
  z-index: 1;
  animation: breathe-navy 20s ease-in-out infinite;
}

/* Cool Blue/Indigo Ambient Source (Left Side) */
.bg-cool-source {
  position: absolute;
  top: -15%;
  left: -20%;
  width: 90%;
  height: 90%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(16, 61, 143, 0.45) 0%,      /* Rich Indigo Blue */
    rgba(16, 61, 143, 0.25) 25%,
    rgba(7, 18, 42, 0.12) 50%,        /* Deep Midnight Navy */
    rgba(7, 18, 42, 0.03) 70%,
    transparent 85%
  );
  z-index: 2;
  will-change: transform, opacity;
  animation: float-cool 22s ease-in-out infinite;
  opacity: 0; /* Starts hidden, revealed only on cursor interaction */
}

/* Warm Orange/Peach Ambient Source (Right Side) */
.bg-warm-source {
  position: absolute;
  top: auto;
  bottom: -15%;
  right: -20%;
  width: 90%;
  height: 90%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(254, 215, 170, 0.4) 0%,     /* Soft Peach */
    rgba(254, 215, 170, 0.2) 25%,
    rgba(249, 115, 22, 0.12) 50%,     /* Warm Soft Orange */
    rgba(249, 115, 22, 0.03) 70%,
    transparent 85%
  );
  z-index: 3;
  will-change: transform, opacity;
  animation: float-warm 18s ease-in-out infinite;
  opacity: 0; /* Starts hidden, revealed only on cursor interaction */
}

/* Keyframes for breathing base navy atmosphere */
@keyframes breathe-navy {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1.0);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.03);
  }
}

/* Keyframes for floating/shifting cool atmosphere */
@keyframes float-cool {
  0%, 100% {
    transform: translate(0px, 0px) scale(1.0);
  }
  50% {
    transform: translate(30px, -20px) scale(1.04);
  }
}

/* Keyframes for floating/shifting warm atmosphere */
@keyframes float-warm {
  0%, 100% {
    transform: translate(0px, 0px) scale(1.0);
  }
  50% {
    transform: translate(-25px, 25px) scale(1.05);
  }
}

/* ==========================================================================
   Central Typography Overlay (Vortex Focal Point)
   ========================================================================== */
.hero-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2; /* Layered above canvas (z-index 1) but below loader (z-index 100) */
  pointer-events: none; /* Clicks/moves pass through to canvas underneath */
  text-align: center;
  width: 90%;
  max-width: 1200px;
}

.premium-headline {
  font-family: var(--vortex-font-serif);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  pointer-events: none;
  animation: float-breathe-text 7s ease-in-out infinite;
  will-change: transform;
}

.luxury-svg-headline {
  display: block;
  width: 100%;
  max-width: 960px; /* Optimal desktop presentation scale */
  height: auto;
  margin: 0 auto;
  overflow: visible;
}

.headline-line {
  will-change: opacity, transform;
}

.line-top {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.line-bottom {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.25s;
}

/* Revealed states triggered via JS reveal engine */
.premium-headline.revealed .line-top {
  opacity: 1;
  transform: translateY(0);
}

.premium-headline.revealed .line-bottom {
  opacity: 1;
  transform: translateY(0);
}

/* SVG Text elements style (Fredoka Rounded Display styling matching the user's mockup) */
.luxury-text-top {
  font-family: var(--vortex-font-display); /* 'Fredoka', sans-serif */
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  font-size: 110px; /* Restored to 110px on desktop */
  letter-spacing: -0.015em; /* Sleek tight letter spacing for rounded font */
  fill: #ff6b35; /* Branded Nudge Orange */
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.95)) 
          drop-shadow(0 0 25px rgba(255, 107, 53, 0.65)) 
          drop-shadow(0 0 50px rgba(255, 107, 53, 0.4)) 
          drop-shadow(0 4px 12px rgba(0, 0, 0, 0.95)); /* Rich multi-layered neon glow */
}

.luxury-text-bottom {
  font-family: var(--vortex-font-display); /* 'Fredoka', sans-serif */
  font-weight: 700;
  font-style: normal;
  text-transform: none;
  font-size: 110px; /* Restored to 110px on desktop */
  letter-spacing: -0.015em; /* Sleek tight letter spacing for rounded font */
  fill: #ffffff; /* White color */
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)) 
          drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)) 
          drop-shadow(0 4px 12px rgba(0, 0, 0, 0.95)); /* Premium soft white halo glow */
}

/* Nudge Brand Orange Pill CTA Button */
.nudge-btn {
  font-family: var(--vortex-font-sans);
  font-weight: 600;
  background-color: #ff6b35; /* Vibrant Orange Nudge Color */
  color: #07122a; /* Midnight Blue text */
  border: none;
  padding: 16px 36px;
  font-size: 16px;
  border-radius: 50px; /* Pill shape */
  cursor: pointer;
  margin-top: 45px; /* Spaced below the options? text */
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1),
              background-color 0.3s ease,
              box-shadow 0.3s ease;
  pointer-events: auto; /* Enable clicks */
  
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.2),
              0 10px 30px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nudge-btn.visible {
  opacity: 1;
  transform: translateY(0);
}

.nudge-btn:hover {
  background-color: #ff804e;
  box-shadow: 0 0 25px rgba(255, 107, 53, 0.45),
              0 10px 30px rgba(0, 0, 0, 0.4);
}

.nudge-btn .arrow {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.nudge-btn:hover .arrow {
  transform: translateX(4px);
}

@keyframes blink-cursor {
  from, to {
    background-color: transparent;
    box-shadow: none;
  }
  50% {
    background-color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 24px rgba(255, 255, 255, 0.5);
  }
}

/* Elegant breathing/floating animation */
@keyframes float-breathe-text {
  0%, 100% {
    transform: translateY(0px) scale(1.0);
  }
  50% {
    transform: translateY(-6px) scale(1.015);
  }
}

/* Metallic/Liquid gradient sweep animation */
@keyframes shimmer-text {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

/* ==========================================================================
   Luxury Preloader Screen
   ========================================================================== */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--vortex-color-bg);
  z-index: 10000; /* Extremely high z-index to cover navbar */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), 
              visibility 1.2s cubic-bezier(0.25, 1, 0.5, 1),
              filter 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.loader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  filter: blur(20px);
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  padding: 20px;
}

.loader-brand {
  margin-bottom: 40px;
}

.brand-subtitle {
  font-family: var(--vortex-font-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.5em;
  color: var(--vortex-color-accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
  animation: pulse-gold 3s infinite ease-in-out;
}

.brand-title {
  font-family: var(--vortex-font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--vortex-color-fg);
}

/* Circular Progress Container */
.spinner-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 40px;
}

.circular-progress {
  position: relative;
  width: 100%;
  height: 100%;
}

.progress-ring {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--vortex-font-sans);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--vortex-color-fg);
}

/* Preloader Status messages */
.loader-status {
  width: 100%;
}

.status-msg {
  font-family: var(--vortex-font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--vortex-color-text-muted);
  margin-bottom: 24px;
}

.category-indicators {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 450px;
}

.cat-tag {
  font-family: var(--vortex-font-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.cat-tag.active {
  color: var(--vortex-color-fg);
  border-color: var(--vortex-color-accent);
}

/* ==========================================================================
   Minimal Corner UI Overlay
   ========================================================================== */
.ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let clicks pass through to canvas */
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  padding: 40px;
  font-size: 12px;
}

.ui-overlay > * {
  pointer-events: auto; /* Enable pointer events on individual UI controls */
}

.mono-label {
  font-family: var(--vortex-font-mono);
  color: var(--vortex-color-text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 10px;
}

.ui-top-left {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.ui-top-right {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.ui-bottom-left {
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
  align-self: end;
  max-width: 300px;
}

.ui-bottom-left .description {
  font-family: var(--vortex-font-serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--vortex-color-text-muted);
}

.ui-bottom-right {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
  align-self: end;
}

/* Premium Buttons */
.ui-btn {
  font-family: var(--vortex-font-sans);
  background: transparent;
  color: var(--vortex-color-fg);
  border: 1px solid var(--vortex-color-border);
  padding: 12px 24px;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  backdrop-filter: blur(10px);
}

.ui-btn:hover {
  border-color: var(--vortex-color-fg);
  background-color: var(--vortex-color-fg);
  color: var(--vortex-color-bg);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes pulse-gold {
  0%, 100% {
    opacity: 0.6;
    color: var(--vortex-color-accent);
  }
  50% {
    opacity: 1;
    color: #ffffff;
  }
}

/* Responsive Scaling */
@media (max-width: 768px) {
  .ui-overlay {
    padding: 24px;
  }
  
  .ui-bottom-left {
    display: none; /* Hide description on mobile to stay minimal */
  }
  
  .brand-title {
    font-size: 24px;
  }
  
  .spinner-container {
    width: 100px;
    height: 100px;
  }
  
  .headline-line {
    max-width: 100%;
  }
  
  .luxury-text-top {
    font-size: 150px;
  }
  
  .luxury-text-bottom {
    font-size: 150px;
  }
}
