/* ==========================================================================
   TapeFox Stylesheet - Cinematic Mascot Transition Light Theme
   ========================================================================== */

:root {
  --color-bg-base: #DCE5EE; /* Light slate base for vignette gradient */
  --color-bg-light: #FFFFFF;
  --color-orange: #FF5A00;
  --color-orange-hover: #FF7226;
  --color-white: #09264A; /* Set text main color to dark navy */
  --color-text-muted: #4C5E76;
  --color-border: rgba(9, 38, 74, 0.08);
  
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  --transition-cinematic: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Reset & Base Elements */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  height: 100svh;
  color: var(--color-white);
  font-family: var(--font-family);
  overflow: hidden; /* Strict 100vh constraint */
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Cinematic Background Environment (Light Theme)
   ========================================================================== */

.bg-gradient-base {
  position: fixed;
  inset: 0;
  background-color: var(--color-bg-base);
  background-image: radial-gradient(circle at 50% 40%, var(--color-bg-light) 0%, var(--color-bg-base) 100%);
  z-index: -3;
}

.bg-gradient-base::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(9, 38, 74, 0.07) 0%, rgba(9, 38, 74, 0) 75%);
  filter: blur(80px);
  pointer-events: none;
}

.bg-gradient-base::after {
  content: "";
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 90, 0, 0.05) 0%, rgba(255, 90, 0, 0) 75%);
  filter: blur(60px);
  pointer-events: none;
}

.bg-orange-glow {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(500px, 80vw);
  height: min(500px, 80vw);
  background: radial-gradient(circle, rgba(255, 90, 0, 0.04) 0%, rgba(255, 90, 0, 0) 70%);
  filter: blur(50px);
  z-index: -2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease 0.5s;
}

.bg-technical-grid {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(rgba(9, 38, 74, 0.09) 1.5px, transparent 1.5px),
    linear-gradient(rgba(9, 38, 74, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 38, 74, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center center;
  mask-image: radial-gradient(circle at 50% 45%, black 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, black 40%, transparent 75%);
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease 0.3s;
}

.state-revealed .bg-orange-glow {
  opacity: 1;
}

.state-revealed .bg-technical-grid {
  opacity: 1;
}

/* ==========================================================================
   App Layout & State Structure
   ========================================================================== */

.app-layout {
  display: flex;
  flex-direction: column;
  height: 100svh;
  width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Main Layout */
.main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px 24px;
}

.hero {
  display: flex;
  flex-direction: row; /* Horizontal split on desktop */
  align-items: center;
  justify-content: center;
  text-align: left;
  max-width: 900px;
  width: 100%;
  height: 100%;
  gap: 0; /* No gap in intro state */
  margin: auto;
  transition: gap 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.state-revealed .hero {
  gap: 80px; /* Expands to split columns */
}

/* ==========================================================================
   Hero Mascot Illustration (Transitions from centered to split-left)
   ========================================================================== */

.hero-logo-wrapper {
  position: relative;
  width: min(280px, 45vw); /* Larger width in intro state */
  aspect-ratio: 2/3;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  opacity: 0;
  transform: scale(1.08); /* Initial scale-up for entry */
  transition: 
    width 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 1.2s ease;
}

/* Intro State: Centered mascot */
.state-intro .hero-logo-wrapper {
  opacity: 1;
  transform: scale(1.08);
}

/* Revealed State: Mascot moves left and starts floating */
.state-revealed .hero-logo-wrapper {
  opacity: 1;
  transform: scale(1);
  width: min(230px, 32vw);
  animation: floatHero 8s ease-in-out infinite alternate 1.2s;
}

.glow-radial-behind {
  position: absolute;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(255, 90, 0, 0.06) 0%, rgba(255, 90, 0, 0) 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

.hero-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* ==========================================================================
   Text Typography Group & Brand Wordmark
   ========================================================================== */

.hero-content-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  max-width: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(30px);
  transition: 
    max-width 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    max-height 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 1.2s ease,
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Revealed State: Text block reveals and slides up */
.state-revealed .hero-content-group {
  max-width: 500px;
  max-height: 500px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.brand-wordmark {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: clamp(34px, 4.5vw, 48px);
  line-height: 1;
  letter-spacing: -0.06em; /* Tight letter spacing matching official logo */
  margin-bottom: 2px; /* Tightly couple with eyebrow */
  display: inline-flex;
}

.wordmark-tape {
  color: var(--color-white); /* Dark navy */
}

.wordmark-fox {
  color: var(--color-orange); /* Orange */
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-orange);
  margin-bottom: 24px;
}

.hero-heading {
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--color-white);
  margin-bottom: 16px;
}

.hero-heading .dot {
  color: var(--color-orange);
}

.hero-description {
  font-size: clamp(14px, 2vw, 15.5px);
  color: var(--color-text-muted);
  max-width: 440px;
  line-height: 1.5;
  font-weight: 400;
}

/* ==========================================================================
   Animation Keyframes
   ========================================================================== */

@keyframes floatHero {
  0% {
    transform: translateY(5px);
  }
  100% {
    transform: translateY(-7px);
  }
}

/* ==========================================================================
   Responsive Design Breakpoints
   ========================================================================== */

@media (max-width: 768px) {
  .hero {
    flex-direction: column; /* Stack logo on top, content below */
    text-align: center;
    max-width: 480px;
    gap: 0;
    justify-content: center;
    transition: gap 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .state-revealed .hero {
    gap: 28px;
  }

  .hero-logo-wrapper {
    width: min(220px, 45vw);
    transition: 
      width 1.2s cubic-bezier(0.16, 1, 0.3, 1),
      transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 1.2s ease;
  }

  .state-intro .hero-logo-wrapper {
    width: min(220px, 45vw);
    transform: scale(1.08);
  }

  .state-revealed .hero-logo-wrapper {
    width: min(170px, 35vw);
    transform: scale(1);
  }

  .hero-content-group {
    align-items: center; /* Center align text on mobile */
    text-align: center;
    width: 100%;
    transform: translateY(20px);
  }

  .brand-wordmark {
    font-size: 36px;
    margin-bottom: 2px;
  }

  .hero-eyebrow {
    margin-bottom: 18px;
  }
  
  .hero-heading {
    font-size: clamp(34px, 7vw, 44px);
    margin-bottom: 12px;
  }
  
  .hero-description {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .state-revealed .hero {
    gap: 20px;
  }

  .state-intro .hero-logo-wrapper {
    width: min(180px, 50vw);
  }

  .state-revealed .hero-logo-wrapper {
    width: min(140px, 40vw);
  }
  
  .hero-eyebrow {
    margin-bottom: 14px;
    letter-spacing: 0.2em;
  }
  
  .hero-heading {
    font-size: clamp(30px, 8vw, 38px);
    margin-bottom: 10px;
  }
  
  .hero-description {
    padding: 0 4px;
    font-size: 13px;
  }
}
