/* Cordyceps field journal: dusk clearing by day, the mycologist's cabin by night. Pixel frames are drawn with stepped
   box-shadows so every panel reads as a sprite, never as a rounded web card. */
@import url('https://fonts.googleapis.com/css2?family=Jacquard+24&family=Pixelify+Sans:wght@400;500;600;700&family=Silkscreen:wght@400;700&display=swap');

:root {
  --sky: #d98a74;
  --sky-2: #b86a63;
  --bg: #efd9b8;
  --bg-2: #e6c9a0;
  --paper: #fbecd2;
  --paper-2: #f3dcb6;
  --ink: #2b1d1f;
  --ink-2: #5a4540;
  --ink-3: #8a6f64;
  --line: #2b1d1f;
  --moss: #4f6b3a;
  --moss-2: #6f8f47;
  --spore: #e8761e;
  --spore-2: #ffa640;
  --glow: rgba(255, 150, 50, .55);
  --burn: #c8442b;
  --ok: #3f7a3a;
  --shadow: rgba(43, 29, 31, .35);
  --px: 3px;
  --f-title: 'Jacquard 24', 'Pixelify Sans', serif;
  --f-label: 'Silkscreen', 'Pixelify Sans', monospace;
  --f-body: 'Pixelify Sans', ui-monospace, monospace;
  color-scheme: light;
}
:root[data-theme='night'] {
  --sky: #1c2147;
  --sky-2: #141733;
  --bg: #12132a;
  --bg-2: #181a36;
  --paper: #22243f;
  --paper-2: #2b2d4d;
  --ink: #f4e6cc;
  --ink-2: #cdbba0;
  --ink-3: #8d85a6;
  --line: #07081a;
  --moss: #2f4a3a;
  --moss-2: #45634b;
  --spore: #ff8a2a;
  --spore-2: #ffb561;
  --glow: rgba(255, 140, 40, .7);
  --shadow: rgba(0, 0, 0, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.5 var(--f-body);
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0;
  -webkit-font-smoothing: none; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
.pix, .pix img { image-rendering: pixelated; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; font-variant-ligatures: none; }
::selection { background: var(--spore); color: #fff; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ------------------------------------------------------------------ pixel frames */
.frame {
  position: relative; background: var(--paper);
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--line), 0 var(--px) 0 0 var(--line),
    calc(-1 * var(--px)) 0 0 0 var(--line), var(--px) 0 0 0 var(--line),
    0 calc(2 * var(--px)) 0 var(--px) var(--shadow);
}
.frame.soft { background: var(--paper-2); }
.btn {
  --b: var(--spore); --t: #2b1405;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--b); color: var(--t); font: 700 15px/1 var(--f-label); letter-spacing: .02em; text-transform: uppercase;
  box-shadow:
    0 calc(-1 * var(--px)) 0 0 var(--line), 0 var(--px) 0 0 var(--line),
    calc(-1 * var(--px)) 0 0 0 var(--line), var(--px) 0 0 0 var(--line),
    inset 0 calc(-1 * var(--px)) 0 0 rgba(0, 0, 0, .22), inset 0 var(--px) 0 0 rgba(255, 255, 255, .35);
  transition: transform .06s steps(1), filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(var(--px)); }
.btn.ghost { --b: var(--paper); --t: var(--ink); }
.btn.moss { --b: var(--moss-2); --t: #fff8e8; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.label { font: 400 12px/1.2 var(--f-label); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.title { font: 400 clamp(40px, 6vw, 72px)/.95 var(--f-title); letter-spacing: .01em; margin: 0; }
.h2 { font: 400 clamp(34px, 4.6vw, 54px)/1 var(--f-title); margin: 0 0 14px; }
.h3 { font: 700 20px/1.2 var(--f-body); margin: 0; }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.spore-text { color: var(--spore); text-shadow: 0 0 12px var(--glow); }

/* ------------------------------------------------------------------ header */
.top {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 64px;
  display: flex; align-items: center; transition: background .3s, box-shadow .3s;
}
.top.solid { background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: 0 var(--px) 0 var(--line); backdrop-filter: blur(6px); }
.top .wrap { display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 38px; height: 38px; box-shadow: 0 0 0 var(--px) var(--line); }
.brand b { font: 400 34px/1 var(--f-title); color: #fff6e6; text-shadow: 0 var(--px) 0 var(--line); transition: color .3s; }
.top.solid .brand b { color: var(--ink); text-shadow: none; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; text-decoration: none; font: 400 13px/1 var(--f-label); text-transform: uppercase; color: #fff6e6; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.top.solid .nav a { color: var(--ink); text-shadow: none; }
.nav a:hover, .nav a.on { color: var(--spore-2); }
.top.solid .nav a:hover, .top.solid .nav a.on { color: var(--spore); }
.theme {
  width: 40px; height: 40px; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--paper);
  box-shadow: 0 -3px 0 var(--line), 0 3px 0 var(--line), -3px 0 0 var(--line), 3px 0 0 var(--line);
}
.theme svg { width: 22px; height: 22px; shape-rendering: crispEdges; }
.menu-btn { display: none; }
.wallet-btn .short { display: none; }
@media (max-width: 860px) {
  .nav { display: none; position: fixed; inset: 64px 0 auto; flex-direction: column; padding: 12px 16px 18px; background: var(--bg); box-shadow: 0 3px 0 var(--line); }
  .nav.open { display: flex; }
  .nav a { color: var(--ink); text-shadow: none; padding: 14px 4px; font-size: 15px; }
  .menu-btn { display: grid; }
  .wallet-btn .full { display: none; }
  .wallet-btn .short { display: inline; }
  .wallet-btn { padding: 0 12px; }
}
@media (max-width: 440px) {
  .brand b { display: none; }
  .top .wrap { gap: 10px; }
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; height: clamp(560px, 100svh, 980px); overflow: hidden; background: var(--sky); isolation: isolate; }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; transition: opacity .9s steps(6); image-rendering: pixelated; }
.hero .night { opacity: 0; }
:root[data-theme='night'] .hero .night { opacity: 1; }
:root[data-theme='night'] .hero .day { opacity: 0; }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 90px; background: linear-gradient(transparent, var(--bg)); z-index: 1; }
.hero-copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: clamp(104px, 17vh, 170px); text-align: center; }
.wordmark { font: 400 clamp(76px, 15vw, 196px)/.8 var(--f-title); color: #fff3df; margin: 0; letter-spacing: .01em; text-shadow: 0 6px 0 rgba(43, 29, 31, .55), 0 0 40px rgba(255, 170, 90, .35); }
:root[data-theme='night'] .wordmark { color: #ffd9a8; text-shadow: 0 6px 0 rgba(0, 0, 0, .6), 0 0 44px var(--glow); }
.hero .lede { margin: 18px 0 26px; font: 500 clamp(18px, 2.2vw, 24px)/1.3 var(--f-body); color: #fff3df; text-shadow: 0 2px 0 rgba(43, 29, 31, .6); }
.hero .ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero .scroll-note { display: none; }
@media (max-width: 760px) { .hero video, .hero .poster { object-position: 50% 100%; } .hero-copy { padding-top: clamp(96px, 14vh, 130px); } }

/* ------------------------------------------------------------------ CA tag */
.ca-tag { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; padding: 10px 14px; max-width: calc(100vw - 32px); }
.ca-tag .label { flex: none; }
.ca-tag code { font: 500 15px/1 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ca-tag .copy { flex: none; }
@media (max-width: 520px) { .ca-tag code { font-size: 12px; } }

/* ------------------------------------------------------------------ sections */
section { position: relative; }
.sec { padding: clamp(72px, 10vw, 128px) 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.sec-head p { margin: 0; max-width: 520px; color: var(--ink-2); }

/* the colony */
.colony { position: relative; overflow: hidden; background: var(--sky-2); }
.colony canvas { width: 100%; height: clamp(360px, 46vw, 560px); image-rendering: pixelated; cursor: crosshair; }
.colony .legend { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.colony .legend span { padding: 6px 10px; font: 400 11px/1 var(--f-label); background: var(--paper); color: var(--ink); text-transform: uppercase; }
.tip { position: absolute; pointer-events: none; z-index: 5; padding: 10px 12px; min-width: 180px; transform: translate(-50%, calc(-100% - 14px)); display: none; }
.tip.show { display: block; }
.tip b { display: block; font: 700 16px/1.2 var(--f-body); }
.tip small { display: block; color: var(--ink-2); font-size: 13px; }

/* the film */
.film { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #120d14; }
.film video { width: 100%; height: 100%; object-fit: cover; }
.film-play { position: absolute; inset: 0; margin: auto; width: 96px; height: 96px; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--spore); color: #2b1405; box-shadow: 0 -4px 0 var(--line), 0 4px 0 var(--line), -4px 0 0 var(--line), 4px 0 0 var(--line), 0 10px 0 4px rgba(0, 0, 0, .35), 0 0 40px var(--glow); }
.film-play svg { width: 40px; height: 40px; shape-rendering: crispEdges; }
.film-play:hover { filter: brightness(1.1); }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 26px; }
.stat { padding: 16px 18px; }
.stat .v { font: 600 clamp(24px, 3vw, 34px)/1.05 var(--f-body); margin-top: 6px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* how it grows */
.plates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.plate { padding: 12px 12px 18px; display: flex; flex-direction: column; }
.plate .art { aspect-ratio: 4 / 3; overflow: hidden; box-shadow: 0 0 0 var(--px) var(--line); }
.plate .art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.plate .step { margin: 14px 0 4px; }
.plate h3 { font: 400 30px/1 var(--f-title); margin: 0 0 10px; }
.plate ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--ink-2); font-size: 15px; }
.plate li::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 9px 2px 0; background: var(--spore); box-shadow: 0 0 6px var(--glow); }
@media (max-width: 1000px) { .plates { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plates { grid-template-columns: 1fr; } }

/* split bar */
.split { display: flex; height: 40px; margin: 18px 0 10px; box-shadow: 0 0 0 var(--px) var(--line); }
.split div { display: grid; place-items: center; font: 700 12px/1 var(--f-label); color: #fff6e8; }
.split .b { background: var(--burn); flex: 60; }
.split .d { background: var(--moss-2); flex: 25; }
.split .t { background: #7a5a9c; flex: 15; }

/* specimen cards */
.specimens { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px 22px; }
.card { padding: 16px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; transform: rotate(var(--r, 0deg)); transition: transform .15s steps(2); }
.card:hover { transform: rotate(0deg) translateY(-4px); }
.card .pin { position: absolute; top: -9px; left: 50%; width: 14px; height: 14px; margin-left: -7px; background: var(--spore); box-shadow: 0 0 0 3px var(--line), 0 0 10px var(--glow); }
.card .row { display: flex; gap: 12px; align-items: center; }
.card .face { width: 64px; height: 64px; flex: none; background: var(--bg-2); box-shadow: 0 0 0 var(--px) var(--line); image-rendering: pixelated; }
.card .face canvas, .card .face img { width: 100%; height: 100%; image-rendering: pixelated; }
.card .name { font: 700 18px/1.15 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .tick { font: 400 12px/1 var(--f-label); color: var(--ink-3); }
.card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 0; }
.card dt { font: 400 10px/1 var(--f-label); color: var(--ink-3); text-transform: uppercase; }
.card dd { margin: 3px 0 0; font: 600 15px/1.1 var(--f-body); }
.bar { height: 12px; background: var(--bg-2); box-shadow: 0 0 0 2px var(--line); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--spore) 0 6px, var(--spore-2) 6px 9px); box-shadow: 0 0 8px var(--glow); }
.tagline-chip { display: inline-block; padding: 4px 8px; font: 400 10px/1 var(--f-label); background: var(--moss-2); color: #fff8e8; text-transform: uppercase; }
.tagline-chip.lv2 { background: #7a5a9c; }
.tagline-chip.done { background: var(--spore); color: #2b1405; }

/* forms */
.field { display: grid; gap: 6px; }
.field > span { font: 400 11px/1 var(--f-label); text-transform: uppercase; color: var(--ink-3); }
.input, .textarea, select.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 0; background: var(--paper); color: var(--ink); font: 500 16px/1.3 var(--f-body);
  box-shadow: inset 0 0 0 var(--px) var(--line), inset 0 6px 0 rgba(0, 0, 0, .06); outline: none;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .textarea:focus { box-shadow: inset 0 0 0 var(--px) var(--spore), 0 0 0 3px var(--glow); }
.note { padding: 12px 14px; font-size: 14px; color: var(--ink-2); background: var(--paper-2); }
.note.err { color: var(--burn); }
.note.ok { color: var(--ok); }

/* reveal */
.rise { opacity: 0; transform: translateY(18px); transition: opacity .5s steps(5), transform .5s steps(5); }
.rise.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } }

/* footer */
.foot { padding: 60px 0 44px; background: var(--bg-2); box-shadow: 0 calc(-1 * var(--px)) 0 var(--line); }
.foot .wrap { display: flex; gap: 28px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.foot b { font: 400 40px/1 var(--f-title); }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { font: 400 12px/1 var(--f-label); text-transform: uppercase; text-decoration: none; }
.foot a:hover { color: var(--spore); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 90; transform: translateX(-50%); padding: 12px 16px; display: none; max-width: calc(100vw - 32px); }
.toast.show { display: block; }

/* page shells for inner pages */
.page { padding-top: 104px; min-height: 80vh; }
.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.panel { padding: 22px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.kv dt { font: 400 11px/1.6 var(--f-label); text-transform: uppercase; color: var(--ink-3); }
.kv dd { margin: 0; font: 500 15px/1.4 var(--f-body); overflow-wrap: anywhere; }
.seg { display: inline-flex; box-shadow: 0 0 0 var(--px) var(--line); }
.seg button { border: 0; padding: 10px 16px; cursor: pointer; background: var(--paper); font: 700 12px/1 var(--f-label); text-transform: uppercase; }
.seg button.on { background: var(--spore); color: #2b1405; }

/* live feed along the bottom of the hero */
.feed { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 46px; display: flex; align-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--bg) 84%, transparent); border-top: var(--px) solid var(--line); backdrop-filter: blur(4px); }
.feed-track { display: flex; gap: 56px; white-space: nowrap; width: max-content; animation: feed-roll 70s linear infinite; }
.feed:hover .feed-track { animation-play-state: paused; }
.feed-item { display: inline-flex; align-items: center; gap: 10px; font: 400 13px/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.feed-item img { width: 24px; height: 24px; object-fit: cover; box-shadow: 0 0 0 2px var(--line); }
.feed-item b { color: var(--spore); font-weight: 700; }
.feed-item i { font-style: normal; color: var(--ink-3); }
@keyframes feed-roll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .feed-track { animation: none; } }
@media (max-width: 760px) { .feed { height: 40px; } .feed-item { font-size: 11px; } }
