/* anipay dashboard — motion design per the workspace motion-design skill.
   Archetype: Corporate dashboard. Signature easing: cubic-bezier(0.2, 0, 0, 1).
   Durations: quick 120ms (hover), standard 250ms (state change), slow 400ms (page entrance).
   Three layers: primary (cards), secondary (shadows/icons), ambient (hero gradient). */
:root {
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --quick: 120ms;
  --standard: 250ms;
  --slow: 400ms;
  --ink: #1c1917;
  --muted: #78716c;
  --bg: #fafaf9;
  --card: #ffffff;
  --border: #e7e5e4;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --danger: #b91c1c;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  animation: fade-in var(--slow) var(--ease) both;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #134e4a 60%, #0c2b28);
  color: #f0fdfa;
  padding: 64px 24px 56px;
}
.hero-glow {
  position: absolute; inset: -40% -20% auto; height: 120%;
  background: radial-gradient(ellipse at 30% 0%, rgba(45, 212, 191, .35), transparent 60%);
  animation: glow-pulse 4s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glow-pulse { from { opacity: .6; transform: translateY(0); } to { opacity: 1; transform: translateY(6px); } }

.hero-inner { position: relative; max-width: 960px; margin: 0 auto; }
.wordmark { font-size: 56px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.tagline { font-size: 20px; margin: 12px 0 8px; font-weight: 600; }
.subtitle { max-width: 640px; color: #ccfbf1; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.badge {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px; padding: 4px 12px; font-size: 13px;
}

main { max-width: 960px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  animation: card-in var(--slow) var(--ease) both;
  transition: box-shadow var(--standard) var(--ease), transform var(--standard) var(--ease);
}
.card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .09); }
.card:nth-child(2) { animation-delay: 60ms; }
.card:nth-child(3) { animation-delay: 120ms; }
.card:nth-child(4) { animation-delay: 180ms; }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.3px; }
h3 { margin: 0 0 6px; font-size: 15px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.small { font-size: 12px; word-break: break-all; }
.muted { color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }
a { color: var(--teal); }

.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .why-grid { grid-template-columns: 1fr; } }
.why-grid p, .why-grid li { font-size: 14.5px; }
.why-grid ul { padding-left: 18px; margin: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

.kv { margin: 0 0 12px; }
.kv > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 600; font-size: 14px; text-align: right; }

.spent { margin: 12px 0; }
.spent-label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.bar { height: 10px; background: #e7e5e4; border-radius: 999px; overflow: hidden; }
.bar-fill {
  height: 100%; width: 0; background: var(--teal); border-radius: 999px;
  transition: width var(--slow) var(--ease);
}

.btn {
  border: 0; border-radius: 10px; padding: 11px 18px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: transform var(--quick) var(--ease), box-shadow var(--standard) var(--ease), background var(--quick) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.primary { background: var(--teal); color: #fff; width: 100%; }
.btn.primary:hover { background: var(--teal-dark); box-shadow: 0 4px 14px rgba(15, 118, 110, .35); }
.btn.ghost { background: #f5f5f4; color: var(--ink); }
.btn.ghost:hover { background: #e7e5e4; }
.btn.danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; width: 100%; text-align: left; }
.btn.danger:hover { background: #fee2e2; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 16px; }
.steps li {
  counter-increment: step; padding: 8px 0 8px 36px; position: relative; color: var(--muted); font-size: 14.5px;
  transition: color var(--standard) var(--ease);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 8px; width: 24px; height: 24px; border-radius: 50%;
  background: #e7e5e4; color: var(--muted); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--standard) var(--ease), color var(--standard) var(--ease);
}
.steps li.active { color: var(--ink); font-weight: 600; }
.steps li.active::before { background: var(--teal); color: #fff; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--teal); color: #fff; content: "✓"; }

.receipt {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 16px; padding: 14px; border: 1px solid #a7f3d0; background: #ecfdf5; border-radius: 10px;
  animation: pop-in var(--standard) var(--ease) both;
}
@keyframes pop-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.receipt .check {
  width: 28px; height: 28px; border-radius: 50%; background: #059669; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}
.receipt-title { font-weight: 700; }

.error-box {
  margin-top: 16px; padding: 12px 14px; border: 1px solid #fecaca; background: #fef2f2;
  color: var(--danger); border-radius: 10px; font-size: 14px;
  animation: shake 350ms var(--ease);
}
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.neg-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .neg-grid { grid-template-columns: 1fr; } }
.neg-result { margin-top: 8px; font-size: 13.5px; color: var(--muted); min-height: 40px; }
.neg-result.ok { color: #047857; font-weight: 600; }
.neg-result.bad { color: var(--danger); font-weight: 600; }

.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }

.howto-list li { margin-bottom: 6px; font-size: 14.5px; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 8px 24px 32px; }

/* Nest map (feature 9 — Galian + Jejak Teruji). Tidy zone boxes, no ant art.
   Grid mirrors the approved mockup; the chamber list below is live on-chain state. */
.nest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.zone { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #fafaf9; text-align: center; }
.zone strong { display: block; font-size: 14.5px; }
.zone span { color: var(--muted); font-size: 12.5px; }
.zone.queen { background: var(--teal); color: #fff; border-color: var(--teal); }
.zone.queen span { color: #ccfbf1; }
.zone.growing { border-color: var(--teal); border-style: dashed; background: #f0fdfa; }
.zone.roadmap { border-style: dashed; margin-top: 12px; text-align: center; }
#chamber-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.chamber { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--card); font-size: 14px; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700; margin-right: 4px; }
.pill.nursery { background: #fef3c7; color: #92400e; }
.pill.dug { background: #ccfbf1; color: var(--teal-dark); }
.pill.collapsed { background: #fee2e2; color: var(--danger); }
#nest-queen-line { margin-top: 12px; }
