/* GPTLayman — under construction. Dark, quiet, a little cosmic. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/SpaceGrotesk-latin.woff2?v=1") format("woff2");
}

:root {
  --bg: #05070e;
  --ink: #e9edf9;
  --muted: #98a2ba;
  --line: rgba(255, 255, 255, 0.08);
  --indigo: #6d7cff;
  --cyan: #2ad4e8;
  --amber: #fbbf24;
  --card: rgba(13, 17, 31, 0.55);
  --card-radius: 28px;
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { color-scheme: dark; overflow-x: hidden; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- backdrop ---------- */

#space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.38;
}

.blob { position: absolute; border-radius: 50%; will-change: transform; }

.blob-a {
  width: 55vmax; height: 55vmax;
  left: -12vmax; top: -18vmax;
  background: radial-gradient(circle at 35% 35%, rgba(109, 124, 255, 0.55), transparent 62%);
  animation: drift-a 34s ease-in-out infinite alternate;
}

.blob-b {
  width: 46vmax; height: 46vmax;
  right: -14vmax; bottom: -20vmax;
  background: radial-gradient(circle at 60% 60%, rgba(42, 212, 232, 0.4), transparent 60%);
  animation: drift-b 28s ease-in-out infinite alternate;
}

.blob-c {
  width: 30vmax; height: 30vmax;
  right: 8vw; top: 6vh;
  background: radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.22), transparent 58%);
  animation: drift-c 22s ease-in-out infinite alternate;
}

@keyframes drift-a { to { transform: translate(9vw, 7vh) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-7vw, -8vh) scale(1.08); } }
@keyframes drift-c { to { transform: translate(-5vw, 6vh) scale(0.92); } }

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 0%, transparent 72%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout ---------- */

.scene {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: clamp(40px, 8vh, 88px) clamp(18px, 3vw, 32px) 24px;
  padding: max(clamp(40px, 8vh, 88px), env(safe-area-inset-top)) max(clamp(18px, 3vw, 32px), env(safe-area-inset-right)) 24px max(clamp(18px, 3vw, 32px), env(safe-area-inset-left));
}

.card {
  width: min(560px, 100%);
  text-align: center;
  padding: clamp(28px, 3.4vw, 44px) clamp(22px, 4vw, 48px);
  border-radius: var(--card-radius);
  background: rgba(10, 14, 26, 0.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(109, 124, 255, 0.55), rgba(255, 255, 255, 0.06) 38%, rgba(42, 212, 232, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- type ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.55);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

/* the 404 scene signals error, not construction */
body[data-scene="lost"] .dot {
  background: #f87171;
  animation-name: pulse-red;
}

@keyframes pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(248, 113, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

.eyebrow {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(2.15rem, 5.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 14px;
}

.grad {
  background: linear-gradient(92deg, var(--indigo) 0%, var(--cyan) 55%, var(--amber) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 1.55;
  max-width: 46ch;
  margin: 0 auto 28px;
  text-wrap: pretty;
}

/* ---------- cta + footer ---------- */

.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0a0d18;
  background: linear-gradient(92deg, var(--cyan), var(--indigo));
  border-radius: 999px;
  padding: 12px 30px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 34px rgba(109, 124, 255, 0.35);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(109, 124, 255, 0.45); }
.btn:active { transform: translateY(0); }

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 999px;
}

.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ---------- mobile ---------- */

@media (max-width: 560px) {
  .scene { gap: 12px; padding-top: max(28px, env(safe-area-inset-top)); }
  .aurora { filter: blur(40px); opacity: 0.42; }
  .card { border-radius: 22px; }
  h1 { font-size: clamp(1.9rem, 8.4vw, 2.3rem); }
}

/* short-landscape viewports: let the footer flow instead of pinning over the card */
@media (max-height: 520px) {
  .foot { position: static; margin-top: 18px; }
}

/* forced-colors / high-contrast mode: keep the headline word visible */
@media (forced-colors: active) {
  .grad { color: CanvasText; background: none; }
}

/* users who ask for more contrast get it */
@media (prefers-contrast: more) {
  :root { --muted: #b6bfd4; --line: rgba(255, 255, 255, 0.16); }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .blob, .dot, body[data-scene="lost"] .dot { animation: none; }
  .btn { transition: none; }
}
