/* moldywit.com. The studio is a petri dish: pale agar, dark ink, and colonies of colour.
   Text is always ink or grey; colour lives only in the colonies and small structural marks. */

:root {
  --agar: #e3e9e1;
  --dish: #f3f6f1;
  --ink: #1b231f;
  --ink-2: #4b5650;
  --line: #c3cdc4;
  --rim: #a9b5ab;
  --teal: #2f7f78;
  --ochre: #c8962b;
  --rose: #c25a73;
  --violet: #6b5ba8;
  --focus: #2f7f78;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --agar: #151b18;
    --dish: #1c2420;
    --ink: #e4eae5;
    --ink-2: #a2aea6;
    --line: #34403a;
    --rim: #4a5750;
    --teal: #4fa59c;
    --ochre: #ddb04c;
    --rose: #d97c93;
    --violet: #9686d1;
    --focus: #6cc3b9;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--agar);
  color: var(--ink);
  font: 400 17px/1.55 "Bricolage Grotesque", system-ui, sans-serif;
  font-optical-sizing: auto;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.page { max-width: 44rem; margin: 0 auto; padding: 2.5rem 16px 4rem; }

/* ---------------------------------------------------------------- site header */
.site-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 3rem; text-decoration: none; width: fit-content; }
.site-head svg { width: 30px; height: 30px; }
.site-head span { font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }

/* ---------------------------------------------------------------- home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; margin: 0 0 4rem; }
.dish {
  width: min(100%, 22rem); aspect-ratio: 1; border-radius: 50%;
  background: var(--dish);
  box-shadow: inset 0 0 0 2px var(--rim), inset 0 0 0 9px var(--dish), inset 0 0 0 10px var(--line);
  overflow: hidden;
}
.dish svg { width: 100%; height: 100%; display: block; }
.wordmark {
  margin: 0; font-weight: 800; font-size: clamp(3.4rem, 15vw, 6.2rem);
  line-height: .9; letter-spacing: -.045em; font-stretch: 85%;
}
.lede { margin: .9rem 0 0; font-size: 1.2rem; color: var(--ink-2); max-width: 30ch; }
@media (min-width: 720px) {
  .hero { grid-template-columns: 22rem minmax(0, 1fr); align-items: end; gap: 2rem; }
  .hero-text { padding-bottom: 1rem; }
}

/* colonies grow once on load */
.colony { transform-box: fill-box; transform-origin: center; animation: grow 1.4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes grow { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .colony { animation: none; } }

/* ---------------------------------------------------------------- sections */
h1, h2 { font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: 2.3rem; margin: 0 0 1rem; }
h2 { font-size: 1.45rem; margin: 3rem 0 1rem; }
h3 { font-size: 1.1rem; margin: 2rem 0 .4rem; }
p, li { max-width: 62ch; }
.muted { color: var(--ink-2); }

.game {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 1.1rem; align-items: center;
  padding: 1rem; margin: 0 -1rem; border-radius: 22px; text-decoration: none;
}
.game:hover { background: var(--dish); }
.game img { width: 88px; height: 88px; border-radius: 22%; display: block; }
.game strong { font-size: 1.3rem; display: block; letter-spacing: -.01em; }
.game p { margin: .15rem 0 0; color: var(--ink-2); }

.app-head { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1.5rem; }
.app-head img { width: 96px; height: 96px; border-radius: 22%; }
.app-head h1 { margin: 0; }
.app-head p { margin: .2rem 0 0; color: var(--ink-2); }

.links { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }

/* ---------------------------------------------------------------- forms */
form.help { display: grid; gap: 1.25rem; margin-top: 1.5rem; max-width: 34rem; }
label { display: grid; gap: .35rem; font-weight: 600; }
label small { font-weight: 400; color: var(--ink-2); }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; padding: .7rem .8rem; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--dish);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
textarea { min-height: 9rem; resize: vertical; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button {
  justify-self: start; padding: .75rem 1.4rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--agar); font-weight: 700;
}
button:hover { opacity: .88; }
.notice { padding: .9rem 1rem; border-radius: 12px; background: var(--dish); border-left: 4px solid var(--teal); margin: 1rem 0 0; }
.notice.is-error { border-left-color: var(--rose); }
.notice[hidden] { display: none; }

/* ---------------------------------------------------------------- footer */
.site-foot { margin-top: 5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .95rem; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* ---------------------------------------------------------------- admin */
.admin .msg { background: var(--dish); border-radius: 14px; padding: 1rem 1.1rem; margin: 0 0 .8rem; border-left: 4px solid var(--ochre); }
.admin .msg.is-done { border-left-color: var(--line); opacity: .75; }
.admin .msg header { display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.admin .from { margin: .3rem 0; }
.admin .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.admin button { padding: .45rem 1rem; font-size: .9rem; }
