@import url("brand-tokens.css");

:root {
  --crd-font-sans: "Inter", Arial, Helvetica, sans-serif;
  --crd-font-mono: "Space Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100svh;
  overflow-x: clip;
  background: var(--crd-black);
  color: var(--crd-light-gray);
  font-family: var(--crd-font-sans);
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(64, 64, 64, 0.62) 0%,
      rgba(64, 64, 64, 0.26) 30%,
      rgba(0, 0, 0, 0.92) 76%
    ),
    linear-gradient(
      145deg,
      rgba(176, 36, 24, 0.05),
      transparent 35%,
      rgba(219, 46, 32, 0.035)
    );
}

body::after {
  position: fixed;
  z-index: 0;
  right: 0;
  bottom: -22vh;
  left: 0;
  height: 48vh;
  content: "";
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(176, 36, 24, 0.17),
    rgba(0, 0, 0, 0) 68%
  );
}

canvas {
  position: fixed;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  row-gap: 32px;
  justify-items: center;
  padding: clamp(28px, 4vh, 48px) 30px clamp(26px, 4vh, 42px);
  text-align: center;
}

.brand-logo {
  display: block;
  width: clamp(180px, 13vw, 205px);
  height: auto;
  opacity: 0.98;
}

.hero {
  align-self: center;
  width: min(100%, 1320px);
  transform: translateY(-4vh);
}

h1 {
  margin: 0;
  color: var(--crd-light-gray);
  font-size: clamp(1.5rem, 4.4vw, 4.4rem);
  font-weight: 300;
  letter-spacing: 0.29em;
  line-height: 1.04;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.34);
  transform: translateX(0.145em);
  white-space: nowrap;
}

h2 {
  margin: 0.28em 0 0.18em;
  padding-left: 0.68em;
  color: var(--crd-red);
  font-size: clamp(2.1rem, 4vw, 3.55rem);
  font-weight: 800;
  letter-spacing: 0.68em;
  line-height: 1;
}

.line {
  width: 220px;
  height: 3px;
  margin: 24px auto 20px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--crd-dark-red), var(--crd-red));
  box-shadow: 0 0 22px rgba(219, 46, 32, 0.28);
}

.type {
  min-height: 2em;
  margin: 0;
  color: var(--crd-light-gray);
  font-family: var(--crd-font-mono);
  font-size: clamp(1.3rem, 2vw, 2rem);
  letter-spacing: 0.01em;
}

.type::after {
  content: "█";
  color: var(--crd-red);
  animation: blink 1s step-end infinite;
}

.email {
  align-self: end;
  margin: 0;
  font-size: clamp(0.88rem, 1.1vw, 1.08rem);
  letter-spacing: 0.045em;
}

.email a {
  color: var(--crd-light-gray);
  opacity: 0.88;
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease;
}

.email a:hover,
.email a:focus-visible {
  color: var(--crd-white);
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--crd-red);
  text-underline-offset: 0.3em;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 700px) {
  main {
    padding: 24px 14px 26px;
  }

  .brand-logo {
    width: 150px;
  }

  .hero {
    width: 100%;
    transform: translateY(-1vh);
  }

  h1 {
    font-size: clamp(1rem, 6.6vw, 1.92rem);
    letter-spacing: 0.115em;
    transform: translateX(0.057em);
  }

  h2 {
    margin-top: 0.42em;
    padding-left: 0.5em;
    font-size: clamp(1.55rem, 6.7vw, 1.86rem);
    letter-spacing: 0.5em;
  }

  .line {
    width: 150px;
    height: 2px;
    margin-top: 21px;
    margin-bottom: 18px;
  }

  .type {
    font-size: 1.03rem;
  }

  .email {
    font-size: 0.82rem;
    letter-spacing: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .type::after {
    animation: none;
  }
}

.email { overflow-wrap: anywhere; max-width: 100%; }
.email a:focus-visible { outline: 2px solid var(--crd-light-gray); outline-offset: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-height: 600px) { .hero { transform: none; } }
html[data-static] .type::after { animation: none; }
