/* Moai Crew public site. Poster ink, carved stone, warm crimson. */
@font-face {
  font-family: "Lilita One";
  src: url("/fonts/lilita-one.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #f3e6cf;
  --cream-2: #e9d7b4;
  --paper: #f8eedc;
  --ink: #16120e;
  --ink-soft: #3a332c;
  --crimson: #c43020;
  --crimson-deep: #8e1c14;
  --terracotta: #b35a38;
  --stone: #cfcbc4;
  --stone-2: #9c9892;
  --gold: #e0b83a;
  --line: 3px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 22px;
  --display: "Lilita One", "Impact", "Arial Black", sans-serif;
  --sans: "Sora", "Segoe UI", system-ui, sans-serif;
  --pad: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(rgba(22, 18, 14, 0.045) 0.7px, transparent 0.7px),
    repeating-linear-gradient(-18deg, rgba(196, 48, 32, 0.035) 0 2px, transparent 2px 16px);
  background-size: 8px 8px, 22px 22px;
  line-height: 1.5;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.wrap { width: min(1080px, calc(100% - 28px)); margin: 0 auto; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 230, 207, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: var(--line) solid var(--ink);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  width: 46px;
  height: 46px;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  background: var(--crimson);
  box-shadow: var(--shadow-sm);
}
.brand-name {
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
}
.top nav { margin-left: auto; display: flex; gap: 8px; }
.nav-link, .btn, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.86rem;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.nav-link:active, .btn:active, .btn-ghost:active, .task-go:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.btn {
  background: var(--crimson);
  color: #fff8ee;
}
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }
.btn-wide { width: 100%; padding: 14px 18px; font-size: 1.05rem; border-radius: 16px; }
.btn-ghost { background: var(--gold); color: var(--ink); }

/* Hero */
.hero { padding: 18px 0 6px; }
.hero-frame {
  border: var(--line) solid var(--ink);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 7px 7px 0 var(--ink);
  background: var(--crimson);
  position: relative;
}
.hero-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center;
}

.intro { padding: 22px 0 10px; text-align: left; }
.stamp {
  display: inline-block;
  font-family: var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--crimson-deep);
  border: 2px solid var(--crimson);
  border-radius: 8px;
  padding: 3px 9px 2px;
  transform: rotate(-2deg);
  margin-bottom: 10px;
  background: rgba(255, 248, 238, 0.7);
}
h1, h2, .display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin: 0 0 10px;
}
h1 {
  font-size: clamp(2.6rem, 12vw, 5.2rem);
  color: var(--crimson);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
}
h2 {
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  color: var(--ink);
}
.lede {
  margin: 0 0 16px;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 34em;
}
.intro .btn { font-size: 1rem; padding: 11px 20px; }

/* Crew gallery */
.crew { padding: 18px 0 8px; }
.crew-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hint { margin: 0; color: var(--ink-soft); font-size: 0.88rem; }

.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 18px;
  margin: 0 -14px;
  padding-left: 14px;
  padding-right: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--crimson) transparent;
}
.tile {
  flex: 0 0 68vw;
  max-width: 280px;
  scroll-snap-align: start;
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  background: var(--stone);
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
  transition: transform 0.18s ease;
  padding: 0;
  display: block;
  cursor: zoom-in;
  position: relative;
}
.tile:nth-child(even) { transform: rotate(1.4deg); }
.tile:nth-child(3n) { transform: rotate(-0.6deg); }
.tile:focus-visible, .tile:hover { transform: rotate(0deg) translateY(-3px); outline: none; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #bdb8b1; }
.tile-cap, .tile figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 8px;
  box-shadow: 2px 2px 0 var(--ink);
}

@media (min-width: 760px) {
  .rail {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    overflow: visible;
    margin: 0;
    padding: 8px 0 18px;
    gap: 16px;
  }
  .tile { flex: none; max-width: none; width: 100%; }
}

/* Panels */
.panel {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px 20px;
  margin: 18px 0;
}
.meta-line {
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 14px;
  font-size: 0.92rem;
}
.meta-line strong { color: var(--crimson-deep); }
.invite-chip {
  display: none;
  background: #efe3c4;
  border: 2px dashed var(--ink);
  border-radius: 14px;
  padding: 8px 12px;
  margin: 0 0 14px;
  font-weight: 600;
}
.invite-chip.on { display: block; }

/* Tasks */
.tasks { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.task {
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  padding: 12px;
  background: #fff8ee;
  box-shadow: var(--shadow-sm);
}
.task.done { background: #e8f0d8; }
.task-top { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.num {
  font-family: var(--display);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--crimson);
  color: #fff8ee;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  line-height: 1;
}
.task h3 { margin: 0; font-size: 1rem; flex: 1 1 auto; line-height: 1.25; padding-top: 4px; }
.task-go {
  border: 2px solid var(--ink);
  background: var(--gold);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}
.mark {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  user-select: none;
}
.mark input { width: 18px; height: 18px; accent-color: var(--crimson); }
.paste { margin-top: 10px; }
.paste label, .field label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.paste input, .field input, textarea {
  width: 100%;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  padding: 11px 12px;
  background: #fffdf8;
  outline: none;
}
.paste input:focus, .field input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(196, 48, 32, 0.28);
}
.quote-row { display: flex; gap: 8px; margin-bottom: 8px; }
.quote-row input { flex: 1; }
.copy-btn {
  border: 2px solid var(--ink);
  background: var(--cream-2);
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
}
.form-block { display: flex; flex-direction: column; gap: 12px; }
.err { color: var(--crimson-deep); font-weight: 600; font-size: 0.88rem; min-height: 1.2em; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

.result { display: none; }
.result.on { display: block; }
.result-card {
  background: #efe3c4;
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.result-card h3 { font-family: var(--display); font-size: 1.6rem; margin: 0 0 6px; }
.linkrow { display: flex; gap: 8px; margin: 10px 0; }
.linkrow input { flex: 1; }
.count { font-weight: 700; }

.lookup .field { margin-bottom: 10px; }

footer {
  text-align: center;
  padding: 28px 0 40px;
  font-family: var(--display);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* Lightbox */
.lb {
  position: fixed;
  inset: 0;
  background: rgba(22, 18, 14, 0.84);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.lb.on { display: flex; }
.lb-card {
  position: relative;
  width: min(920px, 100%);
  border: var(--line) solid #fff8ee;
  border-radius: 20px;
  overflow: hidden;
  background: #1c1915;
}
.lb-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #1c1915; }
.lb button {
  position: absolute;
  border: 2px solid var(--ink);
  background: var(--gold);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 700;
}
.lb-close { top: 10px; right: 10px; border-radius: 999px; width: 36px; height: 36px; }
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  border-radius: 12px;
  width: 40px;
  height: 40px;
}
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-cap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #fff8ee;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 760px) {
  :root { --pad: 24px; }
  .brand img { width: 52px; height: 52px; }
  .brand-name { font-size: 1.7rem; }
  .panel { padding: 24px 26px 26px; }
  .hero { padding-top: 22px; }
}

.wl-badge {
  display: inline-block;
  font-family: var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 10px 3px;
  margin-bottom: 8px;
  background: #efe3c4;
  color: var(--ink-soft);
}
.wl-badge.on {
  background: #d8efb3;
  color: #1c3a10;
  box-shadow: 2px 2px 0 var(--ink);
}

.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
}
.facts li, .facts-line {
  font-family: var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.95rem;
  border: var(--line) solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px 4px;
  box-shadow: var(--shadow-sm);
}
.facts-line {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 0.86rem;
}
