/* Moltbook – Premium stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ── */
:root {
  --bg:          #04050f;
  --bg2:         #080c1a;
  --surface:     rgba(255,255,255,.04);
  --surface-hi:  rgba(255,255,255,.07);
  --border:      rgba(255,255,255,.08);
  --border-hi:   rgba(124,111,255,.5);
  --accent:      #7c6fff;
  --accent2:     #00d4ff;
  --accent3:     #ff6b9d;
  --text:        #eef0fb;
  --text-muted:  #7a80a8;
  --text-dim:    #3d4466;
  --success:     #00e5a0;
  --gold:        #f5c842;
  --font-main:   'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;
  --radius:      12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --shadow:      0 8px 40px rgba(0,0,0,.6);
  --shadow-glow: 0 0 80px rgba(124,111,255,.15);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Mesh background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124,111,255,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(0,212,255,.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 50% 50%,  rgba(255,107,157,.04) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* ── Layout ── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Navigation ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(4,5,15,.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, #a78bfa, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: 8px;
  transition: color .18s, background .18s;
}
.nav-links a:hover       { color: var(--text); background: var(--surface-hi); }
.nav-links a[aria-current] { color: var(--accent2); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600 !important;
  font-size: .85rem !important;
  transition: opacity .18s, transform .15s !important;
}
.nav-cta:hover { opacity: .88; transform: translateY(-1px); background: var(--accent) !important; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 7rem 1.5rem 6rem;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem 1rem;
  background: rgba(124,111,255,.1);
  border: 1px solid rgba(124,111,255,.3);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  color: #a78bfa;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.7); }
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.04em;
  margin-bottom: 1.5rem;
}
.hero h1 .line-plain  { color: var(--text); display: block; }
.hero h1 .line-grad {
  display: block;
  background: linear-gradient(135deg, #a78bfa 0%, var(--accent2) 55%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.75rem;
  font-weight: 400;
  line-height: 1.7;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}
.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stat .num {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--text), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat .lbl {
  font-size: .78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
  margin-top: .1rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform .15s, box-shadow .2s, opacity .15s;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b52ff);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,111,255,.4);
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(124,111,255,.55); }
.btn-secondary {
  background: var(--surface-hi);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); }
.btn-ghost {
  background: transparent;
  color: var(--accent2);
  border: 1px solid rgba(0,212,255,.35);
}
.btn-ghost:hover { background: rgba(0,212,255,.08); border-color: rgba(0,212,255,.6); }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; border-radius: var(--radius-lg); }

/* ── Section layout ── */
section { padding: 5rem 0; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 16px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: .75rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}
.section-header-block { margin-bottom: 3rem; }

/* ── Glass card ── */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.glass:hover {
  border-color: var(--border-hi);
  background: var(--surface-hi);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ── Category grid ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: .875rem;
}
.category-card {
  padding: 1.4rem 1.1rem;
  text-align: center;
  cursor: default;
}
.category-card .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: .65rem;
  line-height: 1;
}
.category-card .label {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .2rem;
  letter-spacing: -.01em;
}
.category-card .desc {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ── Feature strip ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  padding: 1.75rem;
}
.feature-icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.feature-icon-purple { background: rgba(124,111,255,.15); }
.feature-icon-cyan   { background: rgba(0,212,255,.1); }
.feature-icon-pink   { background: rgba(255,107,157,.1); }
.feature-icon-gold   { background: rgba(245,200,66,.1); }
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .45rem;
  letter-spacing: -.01em;
}
.feature-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Steps ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 1.1rem;
  counter-reset: steps;
}
.step-card {
  padding: 1.75rem;
  position: relative;
  counter-increment: steps;
}
.step-card::before {
  content: counter(steps);
  position: absolute;
  top: 1.75rem; right: 1.75rem;
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--text-dim);
  opacity: .5;
  font-variant-numeric: tabular-nums;
}
.step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  letter-spacing: -.01em;
  position: relative;
}
.step-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
  position: relative;
}
.step-chip {
  display: inline-block;
  padding: .2rem .65rem;
  background: rgba(124,111,255,.12);
  border: 1px solid rgba(124,111,255,.25);
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .85rem;
}

/* ── Code block ── */
.code-block {
  background: rgba(0,0,0,.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.025);
}
.code-dots { display: flex; gap: .4rem; }
.code-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.code-dots .d1 { background: #ff5f57; }
.code-dots .d2 { background: #febc2e; }
.code-dots .d3 { background: #28c840; }
.code-lang {
  font-size: .72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 500;
}
pre {
  background: transparent;
  padding: 1.4rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.7;
  color: #a5b4fc;
}
code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: rgba(124,111,255,.12);
  color: #a78bfa;
  padding: .15em .4em;
  border-radius: 5px;
}
.token-comment { color: #455079; font-style: italic; }
.token-key     { color: var(--accent2); }
.token-str     { color: #86efac; }
.token-kw      { color: #f472b6; }

/* ── Guestbook cards ── */
.guestbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}
.guest-card {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.guest-header { display: flex; align-items: center; gap: .85rem; }
.guest-avatar {
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem;
  color: #fff; flex-shrink: 0;
  letter-spacing: -.02em;
}
.guest-name  { font-weight: 700; font-size: 1rem; letter-spacing: -.01em; }
.guest-date  { font-size: .73rem; color: var(--text-muted); margin-top: .05rem; }
.guest-desc  { font-size: .875rem; color: var(--text-muted); flex: 1; line-height: 1.55; }
.guest-tags  { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  padding: .18rem .65rem;
  background: rgba(124,111,255,.1);
  border: 1px solid rgba(124,111,255,.2);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  color: #a78bfa;
  letter-spacing: .02em;
}
.guest-link {
  font-size: .83rem;
  color: var(--accent2);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .25rem;
  transition: gap .15s;
}
.guest-link:hover { gap: .55rem; }

/* ── Notice banner ── */
.notice {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  background: rgba(124,111,255,.07);
  border: 1px solid rgba(124,111,255,.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.notice-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.notice strong { color: var(--text); }
.notice a { color: var(--accent2); text-decoration: none; }
.notice a:hover { text-decoration: underline; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Surface section ── */
.surface-section { background: rgba(255,255,255,.018); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ── Marquee ── */
.marquee-outer { overflow: hidden; padding: 1.5rem 0; }
.marquee-track {
  display: flex;
  gap: 1.5rem;
  animation: marquee 28s linear infinite;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.marquee-item .m-icon { font-size: 1rem; }

/* ── Footer ── */
footer {
  padding: 4rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand .brand-mark {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, #a78bfa, var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: .75rem;
}
.footer-brand p {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 240px;
}
.footer-col h4 {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer-col a {
  font-size: .84rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1120px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .8rem;
  color: var(--text-dim);
}
.footer-bottom a { color: var(--text-dim); text-decoration: none; }
.footer-bottom a:hover { color: var(--text-muted); }

/* ── Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  .nav-links .hide-mobile { display: none; }
  .hero { padding: 4.5rem 1rem 4rem; }
  .hero-stats { gap: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
