/* ============================================================
   AFTERBELL landing — Soft Organic / Pastel Editorial
   ============================================================ */
:root {
  --bg: #F5F4F7; --surface: #FFFCFA; --surface-2: #FFF5F1;
  --ink: #4A304D; --ink-2: #6B5470; --muted: #857985;
  --line: rgba(74, 48, 77, .12); --line-soft: rgba(74, 48, 77, .06);
  --orange: #FF9148; --orange-ink: #E8732C; --orange-soft: rgba(255, 145, 72, .12);
  --peach: #FFD6B4; --cream: #FFE4A1; --lavender: #B597C2; --lavender-soft: #EEE9FA;
  --yes: #22A97E; --yes-soft: rgba(34, 169, 126, .10);
  --no: #E8576B; --no-soft: rgba(232, 87, 107, .09);
  --font-display: 'Manrope', sans-serif;
  --font-body: 'Manrope', 'Inter Tight', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius-card: 28px; --radius-hero: 36px; --radius-sm: 14px; --radius-pill: 999px;
  --shadow-soft: 0 20px 50px rgba(78, 52, 74, .08);
  --shadow-hover: 0 28px 60px rgba(78, 52, 74, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); background: var(--bg); color: var(--ink);
  line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
/* film grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--orange); color: #fff; }
a { color: var(--orange-ink); }
img { max-width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; display: flex; align-items: center;
  padding: 14px 28px; gap: 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-logo { height: 32px; width: auto; }
.brand-mark { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.rpc-status { font-size: 8px; color: var(--yes); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .15s;
}
.nav-links a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  border-radius: var(--radius-pill); padding: 12px 24px; border: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary {
  background: var(--orange); color: #fff;
  box-shadow: 0 12px 26px -10px rgba(255, 145, 72, .55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -10px rgba(255, 145, 72, .6); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.btn-ghost:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-connected { background: var(--yes) !important; }

/* ---------- Hero ---------- */
.hero { max-width: 1240px; margin: 0 auto; padding: 32px 28px 0; }
.hero-card {
  position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px;
  border-radius: var(--radius-hero); overflow: hidden;
  background: linear-gradient(135deg, var(--cream) 0%, var(--peach) 48%, #FFB45E 100%);
  box-shadow: var(--shadow-hover);
  padding: 56px 56px 48px;
}
.hero-content { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(74, 48, 77, .75); margin-bottom: 22px;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.hero-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(44px, 6vw, 76px); line-height: .98; color: var(--ink); margin-bottom: 22px;
}
.hero-sub { font-size: 16.5px; color: var(--ink-2); max-width: 480px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-evidence { display: flex; gap: 20px; flex-wrap: wrap; }
.hero-evidence a {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(74,48,77,.35); padding-bottom: 2px;
}
.hero-evidence a:hover { color: var(--orange-ink); border-bottom-color: var(--orange-ink); }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-mark { width: min(320px, 78%); filter: drop-shadow(0 22px 36px rgba(74,48,77,.22)); animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
.hero-art::before {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,252,250,.75), transparent 65%);
}

/* ---------- Sections ---------- */
.section { max-width: 1240px; margin: 0 auto; padding: 84px 28px 0; position: relative; }
.sec-art {
  position: absolute; right: 28px; top: 60px; width: 140px;
  filter: drop-shadow(0 16px 28px rgba(74,48,77,.16));
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}
.section .eyebrow { color: var(--muted); }
.section-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(28px, 3.4vw, 42px); line-height: 1.08; margin-bottom: 34px; max-width: 640px;
}

/* ---------- Keyframes ---------- */
.keyframes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.keyframe {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 26px 24px; box-shadow: var(--shadow-soft); transition: transform .15s, box-shadow .15s;
}
.keyframe:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.keyframe:nth-child(2) { background: linear-gradient(160deg, var(--surface) 40%, var(--lavender-soft)); }
.keyframe:nth-child(4) { background: linear-gradient(160deg, var(--surface) 40%, var(--surface-2)); }
.kf-number { font-family: var(--font-mono); font-size: 11px; color: var(--orange-ink); margin-bottom: 16px; }
.kf-label {
  display: inline-block; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; color: var(--orange-ink); background: var(--orange-soft);
  border-radius: var(--radius-pill); padding: 4px 10px; margin-bottom: 14px;
}
.kf-title { font-weight: 800; font-size: 17px; margin-bottom: 8px; letter-spacing: -.01em; }
.kf-desc { font-size: 13.5px; color: var(--muted); }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat-pill {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 22px 24px; box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 6px;
}
.stat-pill-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat-pill-value { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1; }

/* ---------- Markets ---------- */
.markets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.market-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 24px; box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .15s, box-shadow .15s;
}
.market-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.market-ticker { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.mk-logo { width: 22px; height: 22px; object-fit: contain; background: #fff; border-radius: 50%; padding: 2px; }
.mk-logo-fb {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 700; color: #fff; background: var(--ink);
}
.market-question { font-size: 15px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; }
.odds-bar { display: flex; height: 8px; border-radius: var(--radius-pill); overflow: hidden; background: var(--no-soft); }
.odds-yes { background: var(--yes); color: transparent; font-size: 0; transition: width .4s ease; }
.odds-no { background: var(--no-soft); color: transparent; font-size: 0; }
.market-prices { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; }
.price-yes { color: var(--yes); font-weight: 700; }
.price-no { color: var(--no); font-weight: 700; }
.market-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em; color: var(--muted); }
.market-card .btn-pill { margin-top: auto; align-self: flex-start; padding: 10px 20px; }
.skeleton-card { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; }

/* ---------- Oracle ---------- */
.oracle-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.oracle-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 26px 24px; box-shadow: var(--shadow-soft);
}
.oracle-card:nth-child(1) { background: linear-gradient(160deg, var(--surface) 35%, var(--lavender-soft)); }
.oracle-label {
  display: inline-block; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; color: var(--orange-ink); background: var(--orange-soft);
  border-radius: var(--radius-pill); padding: 4px 10px; margin-bottom: 16px;
}
.oracle-title { font-weight: 800; font-size: 17px; margin-bottom: 8px; letter-spacing: -.01em; }
.oracle-desc { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.source-link { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.source-link:hover { text-decoration: underline; }

/* ---------- Honest ---------- */
.honest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.honest-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; font-size: 13.5px; color: var(--ink-2);
  box-shadow: var(--shadow-soft);
}

/* ---------- Docs ---------- */
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.doc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 24px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-soft);
  transition: transform .15s, box-shadow .15s;
}
.doc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.doc-label { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .14em; color: var(--orange-ink); margin-bottom: 12px; }
.doc-title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }

