/* Koajo: the dark room. Shared tokens, type, corners, signs, dialogs. The board page inlines this file without the
   font faces (it hands the same fonts to the FontFace API), so nothing below the faces may load a file. */
@font-face { font-family: "Hubot Sans"; src: url("/assets/fonts/hubot-sans-var.woff2") format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: "Karla"; src: url("/assets/fonts/karla-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Commit Mono"; src: url("/assets/fonts/commit-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Commit Mono"; src: url("/assets/fonts/commit-mono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* one hue, three values: the room, the rose, the pale light */
  --room-0: #140a0f;
  --room-1: #1e0e17;
  --room-2: #2a1320;
  --room-3: #3a1a2c;
  --rose-deep: #8a1f4c;
  --rose: #ff4f8e;
  --rose-pale: #ffbfd6;
  --ink: #fbecf2;
  --ink-2: #dcc3cf;
  --ink-3: #ab8f9d;
  --line: rgba(255, 191, 214, 0.12);
  --line-2: rgba(255, 191, 214, 0.24);
  --ok: #6fd6a4;
  --bad: #ff6f8f;
  --title: "Hubot Sans", "Karla", sans-serif;
  --body: "Karla", sans-serif;
  --mono: "Commit Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-long: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-press: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --gutter: clamp(16px, 2.2vw, 32px);
  --chapter-ink: var(--rose);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--room-0); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--room-0); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
::selection { background: var(--rose); color: var(--room-0); }
.mono, code, pre, kbd { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
code { font-size: 0.9em; color: var(--rose-pale); overflow-wrap: anywhere; }
a { color: inherit; }
img, svg, canvas { display: block; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--rose-pale); outline-offset: 3px; border-radius: 4px; }

/* Signs: a pictogram and one word, set as an underlined text link */
.sign { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px; color: var(--ink); text-decoration: none;
  font: 500 16px/1 var(--body); letter-spacing: 0.005em; background: none; border: 0; cursor: pointer; transition: color 160ms var(--ease-press), transform 150ms var(--ease-press); }
.sign svg { width: 18px; height: 18px; flex: none; stroke: var(--chapter-ink); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 300ms linear; }
.sign .w { position: relative; padding-bottom: 3px; background: linear-gradient(var(--chapter-ink), var(--chapter-ink)) 0 100% / 100% 1px no-repeat; transition: background-size 220ms var(--ease), background-image 300ms linear; }
.sign:hover .w { background-size: 100% 2px; }
.sign:hover { color: var(--rose-pale); }
.sign:active { transform: scale(0.97); }
.sign[aria-pressed="true"] .w { background-size: 100% 2px; }
.sign[aria-pressed="true"] { color: var(--rose-pale); }
.sign[disabled] { opacity: 0.5; cursor: not-allowed; }

/* the one solid light element on a page */
.act { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 10px; border: 0;
  background: var(--rose); color: #1a0710; font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color 160ms var(--ease-press), transform 150ms var(--ease-press); }
.act:hover { background: var(--rose-pale); }
.act:active { transform: scale(0.97); }

/* Corners: the menu is scattered to the four corners */
.corner { position: fixed; z-index: 30; display: flex; align-items: center; gap: 18px; }
.corner.tl { top: 14px; left: var(--gutter); }
.corner.tr { top: 14px; right: var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 26px; height: 26px; }
.brand .mark path { fill: none; stroke: var(--chapter-ink); stroke-width: 2; stroke-linecap: round; transition: stroke 300ms linear; }
.brand .word { font: 560 21px/1 var(--title); font-stretch: 118%; letter-spacing: -0.01em; }
.brand .tick { font: 400 13px/1 var(--mono); color: var(--ink-2); }

/* Lamp: a status light, the one place the launch state is written */
.lamp { display: inline-flex; align-items: center; gap: 9px; font: 600 13px/1 var(--mono); letter-spacing: 0.08em; color: var(--rose-pale); text-transform: uppercase; white-space: nowrap; }
.lamp i { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px rgba(255, 79, 142, 0.18); }
/* the light pulses only once something is really open and running; before launch it holds still */
.lamp[data-state="open"] i { background: var(--rose-pale); box-shadow: 0 0 0 3px rgba(255, 191, 214, 0.22); animation: lamp 2400ms ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .lamp i { animation: none !important; } }
@keyframes lamp { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Dialog (Get a key) */
.sheet-dialog { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; padding: 16px; background: rgba(10, 4, 7, 0.62);
  opacity: 0; pointer-events: none; transition: opacity 150ms var(--ease-press); }
.sheet-dialog[hidden] { display: none !important; }
.sheet-dialog[data-open="true"] { opacity: 1; pointer-events: auto; transition-duration: 250ms; }
.sheet-dialog .panel { width: min(680px, 100%); max-height: min(86vh, 820px); overflow: auto; background: var(--room-1); border: 1px solid var(--line-2); border-radius: 16px;
  padding: 32px 32px 28px; transform: translateY(24px) scale(0.98); transition: transform 150ms var(--ease-press); }
.sheet-dialog[data-open="true"] .panel { transform: none; transition: transform 500ms var(--ease-sheet); }
.panel h2 { font: 480 30px/1.12 var(--title); font-stretch: 112%; letter-spacing: -0.02em; margin: 0 0 10px; }
.panel .lead { color: var(--ink-2); margin: 0 0 20px; max-width: 58ch; line-height: 1.6; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 18px 0 18px 48px; border-top: 1px solid var(--line); }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 17px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-2); display: grid; place-items: center; font: 400 14px/1 var(--mono); color: var(--rose-pale); }
.steps h3 { margin: 4px 0 6px; font: 600 17px/1.35 var(--body); }
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.steps a { color: var(--ink); text-decoration-color: var(--rose); text-underline-offset: 3px; }
.close { position: sticky; top: 0; float: right; margin: -10px -10px 0 12px; }

/* code blocks with a copy control */
.code { position: relative; margin: 12px 0 0; background: var(--room-0); border: 1px solid var(--line); border-radius: 10px; }
.code pre { margin: 0; padding: 18px 20px; padding-right: 100px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); white-space: pre; }
.code .copy { position: absolute; top: 8px; right: 8px; }
.copy { display: inline-grid; min-height: 36px; min-width: 76px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--room-2); color: var(--ink);
  font: 500 14px/1 var(--body); cursor: pointer; transition: background-color 160ms var(--ease-press), transform 150ms var(--ease-press); }
