/* =====================================================================
   HOME (/) — v2 „blob + HELLO I'M KAROLINA"
   Płaskie czarne tło, blob (wideo) z napisem HELLO I'M KAROLINA,
   pod spodem lead, po bokach działy portfolio (PORTFOLIO),
   kreska na hover (desktop) / na tap (mobile, przed przejściem).
   ===================================================================== */

.home { background: var(--c-black); }

.home-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--c-black);
  color: var(--c-white);
  overflow: hidden;
}

/* --- Blob (wideo) + napis HELLO I'M KAROLINA --- */
.home-hero__media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}
.home-hero__video {
  width: min(60vw, 880px);
  max-height: 84vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  transform: translateY(10.5%); /* blob siedzi wyzej w kadrze -> zjazd na wspolny srodek z napisem */
  mix-blend-mode: screen;   /* czarne tło nagrania znika, blob świeci na czerni */
}

.hero-name {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 2px 34px rgba(0, 0, 0, 0.45);
}
.hero-name span {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--c-white);
  line-height: 0.9;
  letter-spacing: 0.005em;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  white-space: nowrap;
}

/* --- Lead: rola + zdanie (pod blobem) --- */
.home-hero__text {
  position: absolute;
  left: 50%;
  bottom: clamp(9vh, 15vh, 170px);
  transform: translateX(-50%);
  z-index: 2;
  width: 100%;
  max-width: 560px;
  padding-inline: var(--gutter);
  text-align: center;
}
.home-hero__subtitle {
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.28;
  color: var(--c-white);
  margin-bottom: 14px;
}
.home-hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--c-text-muted);
}

/* --- Działy portfolio: typografia po bokach bloba --- */
.realms {
  position: absolute;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(24px, 6vw, 120px);
  pointer-events: none;
}
.realm {
  pointer-events: auto;
  display: inline-block;
  color: rgba(255, 255, 255, 0.66);
  transition: color 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}
.realm--right { text-align: right; }

.realm__name {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.85rem, 4.2vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: 0.005em;
}
.realm__sub {
  display: block;
  margin-top: 0.7em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: clamp(0.8rem, 1.25vw, 1.1rem);
  color: rgba(255, 255, 255, 0.9);
}

/* kreska — rysuje się na hover (desktop) lub na tap (mobile, klasa is-active) */
.realm__line {
  display: block;
  height: 2px;
  width: min(100%, 340px);
  margin-top: 20px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.realm--right .realm__line {
  margin-left: auto;
  transform-origin: right center;
}

.realm:hover,
.realm:focus-visible { color: #fff; outline: none; }
.realm:hover .realm__line,
.realm:focus-visible .realm__line,
.realm.is-active .realm__line { transform: scaleX(1); }
.realm.is-active { color: #fff; }

/* --- Mobile: blob+napis, lead, działy pod sobą --- */
@media (max-width: 768px) {
  .home-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(18px, 2.6vh, 30px);
    padding: calc(var(--header-h) + 20px) var(--gutter) 72px;
  }
  .home-hero__media { position: relative; inset: auto; order: 0; }
  .home-hero__video { width: min(420px, 86vw); }
  .hero-name span { font-size: clamp(1.7rem, 9vw, 3rem); }

  .home-hero__text {
    position: static;
    transform: none;
    order: 1;
    margin-inline: auto;
  }

  .realms {
    position: static;
    transform: none;
    order: 2;
    flex-direction: column;
    align-items: center;
    gap: clamp(28px, 6vh, 48px);
    padding-inline: 0;
    text-align: center;
  }
  .realm,
  .realm--right { text-align: center; }
  .realm__line {
    margin-inline: auto;
    transform-origin: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .realm__line { transition: none; }
}
