/* ---------- Tokens ---------- */
:root {
  --bg: #101010;
  --fg: #F5F5F5;
  --accent: #BCFF2B;
  --muted: #8A8A8A;
  --rabbit: #5A5A5A;
  --rabbit-tail: #9A9A9A;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin-400.woff2') format('woff2');
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--mono);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--muted); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus-visible { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--bg); }

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 96px 24px;
}
.stage > * { grid-area: 1 / 1; }

/* ---------- Intro rabbit ---------- */
.rabbit {
  position: relative;
  width: 18em;
  height: 18em;
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(11px, 1.5vw, 18px);
  line-height: 1em;
  pointer-events: none;
}
.rabbit span {
  position: absolute;
  width: 0.6em;
  text-align: center;
  color: var(--rabbit);
  will-change: transform, opacity;
}
.rabbit span.is-tail { color: var(--rabbit-tail); }

/* ---------- Hero (logo + typed line) ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  text-align: center;
}
.hero__title { margin: 0; line-height: 0; }
.hero__logo-btn {
  all: unset;
  display: block;
  cursor: pointer;
  line-height: 0;
}
.hero__logo-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 12px; border-radius: 8px; }
.logo { width: clamp(240px, 32vw, 460px); height: auto; overflow: visible; }

.tagline {
  margin: 0;
  display: flex;
  align-items: center;
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--accent);
}
.tagline__text {
  display: inline-block;
  width: 13ch;
  overflow: hidden;
  white-space: nowrap;
}
.tagline__cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 4px;
  background: var(--accent);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px clamp(20px, 4vw, 48px);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- Sequencing ----------
   With JS: hero + footer stay hidden until main.js adds .is-ready to <html>.
   Without JS: everything is visible and static. */
.js .hero, .js .footer { visibility: hidden; }
.js.is-ready .hero, .js.is-ready .footer { visibility: visible; }
.js.is-ready .rabbit { display: none; }
.no-js .rabbit { display: none; }

@keyframes in {
  from { opacity: 0; transform: translateY(12px); filter: blur(6px); }
}
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(188, 255, 43, 0)); }
  50%      { filter: drop-shadow(0 0 18px rgba(188, 255, 43, .55)); }
}
@keyframes type  { from { width: 0; } }
@keyframes blink { 50% { opacity: 0; } }

.is-ready .logo            { animation: in 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.is-ready .logo__accent    { animation: glow 4s ease-in-out 1.4s infinite; }
.is-ready .tagline__text   { animation: type 1.3s steps(13) 1.6s both; }
.is-ready .footer          { animation: in 1s ease 3.2s both; }
.tagline__cursor           { animation: blink 1s step-end infinite; }

@media (prefers-reduced-motion: reduce) {
  .logo, .logo__accent, .tagline__text, .tagline__cursor, .footer { animation: none !important; }
}