.copy > span { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.copy .done { opacity: 0; transform: translateY(4px); }
.copy[data-state="done"] .idle { opacity: 0; transform: translateY(-4px); }
.copy[data-state="done"] .done { opacity: 1; transform: none; color: var(--rose-pale); }
.copy[data-state="error"] .idle { color: var(--bad); }
.copy:hover { background: var(--room-3); }
.copy:active { transform: scale(0.97); }
.copy::after { content: ""; position: absolute; inset: -4px; }

/* the token address, shown once the launch watcher has written it */
.ca { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--room-1); }
.ca-row { display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0; }
.ca-k { font: 700 13px/1 var(--mono); letter-spacing: 0.08em; color: var(--rose); }
.ca-v { font: 400 14px/1.5 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.ca-act { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 0; }
.ca-act a, .ca-act button { display: inline-flex; align-items: center; min-height: 40px; padding: 0; background: none; border: 0; color: var(--ink); font: 500 15px/1 var(--body);
  text-decoration: underline; text-decoration-color: var(--rose); text-underline-offset: 4px; cursor: pointer; }
.ca-act a:hover, .ca-act button:hover { color: var(--rose-pale); }

.toast-zone { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--room-3); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 16px; font: 500 15px/1.45 var(--body);
  transform: translateY(100%); opacity: 0; transition: transform 400ms var(--ease), opacity 400ms var(--ease); }
.toast.in { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
