@font-face {
  font-family: 'Alan Sans';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/alan-sans-latin.woff2') format('woff2-variations'),
       url('/fonts/alan-sans-latin.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-deep: #02040a;
  --fg: #eef5ff;
  --muted: #8190a8;
  --muted-strong: #aab7cd;
  --line: rgba(140, 190, 255, 0.22);
  --cyan: #68e8ff;
  --blue: #6d8dff;
  --violet: #a978ff;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(67, 116, 255, 0.20), transparent 36rem),
    radial-gradient(circle at 20% 20%, rgba(104, 232, 255, 0.10), transparent 28rem),
    radial-gradient(circle at 85% 76%, rgba(169, 120, 255, 0.10), transparent 28rem),
    linear-gradient(135deg, var(--bg-deep), var(--bg) 48%, #070713);
  color: var(--fg);
  font-family: 'Alan Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  opacity: 0.46;
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(circle at center, black 0%, black 42%, transparent 78%);
}

body::after {
  z-index: 3;
  opacity: 0.62;
  background: radial-gradient(ellipse at center, transparent 0 38%, rgba(0,0,0,0.38) 78%, rgba(0,0,0,0.66) 100%);
}

#infra-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100vw;
  height: 100vh;
  background: transparent;
}

.shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100svh;
  padding-block: clamp(1.25rem, 4vw, 3rem);
  padding-inline: clamp(1.25rem, 4vw, 4rem);
}

/* Layout container only — no background, no border, no shadow.
   Text sits directly on the canvas field. */
.card {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(100%, 52rem);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.foot {
  justify-self: center;
  width: min(100%, 52rem);
  padding-block-start: clamp(1.5rem, 3vw, 2.5rem);
  padding-block-end: max(0.5rem, env(safe-area-inset-bottom));
}

.eyebrow {
  margin: 0 0 1.4rem;
  color: var(--muted-strong);
  font-size: clamp(0.72rem, 1.7vw, 0.82rem);
  font-weight: 560;
  letter-spacing: 0.32em;
  line-height: 1.4;
  text-transform: uppercase;
  text-shadow:
    0 0 24px rgba(104, 232, 255, 0.35),
    0 0 60px rgba(0, 0, 0, 0.7);
  animation: reveal 900ms cubic-bezier(.2,.8,.2,1) 200ms both;
}

h1 {
  position: relative;
  margin: 0;
  padding-inline-start: 1.1rem;
  font-size: clamp(2.2rem, 6.4vw, 4.6rem);
  font-weight: 640;
  letter-spacing: -0.040em;
  line-height: 1.02;
  text-align: left;
}

/* Thin vertical accent line on the left — the axis the staircase hangs from. */
h1::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0.18em 0.32em;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(104, 232, 255, 0.55) 18%,
    rgba(109, 141, 255, 0.45) 50%,
    rgba(169, 120, 255, 0.45) 82%,
    transparent 100%
  );
  box-shadow: 0 0 14px rgba(104, 232, 255, 0.30);
  transform-origin: top;
  animation: axis-grow 1100ms cubic-bezier(.16, 1, .3, 1) 220ms both;
}

h1 span {
  display: block;
  background: linear-gradient(
    115deg,
    #ffffff 0%,
    var(--cyan) 22%,
    #ffffff 44%,
    var(--blue) 66%,
    var(--violet) 86%,
    #ffffff 100%
  );
  background-size: 280% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "kern" 1;
  filter:
    drop-shadow(0 0 22px rgba(104, 232, 255, 0.22))
    drop-shadow(0 0 48px rgba(109, 141, 255, 0.14))
    drop-shadow(0 2px 18px rgba(0, 0, 0, 0.55));
  animation:
    headline-fade 320ms cubic-bezier(.16, 1, .3, 1) both,
    aurora-shift 14s ease-in-out infinite;
}

