/* Yakko - quiet, centered, monochrome. Dark ink, warm paper. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/static/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/static/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/static/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #121110;
  --paper: #ece3cf;
  --muted: #9a9180;
  --rule: #34302a;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  background-color: var(--ink);
  color: var(--paper);
  font: 400 14px/1.7 var(--mono);
  text-align: center;
}

a { color: inherit; }
:focus-visible { outline: 1px solid var(--paper); outline-offset: 3px; }
::selection { background: var(--paper); color: var(--ink); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--paper); color: var(--ink); padding: 0.5rem 0.75rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header: centered nav */
.mast { width: 100%; padding: 1.5rem 16px 0; }
nav { display: flex; align-items: center; justify-content: center; gap: 0.25rem; }
.navlink {
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.75rem 0.7rem;
}
.navlink:hover { color: var(--paper); }

.btn {
  display: inline-block;
  font: 500 0.7rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.75rem 1rem;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.btn:hover { border-color: var(--paper); }

/* Centered column, vertically centered in the page */
.center {
  width: 100%;
  max-width: 32rem;
  padding: 2rem 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.message { margin: 0; font: 400 clamp(2.2rem, 8vw, 3.5rem)/1.05 var(--serif); }
.kicker {
  margin: 0 0 1rem;
  font: 500 0.68rem/1.4 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede { margin: 0; max-width: 40ch; color: var(--paper); opacity: 0.9; }

.mark {
  width: 2.5rem;
  height: 0;
  margin: 2.25rem auto;
  border: 0;
  border-top: 1px solid var(--rule);
}

.notice { margin: 0; max-width: 46ch; font-size: 0.8rem; color: var(--muted); }
.notice strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--paper);
}

/* Security check */
.progress {
  position: relative;
  width: 8rem;
  height: 1px;
  margin: 2rem auto;
  overflow: hidden;
  background: var(--rule);
}
.progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  background: var(--paper);
  animation: progress-slide 1.2s ease-in-out infinite;
}
@keyframes progress-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(300%); }
}

/* Forms */
.form {
  width: 100%;
  max-width: 22rem;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: left;
}
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font: 500 0.68rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: 400 0.9rem/1.4 var(--mono);
}
.field input:focus { outline: none; border-color: var(--paper); }
.field input::placeholder { color: var(--rule); }
.hint { margin: 0.35rem 0 0; font-size: 0.72rem; color: var(--muted); }
button.btn { cursor: pointer; background: transparent; }
button.btn:disabled { cursor: progress; opacity: 0.6; }
.btn-block { width: 100%; padding: 0.95rem 1rem; margin-top: 0.4rem; }
.form-error {
  margin: 0;
  padding: 0.25rem 0 0.25rem 0.8rem;
  border-left: 1px solid var(--paper);
  font-size: 0.8rem;
  color: var(--paper);
}
.form-status { margin: 0; min-height: 1.2em; font-size: 0.75rem; color: var(--muted); text-align: center; }
.alt { margin: 1.75rem 0 0; font-size: 0.75rem; color: var(--muted); }
.alt a { color: var(--paper); }
.cta-row { margin: 1.75rem 0 0; }

/* Signed-in pages */
.mast-form { display: flex; align-items: center; justify-content: center; gap: 0.25rem; margin: 0; }
.signed-in { text-transform: none; letter-spacing: 0.04em; }
.address {
  width: 100%;
  max-width: 32rem;
  margin: 1.75rem 0;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--rule);
  font: 400 0.85rem/1.5 var(--mono);
  color: var(--paper);
  word-break: break-all;
  user-select: all;
}
.address-empty { color: var(--muted); user-select: auto; }

/* Grant */
.label {
  margin: 1.25rem 0 0;
  font: 500 0.68rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.label + .address { margin-top: 0.5rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0 0 1rem; }
.actions .notice { flex-basis: 100%; margin-bottom: 0.75rem; }
.dialog {
  width: min(34rem, calc(100vw - 32px));
  padding: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.dialog:not(:modal) { position: static; margin: 0 auto 1.5rem; }
.dialog::backdrop { background: rgba(0, 0, 0, 0.75); }
.dialog-title { margin: 0 0 0.5rem; font: italic 400 1.8rem/1.1 var(--serif); }
.dialog .address { margin: 0.5rem 0 0.75rem; }

/* Footer */
.foot {
  width: 100%;
  max-width: 44rem;
  padding: 1.75rem 16px 2.5rem;
  border-top: 1px solid var(--rule);
}
.tagline { margin: 0; font: italic 400 clamp(1.25rem, 4vw, 1.6rem)/1.3 var(--serif); text-wrap: balance; }
.invite-note { margin: 0.6rem 0 0; font-size: 0.75rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .progress span { animation: none; width: 100%; opacity: 0.5; }
}