/* ---------- Footer ---------- */
.footer { max-width: 1240px; margin: 0 auto; padding: 84px 28px 40px; }
.footer-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 34px; box-shadow: var(--shadow-soft); margin-bottom: 20px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-label { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .14em; color: var(--orange-ink); margin-bottom: 4px; }
.footer-col a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--orange-ink); }
.footer-no-token {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em;
  color: var(--muted); background: var(--orange-soft); border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 20px;
}
.footer-copy { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: var(--muted); line-height: 1.8; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-card { grid-template-columns: 1fr; padding: 40px 30px; }
  .hero-art { order: -1; justify-content: flex-start; }
  .hero-mark { width: 140px; }
  .sec-art { width: 90px; top: 40px; opacity: .9; }
}
@media (max-width: 640px) {
  .nav { padding: 12px 16px; }
  .nav-links { gap: 14px; }
  .nav-links a { display: none; }
  .nav-links a:first-child { display: inline; }
  .hero { padding: 20px 16px 0; }
  .section { padding: 60px 16px 0; }
  .sec-art { display: none; }
  .footer { padding: 60px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Mobile polish ---------- */
@media (min-width: 641px) and (max-width: 900px) {
  .section-title { max-width: calc(100% - 110px); }
}
@media (max-width: 768px) {
  .sec-art { width: 70px; top: 36px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn-pill { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 40px; }
  .hero-card { padding: 32px 22px; border-radius: 26px; }
  .footer-cols { grid-template-columns: 1fr 1fr; padding: 24px; }
}
