:root {
  --mango: #f0b429;
  --mango-deep: #d8890b;
  --leaf: #1c5c3c;
  --leaf-ink: #103226;
  --clay: #c44b16;
  --cream: #f6efe2;
  --paper: #fffaf1;
  --sand: #ead9b8;
  --ink: #1b1612;
  --muted: #5c5348;
  --line: #d8c7a6;
  --good: #2f7d4a;
  --warn: #b45309;
  --shadow: 4px 4px 0 var(--ink);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, #ffe08a 0%, transparent 36%),
    radial-gradient(circle at 110% 8%, #c8e3c4 0%, transparent 28%),
    var(--cream);
  font-family: var(--font-body);
  line-height: 1.55;
  min-height: 100dvh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M36 8c8 8 16 6 22 14 6 8 2 18-4 24s-16 10-24 8-14-10-16-18 2-16 10-22 8-10 12-6z' fill='none' stroke='%231c5c3c' stroke-width='1'/%3E%3C/svg%3E");
  z-index: 0;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, .btn { font: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
}
.skip:focus { left: 8px; z-index: 20; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(246, 239, 226, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.brand-tag {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: flex-end;
}
.nav a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  background: var(--mango);
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink);
  min-height: 44px;
}

main { position: relative; z-index: 1; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.section { padding: 56px 0; }
.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf);
  margin: 0 0 8px;
}
h1, h2, h3, .display {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 12px;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  padding: 48px 0 24px;
}

.hero-panel {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 28px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mango);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn.secondary { background: var(--paper); }
.btn.leaf { background: var(--leaf); color: var(--paper); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px 0 8px;
}
.stat {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
}
.stat span { color: var(--muted); font-size: 0.9rem; }

.loop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.loop article {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 18px;
  min-height: 210px;
}
.loop .n {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mango);
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 12px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }

.card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card.claimed { background: #efe7d4; }
.card.delivered { background: #dcead9; }
.card.ripe { border-left: 10px solid var(--clay); }
.card.mixed { border-left: 10px solid var(--mango-deep); }
.card.green { border-left: 10px solid var(--leaf); }

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill.good { background: #c8e6c0; }
.pill.warn { background: #ffe08a; }

.banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: var(--leaf-ink);
  color: var(--paper);
  border-radius: 20px;
  padding: 16px 18px;
  margin: 8px 0 22px;
}
.banner ol {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.banner li { font-size: 0.92rem; }
.banner .done { color: #c8e6c0; text-decoration: line-through; }

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  background: var(--ink);
  color: var(--paper);
  padding: 14px 16px;
  border-radius: 16px;
  max-width: min(360px, calc(100% - 24px));
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 200ms ease;
}
.toast.show { opacity: 1; transform: none; }

label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
select, input[type="number"], input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
  font: inherit;
}
.field { margin-bottom: 12px; }
.help { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.error { color: #9b1c1c; font-weight: 700; min-height: 1.2em; }

.table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }

.progress {
  height: 10px;
  background: var(--sand);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--leaf);
}

.journey { display: grid; gap: 12px; }
.stage {
  display: grid;
  grid-template-columns: 140px 1fr 180px;
  gap: 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 16px;
}
.feel {
  border-left: 6px solid var(--mango);
  padding-left: 10px;
}
.feel b { display: block; font-family: var(--font-display); }

.diamond-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.diamond {
  border: 2px solid var(--ink);
  background: var(--paper);
  border-radius: 24px;
  padding: 22px;
  min-height: 280px;
}
.diamond.diverge { background: #fff4cc; }
.diamond.converge { background: #dcead9; }

.scamper article,
article.scamper {
  border: 2px solid var(--ink);
  background: var(--paper);
  border-radius: 20px;
  padding: 18px;
}
.letter {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--mango);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 2px solid var(--ink);
  padding: 28px 0 40px;
  margin-top: 20px;
  color: var(--muted);
}

.notice {
  background: #fff4cc;
  border: 2px dashed var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .hero, .stats, .loop, .grid-2, .diamond-wrap, .stage {
    grid-template-columns: 1fr;
  }
  .site-header { flex-wrap: wrap; }
  .nav { justify-content: flex-start; }
}

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

:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 3px;
}
