/* SPECTRA — lab white, ink, holographic spectrum */
:root {
  --lab: #f2f4f7;
  --lab-deep: #e6e9ef;
  --ink: #16181d;
  --chrome: #8b93a3;
  --holo-1: #ff9ee0;
  --holo-2: #9ee8ff;
  --holo-3: #c2ffd4;
  --holo-4: #ffe29e;
  --display: "Unbounded", sans-serif;
  --body: "Space Grotesk", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, #ffffff 0%, var(--lab) 55%, var(--lab-deep) 100%);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}
body.no-webgl .stage {
  background: url("assets/hero.png") center / cover no-repeat;
  filter: saturate(1.05);
}
body.no-webgl #lab { display: none; }

::selection { background: var(--holo-1); color: var(--ink); }

a { color: inherit; text-decoration: none; }
a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* ---------- stage / canvas ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}
#lab {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.hud__corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.hud__corner--tl { top: 1.6rem; left: 1.9rem; }
.hud__corner--tr { top: 1.6rem; right: 1.9rem; text-align: right; }
.hud__corner--bl { bottom: 1.6rem; left: 1.9rem; }
.hud__corner--br { bottom: 1.6rem; right: 1.9rem; text-align: right; }
.hud__brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.34em;
}
.hud__sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chrome);
}
.hud__mono {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
}
.hud__dim { color: var(--chrome); }
.blink { animation: rec-blink 1.6s steps(1) infinite; color: #ff5470; }
@keyframes rec-blink { 50% { opacity: 0.25; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 clamp(1.5rem, 6vw, 5rem) 15vh;
  pointer-events: none;
}
.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8.5vw, 6.8rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
}
.holo {
  background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 55%, #4d5563 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.holo--two {
  background: linear-gradient(95deg, var(--holo-1), var(--holo-2) 35%, var(--holo-3) 65%, var(--holo-4));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo-shift 7s ease-in-out infinite alternate;
}
@keyframes holo-shift {
  from { background-position: 0% 0; }
  to { background-position: 100% 0; }
}
.holo-inline {
  background: linear-gradient(95deg, var(--holo-1), var(--holo-2) 40%, var(--holo-4));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo-shift 6s ease-in-out infinite alternate;
}
.hero__sub {
  max-width: 26rem;
  margin-top: 1.4rem;
  font-size: 1rem;
  color: #3f4550;
}
.hero__scroll {
  pointer-events: auto;
  margin-top: 2.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  color: var(--chrome);
  transition: color .3s;
}
.hero__scroll:hover { color: var(--ink); }
.hero__scroll-arrow {
  display: inline-block;
  animation: arrow-dip 2s ease-in-out infinite;
}
@keyframes arrow-dip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- content ---------- */
.content {
  position: relative;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(242,244,247,0) 0, rgba(242,244,247,0.9) 15rem, rgba(242,244,247,0.9));
}

.sec-head { max-width: 1180px; margin: 0 auto clamp(2.6rem, 5vw, 4rem); }
.sec-eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--chrome);
  margin-bottom: 1rem;
}
.sec-eyebrow--light { color: rgba(242,244,247,0.55); }
.sec-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  line-height: 1.08;
}

/* collection */
.collection {
  padding: clamp(5rem, 10vw, 9rem) clamp(1.5rem, 6vw, 5rem);
}
.specimens {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
}
.specimen {
  background: rgba(255,255,255,0.66);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(22,24,29,0.08);
  transition: transform .3s cubic-bezier(.3,.7,.3,1), box-shadow .3s;
  display: flex;
  flex-direction: column;
}
.specimen:hover, .specimen:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(22,24,29,0.13);
}
.specimen__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.specimen__swatch {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.specimen__swatch span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 3.4rem;
  color: rgba(255,255,255,0.85);
  mix-blend-mode: overlay;
}
.specimen__swatch--vapor {
  background:
    radial-gradient(circle at 30% 35%, rgba(255,255,255,0.75), transparent 45%),
    linear-gradient(135deg, var(--holo-2), var(--holo-1));
}
.specimen__swatch--static {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.16) 0 2px, transparent 2px 5px),
    linear-gradient(135deg, #4b4f5c, #22242c);
}
.specimen__swatch--mirage {
  background:
    radial-gradient(circle at 65% 30%, rgba(255,255,255,0.8), transparent 50%),
    linear-gradient(135deg, var(--holo-3), var(--holo-4));
}
.specimen__data { padding: 1.4rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.specimen__name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.specimen__desc { font-size: 0.88rem; color: #3f4550; margin-bottom: 1.2rem; flex: 1; }
.specimen__table { display: grid; gap: 0.35rem; }
.specimen__table div {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  border-top: 1px dashed rgba(139,147,163,0.4);
  padding-top: 0.35rem;
}
.specimen__table dt { color: var(--chrome); }

/* process */
.process { padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 6vw, 5rem); }
.phases {
  max-width: 1180px;
  margin: 0 auto;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.phase {
  border-top: 2px solid var(--ink);
  padding-top: 1.2rem;
  position: relative;
}
.phase::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--holo-1), var(--holo-2), var(--holo-4));
  transition: width .8s cubic-bezier(.3,.7,.3,1);
}
.phase:hover::before { width: 100%; }
.phase__num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--chrome);
  letter-spacing: 0.2em;
}
.phase h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  margin: 0.5rem 0 0.6rem;
}
.phase p { font-size: 0.9rem; color: #3f4550; max-width: 22rem; }

/* reserve */
.reserve { padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 6vw, 5rem) clamp(5rem, 9vw, 8rem); }
.reserve__inner {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--lab);
  border-radius: 26px;
  padding: clamp(2.6rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
.reserve__inner::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -12%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(158,232,255,0.22), rgba(255,158,224,0.12) 55%, transparent 75%);
  pointer-events: none;
}
.reserve__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0.6rem 0 1.2rem;
}
.reserve__body { max-width: 34rem; color: rgba(242,244,247,0.78); margin-bottom: 2.2rem; }
.reserve__link {
  font-family: var(--mono);
  font-size: clamp(1rem, 2.6vw, 1.4rem);
  letter-spacing: 0.06em;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--holo-1), var(--holo-2)) 1;
  padding-bottom: 0.25rem;
  transition: opacity .3s;
}
.reserve__link:hover { opacity: 0.75; }
.reserve__fine {
  margin-top: 2.4rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: rgba(242,244,247,0.5);
}

/* foot */
.foot {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem 6rem;
}

/* portal return */
.portal-return {
  position: fixed;
  bottom: 1.3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--chrome);
  border: 1px solid rgba(139,147,163,0.4);
  border-radius: 999px;
  padding: 0.55em 1.2em;
  background: rgba(242,244,247,0.75);
  backdrop-filter: blur(8px);
  transition: color .25s, border-color .25s;
}
.portal-return:hover { color: var(--ink); border-color: var(--ink); }

/* reveals */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s cubic-bezier(.25,.6,.25,1), transform .9s cubic-bezier(.25,.6,.25,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* responsive */
@media (max-width: 900px) {
  .phases { grid-template-columns: 1fr; gap: 2.2rem; }
  .hud__corner--bl, .hud__corner--br { display: none; }
  .hero { padding-bottom: 12vh; }
}
@media (max-width: 560px) {
  .hud__corner--tl { top: 1.1rem; left: 1.2rem; }
  .hud__corner--tr { top: 1.1rem; right: 1.2rem; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
