/* ============================================================
   freymi — Hero Section
   ============================================================ */

#hero {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px; /* высота шапки */
}

/* ── Фоновые слои ── */
.hero-bg-img {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  z-index: 0;
}

.hero-noise {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-noise.png');
  background-repeat: repeat;
  background-size: 300px 300px;
  opacity: 0.25;
  z-index: 1;
  pointer-events: none;
}

/* ── Inner ── */
.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: clamp(4rem, 8vh, 8rem);
  padding-bottom: clamp(4rem, 8vh, 8rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

/* ── Status pill ── */
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px 8px 12px;
  border-radius: 100px;
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
  backdrop-filter: blur(8px);
}

/* ── Main heading ── */
#hero-title {
  position: relative;
  font-family: var(--font-hero);
  font-weight: 900;
  width: 100%;
  font-size: 4.35rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-white);
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
  max-width: 1120px;
  isolation: isolate;
}

/* SplitText: overflow-hidden на строке, GSAP управляет сдвигом */
#hero-title .line {
  overflow: hidden;
  display: block;
  padding-top: 0.12em;
  margin-top: -0.12em;
  white-space: nowrap;
}

#hero-title .hero-title-line--accent {
  margin-left: 0.18em;
}

#hero-title .hero-title-line--bottom {
  margin-left: 0;
}

#hero-title em {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.02em 0.14em 0.08em;
  margin-left: -0.03em;
  border: 1px solid rgba(200, 255, 71, 0.42);
  border-radius: 0.16em;
  background:
    linear-gradient(120deg, rgba(200, 255, 71, 0.22), rgba(200, 255, 71, 0.02) 58%),
    rgba(200, 255, 71, 0.08);
  box-shadow:
    0 0 0 1px rgba(200, 255, 71, 0.1) inset,
    0 24px 80px rgba(200, 255, 71, 0.16);
  color: var(--accent);
  font-style: normal;
  transform: skewX(-8deg);
}

#hero-title em::after {
  content: '';
  position: absolute;
  right: -0.08em;
  bottom: -0.1em;
  width: 42%;
  height: 0.08em;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.78;
}

#hero-title .charChild {
  display: inline-block;
  /* начальное положение задаёт GSAP через from(), НЕ CSS */
}

/* ── Sub text ── */
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.5);
  width: min(420px, calc(100vw - 2.5rem));
  line-height: 1.7;
  margin-bottom: clamp(2rem, 4vh, 3rem);
  opacity: 0; /* JS покажет */
  transform: translateY(16px);
}

/* ── CTA buttons row ── */
.hero-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0; /* JS покажет */
  transform: translateY(16px);
}

#btn-works {
  background-color: var(--accent);
  color: var(--text-dark);
}

#btn-discuss {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-white);
}

/* ── Animated button: 3D char flip ── */
.btn-text-flip {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

/* Hover-текст лежит поверх default-текста (те же координаты) */
.btn-hover {
  position: absolute;
  inset: 0;
}

/* ── Scroll hint ── */
.hero-scroll {
  position: absolute;
  bottom: clamp(1.5rem, 3vh, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fade-in-scroll 0.8s ease 2.5s forwards;
}

@keyframes fade-in-scroll {
  to { opacity: 1; }
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scroll-line 1.8s ease-in-out infinite;
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.scroll-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  #hero-title {
    font-size: 3.7rem;
  }
}

@media (max-width: 980px) {
  #hero-title {
    font-size: 2.9rem;
  }
}

@media (max-width: 768px) {
  .hero-inner {
    width: 100vw;
    max-width: 100vw;
    margin-left: 0;
    margin-right: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    align-items: center;
    text-align: center;
    transform: translateX(-1.9rem);
  }

  .hero-status {
    max-width: calc(100vw - 2.5rem);
    font-size: 0.68rem;
  }

  #hero-title {
    font-size: 1.5rem;
    line-height: 1.04;
    max-width: 22rem;
  }

  #hero-title .line {
    text-align: center;
  }

  #hero-title .hero-title-line--accent,
  #hero-title .hero-title-line--bottom {
    margin-left: 0;
  }

  #hero-title .hero-title-line--accent > span {
    display: block;
  }

  #hero-title .hero-title-line--bottom > span {
    display: block;
  }

  #hero-title em {
    padding-inline: 0.12em;
    margin-top: 0.12em;
    margin-left: 0;
  }

  .hero-sub {
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    width: min(100%, 320px);
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  #hero-title {
    font-size: 1.24rem;
    letter-spacing: 0;
  }

  .hero-status {
    font-size: 0.7rem;
  }
}
