/* ============================================================
   locallua.net — styles
   Clean black & blue professional marketplace theme.
   ============================================================ */

:root {
  --bg:        #050608;   /* near-black */
  --bg-2:      #0a0d14;
  --surface:   #0f131c;
  --surface-2: #161b27;
  --border:    #1f2533;
  --border-2:  #2a3142;
  --text:      #eef2f8;
  --muted:     #8a93a6;
  --muted-2:   #5b6377;

  --accent:    #2f81f7;   /* blue */
  --accent-2:  #4cc2ff;   /* light blue */
  --accent-d:  #1e5fd0;   /* deep blue */
  --warn:      #f5a524;
  --danger:    #f85149;
  --success:   #3fb950;

  --grad: linear-gradient(135deg, #2f81f7 0%, #4cc2ff 100%);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 8px 30px -10px rgba(0,0,0,.7);
  --shadow-glow: 0 0 0 1px rgba(47,129,247,.4), 0 8px 30px -6px rgba(47,129,247,.3);

  --maxw: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }

::selection { background: rgba(47,129,247,.35); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 14px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 16px -4px rgba(47,129,247,.5);
}
.btn-primary:hover { box-shadow: 0 6px 22px -4px rgba(47,129,247,.7); transform: translateY(-1px); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); }

.btn-block { width: 100%; justify-content: center; padding: 14px; }
.btn-icon { display: inline-flex; align-items: center; gap: 6px; }

.link-btn {
  font-size: 13px; font-weight: 600; color: var(--accent-2);
  background: none; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center; color: var(--muted);
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5,6,8,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--bg-2); flex-shrink: 0;
  transition: transform .2s ease;
}
.brand:hover .brand-mark { transform: scale(1.06) rotate(-3deg); }
.brand-mark img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.brand-name { font-size: 18px; letter-spacing: -.02em; }
.brand-dot { color: var(--accent-2); }

.nav-links { display: flex; gap: 6px; margin-left: 12px; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--muted); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cart-badge {
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; display: inline-grid; place-items: center;
}

.nav-search {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px 14px;
  display: flex; align-items: center; gap: 12px;
}
.nav-search input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 12px 16px; color: var(--text); font-size: 15px;
  outline: none;
}
.nav-search input:focus { border-color: var(--accent); }
.nav-search-hint { font-size: 12px; color: var(--muted-2); }

.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 90px 24px 70px;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(47,129,247,.22), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(76,194,255,.14), transparent 50%);
  filter: blur(8px);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(47,129,247,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,129,247,.05) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at center, black, transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }

.hero-badge {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-2);
  font-size: 13px; font-weight: 600; color: var(--accent-2);
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(36px, 6vw, 64px); font-weight: 900;
  line-height: 1.05; letter-spacing: -.03em; margin-bottom: 14px;
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: .15s;
}
.grad {
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}

/* typewriter subtitle */
.hero-subtitle {
  font-size: 15px; font-weight: 500;
  color: var(--accent-2);
  margin-bottom: 36px;
  min-height: 22px;
  letter-spacing: .01em;
  opacity: 0;
  animation: fadeIn .5s ease forwards;
  animation-delay: .5s;
}
.hero-subtitle .caret {
  display: inline-block;
  width: 2px; height: 16px;
  background: var(--accent-2);
  margin-left: 2px;
  vertical-align: -2px;
  animation: blink 1s step-end infinite;
}

/* fade-up keyframe (reused by title, search, stats) */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* cascade the rest of the hero to follow the title in */
.hero-badge {
  opacity: 0;
  animation: fadeUp .7s cubic-bezier(.22,1,.36,1) forwards;
}
.hero-search {
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: .75s;
}
.hero-stats {
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: .95s;
}

.hero-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 12px; padding: 8px 8px 8px 18px;
  max-width: 560px; margin: 0 auto 40px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.hero-search-icon { font-size: 20px; color: var(--muted); }
.hero-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 16px; padding: 10px 0;
}
.hero-search input::placeholder { color: var(--muted-2); }

