/* Sole × Aria — one page, one loud object.
   Every colour here is measured from sole.ro's own stylesheet, not invented. Yellow is
   1.09:1 on white: it can never be type, only a block behind ink, and it appears exactly
   once on the page. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --ink: #1d1d1b;
  --paper: #f5f4f0;
  --white: #ffffff;
  --yellow: #ffec00;
  --grey: #7e7e7e;
  --hairline: #e6e6e6;
  --gap: clamp(2rem, 6vw, 3.25rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Montserrat", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: 30rem;
}

/* ---- header and footer share one rail ---- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: block;
  width: 72px;
  height: auto;
}

.lang {
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.lang:hover {
  border-color: var(--ink);
}

/* ---- the middle ---- */

.stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gap) 0;
}

.eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}

.hero {
  margin: 0.75rem 0 0;
  font-size: clamp(2rem, 9vw, 2.75rem);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

/* ---- the QR: the only pure white on the page ---- */

.code {
  margin: var(--gap) 0 0;
}

.codewrap {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

.card {
  display: block;
  padding: 1.125rem;
  background: var(--white);
  box-shadow: 0 1px 2px rgb(29 29 27 / 8%), 0 12px 32px rgb(29 29 27 / 6%);
}

.card img {
  display: block;
  width: min(260px, 62vw);
  height: auto;
  image-rendering: pixelated;
}

/* The signature: one yellow block, ink caps on it, hung off the corner of the card like a
   printed swatch. Positioned rather than nudged with margins, so the overhang is the same
   on a phone and on a booth screen. This is the whole colour budget. */
.flag {
  position: absolute;
  right: -1rem;
  /* Far enough down to clear the code's quiet zone: the white margin around a QR is part
     of the code, and a phone reading it at an angle is less forgiving than a flat scan. */
  bottom: -1rem;
  margin: 0;
  padding: 0.5rem 0.9rem;
  background: var(--yellow);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hint {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--grey);
}

.rule {
  margin: var(--gap) 0 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

/* ---- the ask ---- */

.signup {
  margin-top: var(--gap);
}

.lead {
  margin: 0.75rem 0 0;
  font-size: 1.1875rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.note {
  margin: 0.375rem 0 1.75rem;
  font-size: 0.8125rem;
  color: var(--grey);
}

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

#email {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 0.625rem 0;
}

#email::placeholder {
  color: var(--grey);
}

#email:focus {
  outline: none;
  border-bottom-width: 2px;
  padding-bottom: calc(0.625rem - 1px);
}

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

.named {
  margin: 0;
  padding: 0.375rem 0 0.9375rem;
  border-bottom: 1px solid var(--ink);
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.consent-note {
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--grey);
}

.fineprint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

.submit {
  width: 100%;
  margin-top: 1.75rem;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 1.0625rem 1rem;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.submit:hover:not(:disabled) {
  background: #000;
}

.submit:disabled {
  opacity: 0.45;
  cursor: default;
}

.status {
  margin: 0.875rem 0 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
  color: var(--grey);
}

.status[data-tone="error"] {
  color: #cc0000;
}

.status[data-tone="done"] {
  color: var(--ink);
}

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

.foot {
  margin-top: var(--gap);
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.75rem;
}

.aria {
  display: block;
  /* The lockup carries a small "labs" chip that stops reading below roughly this size. */
  width: 120px;
  height: auto;
}

/* ---- prose, for the privacy page ---- */

.prose {
  flex: 1;
  padding: var(--gap) 0;
}

.prose h1 {
  margin: 0 0 var(--gap);
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  font-weight: 200;
  letter-spacing: -0.03em;
}

.prose h2 {
  margin: 2rem 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}

.prose p,
.prose li {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}

.prose ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

/* ---- focus and motion ---- */

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

@media (prefers-reduced-motion: no-preference) {
  .stack > * {
    animation: rise 520ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  .stack > :nth-child(2) {
    animation-delay: 60ms;
  }
  .stack > :nth-child(3) {
    animation-delay: 140ms;
  }
  .stack > :nth-child(4) {
    animation-delay: 220ms;
  }
  .stack > :nth-child(5) {
    animation-delay: 260ms;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
