/* ── Hero Reveal — GSAP edition ─────────────────────────────────────── */
:root {
  --hero-primary:   #D35400;
  --hero-secondary: #E67E22;
  --hero-light:     #f5f5f5;
}
[data-theme="dark"] {
  --hero-primary:   #E67E22;
  --hero-secondary: #F39C12;
}

/* ── Header hide/show ───────────────────────────────────────────────── */
.header-area {
  position: fixed !important;
  inset: 0 0 auto 0;
  z-index: 9999 !important;
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  transition: transform 0.4s ease, opacity 0.4s ease !important;
  pointer-events: none !important;
}
.header-area.header-scrolled {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
body.at-hero .header-area,
body.at-hero .header-area.header-scrolled {
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
body:not(.at-hero) .header-area.header-scrolled {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* ── Hero container ─────────────────────────────────────────────────── */
.hero-reveal {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

/* ── Video bg ───────────────────────────────────────────────────────── */
.hero-reveal-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-reveal-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Canvas overlay (pixel dissolve) ───────────────────────────────── */
#heroCanvas {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: block;
}

/* ── "Web Design." top text ─────────────────────────────────────────── */
.hero-reveal-top-text {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  z-index: 5;
  opacity: 0;
  white-space: nowrap;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

/* ── Text layers ────────────────────────────────────────────────────── */
.hero-reveal-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-reveal-text {
  position: absolute;
  z-index: 3;
  font-size: clamp(72px, 17vw, 210px);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 60vh;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  perspective: 1000px;
}

.hero-reveal-text-back  { z-index: 3; }
.hero-reveal-text-front { z-index: 5; pointer-events: auto; }

.hero-text-line {
  display: block;
  margin: 0;
}
.hero-text-line span {
  /* individual chars — GSAP controls opacity/transform */
  display: inline-block;
  color: var(--hero-primary);
  cursor: pointer;
  transition: color 0.25s ease, text-shadow 0.25s ease;
  text-shadow: 3px 3px 0 rgba(0,0,0,.12), 0 6px 24px rgba(0,0,0,.18);
}
.hero-reveal-text-back .hero-text-line span {
  color: rgba(255,255,255,0.08);
  text-shadow: none;
}

/* Hover — only front layer */
.hero-reveal-text-front .hero-text-line span:hover {
  color: var(--hero-secondary);
  text-shadow: 0 0 40px rgba(230,126,34,.55), 4px 4px 0 rgba(0,0,0,.2);
}

.hero-line-left   { text-align: left;   padding-left: 10%;  align-self: flex-start; }
.hero-line-center { text-align: center; align-self: center; }
.hero-line-right  { text-align: right;  padding-right: 10%; align-self: flex-end;   }

/* ── Cat ────────────────────────────────────────────────────────────── */
.hero-cat {
  position: absolute;
  width: clamp(360px, 52vw, 680px);
  z-index: 4;
  left: 50%;
  bottom: -14%;
  transform: translateX(-50%);
  opacity: 0;
  filter: drop-shadow(0 12px 36px rgba(0,0,0,.55));
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
}

/* ── Scroll indicator ───────────────────────────────────────────────── */
.hero-scroll-indicator {
  position: fixed;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.hero-scroll-indicator.visible { opacity: 1; }

.hero-scroll-text {
  color: var(--hero-light);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.hero-scroll-mouse {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255,255,255,.45);
  border-radius: 13px;
  position: relative;
}
.hero-scroll-wheel {
  width: 4px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%   { top: 8px;  opacity: 1;   }
  50%  { top: 20px; opacity: 0.4; }
  100% { top: 8px;  opacity: 1;   }
}

/* ── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-reveal-top-text { font-size: 13px; top: 28px; }
  .hero-cat { width: clamp(260px, 58vw, 420px); bottom: 10%; }
  .hero-line-left, .hero-line-right { padding-left: 4% !important; padding-right: 4% !important; }

  .header-area {
    position: fixed !important;
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .header-area.header-scrolled {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  body.at-hero .header-area,
  body.at-hero .header-area.header-scrolled {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  body:not(.at-hero) .header-area.header-scrolled {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

@media (max-width: 767px) {
  .header-area .main-nav .logo { margin-left: 30px; }
}
