/* =====================================================
   BEARAND — HERO SECTION
   Split layout · Day/Night via --time variable
   Layer system · Glassmorphism cards · Parallax
   ===================================================== */

/* ─── HERO CONTAINER ──────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* ─── SHARED LAYER BASE ───────────────────────────── */
.hero-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* =====================================================
   LAYER 1 — SKY BACKGROUND
   Radial gradient controlled entirely by --time
   Day (--time:0): #87CEEB → #4A90D9
   Night (--time:1): #0D2347 → #050A1A
   ===================================================== */
.hero-sky {
  z-index: 1;
  background-color: #050A1A; /* default dark */
  transition: background-color 0.6s ease;
}
:root[data-theme='light'] .hero-sky {
  background-color: #87CEEB;
}

/* Day Image Layer */
.hero-sky::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/hero-bg-day.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--day-opacity, 0);
  transition: opacity 0.6s ease;
  z-index: 1;
}

/* Night Image Layer */
.hero-sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/hero-bg-night.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--night-opacity, 1);
  transition: opacity 0.6s ease;
  z-index: 2;
}


/* =====================================================
   LAYER 2 — MOUNTAINS (parallax)
   ===================================================== */
.hero-mountains {
  display: none; /* Hidden for flat modern aesthetic */
}

/* =====================================================
   LAYER 3 — CLOUDS (day) + SHOOTING STARS (night)
   ===================================================== */
