/* =========================================================================
   CryptoUltimacy — Futuristic theme
   Palette: deep space + neon cyan/violet. Glassmorphism + glow.
   ========================================================================= */

:root {
  --bg:        #06070d;
  --bg-2:      #0a0c17;
  --surface:   rgba(18, 22, 38, 0.55);
  --surface-2: rgba(28, 34, 56, 0.6);
  --border:    rgba(120, 160, 255, 0.14);
  --border-lit:rgba(0, 240, 255, 0.45);

  --text:      #e8ecf8;
  --text-dim:  #9aa6c4;
  --text-mute: #6b769a;

  --cyan:   #00f0ff;
  --violet: #b14bff;
  --pink:   #ff4bd8;
  --green:  #34f5a0;
  --amber:  #ffcf5c;

  --grad: linear-gradient(120deg, #00f0ff 0%, #6a7bff 45%, #b14bff 100%);
  --grad-soft: linear-gradient(120deg, rgba(0,240,255,.16), rgba(177,75,255,.16));

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --shadow-glow: 0 0 40px rgba(0, 240, 255, 0.15);

  --font-head: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Animated background ------------------------------------------------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(rgba(120,160,255,0.05) 1px, transparent 1px) 0 0 / 60px 60px,
    linear-gradient(90deg, rgba(120,160,255,0.05) 1px, transparent 1px) 0 0 / 60px 60px,
    radial-gradient(ellipse at 50% -20%, #131a33 0%, var(--bg) 60%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 40%, transparent 90%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40rem 30rem at 10% 0%, rgba(0,240,255,0.10), transparent 60%),
    radial-gradient(40rem 30rem at 90% 10%, rgba(177,75,255,0.12), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

/* --- Base elements ------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: .5px; font-weight: 700; }

img { max-width: 100%; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--cyan); color: #001016; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.muted { color: var(--text-mute); }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.glow-text { color: var(--cyan); text-shadow: 0 0 18px rgba(0,240,255,.6); }

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(6, 7, 13, 0.55);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.site-header.is-scrolled {
  background: rgba(6, 7, 13, 0.85);
  border-bottom-color: var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 900; font-size: 1.15rem; color: #fff; letter-spacing: 1px; }
.brand__mark { color: var(--cyan); font-size: 1.4rem; filter: drop-shadow(0 0 8px rgba(0,240,255,.7)); }
.brand__accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  color: var(--text-dim); font-weight: 500; font-size: .98rem;
  padding: 8px 14px; border-radius: 8px; position: relative;
}
.site-nav a:hover { color: #fff; background: var(--surface); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem; letter-spacing: .5px;
  padding: 14px 26px; border-radius: 12px; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s, box-shadow .3s, background .3s;
}
.btn--primary { background: var(--grad); color: #00111a; box-shadow: 0 0 0 rgba(0,240,255,0); }
.btn--primary:hover { color: #00111a; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,240,255,.35); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { color: #fff; border-color: var(--border-lit); box-shadow: var(--shadow-glow); }

/* --- Hero ---------------------------------------------------------------- */
.hero { padding: 90px 0 60px; position: relative; }
.hero__inner { text-align: center; max-width: 880px; margin: 0 auto; }
.hero__eyebrow {
  display: inline-block; font-family: var(--font-head); font-size: .72rem; letter-spacing: 3px;
  text-transform: uppercase; color: var(--cyan); padding: 7px 16px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); margin-bottom: 26px;
}
.hero__title { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 900; margin: 0 0 22px; letter-spacing: 1px; }
.hero__lead { font-size: 1.18rem; color: var(--text-dim); max-width: 660px; margin: 0 auto 34px; }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero__stats { display: flex; gap: 50px; justify-content: center; margin-top: 56px; flex-wrap: wrap; }
.hero__stats > div { display: flex; flex-direction: column; }
.hero__stat-num { font-family: var(--font-head); font-size: 2.1rem; font-weight: 900; color: #fff; }
.hero__stat-label { font-size: .82rem; color: var(--text-mute); letter-spacing: 1px; text-transform: uppercase; }

/* --- Sections ------------------------------------------------------------ */
.section { padding: 64px 0; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 12px; }
.section__sub { color: var(--text-dim); margin: 0; font-size: 1.05rem; }

/* --- Topic cards --------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.topic-card {
  display: block; padding: 30px 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  position: relative; overflow: hidden; transition: transform .3s, border-color .3s, box-shadow .3s;
}
.topic-card::before {
  content: ''; position: absolute; inset: 0; padding: 1px; border-radius: var(--radius);
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s;
}
.topic-card:hover { transform: translateY(-5px); box-shadow: 0 18px 50px rgba(0,0,0,.4), var(--shadow-glow); }
.topic-card:hover::before { opacity: 1; }
.topic-card__icon { font-size: 2rem; color: var(--cyan); display: block; margin-bottom: 14px; filter: drop-shadow(0 0 10px rgba(0,240,255,.5)); }
.topic-card__title { font-size: 1.18rem; margin: 0 0 10px; color: #fff; }
.topic-card__desc { color: var(--text-dim); font-size: .96rem; margin: 0 0 16px; }
.topic-card__meta { font-family: var(--font-head); font-size: .8rem; color: var(--cyan); letter-spacing: 1px; }

/* --- Article cards ------------------------------------------------------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 22px; }
.post-card {
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow: hidden; transition: transform .3s, border-color .3s, box-shadow .3s;
}
.post-card:hover { transform: translateY(-5px); border-color: var(--border-lit); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.post-card__link { display: flex; flex-direction: column; height: 100%; padding: 26px 24px; color: inherit; }
.post-card__cat {
  font-family: var(--font-head); font-size: .68rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--violet); margin-bottom: 12px;
}
.post-card__title { font-size: 1.16rem; margin: 0 0 12px; color: #fff; line-height: 1.3; }
.post-card:hover .post-card__title { color: var(--cyan); }
.post-card__excerpt { color: var(--text-dim); font-size: .95rem; margin: 0 0 18px; flex: 1; }
.post-card__meta { font-size: .8rem; color: var(--text-mute); letter-spacing: .5px; }

/* --- Value band ---------------------------------------------------------- */
.value-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
  padding: 44px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--grad-soft); backdrop-filter: blur(10px);
}
.value-band__item h3 { font-size: 1.12rem; margin: 0 0 8px; color: #fff; }
.value-band__item p { margin: 0; color: var(--text-dim); font-size: .96rem; }

/* --- CTA panel ----------------------------------------------------------- */
.cta-panel {
  text-align: center; padding: 60px 40px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border); position: relative; overflow: hidden;
}
.cta-panel::after {
  content: ''; position: absolute; inset: -2px; border-radius: var(--radius);
  background: radial-gradient(30rem 12rem at 50% 0%, rgba(0,240,255,.18), transparent 70%); pointer-events: none;
}
.cta-panel h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 14px; }
.cta-panel p { color: var(--text-dim); max-width: 560px; margin: 0 auto 28px; }

/* --- Page hero (interior) ----------------------------------------------- */
.page-hero { padding: 64px 0 30px; }
.page-hero__title { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 14px; }
.page-hero__icon { color: var(--cyan); filter: drop-shadow(0 0 10px rgba(0,240,255,.5)); }
.page-hero__sub { color: var(--text-dim); font-size: 1.1rem; max-width: 640px; margin: 0; }

/* --- Breadcrumb ---------------------------------------------------------- */
.breadcrumb { font-size: .85rem; color: var(--text-mute); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb span[aria-current] { color: var(--text); }

/* --- Track listing ------------------------------------------------------- */
.track { margin-bottom: 60px; }
.track__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.track__title { font-size: 1.5rem; margin: 0; color: #fff; }
.track__title span { color: var(--cyan); }
.track__all { font-family: var(--font-head); font-size: .8rem; letter-spacing: 1px; white-space: nowrap; }
.track__tag { color: var(--text-mute); margin: 6px 0 22px; }

/* --- Article ------------------------------------------------------------- */
.article { max-width: 820px; padding-top: 36px; padding-bottom: 60px; }
.article__head { margin-bottom: 30px; }
.article__cat { font-family: var(--font-head); font-size: .76rem; letter-spacing: 2px; text-transform: uppercase; color: var(--violet); }
.article__title { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 14px 0 16px; line-height: 1.2; }
.article__meta { color: var(--text-mute); font-size: .9rem; margin: 0; }

.article__body { font-size: 1.06rem; }
.article__body h2 {
  font-size: 1.6rem; margin: 44px 0 16px; color: #fff; padding-left: 16px;
  border-left: 3px solid; border-image: var(--grad) 1;
}
.article__body h3 { font-size: 1.25rem; margin: 30px 0 12px; color: #fff; }
.article__body p { margin: 0 0 18px; color: #d4dbf0; }
.article__body ul, .article__body ol { margin: 0 0 20px; padding-left: 22px; color: #d4dbf0; }
.article__body li { margin-bottom: 9px; }
.article__body strong { color: #fff; }
.article__body a { text-decoration: underline; text-decoration-color: rgba(0,240,255,.4); text-underline-offset: 3px; }
.article__body a:hover { text-decoration-color: var(--cyan); }

/* Callouts */
.callout {
  border-radius: var(--radius-sm); padding: 18px 22px; margin: 26px 0; font-size: .98rem;
  border: 1px solid var(--border); background: var(--surface); position: relative; padding-left: 24px;
}
.callout strong { color: #fff; }
.callout--info  { border-left: 3px solid var(--cyan);  box-shadow: -6px 0 24px -10px rgba(0,240,255,.5); }
.callout--warn  { border-left: 3px solid var(--amber); box-shadow: -6px 0 24px -10px rgba(255,207,92,.5); background: rgba(40,32,16,0.35); }

/* Takeaways */
.takeaways { list-style: none; padding: 0 !important; margin: 18px 0 0; }
.takeaways li { position: relative; padding-left: 28px; margin-bottom: 11px; }
.takeaways li::before { content: '◇'; position: absolute; left: 0; color: var(--cyan); }

/* Data tables */
.data-table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .94rem; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table thead th { font-family: var(--font-head); font-size: .8rem; letter-spacing: 1px; color: var(--cyan); text-transform: uppercase; }
.data-table tbody tr:hover { background: var(--surface); }

/* Related */
.related { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }
.related__title { font-size: 1.5rem; margin: 0 0 24px; }

/* --- Generic prose pages ------------------------------------------------- */
.prose { max-width: 800px; }
.prose h2 { font-size: 1.5rem; margin: 36px 0 14px; color: #fff; }
.prose p, .prose li { color: #d4dbf0; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 9px; }
.contact-email { font-family: var(--font-head); font-size: 1.4rem; }

/* --- Glossary ------------------------------------------------------------ */
.glossary-search { margin-bottom: 28px; }
#glossary-filter {
  width: 100%; max-width: 420px; padding: 13px 18px; font-size: 1rem; font-family: var(--font-body);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text);
}
#glossary-filter:focus { outline: none; border-color: var(--border-lit); box-shadow: var(--shadow-glow); }
.glossary { display: grid; gap: 14px; }
.glossary__item {
  padding: 20px 22px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .3s;
}
.glossary__item:hover { border-color: var(--border-lit); }
.glossary dt { font-family: var(--font-head); font-size: 1.05rem; color: var(--cyan); margin-bottom: 6px; }
.glossary dd { margin: 0; color: var(--text-dim); }

/* --- Ad slots ------------------------------------------------------------ */
.ad-slot { margin: 30px 0; display: flex; justify-content: center; }
.ad-placeholder {
  width: 100%; max-width: 728px; min-height: 90px; border-radius: var(--radius-sm);
  border: 1px dashed var(--border); background: repeating-linear-gradient(45deg, rgba(120,160,255,.03) 0 10px, transparent 10px 20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.ad-placeholder__tag { font-family: var(--font-head); font-size: .7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-mute); }
.ad-placeholder__hint { font-size: .78rem; color: var(--text-mute); opacity: .6; }

/* --- Error page ---------------------------------------------------------- */
.error-page { text-align: center; padding: 100px 0; }
.error-page__code { font-family: var(--font-head); font-size: clamp(5rem, 18vw, 11rem); font-weight: 900; margin: 0; line-height: 1; }
.error-page__title { font-size: clamp(1.4rem, 4vw, 2.2rem); margin: 12px 0 14px; }
.error-page__sub { color: var(--text-dim); max-width: 480px; margin: 0 auto 30px; }

/* --- Footer -------------------------------------------------------------- */
.site-footer { margin-top: 60px; border-top: 1px solid var(--border); background: var(--bg-2); }
.site-footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 56px 24px 40px;
}
.site-footer__brand .brand { margin-bottom: 14px; }
.site-footer__tag { color: var(--cyan); font-size: .9rem; margin: 0 0 12px; }
.site-footer__mini { color: var(--text-mute); font-size: .88rem; max-width: 320px; }
.site-footer__col h3 { font-size: .78rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text); margin: 0 0 16px; }
.site-footer__col a { display: block; color: var(--text-dim); font-size: .92rem; margin-bottom: 10px; }
.site-footer__col a:hover { color: var(--cyan); }
.site-footer__bar { border-top: 1px solid var(--border); }
.site-footer__bar-inner { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px; flex-wrap: wrap; }
.site-footer__bar p { margin: 0; font-size: .82rem; color: var(--text-mute); }
.site-footer__note { color: var(--text-mute); opacity: .7; }
.site-footer__credit { color: var(--text-mute); }
.site-footer__credit a { color: var(--text-dim); font-weight: 500; }
.site-footer__credit a:hover { color: var(--cyan); text-shadow: 0 0 12px rgba(0,240,255,.5); }

/* --- Reveal animation ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg-glow { animation: none; }
  html { scroll-behavior: auto; }
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(8,10,20,.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
    padding: 10px 16px 18px; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s;
  }
  .site-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 14px; border-radius: 8px; }
  .hero { padding: 56px 0 40px; }
  .hero__stats { gap: 30px; }
  .section { padding: 48px 0; }
  .track__head { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .value-band, .cta-panel { padding: 32px 22px; }
}
