/* uInked, the one screen. One viewport at every size: nothing scrolls, nothing is hidden below the fold. */
@font-face { font-family: "Sofia X"; src: url(/fonts/sofia-sans-extra-condensed-latin-wght-normal.woff2) format("woff2"); font-weight: 1 1000; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url(/fonts/commissioner-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #07060b; --ink-2: #100e18; --violet: #6d3cff; --violet-hi: #a68cff; --violet-dim: #2a1866;
  --paper: #f4f1ff; --mute: rgba(244, 241, 255, .66); --line: rgba(244, 241, 255, .16);
  --gut: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }

/* no scroll, ever: the page is exactly the screen */
html, body { height: 100vh; height: 100svh; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--ink); color: var(--paper);
  font: 500 15px/1.4 Commissioner, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: max(env(safe-area-inset-top), 12px) max(env(safe-area-inset-right), var(--gut)) max(env(safe-area-inset-bottom), 18px) max(env(safe-area-inset-left), var(--gut));
  isolation: isolate;
}
/* the sky: a faint violet bloom behind the mark, a vignette, and a grain of skin */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(38vmax 32vmax at 50% 46%, rgba(109, 60, 255, .17), rgba(109, 60, 255, .04) 55%, transparent 72%),
    radial-gradient(120% 90% at 50% 42%, transparent 52%, rgba(0, 0, 0, .7));
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .055; mix-blend-mode: screen;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -.35'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.inked canvas { opacity: 1; }
header, main, footer { position: relative; z-index: 1; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 4px; border-radius: 6px; }

/* top: the name once, small; the way in for artists who already have an account */
.top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.word { font: 600 14px/1 Commissioner, sans-serif; letter-spacing: .02em; text-decoration: none; opacity: .9; padding: 12px 0; }
.word b { color: var(--violet-hi); font-weight: 600; }
.login { display: inline-block; font-size: 14px; text-decoration: none; padding: 12px 2px; position: relative; }
.login::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 8px; height: 1px; background: currentColor; opacity: .35; transform-origin: right; transition: opacity .3s; }
.login:hover::after { opacity: 1; }

/* the mark: the still is the layout, the canvas draws over it in the same place */
.stage { position: relative; min-height: 0; display: grid; place-items: center; }
.still { width: 100%; height: min(97%, 900px); transition: opacity .6s ease; }
.inked .still { opacity: 0; }

/* bottom: one line and one action */
.foot { display: grid; gap: 18px; justify-items: center; text-align: center; }
h1 {
  font: 560 clamp(30px, 9vw, 44px)/.92 "Sofia X", Commissioner, sans-serif;
  letter-spacing: -.005em; max-width: 12ch; text-wrap: balance;
}
h1 em { font-style: normal; color: var(--violet-hi); }
.row { display: flex; align-items: center; gap: 22px; }
.apply {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 56px; padding: 0 30px 0 34px; border-radius: 999px; min-width: 200px;
  font: 600 16px/1 Commissioner, sans-serif; letter-spacing: .01em; color: #fff;
  background: var(--violet);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 10px 40px -12px rgba(109, 60, 255, .85);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s;
}
.apply:hover { transform: translateY(-2px); background: #7646ff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset, 0 18px 50px -12px rgba(109, 60, 255, 1); }
.apply:active { transform: scale(.97); }
.apply svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.apply:hover svg { transform: translateX(3px); }
.legal { font-size: 12px; color: var(--mute); text-decoration: none; padding: 12px 4px; }
.legal:hover { color: var(--paper); }

@media (min-width: 900px) {
  .foot { grid-template-columns: 1fr auto; align-items: end; text-align: left; justify-items: start; }
  h1 { font-size: clamp(48px, 4.6vw, 76px); max-width: 16ch; }
  .foot .row { justify-self: end; flex-direction: row-reverse; }
}
/* short portrait screens */
@media (max-height: 640px) and (orientation: portrait) {
  h1 { font-size: 28px; }
  .apply { height: 50px; }
  .foot { gap: 10px; }
}
/* landscape phones: the line on one line at the left, the action at the right, the mark between them */
@media (orientation: landscape) and (max-height: 520px) {
  body { grid-template-rows: auto minmax(0, 1fr); padding-bottom: max(env(safe-area-inset-bottom), 12px); }
  .foot {
    position: fixed; left: max(env(safe-area-inset-left), var(--gut)); right: max(env(safe-area-inset-right), var(--gut)); bottom: max(env(safe-area-inset-bottom), 14px);
    grid-template-columns: 1fr auto; align-items: end; text-align: left; justify-items: start; pointer-events: none;
  }
  .foot > * { pointer-events: auto; }
  h1 { font-size: clamp(18px, 2.8vw, 28px); max-width: none; white-space: nowrap; line-height: 1; }
  .foot .row { justify-self: end; flex-direction: row-reverse; gap: 14px; }
  .apply { height: 46px; min-width: 0; padding: 0 22px 0 26px; }
}

/* the apply sheet: opens on #apply without script (:target); with script only .open counts,
   because clearing the hash with the History API does not clear :target */
.sheet {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: var(--gut);
  background: rgba(7, 6, 11, .8); opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s .4s;
}
html:not(.js) .sheet:target, .sheet.open { opacity: 1; visibility: visible; transition: opacity .4s ease; }
.panel {
  width: min(100%, 420px); max-height: 100%; overflow: auto; overscroll-behavior: contain;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 22px; padding: 24px 24px 20px;
  transform: translateY(18px) scale(.985); transition: transform .5s var(--ease);
  box-shadow: 0 40px 120px -30px rgba(109, 60, 255, .5);
}
html:not(.js) .sheet:target .panel, .sheet.open .panel { transform: none; }
.panel-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.panel h2 { font: 560 34px/1 "Sofia X", sans-serif; }
.close { font-size: 14px; color: var(--mute); text-decoration: none; padding: 10px 4px; }
.close:hover { color: var(--paper); }
.status-line, .nojs { font-size: 14px; color: var(--mute); margin-bottom: 8px; }
.status-line a, .nojs a { color: var(--paper); }
.form { display: none; gap: 4px; }
.js .form { display: grid; }
.js .nojs { display: none; }
label.f { display: grid; gap: 2px; padding: 8px 0 6px; border-bottom: 1px solid var(--line); transition: border-color .3s; }
label.f:focus-within { border-color: var(--violet-hi); }
label.f span { font-size: 12px; color: var(--mute); }
input[type="text"], input[type="email"] { all: unset; font: 500 16px/1.5 Commissioner, sans-serif; color: var(--paper); width: 100%; padding: 2px 0; }
input::placeholder { color: rgba(244, 241, 255, .5); }
input[aria-invalid="true"] { color: #ffb4c8; }
label.f:has([aria-invalid="true"]) { border-color: #ff7aa0; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--mute); margin: 14px 0 10px; cursor: pointer; }
.consent input { accent-color: var(--violet); width: 18px; height: 18px; margin-top: 1px; flex: none; }
.consent a { color: var(--paper); }
.form .apply { width: 100%; margin-top: 6px; }
.form-msg { min-height: 20px; font-size: 13px; margin-top: 8px; color: var(--mute); }
.form-msg.err { color: #ff9ab6; }
.form-msg.ok { color: #cbbcff; }
button:disabled { opacity: .6; cursor: progress; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
