/* JFEOI0. A "Hello, my name is" sticker on deep teal. */

@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
/* Only the characters J F E O I 0, for the name written on the badge. */
@font-face { font-family: "Marker"; src: url("fonts/permanent-marker-jfeoi0.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --teal: #0F4C5C;
  --teal-2: #13596B;
  --teal-deep: #0B3A46;
  --on-teal: #F2F7F7;
  --on-teal-muted: #B5D1D4;
  --sticker-red: #D7262E;
  --sticker-white: #FFFFFF;
  --marker: #1B1F26;
  --paper: #F3F6F6;
  --paper-2: #E5ECEC;
  --ink: #12262C;
  --muted: #4A5F64;
  --line: rgba(18, 38, 44, 0.16);
  --error: #A0151C;
  --error-light: #FFC5C1;

  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --marker-font: "Marker", "Comic Sans MS", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, dl, dd { margin: 0; }
h1, h2 { font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
a { color: inherit; }

/* A slashed zero, so 0 never reads as the letter O. */
.z { position: relative; display: inline-block; }
.z::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 18%;
  width: 0.09em;
  height: 64%;
  background: currentColor;
  border-radius: 0.05em;
  transform: translateX(-50%) rotate(28deg);
}

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; top: 12px; left: 12px; z-index: 10; padding: 10px 14px; background: var(--sticker-white); color: var(--teal); border-radius: 6px; transform: translateY(-160%); }
.skip:focus { transform: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* ---------- top: teal ---------- */
.bar, .hero { background: var(--teal); color: var(--on-teal); }
.bar :focus-visible, .hero :focus-visible { outline-color: var(--on-teal); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { font-weight: 800; font-size: 1.375rem; line-height: 1; letter-spacing: 0.06em; text-decoration: none; }
.bar-go { font-size: 1rem; font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.hero { padding-bottom: clamp(64px, 10vh, 112px); }
.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(16px, 5vh, 56px);
}
.hero h1 { font-size: clamp(2.5rem, 1.3rem + 3.6vw, 4.5rem); line-height: 1; max-width: 10.5em; color: var(--on-teal); }
.hero .lede { margin-top: 22px; max-width: 30rem; font-size: 1.25rem; line-height: 1.5; color: var(--on-teal-muted); }
.hero .join { margin-top: 32px; max-width: 32rem; }
.hero .fine { color: var(--on-teal-muted); }
.hero .oops, .hero .nojs { color: var(--error-light); }
.hero .tick { stroke: var(--on-teal); }

/* the sticker */
.badge {
  width: clamp(300px, 36vw, 460px);
  aspect-ratio: 7 / 5;
  display: grid;
  grid-template-rows: 34% 1fr 9%;
  border-radius: clamp(14px, 1.6vw, 20px);
  overflow: hidden;
  background: var(--sticker-red);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12), 0 24px 36px -18px rgba(0, 0, 0, 0.55);
  transform: rotate(-4deg);
  container-type: inline-size;
}
.badge-top { display: grid; place-items: center; align-content: center; color: var(--sticker-white); line-height: 1; }
.hello { font-weight: 800; font-size: 13cqw; letter-spacing: 0.06em; }
.mni { margin-top: 1.4cqw; font-weight: 600; font-size: 5.2cqw; letter-spacing: 0.02em; }
.badge-name {
  display: grid;
  place-items: center;
  margin: 0 3.2cqw;
  background: var(--sticker-white);
  border-radius: 1.6cqw;
}
.written {
  font-family: var(--marker-font);
  font-size: 19cqw;
  line-height: 1;
  color: var(--marker);
  transform: rotate(-2deg) translateY(1cqw);
  letter-spacing: 0.02em;
}
.written .z::after { width: 0.07em; top: 14%; height: 70%; }

/* One motion: the sticker is pressed on, once. */
.js .badge { animation: stick 0.7s cubic-bezier(.2, .9, .3, 1.15) 0.25s both; }
@keyframes stick {
  0% { opacity: 0; transform: rotate(-10deg) scale(1.12) translateY(-12px); box-shadow: 0 40px 50px -20px rgba(0, 0, 0, 0.4); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: rotate(-4deg); }
}

/* ---------- form ---------- */
.row { display: flex; gap: 8px; }
.field {
  flex: 1 1 auto; min-width: 0; height: 56px; padding: 0 16px;
  font: inherit; font-size: 1.0625rem; color: var(--ink);
  background: #FFFFFF; border: 2px solid transparent; border-radius: 8px;
}
.field::placeholder { color: #5C6E73; }
.field:focus-visible { outline-offset: 2px; }
.field[aria-invalid="true"] { border-color: var(--error); }
.btn {
  flex: none; height: 56px; padding: 0 24px;
  font: inherit; font-size: 1.0625rem; font-weight: 700;
  color: var(--sticker-white); background: var(--sticker-red); border: 0; border-radius: 8px; cursor: pointer;
}
.btn:hover { background: #BE1F27; }
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: progress; opacity: 0.8; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.fine { margin-top: 14px; font-size: 0.9375rem; color: var(--muted); }
.oops { margin-top: 10px; font-size: 0.9375rem; font-weight: 600; color: var(--error); }
.oops:empty { display: none; }
.nojs { display: none; margin-top: 8px; font-size: 0.9375rem; font-weight: 600; color: var(--error); }
html:not(.js) .nojs { display: block; }
.done-line { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; }
.done-line b { font-weight: 700; }
.tick { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--teal); stroke-width: 1.8; }
.tick path { stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.again { padding: 0; font: inherit; color: inherit; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.when-joined { display: none; }
.is-joined .when-open { display: none; }
.is-joined .when-joined { display: inline; }

/* ---------- facts and questions ---------- */
.band { padding-block: clamp(72px, 11vw, 136px); }
#facts { background: var(--paper-2); }
.band h2 { font-size: clamp(1.875rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.1; }
.cols { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 40rem); justify-content: space-between; gap: 40px; }

.facts { border-top: 2px solid var(--teal); }
.fact { display: grid; grid-template-columns: 8.5rem 1fr; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.fact dt { color: var(--muted); }
.fact dd { font-weight: 600; }

.qs { border-top: 2px solid var(--teal); }
.q { border-bottom: 1px solid var(--line); }
.q summary { position: relative; padding: 20px 44px 20px 0; font-weight: 600; cursor: pointer; list-style: none; }
.q summary::-webkit-details-marker { display: none; }
.q summary::before, .q summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 16px; height: 2px; background: var(--ink); transition: transform 0.2s ease; }
.q summary::after { transform: rotate(90deg); }
.q[open] summary::after { transform: rotate(0deg); }
.q p { padding-bottom: 22px; max-width: 36rem; color: var(--muted); }

/* ---------- close ---------- */
.close { padding-block: clamp(80px, 12vw, 144px); background: var(--teal); color: var(--on-teal); }
.close h2 { color: var(--on-teal); font-size: clamp(1.875rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.1; max-width: 18em; }
.close .lede { margin-top: 14px; color: var(--on-teal-muted); }
.close .join { margin-top: 32px; max-width: 32rem; }
.close .fine { color: var(--on-teal-muted); }
.close .oops, .close .nojs { color: var(--error-light); }
.close .tick { stroke: var(--on-teal); }
.close :focus-visible { outline-color: var(--on-teal); }

.foot { background: var(--teal-deep); color: var(--on-teal-muted); font-size: 0.9375rem; }
.foot-in { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; padding-block: 26px 34px; }
.foot .brand-name { font-weight: 800; letter-spacing: 0.06em; color: var(--on-teal); }
.foot a { text-underline-offset: 3px; }
.foot :focus-visible { outline-color: var(--on-teal); }

/* ---------- smaller screens: the sticker first ---------- */
@media (max-width: 860px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 8px; }
  .badge { order: -1; justify-self: center; width: min(78vw, 340px); }
  .cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 460px) {
  .row { flex-direction: column; }
  .btn { width: 100%; }
  .hero h1 { font-size: 2.375rem; }
  .hero .lede { font-size: 1.125rem; }
  .fact { grid-template-columns: 6.5rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .badge { animation: none; }
  .q summary::before, .q summary::after { transition: none; }
  .btn:active { transform: none; }
}
