/* marginal studies — coming soon, vellum direction (canvas boards 16 / 16b). */
:root {
  color-scheme: light;
  --paper: #ECEAE4;
  --ink: #242321;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --signal: #0018A8;
  --vellum: 1;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
/* Behind the page: the paper's final tone with grain (assets/paper-tile.jpg). Safari paints this wherever the
   page doesn't reach (under its bars, overscroll), so the edges of the screen read as the same paper. */
html, body { background: #D9D8D3 url("assets/paper-tile.jpg") repeat 0 0 / 128px 128px; }

/* Full screen height (100lvh) so the paper runs under the browser bars; text is placed against the visible
   height (svh) so nothing moves when the bars show or hide. */
.page { position: relative; min-height: 640px; height: 100svh; height: 100lvh; overflow: hidden; isolation: isolate; }

/* Paper: soft light in the middle, darker edges, one long streak, mottling and grain on top. */
.light {
  position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(ellipse 70% 60% at 54% 46%, rgba(255,255,255,.55), rgba(255,255,255,0) 72%),
    linear-gradient(90deg, rgba(0,0,0,.06) 0%, rgba(0,0,0,0) 7%, rgba(0,0,0,0) 91%, rgba(0,0,0,.07) 100%);
}
.streak {
  position: absolute; z-index: -3; left: 3%; top: 9%; width: 16.2%; height: 86%;
  background: linear-gradient(90deg, rgba(40,40,38,0) 0%, rgba(40,40,38,.22) 45%, rgba(40,40,38,.16) 70%, rgba(40,40,38,0) 100%);
  filter: blur(14px);
  /* Fades out gradually towards the bottom so the end of the bar stays soft. */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, rgba(0,0,0,.85) 50%, rgba(0,0,0,.35) 76%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 16%, rgba(0,0,0,.85) 50%, rgba(0,0,0,.35) 76%, transparent 100%);
}
.texture { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; pointer-events: none; }
.texture.grain { opacity: .3; }
.texture.mottle { opacity: .105; left: 8.5%; top: 40.3%; width: 91.5%; height: 59.7%; }

/* Vellum: lowercase lines, oversized and blurred behind the sharp layer. */
/* Vellum lines in Signal blue (canvas boards 16c / 16d). */
.back {
  position: absolute; z-index: -2; margin: 0; white-space: nowrap;
  line-height: 1; letter-spacing: -.04em; font-weight: 400; color: var(--signal);
  user-select: none;
}
.back-a { left: 6.25vw; top: 13.3%; font-size: 16vw; opacity: calc(.085 * var(--vellum)); filter: blur(7px); transform: rotate(-1.5deg); }
.back-b { right: 4.5vw; top: 41.3%; font-size: 4.45vw; opacity: calc(.08 * var(--vellum)); filter: blur(6px); transform: rotate(-.8deg); }
.back-c { left: 4.2vw; bottom: 1.5%; font-size: 10.4vw; opacity: calc(.09 * var(--vellum)); filter: blur(9px); transform: rotate(1deg); }
.back-d { right: 4.45vw; top: 7.1%; font-size: 2.5vw; letter-spacing: -.02em; opacity: calc(.13 * var(--vellum)); filter: blur(3.5px); transform: rotate(-.6deg); }

.front {
  position: absolute; left: 0; right: 0; top: 36.7%;
  display: flex; flex-direction: column; align-items: center; padding: 0 24px; text-align: center;
}
.wordmark {
  margin: 0; filter: url(#lv-ink);
  font-weight: 400; font-size: clamp(30px, 4.1vw, 88px); line-height: 1; letter-spacing: -.045em;
  color: rgba(36,35,33,.94);
}
.caps { margin: 0; font-size: 13px; line-height: 1.4; letter-spacing: .01em; text-transform: uppercase; }
.invitation { margin-top: 28px; filter: url(#lv-ink); }  /* same printed ink as the wordmark */
.lead { font-weight: 700; color: #333333; }
.sub { font-weight: 400; color: #111111; }

/* Signup: thin underline at rest, Signal blue contour on hover and while typing. */
.signup { position: relative; margin-top: 120px; width: min(340px, 100%); }
.signup-fields { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.signup input {
  display: block; width: 100%; height: 40px; margin: 0; padding: 0 12px;
  border: 0; border-radius: 0; background: transparent;
  box-shadow: inset 0 -1px 0 0 rgba(36,35,33,.32);
  font: 400 13px/1.4 var(--sans); letter-spacing: .01em; text-transform: uppercase; text-align: center; color: #111111;
  -webkit-appearance: none; appearance: none;
}
.signup input::placeholder { color: rgba(36,35,33,.55); opacity: 1; }
.signup input:hover, .signup input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--signal); }
.signup button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 124px; height: 22px; padding: 0; border: 0; border-radius: 0;
  background: #111111; color: #FFFFFF;
  font: 400 11px/1 var(--sans); letter-spacing: .01em; text-transform: uppercase; cursor: pointer;
}
.signup button::before { content: ""; position: absolute; inset: -11px 0; }
.signup button:hover { background: var(--signal); }
.signup button:disabled { cursor: progress; }
.signup button:focus-visible { outline: 1px solid #111111; outline-offset: 4px; }

.form-status {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; margin: 0; font-size: 13px; line-height: 1.4; letter-spacing: .01em; text-transform: uppercase;
  color: #111111; pointer-events: none; outline: none;
}
.signup[data-state="loading"] .signup-fields,
.signup[data-state="success"] .signup-fields { visibility: hidden; }
.loader-slot { position: absolute; left: 50%; bottom: calc(75% + 10px); transform: translateX(-50%); width: 48px; height: 48px; }
.loader-slot morph-loader { display: block; width: 48px; height: 48px; }
.form-status .confirmation, .form-status .form-error { max-width: 300px; text-wrap: balance; }
.signup[data-state="error"] .form-status { position: static; margin-top: 14px; font-size: 11px; color: #555555; pointer-events: auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Phone: the board 16b layout. */
@media (max-width: 640px) {
  /* Safari only draws the page behind its floating toolbar if the page continues underneath it, so the
     paper runs 160px past the bottom of the screen (no pinning: a pinned page gets cut at the visible area). */
  .page { min-height: 600px; height: calc(100lvh + 160px); }
  .streak { left: 2.8%; top: 8.9%; width: 8%; }
  .texture.mottle { left: 0; top: 0; width: 100%; height: 100%; }
  .back-a { left: -8vw; top: 17.8svh; font-size: 24.6vw; }
  /* Phone: every blurred line stays on screen and a little clearer than on desktop. */
  .back-b { left: 8vw; right: auto; top: 91svh; font-size: 10vw; opacity: calc(.11 * var(--vellum)); filter: blur(4px); }
  .back-c { left: -4vw; bottom: auto; top: 51svh; font-size: 15vw; line-height: 1.02; white-space: normal; width: 120vw; opacity: calc(.12 * var(--vellum)); filter: blur(6px); }
  .back-c span { display: block; }
  .back-c span + span { margin-left: 14vw; }
  .back-d { right: 4.1vw; top: 5.7svh; font-size: 4.6vw; opacity: calc(.16 * var(--vellum)); filter: blur(2.5px); }
  .front { top: 35.5svh; padding: 0 48px; }
  .signup { margin-top: 30vh; }
}
@media (prefers-reduced-motion: no-preference) {
  .signup button { transition: background .18s; }
  .signup input { transition: box-shadow .15s ease; }
}
