/* Shared site chrome — nav, mobile menu, footer, explore cards */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-tap-highlight-color: rgba(56, 189, 248, 0.2);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.perf-below-fold {
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}

.perf-save-data .particle-bg,
.perf-save-data .glow-pulse,
.perf-mobile .particle-bg {
  display: none !important;
}

@media (max-width: 767px) {
  .site-nav-panel {
    inset: 4.75rem max(1rem, env(safe-area-inset-right)) auto max(1rem, env(safe-area-inset-left));
  }

  .site-footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }

  .blog-page,
  .blog-article-page {
    padding-top: calc(5rem + env(safe-area-inset-top));
  }

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

  .blog-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .blog-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (pointer: coarse) {
  .site-nav-panel a,
  .site-nav-toggle,
  .lang-btn,
  .explore-card,
  .blog-card {
    min-height: 44px;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 200;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

[data-site-nav].is-scrolled {
  background: rgba(11, 18, 28, 0.98);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.45);
}

/* Avoid 3D nav slide fighting fixed top + region offset */
[data-site-nav].nav-enter {
  animation: siteNavFadeIn 0.45s ease forwards;
}

@keyframes siteNavFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.site-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.8);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.site-nav-toggle:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(59, 130, 246, 0.35);
}

.site-nav-toggle[aria-expanded="true"] {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(59, 130, 246, 0.2);
}

.site-nav-panel {
  position: fixed;
  inset: 5rem 1rem auto 1rem;
  z-index: 49;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
}

.site-nav-panel[hidden] {
  display: none !important;
}

.site-nav-panel a {
  display: block;
  padding: 0.75rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav-panel a:hover {
  background: rgba(59, 130, 246, 0.12);
  color: #fff;
}

.site-nav-panel__cta {
  margin-top: 0.5rem;
  text-align: center;
  background: #3b82f6 !important;
  color: #fff !important;
}

.site-footer {
  padding: 3rem 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #0b121c;
}

.site-footer__grid {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1.2fr 1.5fr 0.8fr;
    align-items: start;
  }
}

.site-footer__brand p {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #64748b;
  max-width: 18rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.site-footer__links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__links a:hover {
  color: #38bdf8;
}

.site-footer__bottom {
  max-width: 72rem;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.site-footer__legal {
  font-size: 0.72rem;
  line-height: 1.55;
  color: #64748b;
  max-width: 36rem;
}

.site-footer__social {
  display: flex;
  gap: 1rem;
  font-size: 1.1rem;
}

.site-footer__social a {
  color: #64748b;
  transition: color 0.2s ease;
}

.site-footer__social a:hover {
  color: #fff;
}

/* Index explore + blog preview */
.explore-section {
  padding: 4rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #0b121c 0%, #0a1018 100%);
}

.explore-section__inner {
  max-width: 72rem;
  margin: 0 auto;
}

.explore-section__head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.explore-section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.explore-section__lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: #94a3b8;
}

.explore-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .explore-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.explore-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.35rem;
  border-radius: 1.15rem;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.explore-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 16px 40px -16px rgba(59, 130, 246, 0.25);
}

.explore-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.explore-card__icon--cyan {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.explore-card__icon--mint {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.explore-card__icon--blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.explore-card__icon--violet {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.explore-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.explore-card__text {
  margin: 0 0 1rem;
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #94a3b8;
}

.explore-card__more {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
}

.blog-preview {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-preview__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.blog-preview__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.blog-preview__all {
  font-size: 0.85rem;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
}

.blog-preview__all:hover {
  color: #7dd3fc;
}

.blog-preview-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .blog-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-preview-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.blog-preview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.3);
}

.blog-preview-card__img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.blog-preview-card__body {
  padding: 1rem 1.1rem 1.15rem;
}

.blog-preview-card__meta {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
}

.blog-preview-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
}
