@font-face {
  font-family: 'Terminalia';
  src: url('./Terminalia-Regular.woff2') format('woff2'),
       url('./Terminalia-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Terminalia', sans-serif;
  background-color: #000;
  overflow: hidden;
}

.slide {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
}

.background-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.bg-color {
  position: absolute;
  inset: 0;
  background-color: black;
}

.bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.25) 100%
  );
}

.bg-dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

.skull-flicker {
  animation: diode-blink 4s infinite;
}

@keyframes diode-blink {
  0%, 100% { filter: brightness(1) saturate(1); }
  3% { filter: brightness(1.5) saturate(1.8) contrast(1.2); }
  6% { filter: brightness(0.8) saturate(0.8); }
  9% { filter: brightness(1.8) saturate(2) contrast(1.3); }
  12% { filter: brightness(1) saturate(1); }
  50% { filter: brightness(1) saturate(1); }
  52% { filter: brightness(1.4) saturate(1.5); }
  54% { filter: brightness(1) saturate(1); }
}

.left-overlay-image {
  position: absolute;
  left: 0;
  top: -92px;
  width: 600px;
  height: 1200px;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.terminal-scroll {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: scroll-up 15s steps(80, end) infinite;
  mix-blend-mode: plus-lighter;
  opacity: 0.48;
}

.terminal-scroll img {
  width: 100%;
  height: 1200px;
  object-fit: cover;
  max-width: none;
}

@keyframes scroll-up {
  0% { transform: translateY(0); }
  100% { transform: translateY(-1200px); }
}

.top-navigation {
  display: flex;
  gap: 40px;
  height: 55px;
  width: 756px;
  align-items: flex-start;
  position: relative;
  flex-shrink: 0;
  z-index: 3;
}

.nav-button {
  display: flex;
  flex: 1 0 0;
  height: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 1px;
}

.main-content {
  display: flex;
  flex: 1 0 0;
  width: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 1px;
  z-index: 3;
}

.center-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.connect-button {
  display: flex;
  height: 50px;
  width: 444px;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.button-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
  pointer-events: none;
  transition: filter 0.2s ease;
}

.button-text {
  position: relative;
  font-size: 40px;
  color: black;
  white-space: nowrap;
  line-height: normal;
  font-style: normal;
  flex-shrink: 0;
  word-break: break-word;
}

.interactive-btn {
  cursor: pointer;
  transition: transform 0.1s ease;
}

.interactive-btn:hover {
  transform: scale(1.03);
}

.interactive-btn:hover .button-bg {
  filter: brightness(1.3) contrast(1.2);
}

.interactive-btn:active {
  transform: scale(0.98);
}

.title-text {
  position: relative;
  font-size: 96px;
  color: white;
  text-align: center;
  width: 524px;
  line-height: normal;
  font-style: normal;
  flex-shrink: 0;
  word-break: break-word;
  text-shadow: 0px 0px 39.5px rgba(255, 255, 255, 0.25);
}

.subtitle-text {
  position: relative;
  font-size: 32px;
  color: white;
  text-align: center;
  width: 444px;
  line-height: normal;
  font-style: normal;
  flex-shrink: 0;
  word-break: break-word;
  text-shadow: 0px 0px 39.5px rgba(255, 255, 255, 0.25);
}
/* Anchor-wrapped buttons must look identical to the original <div> buttons */
a.connect-button,
a.nav-button {
  text-decoration: none;
  color: inherit;
}

/* Unavailable buttons: glitch out on hover, no navigation */
.glitch-btn {
  cursor: not-allowed;
}
.glitch-btn:hover {
  animation: btn-glitch 0.4s steps(3, end) infinite;
}
.glitch-btn:hover .button-text,
.glitch-btn:hover .tab-text {
  animation: txt-glitch 0.4s steps(3, end) infinite;
}
/* Naturalistic signal jitter — monochrome, no rainbow hue shifts */
@keyframes btn-glitch {
  0%, 100% { transform: translate(0, 0);      filter: none; }
  20%      { transform: translate(-1px, 0);   filter: brightness(1.08) contrast(1.08); }
  40%      { transform: translate(1px, -1px); filter: brightness(0.9); }
  60%      { transform: translate(-1px, 1px); filter: brightness(1.04); }
  80%      { transform: translate(1px, 0);    filter: contrast(1.12); }
}
@keyframes txt-glitch {
  0%, 100% { text-shadow: none;                                        opacity: 1; }
  30%      { text-shadow: 1px 0 rgba(255, 255, 255, 0.45), -1px 0 rgba(0, 0, 0, 0.6); opacity: 0.9; }
  60%      { text-shadow: -1px 0 rgba(255, 255, 255, 0.35);            opacity: 0.82; }
}

/* ============================================================
   Mobile adaptation — keep the layout centered and readable,
   scale the fixed-pixel elements down to the viewport width.
   ============================================================ */
@media (max-width: 768px) {
  .slide {
    padding: 24px 16px;
  }

  /* Decorative terminal scroll: dial it back so it never washes out the title */
  .left-overlay-image {
    width: 340px;
    top: -40px;
    opacity: 0.3;
  }

  .top-navigation {
    width: 100%;
    max-width: 756px;
    gap: 12px;
    height: 48px;
  }
  .top-navigation .button-text { font-size: 18px; }

  .center-block {
    width: 100%;
    gap: 16px;
  }

  .title-text {
    font-size: 56px;
    width: 100%;
    max-width: 440px;
  }
  .subtitle-text {
    font-size: 22px;
    width: 100%;
    max-width: 380px;
  }

  .connect-button {
    width: 100%;
    max-width: 444px;
    height: 48px;
  }
  .connect-button .button-text { font-size: 26px; }
}

@media (max-width: 420px) {
  .left-overlay-image { opacity: 0.22; }

  .top-navigation {
    gap: 8px;
    height: 44px;
  }
  .top-navigation .button-text { font-size: 15px; }

  .title-text { font-size: 42px; }
  .subtitle-text { font-size: 18px; }

  .connect-button { height: 44px; }
  .connect-button .button-text { font-size: 22px; }
}
