:root {
  --black: #000000;
  --white: #ffffff;
  --grey: #8a8a8a;
  --line: #4a4a4a;
  --rule: #2a2a2a;
  --stamp: #ff3b3b;
  --font: 'Courier Prime', 'Courier New', Courier, monospace;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: calc(60px + env(safe-area-inset-top, 0px)) 80px calc(56px + env(safe-area-inset-bottom, 0px));
}

.publisher {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- centre ---------- */

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
  width: 100%;
  max-width: 760px;
}

.logo {
  display: block;
  width: 204px;
  height: auto;
}

.headline {
  margin: 0;
  font-size: 31px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
}

.sub {
  margin: 20px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--grey);
  text-align: center;
}

.signup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.signup-row {
  display: flex;
  gap: 12px;
}

.signup input {
  width: 316px;
  height: 54px;
  padding: 0 16px;
  background: var(--black);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
}
.signup input::placeholder { color: var(--grey); opacity: 1; }
.signup input:focus { outline: none; border-color: var(--white); }
.signup input[aria-invalid="true"] { border-color: var(--stamp); }

.signup button {
  height: 54px;
  padding: 0 26px;
  background: var(--white);
  border: 1px solid var(--white);
  border-radius: 0;
  color: var(--black);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.signup button:hover { background: var(--black); color: var(--white); }
.signup button:disabled { cursor: progress; opacity: 0.6; }

.note {
  margin: 0;
  min-height: 1.4em;
  font-size: 12px;
  color: var(--grey);
  text-align: center;
}
.note.is-error { color: var(--stamp); }

.follow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.follow-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- icons ---------- */

.socials {
  display: flex;
  align-items: center;
  gap: 20px;
}
.socials a {
  display: block;
  line-height: 0;
  opacity: 1;
  transition: opacity 0.15s ease;
}
.socials a:hover { opacity: 0.55; }
.socials img { display: block; width: 18px; height: 18px; }
.socials.is-large { gap: 28px; }
.socials.is-large img { width: 24px; height: 24px; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

/* ---------- footer ---------- */

.footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.footer-rule { height: 1px; background: var(--rule); }
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-side { flex: 1; display: flex; }
.footer-side.is-right { justify-content: flex-end; }

.copyright {
  margin: 0;
  font-size: 12px;
  color: var(--grey);
}

.stamp {
  border: 6px double var(--stamp);
  border-radius: 3px;
  color: var(--stamp);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 10px 20px;
  transform: rotate(-3.5deg);
  -webkit-mask-image: repeating-linear-gradient(118deg, #000 0 5px, rgba(0,0,0,0.45) 5px 6px, #000 6px 13px, rgba(0,0,0,0.3) 13px 14px, #000 14px 19px);
          mask-image: repeating-linear-gradient(118deg, #000 0 5px, rgba(0,0,0,0.45) 5px 6px, #000 6px 13px, rgba(0,0,0,0.3) 13px 14px, #000 14px 19px);
}

/* ---------- states ---------- */

.state[hidden] { display: none; }
.is-done #footer-socials { display: none; }

.state.is-entering { animation: arrive 0.5s ease both; }
@keyframes arrive {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .state.is-entering { animation: none; }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  .page {
    gap: 40px;
    padding: calc(44px + env(safe-area-inset-top, 0px)) 28px calc(40px + env(safe-area-inset-bottom, 0px));
  }
  .publisher { font-size: 11px; }
  .stage { gap: 34px; }
  .logo { width: 192px; }
  .headline { font-size: 21px; line-height: 1.45; }
  .signup { width: 100%; align-items: stretch; gap: 12px; }
  .signup-row { flex-direction: column; }
  .signup input { width: 100%; height: 52px; }
  .signup button { height: 52px; }
  .note { font-size: 11px; }

  .footer { align-items: center; gap: 18px; }
  .footer-rule { width: 100%; }
  .footer-row { flex-direction: column; gap: 22px; }
  .footer-side, .footer-side.is-right { flex: none; justify-content: center; }
  .footer-row .stamp { order: -1; font-size: 13px; padding: 9px 16px; }
  .socials { gap: 22px; }
  .is-done .footer-side:first-child { display: none; }
}

/* ---------- honeypot ---------- */
/* Pushed out of view rather than display:none — many bots skip
   display:none fields, which would defeat the point. */
.hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- footer links ---------- */

.copyright a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.copyright a:hover { color: var(--white); border-bottom-color: var(--grey); }

/* ---------- text pages (privacy, 404) ---------- */

.doc {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}
.doc h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
}
.doc .updated {
  margin: 0 0 40px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
}
.doc h2 {
  margin: 36px 0 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.doc p, .doc li {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--grey);
}
.doc ul { margin: 0 0 14px; padding-left: 20px; }
.doc a { color: var(--white); }
.doc strong { color: var(--white); font-weight: 400; }

.back {
  display: inline-block;
  margin-top: 40px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
}
.back:hover { color: var(--white); }

@media (max-width: 640px) {
  .doc h1 { font-size: 21px; }
  .doc .updated { margin-bottom: 30px; }
}
