/* The Quantum Environment — black and gold, hairline instrument language */

/* Self-hosted latin subsets. See fonts/OFL.txt for licensing. */
@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/spectral-300.woff2") format("woff2");
}

@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/spectral-400.woff2") format("woff2");
}

@font-face {
  font-family: "Spectral";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/spectral-300-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Fragment Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/fragment-mono-400.woff2") format("woff2");
}

:root {
  --void: #0b0a08;
  --warm: #131009;
  --line: rgba(201, 162, 39, 0.16);
  --gold: #c9a227;
  --gold-bright: #e6c566;
  --ivory: #f1ead8;
  --dim: #988f76;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* Energy-level positions: 1 - 1/n^2, the real convergence. Carried as
   classes rather than inline style attributes so the page needs no
   'unsafe-inline' in its Content-Security-Policy. */
.n1 { --e: 0; }
.n2 { --e: 0.75; }
.n3 { --e: 0.889; }
.n4 { --e: 0.9375; }

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: #2a2417 var(--void);
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ivory);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--gold);
  color: var(--void);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--void);
}

::-webkit-scrollbar-thumb {
  background: #2a2417;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 4rem 1.5rem 8rem;
  text-align: center;
}

/* Energy-level diagram: line positions follow E = -1/n^2, so levels converge upward. */
.levels {
  position: relative;
  width: 96px;
  height: 190px;
  margin: 0 auto 3.5rem;
}

.levels::before {
  content: "";
  position: absolute;
  left: 0;
  top: -9px;
  bottom: -9px;
  width: 1px;
  background: var(--line);
}

@media (max-width: 659px) {
  .levels {
    width: 72px;
    height: 150px;
  }

  .levels::before {
    top: -7px;
    bottom: -7px;
  }
}

.level {
  position: absolute;
  left: 12px;
  right: 0;
  bottom: calc(var(--e) * 100%);
  height: 1px;
  background: var(--gold);
}

.level.is-virtual {
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 10px);
  opacity: 0.5;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.75rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-bright);
}

.tagline {
  margin: 1.75rem 0 0;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--dim);
}

.cue {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 14px 2.5rem;
}

.cue .line {
  display: block;
  width: 1px;
  height: 72px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.cue .line::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  width: 1px;
  height: 12px;
  background: var(--gold-bright);
  animation: descend 2.8s cubic-bezier(0.45, 0, 0.25, 1) 1.8s infinite;
}

@keyframes descend {
  to {
    transform: translateY(96px);
  }
}

/* Load stagger — the page's one authored motion moment. */
.levels,
.hero h1,
.tagline {
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cue {
  animation: appear 1.2s ease-out both;
}

.levels { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.18s; }
.tagline { animation-delay: 0.34s; }
.cue { animation-delay: 0.7s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }
}

/* ---------- The four states ---------- */

.states {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(4.5rem, 12vh, 8.5rem) clamp(1.25rem, 4vw, 3rem);
}

.states h2 {
  margin: 0 0 2.75rem;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 300;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.states h2::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 290px;
  padding: 1.9rem 1.7rem 1.7rem;
  background: var(--void);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.4s ease;
}

a.card:hover {
  background: var(--warm);
}

a.card:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: -2px;
}

.mark {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 2.4rem;
}

.glyph {
  position: relative;
  width: 30px;
  height: 40px;
}

.glyph::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}

.glyph i {
  position: absolute;
  left: 7px;
  right: 0;
  bottom: calc(var(--e) * 100%);
  height: 1px;
  background: var(--gold);
  transition: background-color 0.4s ease;
}

.glyph i.is-virtual {
  background: repeating-linear-gradient(90deg, var(--gold) 0 5px, transparent 5px 8px);
  opacity: 0.5;
}

a.card:hover .glyph i {
  background: var(--gold-bright);
}

.qn {
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.18em;
  color: var(--dim);
}

.name {
  margin: 0 0 0.55rem;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.25;
  transition: color 0.4s ease;
}

a.card:hover .name {
  color: var(--gold-bright);
}

.desc {
  margin: 0 0 2.2rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--dim);
  max-width: 30ch;
}

.cta {
  margin-top: auto;
  position: relative;
  padding-bottom: 7px;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--line);
}

.cta::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

a.card:hover .cta::before,
a.card:focus-visible .cta::before {
  transform: scaleX(1);
}

.tag {
  margin-top: auto;
  padding: 7px 11px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.is-soon .name {
  color: var(--dim);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.6rem clamp(1.25rem, 4vw, 3rem);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.65rem;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- Responsive ---------- */

@media (min-width: 660px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .levels,
  .hero h1,
  .tagline,
  .cue {
    animation: none;
  }

  .cue .line::after {
    animation: none;
    top: auto;
    bottom: 0;
  }

  .card,
  .glyph i,
  .name,
  .cta::before {
    transition: none;
  }
}
