/* =========================================================
   CryptoLawMap — Global styles
   Mobile-first. Vanilla CSS only.
   ========================================================= */

:root {
  --font-heading: 'Cal Sans', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --color-brand: #7F1BFF;
  --color-brand-dark: #5A00E0;
  --color-brand-light: #F3ECFF;
  --color-brand-50: #FAF6FF;
  --color-text: #0F0A1E;
  --color-text-muted: #4A4460;
  --color-text-soft: #6F6884;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8F7FF;
  --color-border: #E8E3F5;
  --color-border-strong: #D4CCEA;
  --color-success: #00B37D;
  --color-warning: #F5A623;
  --color-danger: #E53E3E;
  --color-legal: #2D7D46;
  --color-legal-bg: #E6F7EE;
  --color-restricted: #C17A00;
  --color-restricted-bg: #FFF8E6;
  --color-banned: #C53030;
  --color-banned-bg: #FFF0F0;
  --color-unclear: #718096;
  --color-unclear-bg: #F7F7F7;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-card: 0 1px 3px rgba(127, 27, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 10px 32px rgba(127, 27, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 20px 50px rgba(15, 10, 30, 0.10), 0 4px 12px rgba(127, 27, 255, 0.08);
  --max-width: 1200px;
  --max-article: 820px;
  --header-height: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-brand); text-decoration: none; }
a:hover { color: var(--color-brand-dark); }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.625rem; margin-top: 1.6em; }
h3 { font-size: 1.25rem; margin-top: 1.4em; }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; }
p { margin: 0 0 1.1em; color: var(--color-text); }
small { font-size: 0.875rem; }
strong { font-weight: 600; }
mark { background: var(--color-brand-light); padding: 1px 4px; border-radius: 4px; color: var(--color-text); }
hr { border: 0; border-top: 1px solid var(--color-border); margin: 2em 0; }
blockquote {
  border-left: 3px solid var(--color-brand);
  padding: 6px 16px;
  margin: 1.4em 0;
  background: var(--color-brand-50);
  color: var(--color-text-muted);
  font-style: italic;
}

@media (min-width: 768px) {
  body { font-size: 17px; }
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.4rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.25rem; }
}

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

@media (min-width: 768px) {
  .container { padding: 0 32px; }
}

.section { padding: 48px 0; }
@media (min-width: 768px) { .section { padding: 80px 0; } }

.section-alt { background: var(--color-bg-alt); }

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--color-text-muted); font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-brand);
  margin-bottom: 12px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-brand);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Announcement bar ---------- */
.announcement-bar {
  background: linear-gradient(90deg, #1A0533 0%, #3D0099 60%, #7F1BFF 100%);
  color: #fff;
  font-size: 0.86rem;
  padding: 8px 0;
  text-align: center;
  position: relative;
}
.announcement-bar .container { position: relative; padding-right: 40px; }
.announcement-text { display: inline; line-height: 1.4; }
.announcement-link {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
  margin-left: 4px;
}
.announcement-link:hover { color: #F3ECFF; }
.announcement-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px 8px;
  opacity: 0.7;
}
.announcement-close:hover { opacity: 1; }
.announcement-bar.is-hidden { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  line-height: 1;
  flex-shrink: 0;
}
.brand:hover { color: var(--color-text); }
.brand-img {
  height: 36px;
  width: auto;
  max-width: 220px;
  display: block;
}
.brand-img-footer {
  height: 40px;
  filter: none;
}
.brand-tag {
  font-size: 0.65rem;
  color: var(--color-text-soft);
  margin-top: 4px;
  letter-spacing: 0.02em;
  font-weight: 500;
}

@media (min-width: 768px) {
  .brand-img { height: 40px; }
  .brand-tag { font-size: 0.72rem; }
}

/* ---------- Primary nav ---------- */
.primary-nav { display: none; }
@media (min-width: 1024px) { .primary-nav { display: block; } }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-item { position: relative; margin: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--color-brand-light); color: var(--color-brand-dark); }
.caret { font-size: 0.7rem; opacity: 0.6; transition: transform 0.2s; }
.has-dropdown:hover .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.dropdown a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
}
.dropdown a:hover { background: var(--color-brand-light); color: var(--color-brand-dark); }
.dropdown-all, .mega-all { color: var(--color-brand); font-weight: 600; }

.mega-dropdown {
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-width: 720px;
  padding: 20px;
  gap: 20px;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.has-dropdown:hover .mega-dropdown,
.has-dropdown:focus-within .mega-dropdown {
  transform: translateX(-50%) translateY(0);
}
.mega-col { display: flex; flex-direction: column; gap: 2px; }
.mega-heading {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-soft);
  font-weight: 700;
  padding: 4px 12px;
  margin-bottom: 4px;
}

