/* LoRAplex coming soon page. Designed and built by Nick Vivarelli. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --void: #070504;
  --text: #f7f1ea;
  --body: #d2c8be;
  --subtle: #c4b9ae;
  --muted: #9c9088;
  --amber: #ffb547;
  --butter: #ffe38a;
  --ember: #e0561f;
  --ink: #1f1003;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  background: var(--void);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

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

:focus-visible {
  outline: 2px solid var(--butter);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Page frame: header, hero, footer, with the 3D stage behind everything. */

.page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  overflow: hidden;
}

.stage {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

.scene-ready .stage {
  opacity: 1;
}

.stage-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.stage-labels {
  position: absolute;
  inset: 0;
}

.tag {
  position: absolute;
  top: 0;
  left: 0;
  translate: -50% -50%;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tag b {
  margin-right: 0.35em;
  font-weight: 500;
  color: var(--amber);
}

/* Header */

.nav,
.hero,
.footer {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: -4px; /* the mark's side corners sit inside its box */
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--subtle);
}

.dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--amber);
  animation: ping 2.4s var(--ease) infinite;
}

.ghost {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.ghost:hover {
  color: var(--text);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding-block: clamp(16px, 5vh, 64px);
}

.copy {
  position: relative;
  max-width: 40rem;
}

.eyebrow {
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--butter);
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 0.9rem + 4.6vw, 5.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h1 span {
  display: block;
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  margin-top: 30px;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--body);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding-inline: 22px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.25s var(--ease);
}

.button .arrow {
  transition: transform 0.25s var(--ease);
}

.button:hover {
  background: var(--butter);
}

.button:hover .arrow {
  transform: translateX(3px);
}

.stack {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* The slot the sculpture is framed into. The canvas itself sits behind the
   whole page, so the object can bleed past this box without being clipped. */

.visual {
  position: relative;
  align-self: stretch;
  min-height: clamp(360px, 64vh, 720px);
}

.has-webgl .visual {
  cursor: pointer;
}

.fallback {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.no-webgl .fallback {
  display: block;
}

.no-webgl .swap,
.no-webgl .stage-labels {
  display: none;
}

.hud {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  justify-items: end;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-align: right;
  color: var(--muted);
}

.formula {
  font-size: 0.8125rem;
  color: var(--text);
}

.swap {
  margin-top: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--amber);
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}

.swap::before {
  content: "↻ ";
}

.swap:hover {
  color: var(--butter);
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.footer a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgb(255 181 71 / 0.35);
  transition: border-color 0.2s;
}

.footer a:hover {
  border-color: var(--amber);
}

/* Entrance */

.reveal {
  animation: rise 1s var(--ease) both;
}

.copy > .reveal:nth-child(2) {
  animation-delay: 0.08s;
}

.copy > .reveal:nth-child(3) {
  animation-delay: 0.16s;
}

.copy > .reveal:nth-child(4) {
  animation-delay: 0.24s;
}

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

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70%,
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Phones and narrow windows: text first, sculpture underneath. */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 8px;
    padding-top: clamp(20px, 6vh, 48px);
  }

  .visual {
    min-height: 0;
    height: clamp(300px, 48svh, 520px);
  }

  .hud {
    right: 0;
  }
}

@media (max-width: 560px) {
  .nav-meta .ghost {
    display: none;
  }

  .eyebrow {
    margin-bottom: 20px;
    font-size: 0.6875rem;
  }

  .lede {
    margin-top: 22px;
  }

  .actions {
    margin-top: 28px;
  }

  .tag-w {
    display: none;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .dot::after {
    animation: none;
  }

  .stage {
    transition: none;
  }
}

/* 404 page: one column, no sculpture. */

.hero-single {
  grid-template-columns: minmax(0, 1fr);
}
