/*
Theme Name: Astra Child - W3D (Premium Dark)
Template: astra
Version: 2.0.0
Description: Premium emerald/cyan dark redesign for Web3Decentralization.com. Global dark UI + animations on top of Astra.
Author: The W3D Team
Text Domain: ast-w3d
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root{
  --w3d-bg:        #030409;
  --w3d-bg-2:      #04120d;
  --w3d-surface:   #07130f;
  --w3d-surface-2: #0a1f18;
  --w3d-border:    rgba(255,255,255,.07);
  --w3d-border-2:  rgba(52,211,153,.30);
  --w3d-text:      #eafaf4;
  --w3d-muted:     #9db8ad;
  --w3d-dim:       #5f7a70;
  --w3d-emerald:   #10b981;
  --w3d-emerald-2: #34d399;
  --w3d-teal:      #2dd4bf;
  --w3d-cyan:      #06b6d4;
  --w3d-grad:      linear-gradient(120deg,#10b981 0%,#34d399 45%,#06b6d4 100%);
  --w3d-grad-cyan: linear-gradient(120deg,#10b981,#06b6d4);
  --w3d-radius:    16px;
  --w3d-radius-sm: 10px;
  --w3d-glow:      0 0 0 1px rgba(16,185,129,.25), 0 8px 30px -6px rgba(16,185,129,.45);
  --w3d-shadow:    0 4px 24px -8px rgba(0,0,0,.6);
  --w3d-font-head: "Space Grotesk", -apple-system, "Segoe UI", Roboto, sans-serif;
  --w3d-font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --w3d-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ============================================================
   BASE / GLOBAL DARK
   ============================================================ */
html{ scroll-behavior:smooth; }
body, .site, .ast-container, #page, .entry-content{
  background-color: var(--w3d-bg) !important;
  color: var(--w3d-muted);
  font-family: var(--w3d-font-body);
  -webkit-font-smoothing:antialiased;
}
body{ overflow-x:hidden; }
h1,h2,h3,h4,h5,h6,.ast-article-single h1.entry-title{
  font-family: var(--w3d-font-head);
  color: var(--w3d-text);
  letter-spacing:-.01em;
}

/* Emerald gradient text helper */
.w3d-grad-text, .w3d-hero h1, .w3d-hero-inner h1{
  background: var(--w3d-grad-cyan);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
}

