/* ══════════════════════════════════════
   NFTW — shared light UI (blog pages)
   Mirrors the tokens/nav/footer used inline in index.html
══════════════════════════════════════ */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: #d2d2d7;
  --accent: #6B5CE3;
  --accent-hover: #5747d4;
  --accent-soft: #efedfc;
  --radius-lg: 28px;
  --radius-md: 20px;
  --nav-h: 52px;
  --shadow-card: 0 2px 12px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 16px rgba(0,0,0,.06), 0 24px 60px rgba(0,0,0,.10);
  --ease: cubic-bezier(.28,.11,.32,1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: 22px;
}
@media (min-width: 735px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }
a, button, [role="button"], input, select, textarea, label { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--accent); margin-bottom: 12px; }

/* ── Reveal ── */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.fade-up.visible { opacity: 1; transform: none; }
.d100 { transition-delay: .08s; }
.d200 { transition-delay: .16s; }
.d300 { transition-delay: .24s; }

/* ── Skeleton ── */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton {
  background: linear-gradient(90deg, #ececf0 0px, #f5f5f7 200px, #ececf0 400px);
  background-size: 800px 100%;
  animation: shimmer 1.4s linear infinite;
}

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
nav.scrolled { border-bottom-color: rgba(0,0,0,.08); }
nav.menu-open { background: #fff; }
.nav-inner {
  height: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  /* 3-column grid: brand width changes never shift the links or right-side controls */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav-inner > .brand { grid-column: 1; justify-self: start; }
.nav-inner > .nav-links { grid-column: 2; }
.nav-inner > .nav-right { grid-column: 3; justify-self: end; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 28px; height: 28px; }
#nav-brand {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--text);
  text-transform: uppercase;
  white-space: nowrap;
}
/* Letters that fold away to leave N·F·T·W (width measured in JS → --w) */
#nav-brand .bx {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  white-space: pre;
  max-width: var(--w, 6em);
  opacity: 1;
}
nav.brand-ready #nav-brand .bx { transition: max-width .6s var(--ease), opacity .35s ease .1s; }
nav.brand-collapsed #nav-brand .bx { max-width: 0; opacity: 0; }
nav.brand-ready.brand-collapsed #nav-brand .bx { transition: max-width .6s var(--ease), opacity .25s ease; }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  text-decoration: none;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: rgba(0,0,0,.8);
  transition: color .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-cta { padding: 6px 14px !important; font-size: 12px !important; min-height: 28px; }

#nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px; height: 44px;
  margin-right: -12px;
  padding: 0;
  color: var(--text);
  align-items: center;
  justify-content: center;
}
#nav-hamburger .icon { position: relative; width: 18px; height: 12px; display: flex; align-items: center; justify-content: center; }
#nav-hamburger .bar {
  display: block;
  width: 18px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  position: absolute;
  transition: transform .35s var(--ease);
}
#nav-hamburger .bar:nth-child(1) { transform: translateY(-3.5px); }
#nav-hamburger .bar:nth-child(2) { transform: translateY(3.5px); }
nav.menu-open #nav-hamburger .bar:nth-child(1) { transform: rotate(45deg); }
nav.menu-open #nav-hamburger .bar:nth-child(2) { transform: rotate(-45deg); }

/* absolute (not fixed): nav's backdrop-filter makes it the containing block */
#mobile-menu {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  background: #fff;
  padding: 16px 32px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
#mobile-menu.open { visibility: visible; opacity: 1; transition: opacity .3s var(--ease); }
.mobile-nav-link {
  display: block;
  padding: 10px 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), color .2s;
}
#mobile-menu.open .mobile-nav-link { opacity: 1; transform: none; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: .03s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: .06s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: .09s; }
.mobile-nav-link:active, .mobile-nav-link[aria-current="page"] { color: var(--accent); }
#mobile-menu .btn-primary { margin-top: 28px; width: 100%; padding: 15px; font-size: 17px; }

@media (max-width: 833px) {
  .nav-links, .nav-cta { display: none !important; }
  #nav-hamburger { display: flex; }
}
@media (min-width: 834px) { #mobile-menu { display: none; } }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 980px;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--accent);
  transition: background .2s ease, transform .2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(.98); }
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  color: var(--accent);
  text-decoration: none;
  padding: 12px 8px;
}
.btn-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   STATES (error / empty)
══════════════════════════════════════ */
.state { text-align: center; padding: 80px 0; }
.state-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.state h2, .state h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.state p { font-size: 17px; color: var(--text-2); margin-bottom: 28px; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
  background: var(--bg-alt);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--text-2);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand img { width: 20px; height: 20px; }
.footer-brand span { font-size: 10px; font-weight: 800; letter-spacing: .2em; color: var(--text); text-transform: uppercase; }
.footer-links { display: flex; }
.footer-links a {
  font-size: 12px;
  color: var(--text-2);
  text-decoration: none;
  padding: 4px 12px;
  border-left: 1px solid var(--line);
}
.footer-links a:first-child { border-left: none; padding-left: 0; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 734px) { .footer-inner { flex-direction: column; align-items: flex-start; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .fade-up { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
