:root {
  color-scheme: light;
  --paper: #f5f2e9;
  --paper-warm: #ebe5d7;
  --ink: #101112;
  --muted: #73716c;
  --line: rgba(16, 17, 18, 0.23);
  --line-heavy: rgba(16, 17, 18, 0.7);
  --signal: #c9ff43;
  --signal-soft: rgba(201, 255, 67, 0.4);
  --shadow: 0 30px 70px rgba(16, 17, 18, 0.17);
  --display: "Bahnschrift", "Agency FB", "DIN Condensed", "Franklin Gothic Condensed", sans-serif;
  --mono: "Cascadia Mono", "IBM Plex Mono", "Lucida Console", monospace;
  --body: "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  padding: clamp(0.8rem, 1.7vw, 1.35rem) 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(201, 255, 67, 0.24), transparent 22rem),
    linear-gradient(120deg, #fffdf7 0%, var(--paper) 42%, #ddd8ce 100%);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 5.85rem, 5.85rem 100%;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08));
}

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

p,
h1 {
  margin: 0;
}

button,
input {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.hp-field {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: 0.65rem 0.9rem;
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    repeating-radial-gradient(circle at 17% 31%, rgba(16, 17, 18, 0.12) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(16, 17, 18, 0.04) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

.poster-frame {
  display: grid;
  width: min(1180px, calc(100% - 2rem));
  min-height: calc(100vh - clamp(1.6rem, 3.4vw, 2.7rem));
  margin: 0 auto;
  border: 3px solid var(--ink);
  border-radius: 1.05rem;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), var(--line) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 5.85rem;
  box-shadow: var(--shadow);
  grid-template-rows: auto 1fr auto;
}

.ruled-block {
  border-bottom: 1px solid var(--line-heavy);
  background: rgba(245, 242, 233, 0.76);
  backdrop-filter: blur(2px);
}

.site-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: 5.85rem;
}

.brand-mark {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(7rem, 10rem);
  align-items: stretch;
  border-right: 1px solid var(--line-heavy);
}

.tiny-note {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: clamp(0.62rem, 1vw, 0.78rem);
  line-height: 1.05;
  text-transform: lowercase;
}

.brand-mark a {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  font-family: var(--display);
  font-size: clamp(1.85rem, 4vw, 3.9rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: 0;
  text-transform: uppercase;
}

.header-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(8rem, 1fr));
  min-width: 46%;
  font-family: var(--mono);
  font-size: clamp(0.66rem, 0.95vw, 0.82rem);
  text-transform: uppercase;
}

.header-note span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-left: 1px solid var(--line);
  text-align: center;
}

.subscribe-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 30rem;
  padding-top: 2.72rem;
  isolation: isolate;
}

.subscribe-hero::after {
  position: absolute;
  right: 4rem;
  bottom: 2rem;
  z-index: -1;
  width: clamp(5.5rem, 11vw, 9rem);
  height: clamp(9rem, 17vw, 14rem);
  content: "";
  background:
    radial-gradient(ellipse at 52% 13%, var(--ink) 0 10%, transparent 10.5%),
    linear-gradient(73deg, transparent 0 38%, var(--ink) 38.5% 46%, transparent 46.5%),
    linear-gradient(107deg, transparent 0 44%, var(--ink) 44.5% 52%, transparent 52.5%),
    radial-gradient(ellipse at 50% 34%, var(--ink) 0 16%, transparent 16.5%),
    linear-gradient(92deg, transparent 0 35%, var(--ink) 35.5% 61%, transparent 61.5%),
    linear-gradient(84deg, transparent 0 42%, var(--ink) 42.5% 49%, transparent 49.5%),
    linear-gradient(102deg, transparent 0 54%, var(--ink) 54.5% 61%, transparent 61.5%);
  clip-path: polygon(37% 0, 64% 0, 72% 17%, 66% 38%, 74% 67%, 96% 100%, 10% 100%, 34% 67%, 29% 37%, 31% 16%);
  opacity: 0.72;
  filter: contrast(1.45) grayscale(1);
}

