@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2-variations"), url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Marker";
  src: url("/fonts/permanent-marker.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* Heather-grey tee with a red name tag stuck on it */
:root {
  --shirt: #D8DADD;
  --ink: #1F2430;
  --ink-soft: #4A5060;
  --rule: rgba(31, 36, 48, 0.16);
  --field: #FFFFFF;
  --tag-red: #D3242C;
  --tag-red-press: #B81E25;
  --tag-white: #FFFFFF;
  --marker: #17181C;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --shirt: #222327;
    --ink: #ECEDEF;
    --ink-soft: #A3A7B0;
    --rule: rgba(236, 237, 239, 0.16);
    --field: #2D2F34;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--shirt);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-stretch: 100%;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 440px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}

:focus-visible {
  outline: 2px solid var(--tag-red);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- The name tag ---------- */
.tag {
  display: block;
  width: min(100%, 380px);
  margin: 0 auto;
  padding: 0 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--tag-red);
  color: var(--tag-white);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transform: rotate(-2.5deg);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 14px 28px -18px rgba(0, 0, 0, 0.45);
  transition: transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.tag:hover { transform: rotate(-1.5deg); }
.tag:active { transform: rotate(-1.5deg) scale(0.985); }
.tag:focus-visible { outline-offset: 6px; }

.tag-head {
  display: block;
  padding: 16px 16px 12px;
}
.hello {
  display: block;
  font-weight: 850;
  font-stretch: 118%;
  font-size: clamp(2.75rem, 12vw, 3.5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
}
.sub {
  display: block;
  margin-top: 6px;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.2;
}
.tag-body {
  display: grid;
  place-items: center;
  min-height: 132px;
  margin: 0 10px;
  padding: 16px 18px;
  border-radius: 6px;
  background: var(--tag-white);
}
.role {
  font-family: "Marker", "Comic Sans MS", cursive;
  color: var(--marker);
  font-size: clamp(1.625rem, 7.2vw, 2.125rem);
  line-height: 1.15;
  text-wrap: balance;
}
.role.writing { animation: write 520ms steps(14, end) both; }
@keyframes write {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

.hint {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* ---------- Intro ---------- */
.intro { margin-top: 52px; }
h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 750;
  font-stretch: 106%;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.intro p {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--ink-soft);
}

/* ---------- Links ---------- */
.links {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.links a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}
.links .name {
  font-size: 1.25rem;
  font-weight: 650;
  font-stretch: 108%;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: text-decoration-color 120ms ease;
}
.links a:hover .name,
.links a:focus-visible .name { text-decoration-color: var(--tag-red); }
.links .handle {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* ---------- Email signup ---------- */
.signup { margin-top: 48px; }
h2 {
  margin: 0 0 12px;
  font-size: 1.125rem;
  font-weight: 700;
  font-stretch: 106%;
}
.row {
  display: flex;
  gap: 8px;
}
input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16px stops iOS zoom */
}
input[type="email"]::placeholder { color: var(--ink-soft); opacity: 0.8; }
input[type="email"]:focus-visible { outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--tag-red); }

.join {
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--tag-red);
  color: #FFFFFF;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.join:hover { background: var(--tag-red-press); }
.join:disabled { opacity: 0.6; cursor: progress; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status {
  min-height: 1.5em;
  margin: 10px 0 0;
  font-weight: 600;
}
.status:empty { min-height: 0; margin: 0; }
.status.error { color: var(--tag-red); }
@media (prefers-color-scheme: dark) {
  .status.error { color: #FF8A8F; }
}
.fine {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

footer {
  margin-top: 64px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

@media (max-width: 340px) {
  .row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .tag, .links .name { transition: none; }
  .role.writing { animation: none; }
}