.hero-stats {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 24px; font-weight: 800; }
.stat span { font-size: 13px; color: var(--muted); }

/* ============ MARQUEE ============ */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track {
  display: flex; gap: 14px; width: max-content;
  animation: marqueeScroll 40s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500;
  flex-shrink: 0;
}
.marquee-item .mi-icon {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
}
.marquee-item .mi-name { color: var(--text); }
.marquee-item .mi-price { color: var(--accent-2); font-weight: 700; }
.marquee-item .mi-rating { color: var(--warn); font-size: 12px; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ MARKETPLACE ============ */
.marketplace {
  max-width: var(--maxw); margin: 0 auto;
  padding: 56px 24px;
  display: grid; grid-template-columns: 260px 1fr; gap: 32px;
  align-items: start;
}

/* filters sidebar */
.filters {
  position: sticky; top: 80px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 22px;
}
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h3 { font-size: 16px; font-weight: 700; }

.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}
.price-val { color: var(--accent-2); text-transform: none; font-size: 13px; }

.filter-input, .filter-select {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  color: var(--text); font-size: 14px; outline: none; width: 100%;
}
.filter-input:focus, .filter-select:focus { border-color: var(--accent); }
.filter-select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active {
  background: var(--grad); border-color: transparent; color: #fff;
}

.filter-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; border-radius: 5px;
  background: var(--border-2); outline: none;
}
.filter-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 0 0 4px rgba(47,129,247,.2);
}
.range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted-2); }

.filter-check {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; color: var(--text); cursor: pointer; padding: 2px 0;
}
.filter-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* results */
.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.results-info { display: flex; align-items: baseline; gap: 12px; }
.results-info h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.results-count { font-size: 14px; color: var(--muted); }
.results-tools { display: flex; gap: 10px; align-items: center; }
.sort-select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 30px 9px 14px; color: var(--text);
  font-size: 14px; font-weight: 500; cursor: pointer; outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
#filtersToggle { display: none; }

/* grid */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* script card */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.card-thumb {
  height: 130px; position: relative; overflow: hidden;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 32px;
  color: rgba(255,255,255,.95);
  letter-spacing: -.02em;
}
.card-thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
}
.card-thumb span { position: relative; z-index: 1; }
.card-badges {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 8px; border-radius: 6px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
}
.badge-free { background: var(--success); color: #04210f; }
.badge-feat { background: var(--warn); color: #2a1c00; }

.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent-2);
}
.card-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.card-tag { font-size: 13px; color: var(--muted); flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted);
  margin-top: 4px;
}
.card-meta .stars { color: var(--warn); }
.card-game {
  font-size: 11px; color: var(--muted-2);
  background: var(--bg-2); padding: 3px 8px; border-radius: 6px;
  display: inline-block; width: fit-content;
}

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-top: 1px solid var(--border);
  margin-top: 4px;
}
.card-price { display: flex; flex-direction: column; }
.price-amt { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.price-amt.free { color: var(--success); }
.price-sub { font-size: 11px; color: var(--muted-2); }

.add-btn {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: 9px; padding: 9px 14px; font-size: 13px; font-weight: 600;
  color: var(--text); transition: all .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.add-btn:hover { background: var(--grad); border-color: transparent; color: #fff; }
.add-btn.added { background: var(--success); color: #04210f; border-color: transparent; }

/* empty state */
.empty-state {
  text-align: center; padding: 80px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { font-size: 48px; }
.empty-state h3 { font-size: 20px; }
.empty-state p { color: var(--muted); margin-bottom: 8px; }

/* ============ SECTIONS (how / faq) ============ */
.section-head { text-align: center; margin-bottom: 40px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent-2); margin-bottom: 8px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; }

.how { max-width: var(--maxw); margin: 0 auto; padding: 70px 24px; }
.how-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.how-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .2s, transform .2s;
}
.how-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.how-num {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
  margin-bottom: 16px;
}
.how-card h3 { font-size: 18px; margin-bottom: 8px; }
.how-card p { color: var(--muted); font-size: 14px; }

.faq { max-width: 800px; margin: 0 auto; padding: 70px 24px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 20px;
  transition: border-color .2s;
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  padding: 16px 0; font-weight: 600; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--accent); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0 18px; color: var(--muted); font-size: 14px; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 56px 24px 32px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
}
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text); transition: color .15s; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto; padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: var(--muted-2);
}