.subscribe-hero::before {
  position: absolute;
  right: 1.3rem;
  bottom: 1.05rem;
  width: 29%;
  height: 0.45rem;
  content: "";
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px);
  opacity: 0.45;
}

.hero-kicker {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1vw, 0.86rem);
  text-transform: lowercase;
}

.subscribe-copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(1rem, 2.5vw, 1.7rem);
  padding-top: clamp(4.7rem, 7vw, 6.2rem);
}

.hero-label {
  display: inline-block;
  width: fit-content;
  margin-bottom: 0.8rem;
  padding: 0.32rem 0.5rem;
  border: 1px solid var(--line-heavy);
  background: var(--signal-soft);
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.subscribe-copy h1 {
  max-width: 56rem;
  font-family: var(--display);
  font-size: clamp(2.85rem, 6vw, 6.25rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: lowercase;
}

.signup-form {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(100%, 44rem);
  margin-top: clamp(0.8rem, 1.5vw, 1.2rem);
}

.signup-form label {
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.signup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  margin-top: 0.75rem;
  border: 2px solid var(--ink);
  box-shadow: 0.32rem 0.32rem 0 var(--ink);
}

.signup-form input {
  min-width: 0;
  padding: 1rem;
  border: 0;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.signup-form input::placeholder {
  color: #5c5a55;
  opacity: 1;
}

.signup-form input:focus {
  outline: 2px solid var(--signal);
  outline-offset: -2px;
}

.signup-form button {
  min-width: 8.7rem;
  padding: 1rem 1.1rem;
  border: 0;
  border-left: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  cursor: pointer;
}

.signup-form button:hover,
.signup-form button:focus-visible {
  background: var(--signal);
  color: var(--ink);
  outline: none;
}

.signup-form p {
  max-width: 30rem;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.form-message[data-tone="success"] {
  color: #2f6800;
}

.form-message[data-tone="error"] {
  color: #9f1d1d;
}

.signup-form[data-state="loading"] button {
  background: var(--signal-soft);
  color: var(--ink);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.85rem;
  padding: 1.4rem;
  border-bottom: 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.site-footer a {
  font-size: 1.6rem;
}

@media (max-width: 900px) {
  .poster-frame {
    width: min(100% - 1rem, 720px);
    border-width: 2px;
    border-radius: 0.75rem;
  }

  .site-header,
  .subscribe-hero {
    display: grid;
    grid-template-columns: 1fr;
  }

  .brand-mark,
  .header-note {
    grid-template-columns: repeat(2, 1fr);
    min-width: 0;
  }

  .brand-mark {
    border-right: 0;
    border-bottom: 1px solid var(--line-heavy);
  }

  .subscribe-copy {
    min-height: 29rem;
    padding-top: 5.4rem;
  }

  .subscribe-copy h1 {
    max-width: 40rem;
    font-size: clamp(3rem, 9.6vw, 5.2rem);
  }

  .signup-form {
    min-height: auto;
  }

  .subscribe-hero::after {
    right: -1rem;
    bottom: 20%;
    opacity: 0.16;
  }
}

@media (max-width: 560px) {
  body {
    padding: 0;
  }

  body::before {
    background-size: 100% 4.6rem, 4.6rem 100%;
  }

  .poster-frame {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-inline: 0;
    border-radius: 0;
  }

  .brand-mark,
  .header-note,
  .signup-row {
    grid-template-columns: 1fr;
  }

  .tiny-note,
  .brand-mark a {
    border-right: 0;
  }

  .tiny-note,
  .brand-mark a,
  .header-note span + span {
    border-top: 1px solid var(--line);
  }

  .header-note span {
    border-left: 0;
    justify-content: flex-start;
    text-align: left;
  }

  .hero-kicker {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .subscribe-copy,
  .signup-form,
  .site-footer {
    padding: 1rem;
  }

  .subscribe-copy {
    min-height: auto;
    padding-top: 5rem;
  }

  .subscribe-copy h1 {
    font-size: clamp(2.55rem, 12.6vw, 4.1rem);
  }

  .signup-form button {
    min-width: 0;
    border-left: 0;
    border-top: 2px solid var(--ink);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }
}
