/* ==========================================================================
   HOME SECTION — Dark Brutalist Architectural Stage
   ========================================================================== */

.home {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding-inline: clamp(1rem, 2.5vw, 2.5rem);
  padding-top: clamp(1rem, 2.5dvh, 2rem);
  padding-bottom: calc(clamp(1.25rem, 3.5dvh, 2.5rem) + 62px);
  overflow: hidden;
  overflow: clip;
  isolation: isolate;

  /* Completely static solid #151515 background — never scaled, blurred, translated or faded */
  background-color: var(--color-bg);
}

/* Independent oversized geometric grid layer (#242424) extending well beyond viewport edges */
.home__grid {
  position: absolute;
  inset: -40%;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--color-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-grid) 1px, transparent 1px);
  background-size: var(--grid-cell) var(--grid-cell);
  background-position: center center;
  transform-origin: center center;
}

.home__stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 100%;
  max-width: 1920px;
  margin-top: auto;
  transform-origin: center center;
}

/* --------------------------------------------------------------------------
   Intro Statement Centered Between Floating Figure & Dock (Alpha Tango Style)
   -------------------------------------------------------------------------- */

.home__statement {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  width: min(92vw, 940px);
  margin-block: auto;
  margin-inline: auto;
  padding-block: clamp(0.75rem, 1.8dvh, 1.25rem);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: clamp(0.84rem, 1.06vw, 0.98rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.025em;
  text-align: center;
  text-wrap: balance;
  font-kerning: none;
}

.home__statement-line {
  display: block;
}

.home__statement-inner {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  /* Stage 3: Statement lines rise smoothly out of blur after the character settles */
  .home__statement-inner {
    animation: statement-line-reveal 0.8s var(--ease-brutalist) both;
  }

  .home__statement-line:nth-child(1) .home__statement-inner {
    animation-delay: 1.1s;
  }

  .home__statement-line:nth-child(2) .home__statement-inner {
    animation-delay: 1.26s;
  }
}

@keyframes statement-line-reveal {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translate3d(0, 22px, 0);
  }
  99% {
    opacity: 1;
    filter: blur(0px);
    transform: translate3d(0, 0, 0);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: translate3d(0, 0, 0);
  }
}

/* --------------------------------------------------------------------------
   Monumental Display Wordmark ("BLUE") — Layered Behind Character
   -------------------------------------------------------------------------- */

.home__wordmark {
  grid-area: 1 / 1;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 400;
  /* Scales across desktop, tablet, and mobile to span almost full width */
  font-size: clamp(6rem, 32.5vw, 35rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.home__letter {
  display: inline-block;
}

/* Stage 1: Monumental BLUE appears first, rising cleanly out of blur from center outward */
@media (prefers-reduced-motion: no-preference) {
  .home__letter {
    animation: wordmark-reveal 0.85s var(--ease-brutalist) both;
  }

  .home__letter--inner {
    animation-delay: 0.05s;
  }

  .home__letter--outer {
    animation-delay: 0.16s;
  }
}

@keyframes wordmark-reveal {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translate3d(0, 26px, 0);
  }
  99% {
    opacity: 1;
    filter: blur(0px);
    transform: translate3d(0, 0, 0);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: translate3d(0, 0, 0);
  }
}

/* --------------------------------------------------------------------------
   Central Character & Synchronized Independent CSS Shadow
   -------------------------------------------------------------------------- */

.home__figure {
  grid-area: 1 / 1;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Visual optical centering accounting for the shadow underneath */
  margin-top: clamp(0.5rem, 1.5dvh, 1.25rem);
}

/* Stage 2: Floating character & shadow rise smoothly out of blur after BLUE */
@media (prefers-reduced-motion: no-preference) {
  .home__figure {
    animation: figure-enter 0.9s var(--ease-brutalist) 0.55s both;
  }
}

@keyframes figure-enter {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translate3d(0, 28px, 0);
  }
  99% {
    opacity: 1;
    filter: blur(0px);
    transform: translate3d(0, 0, 0);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: translate3d(0, 0, 0);
  }
}

.home__levitate {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home__photo {
  /* Preserves original 1095x1185 proportions with zero distortion or scaling (+7% additional size) */
  aspect-ratio: 1095 / 1185;
  width: auto;
  height: auto;
  max-height: clamp(309px, 68.7dvh, 641px);
  max-width: min(91.6vw, 595px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* Independent soft ground shadow underneath the character (+7% additional size, clear gap) */
.home__shadow {
  position: relative;
  z-index: 1;
  width: min(54%, 309px);
  height: clamp(22.9px, 3.21dvh, 34.3px);
  margin-top: clamp(0.75rem, 1.75dvh, 1.35rem);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.56) 42%,
    rgba(0, 0, 0, 0.18) 66%,
    rgba(0, 0, 0, 0) 80%
  );
  opacity: 0.85;
  transform: scale3d(1, 1, 1);
  pointer-events: none;
}

/* Opt in to smooth continuous 12px / 5s ease-in-out levitation & synced shadow */
@media (prefers-reduced-motion: no-preference) {
  .home__levitate {
    will-change: transform;
    animation: character-levitate var(--float-duration) ease-in-out infinite;
  }

  .home__shadow {
    will-change: transform, opacity;
    animation: shadow-sync var(--float-duration) ease-in-out infinite;
  }
}

@keyframes character-levitate {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, calc(var(--float-amplitude) * -1), 0);
  }
}

@keyframes shadow-sync {
  0%,
  100% {
    transform: scale3d(1, 1, 1);
    opacity: 0.85;
  }
  50% {
    transform: scale3d(0.84, 0.76, 1);
    opacity: 0.44;
  }
}

/* --------------------------------------------------------------------------
   Responsive Refinements (Tablet & Mobile)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .home__wordmark {
    font-size: clamp(5.5rem, 32vw, 22rem);
  }

  .home__photo {
    max-height: clamp(297px, 59.5dvh, 526px);
    max-width: min(77.9vw, 492px);
  }

  .home__statement {
    width: min(86vw, 660px);
    font-size: clamp(0.875rem, 1.8vw, 1rem);
    line-height: 1.48;
  }
}

@media (max-width: 600px) {
  .home {
    padding-inline: 1rem;
    padding-top: clamp(2.5rem, 8dvh, 4.5rem);
    padding-bottom: calc(1.25rem + 60px);
  }

  .home__statement {
    width: min(88vw, 356px);
    padding-block: 1rem;
    font-size: clamp(0.875rem, 3.6vw, 0.98rem);
    line-height: 1.52;
    letter-spacing: 0.02em;
  }

  .home__wordmark {
    font-size: clamp(5.5rem, 32vw, 11.5rem);
    letter-spacing: -0.045em;
  }

  .home__photo {
    max-height: 55dvh;
    max-width: 80.1vw;
  }

  .home__shadow {
    width: min(56%, 217px);
    height: 20.7px;
  }
}