.hero-clouds {
  display: none;
  z-index: 3;
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-shooting-stars {
  display: none;
  z-index: 3;
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Mobile-specific hero backgrounds — portrait images (9:16) */
.hero-sky-mobile {
  display: none;
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  z-index: 2;
  transition: opacity 0.6s ease;
}

/* Night (dark theme) mobile bg */
:root[data-theme='dark'] .hero-sky-mobile {
  background-image: url('../assets/images/hero-bg-night-mobile.png');
}

/* Day (light theme) mobile bg */
:root[data-theme='light'] .hero-sky-mobile {
  background-image: url('../assets/images/hero-bg-day-mobile.png');
}

@media (max-width: 767px) {
  /* Hide desktop ::before / ::after bg images */
  .hero-sky::before,
  .hero-sky::after {
    display: none;
  }
  /* Show mobile portrait bg */
  .hero-sky-mobile {
    display: block;
  }
}


/* Cloud drift keyframes */
@keyframes cloudMoveLeft {
  0%   { transform: translateX(0); opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { transform: translateX(110vw); opacity: 0; }
}
@keyframes cloudMoveRight {
  0%   { transform: translateX(0); opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { transform: translateX(-110vw); opacity: 0; }
}

/* Shooting star keyframes */
@keyframes shootingStar {
  0%   { opacity: 0; transform: rotate(var(--angle,35deg)) translateX(0); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--angle,35deg)) translateX(250px); }
}

/* =====================================================
   LAYER 4 — PARTICLES CANVAS
   ===================================================== */
.hero-particles {
  z-index: 4;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* =====================================================
   LAYER 5 — ROCKS (small geometric shapes)
   ===================================================== */
.hero-rocks {
  z-index: 5;
}

.hero-rock {
  position: absolute;
  pointer-events: all;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.5;
}

.hero-rock:active {
  transform: scale(0.85);
}

.hero-rock.bounce {
  animation: rock-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Bear removed as it's now part of the background image */

/* =====================================================
   LAYER — FLOATING CARDS (z:20, ABOVE everything)
   ===================================================== */
.hero-float-cards {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.hero-float-card {
  position: absolute;
  pointer-events: all;
  padding: 12px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, rgba(10, 22, 40, 0.5) calc(var(--time) * 100%), rgba(255, 255, 255, 0.5));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: grab;
  max-width: 160px;
  user-select: none;
  animation: float var(--f-dur, 7s) ease-in-out infinite;
  animation-delay: var(--f-delay, 0s);

  /* Night: dark glass | Day: white glass */
  background: color-mix(
    in srgb,
    rgba(8, 18, 38, 0.5) calc(var(--time) * 100%),
    rgba(255, 255, 255, 0.5)
  );
  border: 1px solid color-mix(
    in srgb,
    rgba(56, 190, 255, 0.18) calc(var(--time) * 100%),
    rgba(10, 80, 200, 0.18)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition: border-color 0.4s ease, background 0.4s ease;
}

.hero-float-card:active {
  cursor: grabbing;
}

.hero-float-card:hover {
  border-color:
    color-mix(
      in srgb,
      rgba(56, 190, 255, 0.3) calc(var(--time) * 100%),
      rgba(30, 111, 217, 0.25)
    );
}

.hero-float-card .card-icon {
  transition: transform 0.6s ease-in-out;
}

.hero-float-card:hover .card-icon {
  transform: rotate(360deg);
}

/* Card icon — Unicode symbol, adapts day/night */
.hero-float-card .card-icon {
  font-size: 1.25rem;
  margin-bottom: 6px;
  line-height: 1;
  color: color-mix(in srgb, #38BEFF calc(var(--time) * 100%), #0D4FA8);
  transition: color 0.4s ease;
}

/* Card tag — uppercase label, adapts day/night */
.hero-float-card .card-tag {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  color: color-mix(in srgb, #38BEFF calc(var(--time) * 100%), #1359C0);
  transition: color 0.4s ease;
}

/* Card title — adapts day/night */
.hero-float-card .card-title {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: color-mix(in srgb, rgba(240,248,255,0.95) calc(var(--time) * 100%), #0A1628);
  transition: color 0.4s ease;
}

.hero-float-card .card-link {
  display: none;
}

/* Card positions
   Image: bear on RIGHT side, open sky on LEFT & CENTER
   Hero text is bottom-left (~0-40% x, 30-70% y)
   Cards placed in open sky above/right of text, avoiding bear area (>55% x)
*/
.hfc-1 { top: 15%; left: 60%; }  /* Campaigns */
.hfc-2 { top: 35%; left: 75%; }  /* Brand Strategy */
.hfc-3 { top: 35%; left: 35%; }  /* Digital & Web */
.hfc-4 { top: 35%; left: 55%; }  /* Creative */
.hfc-5 { top: 55%; left: 45%; }  /* Film & Motion */
.hfc-6 { top: 75%; left: 35%; }  /* Ai Cinematic */

@keyframes ai-glow {
  0% { filter: drop-shadow(0 0 2px var(--brand-blue-light)); color: var(--brand-blue-light); }
  50% { filter: drop-shadow(0 0 10px var(--brand-blue)); color: white; }
  100% { filter: drop-shadow(0 0 2px var(--brand-blue-light)); color: var(--brand-blue-light); }
}
.ai-icon svg {
  animation: ai-glow 2s infinite ease-in-out;
}

.mobile-cards-toggle {
  display: none;
  position: absolute;
  top: 15%;
  right: 5%;
  z-index: 21;
  background: var(--brand-blue-light);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(56, 190, 255, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(56, 190, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 190, 255, 0); }
}

/* =====================================================
   HERO CONTENT (z:10, LEFT side)
   ===================================================== */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: left;
  padding: 0 var(--space-6, 48px);
  padding-left: clamp(32px, 6vw, 96px);
  max-width: 550px;
}

/* Label — small uppercase with dot indicator */
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-4, 16px);
  color: color-mix(in srgb, #38BEFF calc(var(--time) * 100%), #1E6FD9);
}

.hero-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38BEFF;
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Title */
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4, 16px);
  color: color-mix(in srgb, #FFFFFF calc(var(--time) * 100%), #0A1628);
}

.hero-title .line-2 {
  background: linear-gradient(135deg, #1E6FD9, #38BEFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Slogan */
.hero-slogan {
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 0 var(--space-6, 24px);
  opacity: 0.6;
  color: color-mix(in srgb, #FFFFFF calc(var(--time) * 100%), #0A1628);
}

.hero-slogan em {
  font-style: normal;
  font-weight: 600;
  opacity: 1;
  color: color-mix(in srgb, rgba(255, 255, 255, 0.9) calc(var(--time) * 100%), #0A1628);
}

/* CTA buttons */
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-6, 24px);
  flex-wrap: wrap;
}

/* Play icon (showreel) — inline SVG triangle */
.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, rgba(56, 190, 255, 0.15) calc(var(--time) * 100%), rgba(30, 111, 217, 0.1));
  border: 1px solid color-mix(in srgb, rgba(56, 190, 255, 0.3) calc(var(--time) * 100%), rgba(30, 111, 217, 0.2));
  transition: background 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.play-icon:hover {
  transform: scale(1.1);
  background: color-mix(in srgb, rgba(56, 190, 255, 0.25) calc(var(--time) * 100%), rgba(30, 111, 217, 0.18));
}

.play-icon svg {
  width: 14px;
  height: 14px;
  fill: color-mix(in srgb, #38BEFF calc(var(--time) * 100%), #1E6FD9);
}

/* =====================================================
   DAY/NIGHT SLIDER — RIGHT edge, vertical
   ===================================================== */
.dn-slider {
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dn-slider-icon {
  font-size: 0.9rem;
  line-height: 1;
  color: color-mix(in srgb, rgba(255, 255, 255, 0.7) calc(var(--time) * 100%), rgba(10, 22, 40, 0.6));
  user-select: none;
}

.dn-slider-icon.sun {
  color: color-mix(in srgb, rgba(255, 200, 50, 0.5) calc(var(--time) * 100%), #F5A623);
}

.dn-slider-icon.moon {
  color: color-mix(in srgb, #C8D8F0 calc(var(--time) * 100%), rgba(30, 111, 217, 0.4));
}

.dn-slider-track {
  width: 36px;
  height: 80px;
  border-radius: 18px;
  position: relative;
  cursor: pointer;
  background:
    color-mix(
      in srgb,
      rgba(56, 190, 255, 0.15) calc(var(--time) * 100%),
      rgba(30, 111, 217, 0.1)
    );
  border: 1px solid
    color-mix(
      in srgb,
      rgba(56, 190, 255, 0.3) calc(var(--time) * 100%),
      rgba(30, 111, 217, 0.2)
    );
  transition: background 0.4s ease, border-color 0.4s ease;
}

.dn-slider-handle {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  /* Position based on --time: top (day/0) → bottom (night/1) */
  top: calc(4px + var(--time) * (80px - 24px - 8px));
  cursor: grab;
  transition: background 0.4s ease, box-shadow 0.4s ease, top 0.3s ease;
  background:
    color-mix(
      in srgb,
      #38BEFF calc(var(--time) * 100%),
      #F5A623
    );
  box-shadow:
    0 0 12px
    color-mix(
      in srgb,
      rgba(56, 190, 255, 0.5) calc(var(--time) * 100%),
      rgba(245, 166, 35, 0.5)
    );
}

.dn-slider-handle:active {
  cursor: grabbing;
}

/* =====================================================
   SCROLL INDICATOR — bottom center
   ===================================================== */
.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: bob 2s ease-in-out infinite;
}

.scroll-mouse {
  width: 20px;
  height: 32px;
  border-radius: 10px;
  position: relative;
  border: 1.5px solid
    color-mix(
      in srgb,
      rgba(255, 255, 255, 0.25) calc(var(--time) * 100%),
      rgba(10, 22, 40, 0.25)
    );
}

.scroll-mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  border-radius: 2px;
  animation: scroll-pulse 1.5s ease-in-out infinite;
  background:
    color-mix(
      in srgb,
      rgba(255, 255, 255, 0.5) calc(var(--time) * 100%),
      rgba(10, 22, 40, 0.4)
    );
}

.scroll-text {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color:
    color-mix(
      in srgb,
      rgba(255, 255, 255, 0.3) calc(var(--time) * 100%),
      rgba(10, 22, 40, 0.3)
    );
}

/* =====================================================
   GRADIENT OVERLAY — fades hero into next section
   ===================================================== */
.hero-gradient-overlay {
  display: none;
}

/* =====================================================
   KEYFRAMES
   ===================================================== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

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

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

@keyframes scroll-pulse {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

@keyframes rock-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(0.8); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes cloud-drift-1 {
  0% { transform: translateX(-10%); }
  100% { transform: translateX(110vw); }
}

@keyframes cloud-drift-2 {
  0% { transform: translateX(10%); }
  100% { transform: translateX(-110vw); }
}

/* =====================================================
   RESPONSIVE — 768px
   ===================================================== */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .hero-content {
    text-align: center;
    padding: 0 var(--space-4, 16px);
    padding-left: var(--space-4, 16px);
    max-width: 100%;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-slogan {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-bear {
    width: 100%;
  }

  .hero-bear img {
    right: 50%;
    transform: translateX(50%);
    max-height: 45vh;
    opacity: 0.35;
  }

  /* Hero float cards mobile styles managed entirely by mobile.css */

  .dn-slider {
    right: 12px;
  }

  .dn-slider-track {
    height: 64px;
  }

  .dn-slider-handle {
    top: calc(4px + var(--time) * (64px - 24px - 8px));
  }
}

/* =====================================================
   RESPONSIVE — 480px
   ===================================================== */
@media (max-width: 480px) {
  .hero {
    min-height: 600px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-slogan {
    font-size: 0.85rem;
  }

  .hero-bear img {
    max-height: 35vh;
    opacity: 0.25;
  }

  /* Hero float cards mobile styles managed entirely by mobile.css */

  .dn-slider {
    right: 8px;
  }

  .dn-slider-track {
    width: 30px;
    height: 56px;
    border-radius: 15px;
  }

  .dn-slider-handle {
    width: 20px;
    height: 20px;
    top: calc(3px + var(--time) * (56px - 20px - 6px));
  }

  .scroll-indicator {
    bottom: 16px;
  }
}
