/* ==========================================================================
   MemeNation — shared design system
   Mobile-first. Dark black/purple base with yellow accent.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Sora:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0a0714;
  --bg-soft: #0f0a1e;
  --card: #16102a;
  --card-hover: #1c1436;
  --line: #2b2145;
  --line-soft: #211934;
  --text: #f6f3fc;
  --muted: #ada4c9;
  --muted-dim: #776e97;
  --yellow: #ffce3d;
  --yellow-deep: #e2a70f;
  --purple: #9b5cf6;
  --purple-deep: #6c2fd1;
  --purple-glow: rgba(155, 92, 246, 0.28);
  --success: #4fdb9a;
  --danger: #ff6b7a;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 24px 60px -30px rgba(107, 47, 209, 0.55);
  --container: 1180px;
  --font-display: 'Lilita One', 'Sora', sans-serif;
  --font-body: 'Sora', -apple-system, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-family: var(--font-display); font-weight: 400; letter-spacing: .3px; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ---- Background atmosphere ---- */
body {
  background-image:
    radial-gradient(60vw 40vh at 85% -5%, var(--purple-glow), transparent 60%),
    radial-gradient(50vw 35vh at -10% 15%, rgba(255, 206, 61, 0.09), transparent 65%);
  background-repeat: no-repeat;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--yellow);
  color: #171029;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
  z-index: 200;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: var(--yellow); color: #1a1206; box-shadow: 0 12px 30px -10px rgba(255, 206, 61, 0.55); }
.btn.primary:hover { background: var(--yellow-deep); }
.btn.purple { background: var(--purple); color: #fff; box-shadow: 0 12px 30px -10px rgba(155, 92, 246, 0.6); }
.btn.purple:hover { background: var(--purple-deep); }
.btn.outline { background: transparent; color: var(--text); border-color: var(--line); }
.btn.outline:hover { border-color: var(--purple); background: rgba(155, 92, 246, 0.08); }
.btn.block { width: 100%; }
.btn.sm { padding: 10px 18px; font-size: .88rem; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 7, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  flex-shrink: 0;
}
.logo .dot { color: var(--yellow); }
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-panel {
  position: fixed;
  inset: 68px 0 0 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  padding: 10px 20px 30px;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  overflow-y: auto;
  z-index: 99;
}
.nav-panel.is-open { opacity: 1; transform: translateY(0); visibility: visible; }
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-links a {
  display: block;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-weight: 600;
}
.nav-links a.active, .nav-links a:hover { color: var(--yellow); }
.nav-cta { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-panel {
    position: static;
    inset: auto;
    background: none;
    border-top: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    overflow: visible;
  }
  .nav-links { flex-direction: row; align-items: center; gap: 28px; }
  .nav-links a { padding: 0; border-bottom: none; font-weight: 600; font-size: .95rem; position: relative; }
  .nav-links a.active::after, .nav-links a:hover::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 3px; background: var(--yellow); border-radius: 3px;
  }
  .nav { gap: 24px; }
  .nav-cta { margin-top: 0; flex-direction: row; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 56px 0 40px;
  text-align: center;
  overflow: hidden;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: .78rem;
  text-transform: uppercase;
  background: rgba(255, 206, 61, 0.08);
  border: 1px solid rgba(255, 206, 61, 0.25);
  padding: 7px 16px;
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2.6rem, 10vw, 4.6rem);
  line-height: 1.02;
  margin: 22px auto 18px;
  max-width: 16ch;
}
.hero h1 .accent { color: var(--yellow); }
.hero h1 .accent2 { color: var(--purple); }
.hero p.lead {
  max-width: 540px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.08rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.floaters { display: none; }
@media (min-width: 760px) {
  .floaters { display: block; }
  .floater {
    position: absolute;
    font-size: 2.2rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,.4));
    animation: float 6s ease-in-out infinite;
  }
  .floater.f1 { top: 8%; left: 6%; animation-delay: 0s; }
  .floater.f2 { top: 18%; right: 8%; animation-delay: 1.2s; font-size: 2.6rem; }
  .floater.f3 { bottom: 10%; left: 12%; animation-delay: .6s; }
  .floater.f4 { bottom: 16%; right: 14%; animation-delay: 1.8s; font-size: 1.8rem; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .floater { animation: none; }
}

/* ==========================================================================
   Page hero (secondary pages)
   ========================================================================== */