/* ============ CART DRAWER ============ */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: 400px; max-width: 90vw;
  background: var(--bg-2); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.cart-drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--border);
}
.drawer-head h3 { font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 12px; }
.drawer-body:empty::before {
  content: "Your cart is empty"; color: var(--muted); text-align: center;
  padding: 40px 0; font-size: 14px;
}
.cart-row {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px;
}
.cart-row-thumb {
  width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
  font-family: 'JetBrains Mono', monospace; color: #fff;
}
.cart-row-info { flex: 1; min-width: 0; }
.cart-row-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-row-price { font-size: 13px; color: var(--accent-2); font-weight: 600; }
.cart-row-remove { color: var(--muted-2); font-size: 18px; padding: 4px 8px; transition: color .15s; }
.cart-row-remove:hover { color: var(--danger); }

.drawer-foot { padding: 20px 22px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.cart-total strong { font-size: 22px; }
.cart-note { text-align: center; font-size: 11px; color: var(--muted-2); margin-top: 10px; }

/* ============ TOASTS ============ */
.toasts {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: 10px; padding: 12px 18px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow);
  animation: toastIn .25s ease, toastOut .25s ease 2.6s forwards;
}
@keyframes toastIn  { from { opacity: 0; transform: translateX(40px); } }
@keyframes toastOut { to   { opacity: 0; transform: translateX(40px); } }

/* ============ SCROLL REVEAL ============ */
/* Base hidden state — overridden when .is-visible is added by JS */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1),
              transform .7s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--reveal-d, 0ms);
  will-change: opacity, transform;
}
.reveal-up    { transform: translateY(50px); }
.reveal-down  { transform: translateY(-30px); }
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* staggered children inside revealed grids */
.how-grid.reveal.is-visible .how-card,
.testimonial-grid.reveal.is-visible .testimonial,
.faq-list.reveal.is-visible .faq-item {
  animation: revealChild .7s cubic-bezier(.22,1,.36,1) backwards;
}
.testimonial-grid.is-visible .testimonial:nth-child(1),
.faq-list.is-visible .faq-item:nth-child(1)        { animation-delay: 0ms; }
.testimonial-grid.is-visible .testimonial:nth-child(2),
.faq-list.is-visible .faq-item:nth-child(2)        { animation-delay: 100ms; }
.testimonial-grid.is-visible .testimonial:nth-child(3),
.faq-list.is-visible .faq-item:nth-child(3)        { animation-delay: 200ms; }
.testimonial-grid.is-visible .testimonial:nth-child(4),
.faq-list.is-visible .faq-item:nth-child(4)        { animation-delay: 300ms; }
.testimonial-grid.is-visible .testimonial:nth-child(5),
.faq-list.is-visible .faq-item:nth-child(5)        { animation-delay: 400ms; }
.testimonial-grid.is-visible .testimonial:nth-child(6) { animation-delay: 500ms; }
@keyframes revealChild {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-up, .reveal-down {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* ============ TRUST BADGES ============ */
.trust-badges {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 28px;
}
.trust-badge {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  transition: border-color .2s, transform .2s;
}
.trust-badge:hover { border-color: var(--accent); transform: translateY(-2px); }
.tb-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 800;
}
.tb-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-text strong { font-size: 14px; }
.tb-text span { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* ============ TESTIMONIALS ============ */
.testimonials { max-width: var(--maxw); margin: 0 auto; padding: 70px 24px; }
.trust-summary {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 18px;
}
.trust-stars {
  color: #00b67a; font-size: 16px; letter-spacing: 2px;
}
.trust-score { font-size: 13px; color: var(--muted); }
.trust-score strong { color: var(--text); }

.testimonial-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 40px;
}
.testimonial {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .2s, transform .2s;
}
.testimonial:hover { border-color: var(--accent); transform: translateY(-3px); }
.t-stars {
  color: #00b67a; font-size: 18px; letter-spacing: 2px;
}
.testimonial p {
  color: var(--text); font-size: 14px; line-height: 1.6;
  flex: 1;
}
.t-author { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.t-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
  font-family: 'JetBrains Mono', monospace;
}
.t-meta { display: flex; flex-direction: column; gap: 2px; }
.t-name { font-size: 14px; font-weight: 600; }
.t-verified {
  font-size: 11px; color: #00b67a; font-weight: 600;
  display: inline-flex; align-items: center; gap: 3px;
}

/* ============ MODALS ============ */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.modal.open { opacity: 1; pointer-events: auto; }

.modal-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px -10px rgba(0,0,0,.7);
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  max-height: 90vh; overflow-y: auto;
}
.modal.open .modal-card { transform: translateY(0) scale(1); }
.modal-wide { max-width: 560px; padding: 0; }

