:root {
  --bg: #222222;
  --grid-line: #2c2c2c;
  --gold: #e2b82a;
  --gold-hover: #edc63c;
  --on-gold: #241d00;
  --ink: #fbfbfb;
  --ink-soft: #d3d3d3;
  --field-border: #e2e2e2;
  --placeholder: #8a8a8a;

  /* One design pixel. The reference layout is measured at a 1024px viewport,
     so every size below is written in reference pixels and scales with it. */
  --u: clamp(0.86px, 0.0977vw, 1.5625px);

  --pad-x: calc(81 * var(--u));
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Background grid ---------- */

.grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 7% 25%;
  background-position: 11px -2px;
}

/* ---------- Topbar ---------- */

.topbar {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(16 * var(--u));
  padding: calc(19 * var(--u)) var(--pad-x) 0;
}

.logo {
  display: block;
  line-height: 0;
}

.logo img {
  width: calc(49 * var(--u));
  height: auto;
}

.hi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--u));
  flex: none;
  height: calc(31 * var(--u));
  margin-top: calc(7 * var(--u));
  padding: 0 calc(19 * var(--u));
  border-radius: calc(4 * var(--u));
  background: var(--gold);
  color: var(--on-gold);
  font-size: calc(8.8 * var(--u));
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.hi:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
}

.hi__wave {
  width: calc(19 * var(--u));
  height: calc(19 * var(--u));
  flex: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(80 * var(--u)) var(--pad-x) calc(76 * var(--u));
  text-align: center;
}

.hero__title {
  margin: 0;
  font-size: calc(40.9 * var(--u));
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.hero__copy {
  margin: calc(19 * var(--u)) 0 0;
  color: var(--ink-soft);
  font-size: calc(12.8 * var(--u));
  font-weight: 400;
  line-height: 1.5625;
}

/* ---------- Signup ---------- */

.signup {
  position: relative;
  width: 100%;
  max-width: calc(512 * var(--u));
  margin: calc(47 * var(--u)) 0 0;
}

.signup__field {
  display: flex;
  align-items: stretch;
  padding: calc(2 * var(--u));
  border: 1px solid var(--field-border);
  border-radius: calc(3 * var(--u));
}

.signup__input {
  flex: 1;
  min-width: 0;
  padding: 0 calc(13 * var(--u));
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: calc(11.5 * var(--u));
  font-weight: 400;
  letter-spacing: 0.005em;
}

.signup__input::placeholder {
  color: var(--placeholder);
}

.signup__input:focus {
  outline: none;
}

.signup__field:focus-within {
  border-color: var(--gold);
}

.signup__btn {
  flex: none;
  height: calc(36 * var(--u));
  padding: 0 calc(16 * var(--u));
  border: 0;
  border-radius: calc(4 * var(--u));
  background: var(--gold);
  color: var(--on-gold);
  font-family: inherit;
  font-size: calc(9.6 * var(--u));
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.signup__btn:hover:not(:disabled) {
  background: var(--gold-hover);
}

.signup__btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Absolute so the reserved space never shifts the hero off centre. */
.signup__status {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: calc(11 * var(--u)) 0 0;
  font-size: calc(11 * var(--u));
  color: var(--ink-soft);
}

.signup__status.is-error {
  color: #ff8a7a;
}

.signup__status.is-success {
  color: var(--gold);
}

/* ---------- Entrance ---------- */

.hero__title,
.hero__copy,
.signup {
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__copy {
  animation-delay: 0.1s;
}

.signup {
  animation-delay: 0.2s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Phones ---------- */

@media (max-width: 720px) {
  :root {
    --pad-x: 22px;
  }

  .grid {
    background-size: 14% 18%;
  }

  .topbar {
    padding-top: 20px;
  }

  .logo img {
    width: 42px;
  }

  .hi {
    height: 34px;
    gap: 7px;
    padding: 0 14px;
    border-radius: 5px;
    font-size: 11px;
  }

  .hi__wave {
    width: 17px;
    height: 17px;
  }

  .hero {
    padding: 96px var(--pad-x) 72px;
  }

  .hero__title {
    font-size: 8.4vw;
    line-height: 1.2;
  }

  .hero__copy {
    margin-top: 14px;
    font-size: 3.5vw;
  }

  .hero__copy br {
    display: none;
  }

  .signup {
    max-width: 100%;
    margin-top: 30px;
  }

  .signup__field {
    flex-direction: column;
    padding: 5px;
    border-radius: 5px;
  }

  .signup__input {
    padding: 12px 10px;
    font-size: 13px;
  }

  .signup__btn {
    height: 42px;
    border-radius: 5px;
    font-size: 12.5px;
  }

  .signup__status {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
