/* ========================================================== groklets
 *
 * The palette is sampled from the artwork rather than guessed: the banner's
 * background is #0a110e — near-black with a green cast, not neutral — and the
 * aura green and hat pink are the exact values used in the character art.
 *
 * Everything carries the same fine grain the images do, as one repeating SVG
 * noise tile: it costs nothing and never tiles visibly at any zoom.
 */

:root {
  --bg: #0a110e;
  --bg-lift: #101a15;
  --card: #0d1712;
  --line: #1e2d25;
  --line-soft: #172219;

  --ink: #ffffff;
  --ink-dim: #9aa89f;
  --ink-faint: #5d6b63;

  --green: #1af83b;
  --pink: #ef5b91;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px 60px; }

/* ---------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(10, 17, 14, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-links a:not(.btn) {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:not(.btn):hover { color: var(--ink); background: var(--bg-lift); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.btn:hover { border-color: var(--ink-faint); background: var(--bg-lift); }
.btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The mint button wears the aura from the artwork. */
.btn-mint {
  background: var(--green);
  border-color: var(--green);
  color: #06210c;
  box-shadow: 0 0 22px rgba(26, 248, 59, 0.28);
}

.btn-mint:hover {
  background: #4dff6b;
  border-color: #4dff6b;
  box-shadow: 0 0 32px rgba(26, 248, 59, 0.45);
}

.btn-lg { padding: 15px 26px; font-size: 14px; }

/* ----------------------------------------------------------- masthead */

.masthead { padding: 54px 0 30px; text-align: center; }

.masthead h1 {
  margin: 0 0 12px;
  font-size: clamp(42px, 9vw, 76px);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.masthead p {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-dim);
}

.masthead strong { color: var(--ink); font-weight: 600; }

/* -------------------------------------------------- feed + preview row */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.panel {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  color: var(--ink-faint);
}

.pulse, .dot-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
}

.pulse::before, .dot-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(26, 248, 59, 0.5); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(26, 248, 59, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .pulse::before, .dot-live::before, .badge-minting::before { animation: none; }
}

/* ---------------------------------------------------------- mint feed */

/* Scrolls internally so the feed can be long without pushing the page down,
   and so it sits the same height as the preview beside it. */
.feed { overflow-y: auto; max-height: 520px; flex: 1; }

.mint {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.mint:last-child { border-bottom: 0; }

.mint-pfp {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-lift);
}

.mint-pfp-blank {
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-faint);
}

.mint-profile { display: block; width: 36px; height: 36px; }
.mint-link { display: block; color: inherit; text-decoration: none; }
.mint-link:hover .mint-handle { color: var(--green); }

.mint-who { min-width: 0; }

.mint-name {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mint-handle { font-weight: 400; color: var(--ink-faint); margin-left: 5px; }
.mint-age { font-weight: 400; color: var(--ink-faint); margin-left: 5px; font-size: 11.5px; }
.mint-addr { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin-top: 2px; }

/* Status carries the only colour in the row, because it is the one thing
   someone is scanning for. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-minting {
  background: rgba(26, 248, 59, 0.1);
  color: var(--green);
  border: 1px solid rgba(26, 248, 59, 0.28);
}

.badge-minting::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.badge-done { background: rgba(255,255,255,0.05); color: var(--ink-dim); border: 1px solid var(--line); }
.badge-failed { background: rgba(239,91,145,0.08); color: var(--pink); border: 1px solid rgba(239,91,145,0.26); }
.badge-queued { background: rgba(255,255,255,0.03); color: var(--ink-faint); border: 1px solid var(--line-soft); }

.empty { padding: 60px 20px; text-align: center; font-size: 13.5px; color: var(--ink-faint); }

/* ------------------------------------------------------------ preview */

.preview-panel { padding-bottom: 16px; }

.preview-art {
  position: relative;
  aspect-ratio: 1;
  margin: 16px 16px 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

/* Trait layers stack in one box, each filling it exactly — the artwork is
   drawn on a shared 1254px canvas, so they align without any offsets. */
.layers { position: absolute; inset: 0; }

/* Every layer is the same square canvas and is already registered against the
   others, so each one fills the box identically.
   `object-fit: contain` is wrong here: it scales each image to fit its own
   content box, and because layers have different transparent margins it
   letterboxes them by different amounts — pulling apart alignment that is
   correct in the files. `fill` keeps the canvases coincident. */
.layers img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.preview-traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 16px;
  padding: 16px 16px 0;
}

.ptrait { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; }
.ptrait span { color: var(--ink-faint); }
.ptrait b { font-weight: 600; text-align: right; }

.preview-actions { display: flex; gap: 9px; padding: 16px 16px 0; }
.preview-actions .btn { flex: 1; }

/* ----------------------------------------------------------- counters */

.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 760px) { .counters { grid-template-columns: 1fr; } }

.counter {
  position: relative;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}

/* A hairline of colour along the bottom, as in the reference. */
.counter::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--green), transparent);
  opacity: 0.55;
}

.counter-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.counter-value {
  display: block;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}

.counter-value.pending { color: var(--ink); }
.counter-value.left { color: var(--ink-dim); }

.counter-note { display: block; margin-top: 9px; font-size: 12px; color: var(--ink-faint); }

/* ------------------------------------------------------------ callout */

.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding: 28px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(26, 248, 59, 0.06), transparent 55%);
  border: 1px solid rgba(26, 248, 59, 0.3);
  border-radius: var(--r);
}

.callout-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.callout h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--green);
}

.callout p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-dim); max-width: 52ch; }
.callout strong { color: var(--ink); font-weight: 600; }

.tweet-example {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 15px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-all;
}

.tweet-example .at { color: var(--green); }
.tweet-example .cmd { color: var(--ink); font-weight: 600; }
.tweet-example .addr { color: var(--ink-faint); }

/* ---------------------------------------------------------- contracts */

.contracts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 64px; }

@media (max-width: 760px) { .contracts { grid-template-columns: 1fr; } }

.contract {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
}

.contract-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.contract code {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy {
  flex: none;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-faint);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.copy:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ------------------------------------------------------------- traits */

.section { padding-bottom: 64px; }
.section-head { margin-bottom: 20px; }

.section-head h2 { margin: 0 0 7px; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.section-head p { margin: 0; font-size: 14px; color: var(--ink-dim); line-height: 1.6; }

.trait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.trait {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.trait-name { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }

.trait-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  padding: 3px 0;
  color: var(--ink-faint);
  text-transform: capitalize;
}

.trait-row b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-dim); }

.trait-opt {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px;
  color: var(--ink-faint);
  font-style: italic;
}

/* Tier colours, used by both the trait grid and the preview's trait list. */
.tier-common { color: var(--ink-faint); }
.tier-uncommon { color: #7dd3a0; }
.tier-rare { color: #6cb6ff; }
.tier-legendary { color: #f5c518; }

/* ------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--line-soft);
  padding-top: 26px;
  font-size: 12.5px;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer a { color: var(--ink-dim); text-decoration: none; }
.footer a:hover { color: var(--ink); }
