/* ── HERO ── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  background-color: var(--pro-bg);
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 1;
  transform: translateY(clamp(1rem, 4vh, 3rem));
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

.hero::after {
  content: 'FRONTEND / VISUAL SYSTEM';
  position: absolute;
  right: clamp(1rem, 5vw, 4rem);
  bottom: clamp(3.5rem, 8vw, 7rem);
  z-index: 0;
  color: var(--pro-title);
  opacity: 0.062;
  font-family: var(--font-pro);
  font-size: clamp(2.2rem, 7vw, 6.2rem);
  font-weight: 700;
  line-height: 0.9;
  text-align: right;
  pointer-events: none;
}

.hero-scroll {
  position: absolute;
  right: clamp(1.25rem, 5vw, 4rem);
  bottom: 1.15rem;
  width: 1px;
  height: 44px;
  overflow: hidden;
  z-index: 0;
  opacity: .58;
}

.hero-scroll-line {
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, var(--pro-accent), transparent);
  animation: scroll-drop 1.9s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes scroll-drop {
  0%   { transform: translateY(-100%); opacity: 1; }
  75%  { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

.hero-tag {
  font-size: clamp(.72rem, 1vw, .82rem);
  font-weight: 500;
  color: var(--pro-accent);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1rem;
  opacity: 0;
}

.hero-title {
  font-family: var(--font-pro);
  font-size: clamp(3.2rem, 8.4vw, 6.4rem);
  font-weight: 700;
  color: var(--pro-title);
  line-height: .94;
  margin-bottom: 1.15rem;
  opacity: 0;
}

.hero-title.typing { opacity: 1; position: relative; }

.hero-title.typing::after {
  content: '|';
  color: var(--pro-accent);
  font-weight: 300;
  position: absolute;
  animation: cursor-blink 0.65s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-title.typing-done::after { display: none; }

.hero-subtitle {
  font-size: clamp(1.02rem, 1.5vw, 1.14rem);
  color: var(--pro-secondary);
  line-height: 1.55;
  margin-bottom: 2.35rem;
  max-width: min(520px, 58ch);
  opacity: 0;
}

.hero-ctas {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
  opacity: 0;
  position: relative;
  z-index: 2;
}

.hero-ctas .btn-secondary {
  position: relative;
  overflow: hidden;
  border-color: rgba(255,255,255,0.64);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.82), rgba(255,255,255,0.42) 48%, rgba(248,247,255,0.72)),
    rgba(255,255,255,0.52);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    inset 0 -18px 32px rgba(127,119,221,0.08),
    0 14px 34px rgba(83,74,183,0.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
}

.hero-ctas .btn-secondary::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.62), transparent 35%),
    radial-gradient(circle at 18% 12%, rgba(255,255,255,0.9), transparent 28%);
  opacity: .62;
  pointer-events: none;
}

.hero-ctas .btn-secondary::after {
  content: '';
  position: absolute;
  inset: -40% -70%;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,0.52) 50%, transparent 58%);
  transform: translateX(-40%) rotate(2deg);
  opacity: 0;
  pointer-events: none;
  transition: transform .55s cubic-bezier(.16,1,.3,1), opacity .25s;
}

@media (hover: hover) and (pointer: fine) {
  .hero-ctas .btn-secondary:hover::after {
    transform: translateX(42%) rotate(2deg);
    opacity: .8;
  }

  .hero-ctas .btn-secondary:hover {
    border-color: rgba(255,255,255,0.9);
    background:
      linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.52) 48%, rgba(248,247,255,0.82)),
      rgba(255,255,255,0.66);
    color: var(--pro-accent-strong);
    transform: translateY(-3px);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.94),
      inset 0 -18px 32px rgba(127,119,221,0.1),
      0 20px 42px rgba(83,74,183,0.16);
  }
}

.hero-tag.reveal     { animation: fade-blur-up 1s cubic-bezier(0.16,1,0.3,1) forwards; }
.hero-subtitle.reveal{ animation: fade-blur-up 1s cubic-bezier(0.16,1,0.3,1) forwards 0.25s; }
.hero-ctas.reveal    { animation: fade-blur-up 1s cubic-bezier(0.16,1,0.3,1) forwards 0.55s; }

@keyframes fade-blur-up {
  from { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0);   }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 112px 0 4.5rem;
  }
  .hero .container { transform: none; }
  .hero-title { font-size: clamp(3rem, 16vw, 4.6rem); }
  .hero::after { right: 1rem; bottom: 5rem; font-size: 2.8rem; }
  .hero-scroll { display: none; }
  .hero-ctas {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-height: 780px) and (min-width: 901px) {
  .hero-scroll { display: none; }
}

@media (min-width: 1200px) and (min-height: 780px) {
  .hero .container { transform: translateY(clamp(2rem, 5vh, 4rem)); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line { animation: none; }
  .hero-tag.reveal,
  .hero-subtitle.reveal,
  .hero-ctas.reveal { animation: none; opacity: 1; }
}
