/* AgentQuest v2 — gaya editorial ala agentic404.xyz, palet hijau + ungu + kuning */

:root {
  --bg: #121014;
  --surface: #1d1920;
  --surface-2: #251f2a;
  --border: #322a38;
  --text: #f2eee6;
  --muted: #a8a2ad;
  --purple: #c9a7eb;
  --purple-dim: #9c75bb;
  --green: #4ade80;
  --yellow: #facc15;
  --red: #e57373;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--purple);
}

.txt-purple { color: var(--purple); }
.txt-green { color: var(--green); }
.txt-yellow { color: var(--yellow); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ===== INTRO OVERLAY ===== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  animation: introAutoHide 0.7s ease 4.5s forwards;
}

.intro-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes introAutoHide {
  to { opacity: 0; visibility: hidden; }
}

.intro-eyebrow {
  position: absolute;
  top: 24px;
  left: 28px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro-center {
  display: flex;
  align-items: flex-start;
  line-height: 1;
}

.intro-giant {
  font-size: clamp(8rem, 32vw, 20rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--purple);
  opacity: 0.22;
}

.intro-tag-num {
  margin-top: 12%;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--purple);
}

.intro-card {
  position: absolute;
  right: 8%;
  top: 22%;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px;
  transform: rotate(5deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  animation: floaty 3s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: rotate(5deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-10px); }
}

.intro-card-tag {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text);
}

.intro-card-xp {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--yellow);
  margin-top: 6px;
}

.intro-card-sub {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 4px;
}

.intro-tagline {
  margin-top: 28px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  padding: 0 20px;
}

.intro-skip {
  position: absolute;
  right: 28px;
  bottom: 24px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.intro-skip:hover {
  border-color: var(--purple);
  color: var(--purple);
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  background: rgba(18, 16, 20, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  color: var(--purple);
}

.site-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--text);
}

.header-connect {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language switcher */
.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.lang-btn:hover {
  border-color: var(--purple);
  color: var(--text);
}

.lang-btn.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #17131a;
}

/* ===== ANNOUNCE STRIP ===== */
.announce {
  background: #241a2e;
  border-bottom: 1px solid var(--border);
  color: var(--purple);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 8px 16px;
}

/* ===== HERO ===== */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 40px;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 16px;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-meta {
  margin-top: 28px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.hero-right {
  position: relative;
  min-height: 340px;
}

.tilt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.tc-back {
  position: absolute;
  top: 0;
  right: 8%;
  width: 240px;
  transform: rotate(-4deg);
  opacity: 0.85;
}

.tc-front {
  position: absolute;
  top: 110px;
  right: 0;
  width: 260px;
  transform: rotate(3deg);
}

.tilt-tag {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.tilt-xp {
  display: block;
  font-size: 2.1rem;
  font-weight: 900;
  margin-top: 6px;
}

.tilt-sub {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 4px;
}

.sticker {
  position: absolute;
  left: 0;
  bottom: 64px;
  background: var(--yellow);
  color: #17131a;
  font-weight: 900;
  font-size: 0.85rem;
  line-height: 1.25;
  padding: 10px 14px;
  border-radius: 2px;
  transform: rotate(-6deg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.hero-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ===== MARQUEE ===== */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 24px;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  animation: marquee 26s linear infinite;
}

.marquee-track span {
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 0.95rem;
  color: var(--purple);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 16px;
  animation: rise 0.5s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card h2 {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

/* Notice banner */
.notice {
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.notice.error {
  border-color: #5c2b2b;
  background: #2a1515;
  color: #f0b4b4;
}

.notice.success {
  border-color: #2b5c2b;
  background: #142a14;
  color: #b4e0b4;
}

.notice.info {
  border-color: #5a4a1a;
  background: #23230f;
  color: #e8d98a;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s ease, transform 0.05s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--purple);
  color: #17131a;
}

.btn-primary:hover:not(:disabled) {
  background: #d3a9f5;
}

.btn-gold {
  background: var(--yellow);
  color: #17131a;
}

.btn-gold:hover:not(:disabled) {
  background: #fde047;
}

.btn-outline {
  background: transparent;
  color: var(--purple);
  border: 1px solid var(--purple);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(201, 167, 235, 0.12);
}

.btn-big {
  width: 100%;
  padding: 14px 20px;
  font-size: 1.05rem;
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

/* Connect row */
.wallet-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wallet-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.network-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.network-status.ok {
  color: var(--green);
}

.network-status.bad {
  color: var(--red);
}

/* Agent ID status */
.agent-status {
  font-size: 1rem;
}

.agent-status.ok {
  color: var(--green);
  font-weight: 700;
}

.agent-status.bad {
  color: var(--red);
}

/* How it works */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.how-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px;
}

.how-num {
  font-size: 1.8rem;
  font-weight: 900;
}

.how-card h3 {
  font-size: 1.05rem;
  margin: 8px 0 6px;
}

.how-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 8px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 4px;
}

.val-yellow { color: var(--yellow); }
.val-purple { color: var(--purple); }
.val-green { color: var(--green); }

/* Tx status */
.tx-status {
  margin-top: 12px;
  font-size: 0.92rem;
  word-break: break-all;
}

.tx-status a {
  color: var(--yellow);
}

/* Quests */
.quest-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
}

.quest-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.quest-name {
  font-weight: 800;
  font-size: 1rem;
}

.quest-reward {
  color: var(--yellow);
  font-weight: 800;
  white-space: nowrap;
}

.quest-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 6px 0 10px;
}

.quest-target {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
  word-break: break-all;
}

.quest-target a {
  color: var(--purple);
  text-decoration: none;
}

.quest-target a:hover {
  text-decoration: underline;
}

.quest-hint {
  font-size: 0.88rem;
  color: var(--red);
  margin-top: 8px;
}

.quest-done {
  color: var(--green);
  font-weight: 800;
}

/* Leaderboard */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
}

.lb-rank {
  font-weight: 800;
  color: var(--purple);
  min-width: 28px;
  text-align: center;
}

.lb-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-xp {
  font-weight: 800;
  color: var(--yellow);
  white-space: nowrap;
}

.lb-level {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 32px 0 8px;
}

.footer-logo {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-links {
  margin: 10px 0;
}

.footer-links a {
  font-weight: 700;
}

/* Mobile */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 0 28px;
  }

  .hero-right {
    min-height: 300px;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: 2.4rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quest-top {
    flex-direction: column;
    gap: 2px;
  }

  .lb-level {
    display: none;
  }

  .intro-card {
    right: 4%;
    width: 180px;
    padding: 14px;
  }

  .tc-back,
  .tc-front {
    width: 210px;
  }
}
