:root {
  --bg: #0a0a0a;
  --gold: #ffd100;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --rule: rgba(255, 255, 255, 0.28);
  --pill: rgba(255, 255, 255, 0.85);
  --micro: rgba(255, 255, 255, 0.32);
  --font: Inter, system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

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

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

::selection {
  background: var(--gold);
  color: #0a0a0a;
}

a {
  -webkit-tap-highlight-color: rgba(255, 209, 0, 0.2);
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip:focus {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  left: max(0.75rem, env(safe-area-inset-left));
  z-index: 8;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.65rem 0.9rem;
  overflow: visible;
  clip: auto;
  background: var(--gold);
  color: #0a0a0a;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-radius: 4px;
  outline: 2px solid #fff;
  outline-offset: 3px;
}

#neural {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.code-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.code-ghost {
  position: absolute;
  max-width: min(440px, 72vw);
  color: #f9f8f6;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s linear;
}

.code-ghost.is-in {
  opacity: 0.8;
}

.code-ghost-line {
  margin: 0;
  min-height: 1.6em;
  white-space: pre;
}

@media (prefers-reduced-motion: reduce) {
  .code-field {
    display: none;
  }
}

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding:
    max(32px, env(safe-area-inset-top))
    max(40px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(40px, env(safe-area-inset-left));
}

.chrome,
.lockup,
.wordmark,
.gutter,
h1,
.sub,
.pill,
.micro {
  opacity: 1;
}

.chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  pointer-events: none;
}

.chrome a {
  pointer-events: auto;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
}

.mark {
  display: block;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.wordmark {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.035em;
  line-height: 1;
  color: #fff;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid var(--pill);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}

.pill:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.lockup:focus-visible,
.pill:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 820px;
  min-height: 0;
  padding-bottom: 48px;
}

.gutter {
  align-self: flex-start;
  width: fit-content;
  margin-bottom: 20px;
  padding: 6px 12px;
  border-radius: 0;
  background: var(--gold);
  color: #0a0a0a;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

h1 {
  position: relative;
  max-width: 12ch;
  font-weight: 800;
  font-size: clamp(4.5rem, 8.2vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: #fff;
}

h1.is-glitch::before,
h1.is-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

h1.is-glitch::before {
  color: rgba(255, 64, 64, 0.85);
  transform: translate(-3px, 0);
  clip-path: inset(10% 0 52% 0);
}

h1.is-glitch::after {
  color: rgba(90, 220, 255, 0.8);
  transform: translate(3px, 1px);
  clip-path: inset(48% 0 8% 0);
}

@media (prefers-reduced-motion: reduce) {
  h1.is-glitch::before,
  h1.is-glitch::after {
    content: none;
  }
}

.rule {
  width: 64px;
  height: 1px;
  margin: 28px 0 22px;
  border: 0;
  background: var(--rule);
}

.sub {
  max-width: 28ch;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--muted);
}

.micro {
  position: absolute;
  left: max(40px, env(safe-area-inset-left));
  bottom: max(28px, env(safe-area-inset-bottom));
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--micro);
}

@media (max-width: 640px) {
  .shell {
    padding:
      max(24px, env(safe-area-inset-top))
      max(20px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
  }

  .mark {
    width: 32px;
    height: 32px;
  }

  .wordmark {
    font-size: 1.05rem;
  }

  .pill {
    padding: 9px 14px;
    font-size: 0.75rem;
  }

  .hero {
    max-width: 100%;
    padding-bottom: 36px;
  }

  h1 {
    font-size: clamp(3.25rem, 14vw, 4.75rem);
  }

  .micro {
    left: max(20px, env(safe-area-inset-left));
    bottom: max(20px, env(safe-area-inset-bottom));
  }
}

@media (max-height: 520px) {
  .shell {
    padding:
      max(6px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }

  .chrome {
    gap: 10px;
  }

  .lockup {
    gap: 8px;
  }

  .mark {
    width: 26px;
    height: 26px;
  }

  .wordmark {
    font-size: 1rem;
  }

  .pill {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .hero {
    padding-bottom: 2px;
    justify-content: center;
  }

  .gutter {
    margin-bottom: 6px;
    padding: 3px 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  h1 {
    font-size: clamp(1.5rem, 7.4vh, 2.65rem);
    line-height: 1;
  }

  .rule {
    width: 40px;
    margin: 6px 0 6px;
  }

  .sub {
    font-size: clamp(0.8rem, 2.5vh, 0.95rem);
    line-height: 1.25;
  }

  .micro {
    bottom: max(6px, env(safe-area-inset-bottom));
    font-size: 9px;
  }
}

@media (max-height: 520px) and (min-width: 560px) {
  h1 {
    max-width: 100%;
    font-size: clamp(1.35rem, 4.4vw, 2.55rem);
    white-space: nowrap;
  }

  .sub {
    max-width: 100%;
    font-size: clamp(0.75rem, 1.7vw, 0.95rem);
    white-space: nowrap;
  }
}

.loader {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  display: block;
  visibility: visible;
  overflow: hidden;
  background: #000;
  color: #f9f8f6;
  pointer-events: auto;
  transform: translateZ(0);
  transition: opacity 0.7s linear;
}

.loader.is-out {
  opacity: 0;
  pointer-events: none;
}


.loader-block {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  color: #f9f8f6;
  max-width: min(40rem, calc(100vw - 28px));
}

@media (max-width: 700px) {
  .loader-block {
    font-size: 11px;
    max-width: calc(100vw - 28px);
  }
}

.loader-block.is-glitch {
  animation: loader-shift 0.1s steps(2, end) infinite;
}

.loader-block.is-glitch .loader-line {
  text-shadow: 2px 0 rgba(255, 72, 72, 0.9), -2px 0 rgba(80, 210, 255, 0.85);
}

@keyframes loader-shift {
  50% {
    transform: translate(3px, -1px);
  }
}

.loader-line {
  height: 0;
  margin: 0;
  overflow: hidden;
  white-space: pre;
  color: inherit;
}

.loader-line.is-on {
  height: auto;
  min-height: 1.65em;
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.loader-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 0;
  margin: 0 0 0 46px;
  overflow: hidden;
  opacity: 0;
}

.loader-brand.is-on {
  height: auto;
  margin: 16px 0 16px 46px;
  overflow: visible;
  opacity: 1;
  transition: opacity 0.4s linear;
}

.loader-brand img {
  display: block;
  width: 28px;
  height: 28px;
}

.loader-brand span {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: inherit;
}