/* Selection */
::selection{ background:rgba(16,185,129,.4); color:#fff; }

/* Scrollbar (webkit) */
::-webkit-scrollbar{ width:11px; height:11px; }
::-webkit-scrollbar-track{ background:var(--w3d-bg); }
::-webkit-scrollbar-thumb{ background:#103b33; border-radius:99px; border:3px solid var(--w3d-bg); }
::-webkit-scrollbar-thumb:hover{ background:#174a40; }

/* Links */
a{ color:var(--w3d-emerald-2); transition:color .2s; }
a:hover{ color:#99f6e4; }

/* Buttons base */
.wp-block-button__link, .w3d-btn{
  border-radius:12px !important;
  font-family: var(--w3d-font-head);
  font-weight:600;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease, background .2s;
}
.wp-block-button__link:hover{ transform:translateY(-2px); }

/* ============================================================
   BACKGROUND ORBS (animated) — injected on hero / sections
   ============================================================ */
.w3d-hero{ position:relative; overflow:hidden; }
.w3d-hero::before,
.w3d-hero::after,
.w3d-orb,
.w3d-orb2{
  content:""; position:absolute; border-radius:50%; filter:blur(80px); pointer-events:none; z-index:0;
}
.w3d-hero::before{ width:520px; height:520px; left:-140px; top:-160px; background:rgba(16,185,129,.55); animation:w3dFloat 18s ease-in-out infinite; }
.w3d-hero::after{ width:460px; height:460px; right:-120px; bottom:-180px; background:rgba(6,182,212,.4); animation:w3dFloat 22s ease-in-out infinite reverse; }
@keyframes w3dFloat{
  0%,100%{ transform:translate(0,0) scale(1); }
  33%{ transform:translate(30px,-40px) scale(1.08); }
  66%{ transform:translate(-25px,25px) scale(.95); }
}
.w3d-hero > *{ position:relative; z-index:1; }

/* ============================================================
   STICKY GLASS HEADER
   ============================================================ */
.site-header{
  background:transparent !important;
  border-bottom:1px solid transparent;
  transition:background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease, border-color .3s ease;
}
.site-header.w3d-scrolled,
body.w3d-scrolled .site-header{
  background:rgba(10,10,18,.72) !important;
  backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--w3d-border);
  box-shadow:0 8px 30px -18px rgba(0,0,0,.7);
}
.site-header .ast-menu-toggle, .site-header .ast-icon{ color:var(--w3d-text); }
.site-title a, .site-title{ color:var(--w3d-text) !important; }

/* Astra inner header bar / primary bar — forced transparent */
.main-header-bar,
.ast-primary-header-bar,
.main-header-bar-wrap,
.ast-main-header-wrap,
.site-header-primary-wrap{
  background:transparent !important;
}

/* Header text + nav links */
.main-header-menu .menu-link{ color:var(--w3d-muted) !important; transition:color .2s; }
.main-header-menu .menu-link:hover{ color:var(--w3d-emerald-2) !important; }

/* Astra dropdowns + sub-menus — dark */
.main-header-menu .sub-menu,
.ast-header-break-point .main-header-menu,
.ast-header-break-point .main-header-menu .sub-menu{
  background-color:var(--w3d-bg) !important;
}
.main-header-menu .sub-menu .menu-link{ color:var(--w3d-muted) !important; }
.main-header-menu .sub-menu .menu-link:hover{ color:var(--w3d-emerald-2) !important; }

/* Mobile menu toggle / hamburger */
.ast-mobile-menu-to-toggle, .ast-menu-toggle{ color:var(--w3d-text) !important; }
.ast-header-break-point .main-header-menu .main-header-bar-navigation{ background:var(--w3d-bg) !important; }

/* ============================================================
   CONTENT WRAPPER / CARDS — global dark
   ============================================================ */
.ast-article-single, .page .entry-content, .ast-separate-container .ast-article-single,
.wp-block-group, .entry-content p, .entry-content li{ color:var(--w3d-muted); }
.ast-separate-container .ast-article-single{
  background:var(--w3d-bg-2) !important; border:1px solid var(--w3d-border); border-radius:var(--w3d-radius);
}
.entry-meta, .posted-on, .posted-by, .cat-links a, .comments-area{ color:var(--w3d-dim); }

/* Content area — no white bleed from Astra */
#primary, .content-area, .site-main, .ast-container,
.ast-separate-container, .ast-plain-container,
.ast-article-single, .page .entry-content,
.post-23, .ast-article-post,
.ast-no-sidebar .ast-container, .ast-left-sidebar .ast-container,
.ast-right-sidebar .ast-container{
  background:transparent !important;
}
body{ background-color:var(--w3d-bg) !important; }
#page{ background:transparent !important; }

/* ============================================================
   HOMEPAGE — HERO
   ============================================================ */
.w3d-hero{
  background:
    radial-gradient(120% 90% at 8% -10%, rgba(16,185,129,.28), transparent 55%),
    radial-gradient(110% 80% at 95% 0%, rgba(6,182,212,.14), transparent 55%),
    radial-gradient(90% 70% at 50% 120%, rgba(6,182,212,.18), transparent 60%),
    linear-gradient(180deg,#0a0a12 0%, #0e1020 100%) !important;
  color:var(--w3d-text);
}
.w3d-hero-inner{ max-width:860px; margin:0 auto; text-align:center; }
.w3d-hero-badge{
  display:inline-block; padding:7px 16px; border-radius:999px;
  background:rgba(16,185,129,.14); border:1px solid rgba(52,211,153,.35);
  font-size:13px; letter-spacing:.06em; color:#a7f3d0; margin-bottom:20px;
  font-family:var(--w3d-font-mono); text-transform:uppercase;
}
.w3d-hero h1{ font-size:clamp(32px,6vw,54px); font-weight:700; line-height:1.08; margin:0 0 18px; }
.w3d-hero .w3d-sub{ font-size:19px; line-height:1.65; color:var(--w3d-muted); max-width:640px; margin:0 auto 30px; }
.w3d-ctas{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.w3d-hero .btn-primary, .w3d-cta .btn-primary{
  background:linear-gradient(120deg,#10b981,#059669); color:#fff !important;
  box-shadow:0 10px 30px -8px rgba(16,185,129,.6);
}
.w3d-hero .btn-primary:hover{ box-shadow:0 14px 40px -8px rgba(16,185,129,.8); }
.w3d-hero .btn-ghost, .w3d-cta .btn-ghost{
  background:rgba(255,255,255,.04); color:#fff !important; border:1px solid rgba(255,255,255,.18);
}
.w3d-hero .btn-ghost:hover{ background:rgba(255,255,255,.09); }

/* Stats */
.w3d-stats{ display:flex; gap:34px; justify-content:center; flex-wrap:wrap; margin-top:36px; }
.w3d-stat{ text-align:center; }
.w3d-stat strong{ display:block; font-size:30px; color:#fff; font-family:var(--w3d-font-mono); font-weight:700; }
.w3d-stat strong::after{ content:""; display:block; width:100%; height:3px; margin-top:6px; border-radius:99px; background:var(--w3d-grad-cyan); }
.w3d-stat span{ font-size:13px; color:var(--w3d-dim); }

/* ============================================================
   SECTIONS
   ============================================================ */
.w3d-section{ padding:60px 0; }
.w3d-section .w3d-sec-label{
  text-align:center; color:var(--w3d-emerald-2); font-weight:700; text-transform:uppercase;
  letter-spacing:.12em; font-size:12px; margin:0 0 10px; font-family:var(--w3d-font-mono);
}
.w3d-section h2{ text-align:center; font-size:clamp(26px,3.2vw,36px); font-weight:700; margin:0 0 10px; }
.w3d-section .w3d-sec-sub{ text-align:center; color:var(--w3d-muted); max-width:640px; margin:0 auto 36px; font-size:16px; }
.w3d-section[style*="background-color"]{ background-color:var(--w3d-bg-2) !important; }

/* ============================================================
   CHAIN SCORECARD GRID
   ============================================================ */
.w3d-chains{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
@media (max-width:1024px){ .w3d-chains{grid-template-columns:repeat(3,1fr);} }
@media (max-width:760px){ .w3d-chains{grid-template-columns:repeat(2,1fr);} }
@media (max-width:480px){ .w3d-chains{grid-template-columns:1fr;} }
.w3d-chain{
  background:linear-gradient(180deg,rgba(23,26,43,.9),rgba(18,20,31,.95));
  border:1px solid var(--w3d-border); border-radius:var(--w3d-radius-sm);
  padding:18px; display:flex; flex-direction:column; gap:10px;
  box-shadow:var(--w3d-shadow); transition:transform .2s ease, box-shadow .25s ease, border-color .25s ease;
  text-decoration:none; color:var(--w3d-text) !important;
}
.w3d-chain:hover{
  transform:translateY(-4px); border-color:var(--w3d-border-2);
  box-shadow:0 16px 38px -14px rgba(16,185,129,.5);
}
.w3d-chain a{ text-decoration:none; color:inherit !important; display:block; }
.w3d-top{ display:flex; justify-content:space-between; align-items:baseline; }
.w3d-name{ font-weight:600; font-size:15px; color:var(--w3d-text); font-family:var(--w3d-font-head); }
.w3d-score{ font-weight:700; font-size:22px; color:var(--w3d-emerald-2); font-family:var(--w3d-font-mono); }
.w3d-bar{ height:8px; border-radius:99px; background:rgba(255,255,255,.08); overflow:hidden; margin:2px 0; }
.w3d-bar i{ display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#10b981,#06b6d4); }
.w3d-detail{ font-size:12px; color:var(--w3d-dim); }

/* ============================================================
   GUIDE / TOPIC CARDS
   ============================================================ */
.w3d-cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
@media (max-width:900px){ .w3d-cards{grid-template-columns:1fr;} }
.w3d-card{
  background:linear-gradient(180deg,rgba(23,26,43,.85),rgba(18,20,31,.95));
  border:1px solid var(--w3d-border); border-radius:var(--w3d-radius);
  overflow:hidden; box-shadow:var(--w3d-shadow); transition:transform .2s ease, border-color .25s ease, box-shadow .25s ease;
  display:flex; flex-direction:column;
}
.w3d-card:hover{ transform:translateY(-4px); border-color:var(--w3d-border-2); box-shadow:0 16px 38px -14px rgba(16,185,129,.45); }
.w3d-card-body{ padding:20px; }
.w3d-card-cat{
  font-size:11px; font-weight:700; color:var(--w3d-emerald-2); text-transform:uppercase;
  letter-spacing:.08em; font-family:var(--w3d-font-mono);
}
.w3d-card h3{ font-size:17px; line-height:1.35; margin:10px 0 6px; }
.w3d-card h3 a{ color:var(--w3d-text); text-decoration:none; }
.w3d-card h3 a:hover{ color:var(--w3d-emerald-2); }
.w3d-card p{ font-size:14px; color:var(--w3d-muted); margin:0; }

/* ============================================================
   TRUST + CTA
   ============================================================ */
.w3d-trust{
  background:linear-gradient(150deg,#071a14 0%,#0a2d22 100%);
  border:1px solid var(--w3d-border-2); border-radius:var(--w3d-radius);
  padding:40px; color:#fff; position:relative; overflow:hidden;
  box-shadow:0 24px 60px -30px rgba(16,185,129,.4);
}
.w3d-trust::before{ content:""; position:absolute; inset:0; background:radial-gradient(700px 260px at 15% 0%, rgba(16,185,129,.28), transparent 60%); pointer-events:none; }
.w3d-trust h3{ color:#fff; font-size:24px; margin:0 0 12px; position:relative; }
.w3d-trust p{ color:#c9cfe8; max-width:740px; position:relative; }
.w3d-trust a{ color:var(--w3d-emerald-2); }

.w3d-cta{
  text-align:center; color:#fff; border-radius:var(--w3d-radius); padding:48px 28px;
  background:radial-gradient(120% 140% at 50% -20%, rgba(16,185,129,.5), transparent 55%),
             radial-gradient(120% 120% at 50% 130%, rgba(6,182,212,.35), transparent 60%),
              linear-gradient(150deg,#09201a,#0c3028);
  border:1px solid var(--w3d-border-2); box-shadow:0 24px 70px -30px rgba(16,185,129,.5);
  position:relative; overflow:hidden;
}
.w3d-cta h3{ color:#fff; font-size:30px; margin:0 0 12px; }
.w3d-cta p{ color:#d3d6f2; max-width:560px; margin:0 auto 24px; }

/* ============================================================
   ARTICLE LAYOUT — reading bar, TOC, blocks
   ============================================================ */
.w3d-progress{ position:fixed; top:0; left:0; height:3px; width:0; z-index:99999;
  background:var(--w3d-grad-cyan); border-radius:0 99px 99px 0; }

.single .entry-content h2, .page .entry-content h2{ font-size:28px; font-weight:700; margin-top:1.7em; color:var(--w3d-text); }
.single .entry-content h3, .page .entry-content h3{ font-size:21px; font-weight:700; color:var(--w3d-text); }
.single .entry-content a{ color:var(--w3d-emerald-2); }
.single .entry-content a:hover{ color:#99f6e4; }
.single .entry-content blockquote{
  border-left:3px solid var(--w3d-emerald); background:rgba(16,185,129,.08);
  color:var(--w3d-text); border-radius:0 12px 12px 0; padding:16px 20px;
}
.single .entry-content table, .page .entry-content table{ border-collapse:collapse; }
.single .entry-content th{ background:rgba(16,185,129,.14); color:var(--w3d-text); }
.single .entry-content td, .single .entry-content th{ border:1px solid var(--w3d-border); padding:10px 14px; }
.single .entry-content code, .w3d-mono{ font-family:var(--w3d-font-mono); }
.single .entry-content pre{ background:#0c0d18; border:1px solid var(--w3d-border); border-radius:12px; }
.ast-article-single h1.entry-title{ font-size:40px; font-weight:800; }
.post-navigation a, .share-links a{ color:var(--w3d-emerald-2); }

/* ============================================================
   ARCHIVES / BLOG LISTINGS
   ============================================================ */
.blog .ast-article-post, .archive .ast-article-post, .search .ast-article-post{
  background:var(--w3d-surface); border:1px solid var(--w3d-border); border-radius:var(--w3d-radius);
  padding:24px; transition:transform .2s, border-color .25s;
}
.blog .ast-article-post:hover, .archive .ast-article-post:hover{
  transform:translateY(-3px); border-color:var(--w3d-border-2);
}
.blog .entry-title a, .archive .entry-title a{ color:var(--w3d-text); }
.blog .entry-title a:hover{ color:var(--w3d-emerald-2); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer, .site-footer .ast-container, #colophon, .ast-footer-overlay,
.site-above-footer-wrap, .site-below-footer-wrap, .site-primary-footer-wrap,
.site-footer-section, .site-footer-below-section-1,
.site-footer .ast-builder-grid-row, .site-footer .widget,
.ast-builder-grid-row-full, .ast-builder-grid-row-container{
  background:var(--w3d-bg-2) !important; color:var(--w3d-muted);
  border-top:1px solid var(--w3d-border-2);
}
.site-footer a{ color:var(--w3d-muted); }
.site-footer a:hover{ color:var(--w3d-emerald-2); }
.site-footer .widget-title, .site-footer h1,.site-footer h2,.site-footer h3,.site-footer h4{ color:var(--w3d-text); }

/* Home page — hide Astra page title */
.home .entry-header{ display:none !important; }

/* ============================================================
   REVEAL ANIMATION CLASSES (driven by w3d-ui.js)
   ============================================================ */
.w3d-reveal{ opacity:0; transform:translateY(26px); transition:opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); will-change:opacity,transform; }
.w3d-reveal.w3d-in{ opacity:1; transform:none; }
.w3d-reveal-d1{ transition-delay:.08s; }
.w3d-reveal-d2{ transition-delay:.16s; }
.w3d-reveal-d3{ transition-delay:.24s; }

/* ============================================================
   REDUCED MOTION — never animate for users who opt out
   ============================================================ */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *, *::before, *::after{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
  .w3d-reveal{ opacity:1; transform:none; }
  .w3d-hero::before, .w3d-hero::after{ animation:none; }
}
