/* comfyarts — marketplace design system.
   Dark, saturated, cinematic: near-black canvas so generated art supplies all the
   colour, with a cyan→violet→magenta gradient reserved for interactive accents only.
   Loaded after pixel-theme.css, so anything here intentionally wins. */

:root {
  --bg: #07060B;
  --bg-2: #0C0B12;
  --surface: #121119;
  --surface-2: #1A1824;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);

  --ink: #F4F3F8;
  --ink-2: #B9B7C9;
  --muted: #7E7C93;

  --cyan: #19E3FF;
  --violet: #A855F7;
  --magenta: #FF3D8B;
  --grad: linear-gradient(115deg, var(--cyan) 0%, var(--violet) 52%, var(--magenta) 100%);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

.wrap { width: min(1280px, 100% - 40px); margin-inline: auto; }

/* ───────────────────────────── nav ───────────────────────────── */

#nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: rgba(7, 6, 11, .72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: var(--nav-h); }
.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-weight: 700; font-size: 19px; letter-spacing: -.02em;
}
.brand img { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 22px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.nav-links a { padding: 6px 0; position: relative; transition: color .18s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--grad); border-radius: 2px;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: var(--ink); font-size: 22px; cursor: pointer; }
.mobile { display: none; flex-direction: column; gap: 4px; padding: 12px 20px 18px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.mobile.open { display: flex; }
.mobile a { padding: 10px 0; color: var(--ink-2); font-size: 15px; }

/* ───────────────────────────── buttons ───────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: transform .16s, box-shadow .16s, background .16s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-grad { background: var(--grad); color: #0A0910; box-shadow: 0 8px 26px rgba(168, 85, 247, .32); }
.btn-grad:hover { box-shadow: 0 12px 34px rgba(168, 85, 247, .5); }
.btn-line { border-color: var(--line-2); color: var(--ink); background: rgba(255, 255, 255, .04); }
.btn-line:hover { background: rgba(255, 255, 255, .09); }
.btn-sm { height: 36px; padding: 0 15px; font-size: 13px; }

/* Gold is reserved exclusively for value actions — download and unlock — and for the
   credit pill. Nothing decorative uses it, so on any page the gold element is the thing
   the user came to press. */
.btn-gold {
  background: linear-gradient(180deg, #FCD34D 0%, #F5A623 100%);
  color: #1A1206; border-color: #F5A623;
  box-shadow: 0 8px 24px rgba(245, 166, 35, .28);
  font-weight: 700;
}
.btn-gold:hover { box-shadow: 0 12px 32px rgba(245, 166, 35, .46); filter: brightness(1.04); }
.btn-gold:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ───────────────────────────── hero ───────────────────────────── */

.hero { position: relative; padding: 92px 0 76px; overflow: hidden; }
/* Two offset colour wells rather than one flat gradient — keeps the black dominant
   so thumbnails below are the brightest thing on screen. */
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(120px); opacity: .5; pointer-events: none;
}
.hero::before { width: 620px; height: 620px; top: -280px; left: -140px; background: radial-gradient(circle, var(--violet), transparent 68%); }
.hero::after  { width: 560px; height: 560px; top: -180px; right: -120px; background: radial-gradient(circle, var(--cyan), transparent 68%); }
.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 22px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

.hero h1 {
  margin: 0 0 18px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(40px, 6.4vw, 82px);
  line-height: .98; letter-spacing: -.035em; font-weight: 700;
  max-width: 16ch;
}
.hero h1 .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { margin: 0 0 30px; font-size: clamp(15px, 1.7vw, 18.5px); color: var(--ink-2); max-width: 60ch; line-height: 1.6; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-stats { display: flex; gap: 30px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 26px; letter-spacing: -.02em; }
.hero-stats span { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ───────────────────────────── sections ───────────────────────────── */

section { padding: 62px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head h2 {
  margin: 0; font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; font-weight: 700;
}
.sec-head p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }

/* model showcase */
.models { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.model-card {
  position: relative; padding: 20px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, transform .2s;
}
.model-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.model-card .tag { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--cyan); }
.model-card h3 { margin: 10px 0 6px; font-size: 18px; font-family: "Space Grotesk", sans-serif; letter-spacing: -.02em; }
.model-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.model-card.live::after {
  content: ""; position: absolute; top: 20px; right: 20px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 10px var(--cyan);
}
/* Dimmed rather than hidden: showing what is wired but switched off is a roadmap the
   visitor can read, and it is honest about what works today. */
.model-card.soon { opacity: .62; }
.model-card.soon .tag { color: var(--violet); }

/* ───────────────────────────── gallery ───────────────────────────── */

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.tabs button {
  border: 0; background: none; color: var(--ink-2); cursor: pointer;
  padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; transition: .16s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { background: var(--grad); color: #0A0910; }

.searchbar {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px;
  height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
}
.searchbar input { flex: 1; background: none; border: 0; outline: 0; color: var(--ink); font-size: 14.5px; font-family: inherit; }
.searchbar input::placeholder { color: var(--muted); }

/* Masonry via CSS columns: generated art is wildly mixed-ratio, and columns let each
   card keep its true aspect instead of being cropped into a uniform grid. */
.gallery { columns: 4 260px; column-gap: 16px; }
.card {
  break-inside: avoid; margin-bottom: 16px; position: relative;
  border-radius: var(--r); overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); cursor: pointer;
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card .media { position: relative; background: var(--bg-2); min-height: 120px; }
.card .media img, .card .media video { width: 100%; height: auto; display: block; }

.card .overlay {
  position: absolute; inset: 0; padding: 14px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  background: linear-gradient(to top, rgba(5, 4, 9, .92) 0%, rgba(5, 4, 9, .5) 42%, transparent 72%);
  opacity: 0; transition: opacity .22s;
}
.card:hover .overlay, .card:focus-within .overlay { opacity: 1; }
.card .title { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.card .by { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.card .by img { width: 18px; height: 18px; border-radius: 50%; }

.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .03em; background: rgba(6, 5, 10, .78); backdrop-filter: blur(8px);
  border: 1px solid var(--line-2); color: var(--ink);
}
.badge.made { background: rgba(25, 227, 255, .16); border-color: rgba(25, 227, 255, .45); color: var(--cyan); }
.badge.vid  { background: rgba(255, 61, 139, .16); border-color: rgba(255, 61, 139, .45); color: var(--magenta); }

.price {
  position: absolute; top: 10px; right: 10px;
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(6, 5, 10, .8); backdrop-filter: blur(8px);
  border: 1px solid var(--line-2); display: flex; align-items: center; gap: 5px;
}
.price.free { color: var(--cyan); border-color: rgba(25, 227, 255, .45); }

.skel { border-radius: var(--r); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 220% 100%; animation: sh 1.3s infinite; margin-bottom: 16px; break-inside: avoid; }
@keyframes sh { to { background-position: -220% 0; } }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); font-family: "Space Grotesk", sans-serif; margin: 0 0 8px; font-size: 20px; }

/* ───────────────────────────── cta band ───────────────────────────── */

.band {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  padding: 54px 40px; border: 1px solid var(--line); background: var(--surface);
  text-align: center;
}
.band::before {
  content: ""; position: absolute; inset: 0; opacity: .17;
  background: var(--grad);
}
.band > * { position: relative; }
.band h2 { margin: 0 0 12px; font-family: "Space Grotesk", sans-serif; font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.03em; }
.band p { margin: 0 auto 26px; color: var(--ink-2); max-width: 56ch; font-size: 15.5px; line-height: 1.6; }

footer { border-top: 1px solid var(--line); padding: 34px 0; margin-top: 40px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.foot a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav-right { display: none; }
  .gallery { columns: 2 150px; }
  .hero { padding: 62px 0 50px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
