/* ─────────────────────────────────────────────────────────────
   humannoid.ai — domain splash
   Aesthetic: cinematic void. The emblem is delivered on a pure
   #000 field, so the page base matches it exactly and every
   atmospheric layer is *additive light painted above* the image.
   That way the artwork bleeds into the page with no seam.
   ───────────────────────────────────────────────────────────── */

:root {
  --void:        #000;
  --void-lift:   #0a0f18;
  --chrome:      #d3d9e3;
  --chrome-dim:  #828d9e;
  --chrome-face: #545e6e;
  --blue:        #2f7dff;

  --rule: rgba(211, 217, 227, 0.14);

  --font-display: 'Michroma', 'Trebuchet MS', sans-serif;
  --font-body: 'Archivo', 'Helvetica Neue', sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.75rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--void);
  color: var(--chrome);
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* ── Atmosphere ─────────────────────────────────────────────────
   Sits *above* the artwork (z-index 2) and never intercepts input.
   Every layer is low-alpha light over black, so it reads the same
   whether it falls on the emblem or on bare page.
   ────────────────────────────────────────────────────────────── */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.atmosphere__grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, rgba(211, 217, 227, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(211, 217, 227, 0.05) 1px, transparent 1px);
  background-size: clamp(58px, 7vw, 104px) clamp(58px, 7vw, 104px);
  mask-image: radial-gradient(ellipse 74% 66% at 50% 42%, transparent 30%, #000 94%);
  -webkit-mask-image: radial-gradient(ellipse 74% 66% at 50% 42%, transparent 30%, #000 94%);
  opacity: 0;
  animation: fade-in 2.4s var(--ease-out) 0.85s forwards;
}

.atmosphere__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 44% at 50% 122%, rgba(19, 58, 128, 0.24), transparent 72%),
    radial-gradient(ellipse 90% 34% at 50% -18%, rgba(132, 143, 161, 0.10), transparent 72%);
  opacity: 0;
  animation:
    fade-in 2.1s var(--ease-out) 0.2s forwards,
    breathe 14s ease-in-out 2.4s infinite;
}

.atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* ── Stage ──────────────────────────────────────────────────── */

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(1rem, 3vh, 2.25rem) var(--gutter) clamp(1.25rem, 3vh, 2rem);
}

/* ── Edge rails ─────────────────────────────────────────────── */

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  width: var(--gutter);
  opacity: 0;
  animation: fade-in 1.4s var(--ease-out) 1.05s forwards;
}

.rail--left  { left: 0; }
.rail--right { right: 0; }

.rail__text {
  font-family: var(--font-display);
  font-size: 0.5625rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--chrome-face);
  writing-mode: vertical-rl;
}

.rail--left .rail__text { transform: rotate(180deg); }

.rail__tick {
  width: 1px;
  height: clamp(40px, 9vh, 96px);
  background: linear-gradient(to bottom, transparent, var(--rule), transparent);
}

.rail--left .rail__tick {
  background: linear-gradient(to bottom, transparent, rgba(47, 125, 255, 0.6), transparent);
}

/* ── The mark ───────────────────────────────────────────────── */

.mark {
  display: grid;
  place-items: center;
  padding-block: clamp(0.5rem, 4vh, 3rem);
}

.mark__frame {
  position: relative;
  margin: 0;
  width: min(62vw, 66vh, 660px);
  aspect-ratio: 1;
  isolation: isolate;
}

.mark__image {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  animation: mark-in 1.9s var(--ease-out) 0.35s forwards;
}

/* Halo hugging the emblem — begins outside the artwork's own
   footprint, so it never washes over the chrome or the wordmark. */
.mark__frame::after {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    transparent 60%,
    rgba(47, 125, 255, 0.13) 74%,
    transparent 95%
  );
  opacity: 0;
  animation:
    fade-in 2.6s var(--ease-out) 0.6s forwards,
    breathe 11s ease-in-out 3s infinite;
}

/* Slow reconnaissance sweep across the emblem. */
.mark__sweep {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 76% at 50% 50%, #000 52%, transparent 92%);
  -webkit-mask-image: radial-gradient(ellipse 80% 76% at 50% 50%, #000 52%, transparent 92%);
}

.mark__sweep::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  height: 34%;
  top: 0;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(47, 125, 255, 0.06) 42%,
    rgba(211, 217, 227, 0.08) 52%,
    transparent
  );
  transform: translate3d(0, -140%, 0);
  animation: sweep 11s cubic-bezier(0.55, 0, 0.45, 1) 3.5s infinite;
}

/* ── Notice ─────────────────────────────────────────────────── */

.notice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1rem, 3vw, 3rem);
  padding-top: clamp(1.1rem, 2.4vh, 1.75rem);
  opacity: 0;
  animation: rise-in 1.3s var(--ease-out) 1.15s forwards;
}

.notice__hairline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, rgba(47, 125, 255, 0.62), var(--rule) 34%, transparent 96%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: rule-in 1.5s var(--ease-out) 0.95s forwards;
}

.notice__eyebrow {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.5625rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--chrome-face);
}

.notice__line {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(0.875rem, 0.79rem + 0.36vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.008em;
  color: var(--chrome-dim);
  text-wrap: pretty;
}

.notice__mail {
  color: var(--chrome);
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 1px;
  background-image: linear-gradient(var(--blue), var(--blue));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: color 0.3s ease, background-size 0.4s var(--ease-out);
}

.notice__mail:hover,
.notice__mail:focus-visible {
  color: #fff;
  background-size: 100% 2px;
}

/* ── Actions ────────────────────────────────────────────────── */

.notice__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.66rem 1.05rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: rgba(10, 15, 24, 0.6);
  color: var(--chrome);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease,
              background-color 0.25s ease, color 0.25s ease;
}

.btn__icon { width: 15px; height: 15px; flex: none; }

.btn--solid {
  border-color: rgba(47, 125, 255, 0.5);
  background: linear-gradient(160deg, rgba(47, 125, 255, 0.22), rgba(11, 47, 110, 0.3));
  color: #eaf1ff;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 125, 255, 0.85);
  background-color: rgba(47, 125, 255, 0.12);
}

.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.btn[data-state="done"]   { border-color: rgba(47, 125, 255, 0.85); color: #eaf1ff; }
.btn[data-state="failed"] { border-color: rgba(196, 108, 96, 0.75); }

.btn-status {
  flex-basis: 100%;
  margin: 0;
  min-height: 1em;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chrome-face);
}

/* ── Small screens ──────────────────────────────────────────── */

@media (max-width: 860px) {
  .rail { display: none; }

  .notice {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.25rem;
  }

  .notice__actions { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .mark { padding-block: clamp(1rem, 6vh, 2.5rem); }
  .mark__frame { width: 88vw; }
  .notice__line { font-size: 0.9375rem; }
  .btn { flex: 1 1 auto; justify-content: center; }
}

/* ── Motion ─────────────────────────────────────────────────── */

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

@keyframes mark-in {
  from { opacity: 0; transform: scale(1.045); filter: blur(7px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}

@keyframes rule-in {
  to { transform: scaleX(1); }
}

@keyframes sweep {
  0%        { transform: translate3d(0, -140%, 0); }
  55%, 100% { transform: translate3d(0, 340%, 0); }
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.72; }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere__grid,
  .atmosphere__wash,
  .rail,
  .mark__image,
  .mark__frame::after,
  .notice {
    opacity: 1;
    animation: none;
  }

  .notice__hairline { transform: scaleX(1); animation: none; }
  .mark__sweep { display: none; }

  .btn { transition: none; }
  .btn:hover { transform: none; }
}