.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(0,0,0,.4); color: #fff;
}
.modal-head { text-align: center; margin-bottom: 20px; }
.modal-icon { font-size: 32px; }
.modal-head h2 { font-size: 20px; margin: 8px 0 6px; }
.modal-head p { font-size: 13px; color: var(--muted); }
.modal-body { margin-bottom: 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; }

/* ============ DETAIL MODAL CONTENT ============ */
.detail-head {
  height: 140px; position: relative; overflow: hidden;
  display: grid; place-items: center;
  border-radius: var(--radius) var(--radius) 0 0;
}
.detail-head::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
}
.detail-initials {
  position: relative; z-index: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 44px; font-weight: 800; color: #fff;
}
.detail-badges {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: flex; gap: 6px;
}
.badge-new { background: var(--accent); color: #fff; }
.badge-owned { background: var(--success); color: #04210f; }

/* 3-dot listing menu (only shown on listings you own) */
.card-menu-btn {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  color: #fff; font-size: 18px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s;
}
.card-menu-btn:hover { background: rgba(0,0,0,.75); }
.card-menu {
  position: absolute; top: 44px; right: 10px; z-index: 4;
  min-width: 150px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 5px; box-shadow: var(--shadow);
}
.card-menu-item {
  width: 100%; text-align: left; padding: 9px 12px;
  border-radius: 6px; font-size: 13px; font-weight: 500;
  color: var(--text); transition: background .12s;
}
.card-menu-item:hover { background: var(--surface-2); }
.card-menu-item.danger { color: var(--danger); }
.card-menu-item.danger:hover { background: rgba(248,81,73,.12); }

.detail-body { padding: 24px 28px; }
.detail-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 8px; }
.detail-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted); margin-bottom: 22px;
}
.detail-meta .stars { color: var(--warn); }
.detail-h {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--accent-2);
  margin: 20px 0 8px;
}
.detail-p { font-size: 14px; line-height: 1.65; color: var(--text); }

.code-box {
  position: relative; margin-top: 4px;
  background: #050608; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.code-box pre {
  margin: 0; padding: 16px 16px;
  max-height: 280px; overflow: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  color: #c9d1d9; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.code-copy {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 6px; padding: 5px 10px;
  font-size: 12px; font-weight: 600; color: var(--text);
  transition: all .15s;
}
.code-copy:hover { background: var(--accent); border-color: transparent; color: #fff; }

.code-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 4px; padding: 14px 16px;
  background: #050608; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--accent-2); transition: border-color .2s;
}
.code-link:hover { border-color: var(--accent); }
.code-link span { color: var(--muted); font-size: 12px; }

.detail-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-top: 1px solid var(--border); gap: 12px;
}

/* ============ CODE AREA (listing form) ============ */
.code-area {
  font-family: 'JetBrains Mono', monospace !important; font-size: 13px !important;
}