.page-hero {
  padding: 44px 0 30px;
  border-bottom: 1px solid var(--line-soft);
}
.page-hero .eyebrow { margin-bottom: 14px; }
.page-hero h1 { font-size: clamp(2rem, 7vw, 3rem); max-width: 22ch; }
.page-hero p.lead { max-width: 620px; color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ==========================================================================
   Category pills
   ========================================================================== */
.cat-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .88rem;
  transition: all .15s ease;
}
.cat-pill:hover { border-color: var(--purple); color: var(--text); }
.cat-pill[aria-pressed="true"] {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #1a1206;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 34px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 0; }
.section-kicker { color: var(--purple); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: .75rem; }
.section-sub { color: var(--muted); max-width: 560px; margin: 8px 0 0; }

/* ==========================================================================
   Ad slots
   ========================================================================== */
.ad-slot {
  margin: 26px 0;
  border: 1.5px dashed #443a63;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(155,92,246,0.05), rgba(255,206,61,0.03));
  padding: 22px 18px;
  text-align: center;
}
.ad-slot .ad-label {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted-dim);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.ad-slot p { color: var(--muted); font-size: .9rem; margin: 0; }
.ad-slot a { color: var(--yellow); font-weight: 700; }
.ad-slot.lg { padding: 34px 20px; min-height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ==========================================================================
   Meme grid / cards
   ========================================================================== */
.meme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.meme-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
  display: flex;
  flex-direction: column;
}
.meme-card:hover { transform: translateY(-4px); border-color: var(--purple); background: var(--card-hover); }
.meme-card .emoji { font-size: 2.4rem; line-height: 1; margin-bottom: 12px; }
.meme-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.meme-card p { color: var(--muted); font-size: .93rem; margin-bottom: 14px; flex-grow: 1; }
.meme-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(155, 92, 246, 0.12);
  border: 1px solid rgba(155, 92, 246, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.meme-card.is-hidden { display: none; }

/* Share row (populated by JS) */
.share-row {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  margin-top: auto;
}
.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all .15s ease;
}
.share-btn svg { width: 16px; height: 16px; fill: currentColor; }
.share-btn:hover { color: var(--text); border-color: var(--purple); background: rgba(155,92,246,0.12); }
.share-row.large .share-btn { width: 46px; height: 46px; border-radius: 12px; }
.share-row.large .share-btn svg { width: 20px; height: 20px; }

/* ==========================================================================
   CTA banners
   ========================================================================== */
.cta-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .cta-grid { grid-template-columns: 1fr 1fr; } }
.cta-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  top: -80px; right: -80px;
  background: radial-gradient(circle, var(--purple-glow), transparent 70%);
}
.cta-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.cta-card p { color: var(--muted); margin-bottom: 20px; }
.cta-card.yellow::before { background: radial-gradient(circle, rgba(255,206,61,.22), transparent 70%); }

/* ==========================================================================
   Steps (advertise page process)
   ========================================================================== */
.steps { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 20px 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-md); padding: 20px; }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--yellow); color: #1a1206; font-weight: 800; font-size: .85rem; margin-bottom: 10px;
}
.step h4 { margin: 0 0 6px; font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; }
.step p { color: var(--muted); font-size: .88rem; margin: 0; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 5vw, 38px);
  box-shadow: var(--shadow-card);
}
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.form-grid.two { grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: .9rem; }
.field .hint { color: var(--muted-dim); font-size: .78rem; }
.field input,
.field select,
.field textarea {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23ada4c9' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px; }
.field textarea { resize: vertical; min-height: 120px; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-glow);
}
.field.check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--purple); flex-shrink: 0; }
.field.check label { font-weight: 500; font-size: .88rem; color: var(--muted); }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.form-note { color: var(--muted-dim); font-size: .82rem; }

.form-status {
  display: none;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 18px;
  font-weight: 600;
  font-size: .92rem;
}
.form-status.is-visible { display: block; }
.form-status.success { background: rgba(79, 219, 154, 0.12); border: 1px solid rgba(79, 219, 154, 0.4); color: var(--success); }
.form-status.error { background: rgba(255, 107, 122, 0.12); border: 1px solid rgba(255, 107, 122, 0.4); color: var(--danger); }
.form-shell.is-submitted .form-fields { display: none; }

/* honeypot */
.hidden-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ==========================================================================
   Content pages (about / privacy / terms)
   ========================================================================== */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.2em; list-style: disc; }
.prose li { margin-bottom: .5em; }
.prose strong { color: var(--text); }
.updated-badge { color: var(--muted-dim); font-size: .85rem; margin-bottom: 30px; display: block; }

.value-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 24px 0; }
@media (min-width: 640px) { .value-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; }
.value-card .emoji { font-size: 1.8rem; margin-bottom: 10px; }
.value-card h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 6px; }
.value-card p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ==========================================================================
   Toast (copy link confirmation)
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--purple);
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .88rem;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 300;
  max-width: 90vw;
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 40px; background: var(--bg-soft); }
.footer-top { padding: 44px 0 30px; display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand .logo { margin-bottom: 10px; }
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 320px; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-dim); font-family: var(--font-body); margin-bottom: 14px; }
.footer-col a, .footer-col span { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding: 20px 0 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-dim);
  font-size: .82rem;
}
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a:hover { color: var(--yellow); }
.footer-share { display: flex; gap: 10px; }

/* ==========================================================================
   Misc utilities
   ========================================================================== */
.text-center { text-align: center; }
.mt-lg { margin-top: 40px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.badge-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.badge-row span {
  font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
