/* UTR5OC. An embossed licence plate on oxblood car paint. */

@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-600-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-700-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-600-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paint: #7A1820;
  --paint-hi: #9A2630;
  --paint-lo: #5A1016;
  --on-paint: #FFF5F3;
  --on-paint-muted: #F0C4BF;
  --plate: #F6F6F1;
  --plate-ink: #1C2747;
  --chrome-hi: #E6E9EC;
  --chrome-lo: #8C9197;
  --steel: #EEF0F2;
  --ink: #1C2747;
  --muted: #4B5470;
  --line: rgba(28, 39, 71, 0.18);
  --error-light: #FFD2CC;
  --error: #9E1C1C;

  --cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  background: var(--steel);
  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-family: var(--cond); font-weight: 700; letter-spacing: 0.005em; text-wrap: balance; }
a { color: inherit; }

.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(--plate); color: var(--plate-ink); border-radius: 4px; transform: translateY(-160%); }
.skip:focus { transform: none; }
:focus-visible { outline: 3px solid var(--plate-ink); outline-offset: 3px; }

/* ---------- top: painted panel ---------- */
/* header and hero share one painted panel, glossy at the top */
.bar { color: var(--on-paint); background: var(--paint-hi); }
.hero {
  color: var(--on-paint);
  background:
    radial-gradient(90% 60% at 30% 0%, rgba(255, 255, 255, 0.12), transparent 70%),
    linear-gradient(180deg, var(--paint-hi), var(--paint) 40%, var(--paint-lo));
  padding-bottom: clamp(64px, 10vh, 112px);
}
.bar :focus-visible, .hero :focus-visible { outline-color: var(--on-paint); }

.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { font-family: var(--cond); font-weight: 700; font-size: 1.625rem; 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-in { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: clamp(16px, 4vh, 48px); }

/* the plate */
.plate {
  width: min(100%, 640px);
  aspect-ratio: 2 / 1;
  padding: 2.2%;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--chrome-hi), var(--chrome-lo) 55%, #C3C7CC);
  box-shadow: 0 26px 40px -20px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(255, 255, 255, 0.25) inset;
  container-type: inline-size;
}
.plate-face {
  position: relative;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 30%),
    var(--plate);
  box-shadow: inset 0 0 0 3px var(--plate-ink), inset 0 0 0 7px var(--plate), inset 0 3px 8px rgba(0, 0, 0, 0.12);
}
.bolt {
  position: absolute; top: 10%; width: 5.5%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F4F5F6, #9EA3A9 60%, #6E737A);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.bolt::after { content: ""; position: absolute; inset: 46% 18%; background: rgba(60, 64, 70, 0.6); border-radius: 2px; }
.bolt-l { left: 18%; }
.bolt-r { right: 18%; }

.chars {
  display: flex;
  margin-top: 6%;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 27cqw;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--plate-ink);
  /* embossed: lit from the top left */
  text-shadow: -1px -1px 0 rgba(255, 255, 255, 0.9), 2px 3px 2px rgba(0, 0, 0, 0.28);
}
.chars .gap { margin-left: 0.22em; }

/* One motion: the six characters are stamped in, one after another. */
.js .chars span { opacity: 0; transform: scale(1.35); animation: stamp 0.22s cubic-bezier(.2, .8, .3, 1.2) forwards; }
.js .chars span:nth-child(1) { animation-delay: 0.25s; }
.js .chars span:nth-child(2) { animation-delay: 0.37s; }
.js .chars span:nth-child(3) { animation-delay: 0.49s; }
.js .chars span:nth-child(4) { animation-delay: 0.69s; }
.js .chars span:nth-child(5) { animation-delay: 0.81s; }
.js .chars span:nth-child(6) { animation-delay: 0.93s; }
@keyframes stamp { to { opacity: 1; transform: none; } }

.hero h1 {
  margin-top: clamp(36px, 6vh, 56px);
  font-size: clamp(2.375rem, 1.4rem + 3.2vw, 4rem);
  line-height: 1;
  color: var(--on-paint);
  max-width: 14em;
}
.hero .lede { margin-top: 18px; max-width: 30rem; font-size: 1.25rem; line-height: 1.5; color: var(--on-paint-muted); }
.hero .join { margin-top: 30px; width: min(100%, 32rem); }
.hero .fine { color: var(--on-paint-muted); }
.hero .oops, .hero .nojs { color: var(--error-light); }
.hero .tick { stroke: var(--on-paint); }
.hero .done-line { justify-content: center; }

/* ---------- 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: 6px;
}
.field::placeholder { color: #5C6478; }
.field:focus-visible { outline-offset: 2px; }
.field[aria-invalid="true"] { border-color: var(--error); }
.btn {
  flex: none; height: 56px; padding: 0 24px;
  font-family: var(--cond); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--plate); background: var(--plate-ink); border: 0; border-radius: 6px; cursor: pointer;
}
.btn:hover { background: #26345E; }
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: progress; opacity: 0.8; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.fine { margin-top: 12px; 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: 600; }
.tick { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ink); 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: brushed steel ---------- */
.band { padding-block: clamp(72px, 11vw, 136px); }
#facts { background: #E3E6E9; }
.band h2 { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.875rem); line-height: 1.02; }
.cols { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 40rem); justify-content: space-between; gap: 40px; }

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

.qs { border-top: 3px solid var(--plate-ink); }
.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: 2.5px; 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: the paint again ---------- */
.close { padding-block: clamp(80px, 12vw, 144px); background: linear-gradient(180deg, var(--paint), var(--paint-lo)); color: var(--on-paint); }
.close h2 { color: var(--on-paint); font-size: clamp(2rem, 1.4rem + 1.8vw, 2.875rem); line-height: 1.02; max-width: 18em; }
.close .lede { margin-top: 14px; color: var(--on-paint-muted); }
.close .join { margin-top: 32px; max-width: 32rem; }
.close .fine { color: var(--on-paint-muted); }
.close .oops, .close .nojs { color: var(--error-light); }
.close .tick { stroke: var(--on-paint); }
.close :focus-visible { outline-color: var(--on-paint); }

.foot { background: var(--paint-lo); color: var(--on-paint-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; border-top: 1px solid rgba(255, 245, 243, 0.16); }
.foot .brand-name { font-family: var(--cond); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.06em; color: var(--on-paint); }
.foot a { text-underline-offset: 3px; }
.foot :focus-visible { outline-color: var(--on-paint); }

/* ---------- smaller screens ---------- */
@media (max-width: 860px) {
  .cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 460px) {
  .row { flex-direction: column; }
  .btn { width: 100%; }
  .plate { border-radius: 12px; }
  .plate-face { border-radius: 8px; }
  .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 .chars span { animation: none; opacity: 1; transform: none; }
  .q summary::before, .q summary::after { transition: none; }
  .btn:active { transform: none; }
}