/* ============ REVIEWS ============ */
.new-tag {
  color: var(--accent-2); font-size: 12px; font-weight: 600;
}
.review-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.review-item:last-child { border-bottom: none; }
.review-row { display: flex; align-items: center; gap: 10px; }
.review-name { font-size: 14px; font-weight: 600; }
.review-stars-small { color: #00b67a; font-size: 13px; letter-spacing: 1px; }
.review-form { margin-top: 20px; }
.review-stars-input { display: flex; gap: 6px; margin-bottom: 12px; }
.rsi-star {
  font-size: 28px; color: var(--border-2); cursor: pointer;
  transition: color .12s, transform .12s;
}
.rsi-star:hover { transform: scale(1.1); }
.rsi-star.active { color: #00b67a; }
.filter-input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text);
  font-size: 14px; outline: none; font-family: inherit; display: block;
}
.filter-input:focus { border-color: var(--accent); }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .marketplace { grid-template-columns: 1fr; }
  .filters {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 210;
    width: 300px; max-width: 85vw; border-radius: 0;
    transform: translateX(-100%); transition: transform .3s;
    overflow-y: auto;
  }
  .filters.open { transform: translateX(0); }
  #filtersToggle { display: inline-flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-actions .btn-ghost { display: none; }
  .hero { padding: 60px 20px 50px; }
  .hero-stats { gap: 24px; }
  .hero-search { flex-wrap: wrap; padding: 10px; }
  .hero-search input { width: 100%; }
  .hero-search .btn { width: 100%; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .results-tools { width: 100%; }
  .sort-select { flex: 1; }
  .form-row { grid-template-columns: 1fr !important; }
  .results-tools .btn-primary { order: -1; }
  .trust-badges { grid-template-columns: 1fr; }
}

/* ============ CATALOG BANNER ============ */
.catalog-banner {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, rgba(47,129,247,.12), rgba(76,194,255,.06));
  border: 1px solid rgba(47,129,247,.35);
  border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 24px;
}
.cb-icon { font-size: 30px; }
.cb-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cb-text strong { font-size: 15px; }
.cb-text span { font-size: 13px; color: var(--muted); }
.cb-action { flex-shrink: 0; }
@media (max-width: 680px) {
  .catalog-banner { flex-wrap: wrap; }
  .cb-action { width: 100%; justify-content: center; }
}

/* ============ REQUEST FORM PAGE ============ */
.page-wrap {
  max-width: 640px; margin: 0 auto;
  padding: 56px 24px 80px;
}
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow);
}
.form-head { text-align: center; margin-bottom: 28px; }
.form-head h1 {
  font-size: 28px; font-weight: 800; letter-spacing: -.02em;
  margin: 6px 0 10px;
}
.form-sub { color: var(--muted); font-size: 14px; }

.form { display: flex; flex-direction: column; gap: 18px; }
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 13px; font-weight: 600; color: var(--text);
}
.req { color: var(--accent-2); }
.field input, .field textarea {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit; resize: vertical;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,129,247,.15);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field-hint { font-size: 12px; color: var(--muted-2); }

.form-actions { margin-top: 6px; }
.form-note { text-align: center; font-size: 12px; color: var(--muted-2); margin-top: 12px; }

/* success / error states */
.form-success, .form-error {
  text-align: center; padding: 28px; border-radius: var(--radius);
}
.form-success {
  background: rgba(63,185,80,.08); border: 1px solid rgba(63,185,80,.35);
}
.success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--success); color: #04210f;
  display: grid; place-items: center; font-size: 28px; font-weight: 800;
  margin: 0 auto 16px;
}
.form-success h2 { font-size: 22px; margin-bottom: 8px; }
.form-success p { color: var(--muted); margin-bottom: 20px; font-size: 14px; }

.form-error {
  background: rgba(248,81,73,.08); border: 1px solid rgba(248,81,73,.35);
  color: var(--danger); font-size: 14px; margin-top: 16px;
}

