:root {
  --red: #ca202b;
  --red-bright: #ed4a54;
  --ink: #050506;
  --paper: #f4f0eb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-shell {
  min-height: 100%;
}

.video-screen,
.contact-screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.video-screen {
  background: #111;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.video-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent 28%, transparent 68%, rgba(0, 0, 0, 0.42)),
    radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.18) 100%);
  pointer-events: none;
}

.video-shade::after,
.contact-screen::after {
  content: "";
  position: absolute;
  inset: -50%;
  opacity: 0.085;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 23%, white 0 0.45px, transparent 0.75px),
    radial-gradient(circle at 71% 62%, white 0 0.35px, transparent 0.7px),
    radial-gradient(circle at 43% 84%, white 0 0.4px, transparent 0.72px);
  background-size: 7px 9px, 11px 13px, 13px 7px;
  animation: grain 0.24s steps(2) infinite;
}

.corner-label,
.screen-index {
  position: absolute;
  z-index: 3;
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.corner-label {
  top: clamp(1.4rem, 3vw, 2.7rem);
  left: clamp(1.4rem, 4vw, 4.2rem);
  color: rgba(255, 255, 255, 0.72);
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  right: clamp(1.4rem, 4vw, 4.2rem);
  bottom: clamp(1.4rem, 3vw, 2.7rem);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: rgba(255, 255, 255, 0.74);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-cue i {
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  position: relative;
  transition: border-color 200ms ease, transform 200ms ease;
}

.scroll-cue i::before {
  content: "";
  position: absolute;
  width: 0.35rem;
  height: 0.35rem;
  left: 50%;
  top: 46%;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.scroll-cue:hover i,
.scroll-cue:focus-visible i {
  border-color: white;
  transform: translateY(3px);
}

.contact-screen {
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 28%, rgba(166, 17, 28, 0.13), transparent 32%),
    linear-gradient(135deg, #09090b, #030304 62%);
}

.network-canvas,
.tech-grid,
.scan-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.network-canvas {
  z-index: -3;
}

.tech-grid {
  z-index: -2;
  inset: auto -15% -54%;
  width: 130%;
  height: 92%;
  opacity: 0.22;
  transform: perspective(550px) rotateX(58deg);
  transform-origin: center bottom;
  background-image:
    linear-gradient(rgba(216, 48, 60, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 48, 60, 0.2) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: linear-gradient(to bottom, transparent, black 28%, black 72%, transparent);
}

.scan-line {
  z-index: -1;
  height: 1px;
  top: 8%;
  opacity: 0.45;
  background: linear-gradient(90deg, transparent, rgba(239, 65, 77, 0.85), transparent);
  box-shadow: 0 0 35px 8px rgba(204, 29, 41, 0.16);
  animation: scan 7s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.contact-content {
  position: relative;
  z-index: 2;
  width: min(82vw, 970px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.signal-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 clamp(2rem, 5vh, 4.2rem);
  color: rgba(255, 255, 255, 0.4);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.signal-label span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 14px 3px rgba(237, 74, 84, 0.45);
  animation: pulse 1.9s ease-in-out infinite;
}

.wordmark {
  display: block;
  width: min(46vw, 480px);
  height: auto;
  filter: drop-shadow(0 0 38px rgba(202, 32, 43, 0.16));
  user-select: none;
}

.slogan {
  margin: clamp(1.2rem, 3vh, 2rem) 0 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: clamp(0.74rem, 1.2vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.email-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: clamp(3rem, 7vh, 5.4rem);
  color: var(--paper);
  font-size: clamp(1.35rem, 2.8vw, 2.35rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

.email-link span {
  align-self: flex-start;
  color: var(--red-bright);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.email-link::after {
  content: "";
  width: 100%;
  height: 1px;
  margin-top: 0.35rem;
  background: linear-gradient(90deg, var(--red), rgba(255, 255, 255, 0.18));
  transform: scaleX(0.16);
  transform-origin: left;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.email-link:hover::after,
.email-link:focus-visible::after {
  transform: scaleX(1);
}

.screen-index {
  left: clamp(1.4rem, 4vw, 4.2rem);
  bottom: clamp(1.4rem, 3vw, 2.7rem);
  color: rgba(255, 255, 255, 0.28);
}

.back-cue {
  position: absolute;
  z-index: 3;
  right: clamp(1.4rem, 4vw, 4.2rem);
  bottom: clamp(1.4rem, 3vw, 2.7rem);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 200ms ease, border-color 200ms ease;
}

.back-cue:hover,
.back-cue:focus-visible {
  color: white;
  border-color: rgba(255, 255, 255, 0.56);
}

@keyframes scan {
  0%, 100% { transform: translateY(0); opacity: 0; }
  12% { opacity: 0.42; }
  50% { transform: translateY(78vh); opacity: 0.2; }
  88% { opacity: 0.42; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.88); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2%, -1%); }
  50% { transform: translate(-1%, 2%); }
  75% { transform: translate(1%, 1%); }
  100% { transform: translate(-2%, -1%); }
}

@media (max-width: 640px) {
  .corner-label {
    max-width: 12rem;
    line-height: 1.6;
  }

  .scroll-cue span {
    display: none;
  }

  .contact-content {
    width: 86vw;
  }

  .wordmark {
    width: min(64vw, 360px);
  }

  .slogan {
    font-size: 0.62rem;
    line-height: 1.65;
    letter-spacing: 0.2em;
  }

  .email-link {
    font-size: clamp(1.3rem, 7vw, 1.75rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-video { display: none; }
  .video-screen {
    background:
      radial-gradient(circle at 68% 28%, rgba(202, 32, 43, 0.2), transparent 34%),
      #080809;
  }
  .scan-line,
  .signal-label span,
  .video-shade::after,
  .contact-screen::after {
    animation: none;
  }
}
