:root {
  color-scheme: dark;
  --ink: #f7f3ff;
  --muted: #cfc7dc;
  --violet: #c65cff;
  --magenta: #ff42c5;
  --cyan: #35d9ff;
  --amber: #ffb65f;
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
  margin: 0;
  background: #05060b;
}

body {
  min-height: 100svh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(rgba(5, 6, 11, .52), rgba(5, 6, 11, .52)),
    url("assets/pixel-hq-hero.webp") 50% 50% / cover no-repeat,
    #070810;
}

.hero__art,
.hero__art img,
.hero__shade,
.ambient-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__art { z-index: -3; }

.hero__art img {
  object-fit: contain;
  object-position: 50% 50%;
}

.hero__shade {
  z-index: -2;
  background: linear-gradient(180deg, rgba(4, 5, 11, .15), transparent 38%, rgba(4, 5, 11, .28));
}

.ambient-glow {
  z-index: -1;
  left: 52%;
  top: 31%;
  width: 31vmax;
  height: 31vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(189, 69, 255, .16), transparent 67%);
  mix-blend-mode: screen;
  animation: breathe 9s ease-in-out infinite alternate;
}

.identity,
.brand-architecture {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.domain {
  position: absolute;
  z-index: 2;
  right: clamp(1rem, 2.5vw, 2.5rem);
  bottom: clamp(1rem, 2vw, 2rem);
  padding: .7rem .9rem;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(6, 7, 15, .56);
  box-shadow: 0 0 24px rgba(190, 80, 255, .13);
  color: rgba(255, 255, 255, .82);
  font-size: clamp(.62rem, .7vw, .76rem);
  font-weight: 500;
  letter-spacing: .28em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  animation: reveal 1.4s .5s both;
}

.domain:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

@keyframes breathe {
  from { opacity: .45; transform: scale(.96); }
  to { opacity: 1; transform: scale(1.05); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-aspect-ratio: 4 / 5) {
  .hero__art img { object-fit: cover; object-position: 58% 50%; }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(4, 5, 11, .92) 0%, rgba(4, 5, 11, .42) 27%, transparent 52%),
      linear-gradient(0deg, rgba(4, 5, 11, .96) 0%, rgba(4, 5, 11, .45) 31%, transparent 55%);
  }

  .identity {
    position: relative;
    align-self: start;
    width: auto;
    height: auto;
    margin: 0;
    padding: clamp(2.25rem, 9vw, 4.5rem) 1.5rem 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    text-align: center;
    animation: reveal 1.4s both;
  }

  .eyebrow,
  .identity h1,
  .statement,
  .brand-architecture h2,
  .brand-architecture p { margin: 0; text-transform: uppercase; }

  .eyebrow {
    font-size: clamp(.78rem, 3.8vw, 1.05rem);
    letter-spacing: .32em;
  }

  .identity h1 {
    margin-top: .8rem;
    color: #f3e7ff;
    font-size: clamp(.7rem, 3.4vw, .92rem);
    font-weight: 400;
    letter-spacing: .4em;
    text-shadow: 0 0 18px rgba(201, 83, 255, .7);
  }

  .statement {
    margin-top: 1.1rem;
    color: var(--muted);
    font-size: clamp(.57rem, 2.6vw, .7rem);
    letter-spacing: .24em;
  }

  .brand-architecture {
    position: relative;
    isolation: isolate;
    align-self: end;
    display: grid;
    gap: .8rem;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0 1.25rem 5.2rem;
    overflow: visible;
    clip: auto;
    white-space: normal;
    text-align: center;
    animation: reveal 1.4s .35s both;
  }

  .brand-architecture::before {
    position: absolute;
    z-index: -1;
    inset: -1.25rem -.75rem -1.6rem;
    content: "";
    background: radial-gradient(
      ellipse at 50% 58%,
      rgba(4, 5, 11, .94) 0%,
      rgba(4, 5, 11, .84) 50%,
      rgba(4, 5, 11, .42) 72%,
      transparent 88%
    );
    backdrop-filter: blur(2px);
    pointer-events: none;
  }

  .brand-architecture section { min-width: 0; }
  .brand-architecture h2 { font-size: .68rem; font-weight: 500; letter-spacing: .3em; }
  .brand-architecture p { margin-top: .25rem; color: #d398ef; font-size: .5rem; letter-spacing: .2em; }

  .domain {
    right: 50%;
    bottom: 1.25rem;
    transform: translateX(50%);
    animation-name: reveal-mobile;
  }

  @keyframes reveal-mobile {
    from { opacity: 0; transform: translate(50%, 8px); }
    to { opacity: 1; transform: translate(50%, 0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