/* ---------- Mobile nav ---------- */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1024px) { .nav-toggle { display: none; } }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 30, 0.6);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }
.mobile-nav-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88%;
  max-width: 400px;
  background: #fff;
  overflow-y: auto;
  padding: 80px 24px 40px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-nav.is-open .mobile-nav-inner { transform: translateX(0); }
.mobile-nav-link {
  display: block;
  padding: 12px 8px;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav-group { border-bottom: 1px solid var(--color-border); }
.mobile-nav-group summary {
  padding: 12px 8px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  position: relative;
}
.mobile-nav-group summary::-webkit-details-marker { display: none; }
.mobile-nav-group summary::after {
  content: '+';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--color-brand);
  line-height: 1;
}
.mobile-nav-group[open] summary::after { content: '−'; }
.mobile-nav-sublinks {
  display: flex;
  flex-direction: column;
  padding: 4px 8px 12px;
  gap: 2px;
}
.mobile-nav-sublinks a {
  padding: 8px 4px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.mobile-nav-sublinks a:hover { color: var(--color-brand); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 48px 0 56px;
  background: var(--color-bg);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(127, 27, 255, 0.07), transparent 50%),
                    radial-gradient(circle at 10% 80%, rgba(127, 27, 255, 0.05), transparent 50%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 880px; margin: 0 auto; }
.hero h1 {
  margin: 0 0 18px;
  background: linear-gradient(135deg, #0F0A1E 30%, #7F1BFF 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin: 0 auto 28px;
  max-width: 680px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 36px;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
  margin-top: 28px;
}
.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.hero-trust-item svg { color: var(--color-brand); }

@media (min-width: 768px) {
  .hero { padding: 80px 0 96px; }
  .hero-sub { font-size: 1.2rem; }
}

/* ---------- Search ---------- */
.search-block {
  background: linear-gradient(135deg, var(--color-brand-50), #fff);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  border: 1px solid var(--color-border);
  margin: 0 auto;
  max-width: 800px;
}
.search-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-text);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 4px rgba(127, 27, 255, 0.12);
}
.search-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}
.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all 0.15s;
}
.search-pill:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0F0A1E;
  color: #C8C2D9;
  padding: 56px 0 24px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; } }

.site-footer .brand-crypto,
.site-footer .brand-map { color: #fff; }
.site-footer .brand-law { color: #B687FF; }
.site-footer .brand-tag { color: #6F6884; }

.footer-tagline { color: #9D96B5; margin: 16px 0; }
.footer-flag { font-size: 0.95rem; color: #fff; margin-bottom: 12px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  color: #C8C2D9;
  transition: background 0.15s, color 0.15s;
}
.footer-social a:hover { background: var(--color-brand); color: #fff; }

.footer-heading {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 0; }
.footer-links a {
  display: block;
  padding: 6px 0;
  color: #9D96B5;
  font-size: 0.92rem;
}
.footer-links a:hover { color: #fff; }

.footer-disclaimer {
  background: rgba(245, 166, 35, 0.08);
  border-left: 3px solid var(--color-warning);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #C8C2D9;
  margin-bottom: 24px;
}
.footer-disclaimer strong { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.83rem;
  color: #7C7595;
}
.footer-copy { display: flex; flex-direction: column; gap: 4px; }
.footer-updated { color: #5F5878; }
.footer-meta { font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.2;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
  box-shadow: 0 6px 18px rgba(127, 27, 255, 0.25);
}
.btn-primary:hover {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(127, 27, 255, 0.35);
}
.btn-outline {
  background: #fff;
  color: var(--color-brand);
  border-color: var(--color-brand);
}
.btn-outline:hover {
  background: var(--color-brand);
  color: #fff;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover { border-color: var(--color-brand); color: var(--color-brand); }

.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* ---------- Article layout ---------- */
.article-container {
  max-width: var(--max-article);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .article-container { padding: 0 32px; } }

.article-header {
  padding: 32px 0 8px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 32px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 18px;
  font-size: 0.86rem;
  color: var(--color-text-muted);
}
.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-brand-50);
  padding: 4px 10px;
  border-radius: 99px;
  color: var(--color-text);
  font-weight: 500;
}
.meta-badge-updated { background: #E6F7EE; color: #2D7D46; }

/* ---------- Page wrapper for content pages ---------- */
.page-wrapper { padding: 28px 0 64px; }
@media (min-width: 768px) { .page-wrapper { padding: 40px 0 96px; } }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .announcement-bar, .nav-toggle, .mobile-nav { display: none; }
  body { font-size: 12pt; }
}