h1 span:nth-child(1) { animation-delay: 320ms, 0s;  padding-inline-start: 0; }
h1 span:nth-child(2) { animation-delay: 520ms, -3s; padding-inline-start: 1.6em; }
h1 span:nth-child(3) { animation-delay: 720ms, -7s; padding-inline-start: 3.2em; }

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.links a:first-of-type  { animation: slide-from-left  1300ms cubic-bezier(.34, 1.56, .64, 1) 2320ms both; }
.links a:nth-of-type(2) { animation: pop-up             900ms cubic-bezier(.34, 1.56, .64, 1) 2620ms both; }
.links a:last-of-type   { animation: slide-from-right 1300ms cubic-bezier(.34, 1.56, .64, 1) 2320ms both; }

.links a {
  position: relative;
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid rgba(140, 190, 255, 0.22);
  border-radius: 999px;
  background: rgba(6, 10, 20, 0.42);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  color: #dbeaff;
  font-size: 0.82rem;
  font-weight: 560;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease,
    transform 220ms ease;
}

.links a .ico {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  color: var(--cyan);
  filter: drop-shadow(0 0 8px rgba(104, 232, 255, 0.55));
  transition: color 220ms ease, filter 220ms ease, transform 220ms ease;
}

.links a:nth-of-type(2) .ico {
  color: var(--blue);
  filter: drop-shadow(0 0 8px rgba(109, 141, 255, 0.55));
}

.links a:nth-of-type(3) .ico {
  color: var(--violet);
  filter: drop-shadow(0 0 8px rgba(169, 120, 255, 0.55));
}

.links a:hover,
.links a:focus-visible {
  border-color: rgba(104, 232, 255, 0.66);
  background: rgba(104, 232, 255, 0.10);
  box-shadow: 0 0 38px rgba(104, 232, 255, 0.18);
  color: #ffffff;
  outline: 2px solid rgba(104, 232, 255, 0.72);
  outline-offset: 4px;
  transform: translateY(-1px);
}

.links a:hover .ico,
.links a:focus-visible .ico {
  color: #ffffff;
  filter: drop-shadow(0 0 12px rgba(104, 232, 255, 0.85));
  transform: scale(1.08);
}

.noscript {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 4;
  max-width: calc(100vw - 2rem);
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(104, 232, 255, 0.24);
  border-radius: 999px;
  background: rgba(2, 4, 10, 0.82);
  color: var(--muted-strong);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  backdrop-filter: blur(12px);
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(14px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

@keyframes headline-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes aurora-shift {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}

@keyframes slide-from-left {
  0%   { opacity: 0; transform: translate3d(-110vw, 0, 0) scale(0.86) rotate(-4deg); filter: blur(10px); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: translate3d(0, 0, 0)        scale(1)    rotate(0);     filter: blur(0); }
}

@keyframes slide-from-right {
  0%   { opacity: 0; transform: translate3d(110vw, 0, 0)  scale(0.86) rotate(4deg);  filter: blur(10px); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: translate3d(0, 0, 0)        scale(1)    rotate(0);     filter: blur(0); }
}

@keyframes pop-up {
  0%   { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.82); filter: blur(6px); }
  100% { opacity: 1; transform: translate3d(0, 0, 0)     scale(1);    filter: blur(0); }
}

@keyframes axis-grow {
  0%   { opacity: 0; transform: scaleY(0); }
  100% { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 640px) {
  .shell {
    padding-block: 1rem max(1rem, env(safe-area-inset-bottom));
  }

  .card { padding: 1.5rem; }

  h1 {
    font-size: clamp(1.95rem, 9.5vw, 3.2rem);
    letter-spacing: -0.045em;
    padding-inline-start: 0.75rem;
  }

  h1 span:nth-child(2) { padding-inline-start: 1em; }
  h1 span:nth-child(3) { padding-inline-start: 2em; }

  .foot { padding-block-start: 1.25rem; }

  .links { gap: 0.55rem; }

  .links a {
    flex: 1 1 auto;
    padding-inline: 0.75rem;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }

  #infra-field { opacity: 0.42; }

  .eyebrow,
  h1 span,
  .links {
    opacity: 1;
    transform: none;
    filter: none;
  }

  /* Restore a flat fill so the text remains visible when the gradient animation
     is disabled. */
  h1 span {
    background: none;
    -webkit-text-fill-color: var(--fg);
            color: var(--fg);
  }
}
