/* ============================================================
   FLOWTIVE — Premium B2B UI Component Marketplace
   Design System · Vanilla CSS · Dark Luxury Minimalist
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ── Design Tokens ── */
:root {
  --bg-base:        #0B0F19;
  --bg-elevated:    #0F1629;
  --bg-card:        #111827;
  --bg-card-hover:  #141c2e;
  --border:         #1E2333;
  --border-bright:  #2D3748;

  --accent:         #6C63FF;
  --accent-dim:     rgba(108,99,255,0.12);
  --accent-glow:    rgba(108,99,255,0.35);
  --accent-text:    #a5a0ff;

  --teal:           #00D4AA;
  --teal-dim:       rgba(0,212,170,0.10);
  --teal-glow:      rgba(0,212,170,0.28);

  --rose:           #FF6B8A;
  --rose-dim:       rgba(255,107,138,0.12);

  --amber:          #FFB347;
  --amber-dim:      rgba(255,179,71,0.12);

  --green:          #4ADE80;
  --green-dim:      rgba(74,222,128,0.12);

  --indigo:         #818CF8;
  --indigo-dim:     rgba(129,140,248,0.12);

  --text-1:         #F0F4FF;
  --text-2:         #9BA3BF;
  --text-3:         #4A5568;
  --text-4:         #2D3748;

  --font-body:      'Inter', system-ui, sans-serif;
  --font-display:   'Outfit', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-2xl: 28px;
  --r-full: 9999px;

  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 24px rgba(0,0,0,0.45);
  --shadow-lg:    0 8px 48px rgba(0,0,0,0.55);
  --shadow-accent: 0 0 40px var(--accent-glow);
  --shadow-teal:   0 0 40px var(--teal-glow);

  --t-fast: 120ms ease;
  --t-base: 220ms ease;
  --t-slow: 380ms cubic-bezier(0.4,0,0.2,1);

  --max-w: 1280px;
  --nav-h: 68px;
}

/* ── Base ── */
body {
  background: var(--bg-base);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  line-height: 1.18;
  color: var(--text-1);
  font-weight: 700;
}

/* ── Noise texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

/* ── Container ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ════════════════════════════════════
   NAVIGATION
════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(11,15,25,0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav__logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}
.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--t-fast);
}
.nav__link:hover { color: var(--text-1); }
.nav__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 600;
  transition: all var(--t-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn--ghost {
  color: var(--text-2);
  border: 1px solid var(--border);
  background: transparent;
}
.btn--ghost:hover { color: var(--text-1); border-color: var(--border-bright); background: var(--bg-card); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, #8B5CF6 100%);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px var(--accent-glow); filter: brightness(1.08); }
.btn--primary:active { transform: translateY(0); }

.btn--teal {
  background: linear-gradient(135deg, var(--teal) 0%, #00B894 100%);
  color: #0B0F19;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--teal-glow);
}
.btn--teal:hover { transform: translateY(-1px); box-shadow: 0 6px 28px var(--teal-glow); filter: brightness(1.06); }

.btn--outline {
  color: var(--text-2);
  border: 1px solid rgba(31, 41, 55, 1);
  background: transparent;
  font-size: 13px; padding: 8px 16px;
}
.btn--outline:hover { color: var(--text-1); background: rgba(255,255,255,0.1); }

.btn--sm { padding: 7px 14px; font-size: 13px; border-radius: var(--r-md); }
.btn--lg { padding: 14px 28px; font-size: 16px; border-radius: var(--r-lg); }

/* ════════════════════════════════════
   HERO / BENTO GRID SECTION
════════════════════════════════════ */
.hero-section {
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 0;
  position: relative;
}

/* Ambient background orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  opacity: 0.55;
  animation: orb-drift 12s ease-in-out infinite alternate;
}
.orb--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -80px; left: -120px;
  animation-delay: 0s;
}
.orb--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--teal) 0%, transparent 70%);
  top: 60px; right: -80px;
  animation-delay: -4s;
}
.orb--3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #8B5CF6 0%, transparent 70%);
  bottom: 40px; left: 30%;
  animation-delay: -8s;
  opacity: 0.3;
}
@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.08); }
}

/* Grid overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

/* ── Bento Grid ── */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  position: relative;
  transition: border-color var(--t-base);
}
.bento-card:hover { border-color: var(--border-bright); }

/* Block 1: Hero */
.bento-hero {
  grid-column: span 7;
  padding: 52px 52px 48px;
  background: linear-gradient(145deg, #0F1629 0%, #111827 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(108,99,255,0.2);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--r-full);
  margin-bottom: 28px;
  width: fit-content;
}
.hero-eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-h1 {
  font-size: clamp(44px, 5.5vw, 72px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
  color: var(--text-1);
}
.hero-h1 .gradient-word {
  background: linear-gradient(135deg, var(--accent) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-2);
  max-width: 440px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px; font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--r-full);
}
.hero-badge svg { color: var(--teal); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Block 2: Kanban Preview */
.bento-kanban {
  grid-column: span 5;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.kanban-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.kanban-header-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--green-dim);
  border: 1px solid rgba(74,222,128,0.2);
  color: var(--green);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-full);
  margin-left: auto;
}
.live-dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; animation: pulse-dot 1.5s ease infinite; }

/* ── Kanban Board (live widget) ── */
.kanban-board {
  display: flex;
  gap: 10px;
  padding: 16px;
  flex: 1;
  overflow: hidden;
}
.kanban-col {
  flex: 1;
  background: rgba(11,15,25,0.6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  transition: border-color var(--t-base), background var(--t-base);
}
.kanban-col.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.kanban-col-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.k-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.k-dot--todo     { background: var(--rose); }
.k-dot--progress { background: var(--amber); }
.k-dot--done     { background: var(--green); }
.k-col-title { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.k-col-count {
  margin-left: auto;
  background: var(--border);
  color: var(--text-3);
  font-size: 10px; font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--r-full);
}

.kanban-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px;
  cursor: grab;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast), opacity var(--t-fast);
  user-select: none;
}
.kanban-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-bright); }
.kanban-item:active { cursor: grabbing; }
.kanban-item.dragging { opacity: 0.4; transform: scale(0.97); }

.k-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  padding: 2px 7px; border-radius: 4px;
  display: inline-block; margin-bottom: 6px;
}
.k-label--high   { background: var(--rose-dim);   color: var(--rose); }
.k-label--med    { background: var(--amber-dim);  color: var(--amber); }
.k-label--low    { background: var(--green-dim);  color: var(--green); }

.k-item-title { font-size: 11px; color: var(--text-1); font-weight: 500; line-height: 1.4; margin-bottom: 7px; }
.k-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.k-tag { font-size: 9px; color: var(--text-3); background: var(--border); padding: 1px 5px; border-radius: 4px; }

/* ── Filter Matrix (Block 3) ── */
.filter-section {
  padding: 0;
  position: relative;
  z-index: 1;
}
.filter-row {
  display: flex; align-items: center; justify-content: flex-start;
  flex-wrap: nowrap; gap: 12px; margin-bottom: 24px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 20px 0 8px 0;
  -ms-overflow-style: none; scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .filter-row { justify-content: center; flex-wrap: wrap; overflow-x: visible; padding-bottom: 20px; }
}
.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
  margin-right: 4px;
}
.filter-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px;
  border-radius: var(--r-full);
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--t-base);
  cursor: pointer;
}
.filter-pill:hover { color: var(--text-1); border-color: var(--border-bright); }
.filter-pill.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 0 16px var(--accent-glow);
}
.filter-pill-count {
  background: rgba(255,255,255,0.06);
  color: var(--text-3);
  font-size: 11px; font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--r-full);
}
.filter-pill.active .filter-pill-count {
  background: var(--accent-dim);
  color: var(--accent-text);
}

/* ── Gallery Section ── */
.gallery-section { position: relative; z-index: 1; padding-bottom: 80px; }
.gallery-header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.gallery-title { font-size: 22px; font-weight: 700; }
.gallery-count { font-size: 14px; color: var(--text-3); font-weight: 500; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Component Card ── */
.component-card {
  background: var(--bg-card);
  border: 1px solid rgba(31, 41, 55, 0.6);
  border-radius: var(--r-2xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
  position: relative;
}
.component-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 170, 0.5);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(0, 212, 170, 0.1);
}
.component-card.hidden { display: none; }

/* Card preview thumbnail */
.card-preview {
  height: 180px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.card-preview-inner {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Preview Mockups */
.preview-kanban { display: flex; gap: 8px; }
.preview-col {
  flex: 1; background: #0F1629; border: 1px solid #1E2333;
  border-radius: 8px; padding: 8px;
}
.preview-col-h { height: 10px; background: #1E2333; border-radius: 4px; margin-bottom: 8px; }
.preview-card-item {
  height: 36px; background: #111827; border: 1px solid #1E2333;
  border-radius: 6px; margin-bottom: 6px;
}
.preview-bento { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; width: 100%; }
.preview-bento-cell { background: #0F1629; border: 1px solid #1E2333; border-radius: 8px; }
.preview-bento-cell:first-child { grid-row: span 2; }
.preview-hero { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.preview-hero-h { height: 14px; background: linear-gradient(90deg, #6C63FF, #00D4AA); border-radius: 4px; width: 60%; }
.preview-hero-p { height: 8px; background: #1E2333; border-radius: 4px; }
.preview-hero-p2 { height: 8px; background: #1E2333; border-radius: 4px; width: 75%; }
.preview-hero-btn { height: 28px; background: #6C63FF; border-radius: 6px; width: 40%; margin-top: 8px; }
.preview-form { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.preview-input { height: 28px; background: #0F1629; border: 1px solid #1E2333; border-radius: 6px; }
.preview-form-btn { height: 32px; background: linear-gradient(90deg, #6C63FF, #8B5CF6); border-radius: 6px; margin-top: 4px; }
.preview-dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; }
.preview-stat { background: #0F1629; border: 1px solid #1E2333; border-radius: 8px; height: 50px; }
.preview-chart { grid-column: span 2; background: #0F1629; border: 1px solid #1E2333; border-radius: 8px; height: 60px; }
.preview-pricing { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 12px; }
.preview-plan { background: #0F1629; border: 1px solid #1E2333; border-radius: 8px; padding: 10px; }
.preview-plan.featured { background: var(--accent-dim); border-color: var(--accent); }
.preview-plan-price { height: 16px; background: #1E2333; border-radius: 4px; margin-bottom: 6px; }
.preview-plan.featured .preview-plan-price { background: var(--accent-dim); }
.preview-table { padding: 12px; }
.preview-table-row { display: flex; gap: 6px; margin-bottom: 5px; }
.preview-table-cell { flex: 1; height: 20px; background: #0F1629; border: 1px solid #1E2333; border-radius: 4px; }
.preview-table-row:first-child .preview-table-cell { background: #1E2333; }

/* Premium overlay on preview */
.card-premium-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-full);
  z-index: 2;
}

/* Card Body */
.card-body { padding: 18px 20px 14px; flex: 1; display: flex; flex-direction: column; }
.card-tech-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tech-tag {
  font-size: 10px; font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--r-sm);
  letter-spacing: 0.04em;
}
.tech-tag--html  { background: rgba(255,107,53,0.15); color: #FF6B35; }
.tech-tag--css   { background: rgba(59,130,246,0.15); color: #60A5FA; }
.tech-tag--js    { background: rgba(234,179,8,0.15);  color: #FBBF24; }
.tech-tag--tw    { background: rgba(6,182,212,0.15);  color: #22D3EE; }

.card-category {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-3);
  margin-bottom: 6px;
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; line-height: 1.375; }
.card-desc { font-size: 13px; color: var(--text-2); line-height: 1.55; flex: 1; }

/* Card Actions */
.card-actions {
  padding: 14px 20px 18px;
  display: flex; gap: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-shrink: 0;
}
.card-actions .btn { flex: 1; justify-content: center; font-size: 13px; padding: 9px 14px; }
.btn--get-code {
  background: transparent;
  border: 1px solid rgba(31, 41, 55, 1);
  color: var(--text-2);
}
.btn--get-code:hover { background: rgba(255,255,255,0.1); color: var(--text-1); }
.btn--get-code.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ── Code View Panel ── */
.code-view-panel {
  border-top: 1px solid var(--border);
  display: none;
  flex-direction: column;
  max-height: 380px;
  position: relative;
  background: #080C14;
  flex-shrink: 0;
}
.code-view-panel.open { display: flex; }

.code-panel-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.code-file-name {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.code-file-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

.copy-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--r-md);
  font-size: 12px; font-weight: 500;
  transition: all var(--t-base);
  flex-shrink: 0;
}
.copy-btn:hover { color: var(--text-1); border-color: var(--border-bright); }
.copy-btn.copied {
  background: var(--green-dim);
  border-color: rgba(74,222,128,0.3);
  color: var(--green);
}

.code-scroll-area {
  overflow-y: auto;
  overflow-x: auto;
  flex: 1;
  padding: 16px;
}
.code-scroll-area::-webkit-scrollbar { width: 6px; height: 6px; }
.code-scroll-area::-webkit-scrollbar-track { background: transparent; }
.code-scroll-area::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

.code-block {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: #ABB2BF;
  white-space: pre;
  tab-size: 2;
}
/* Syntax highlighting */
.tok-tag    { color: #E06C75; }
.tok-attr   { color: #D19A66; }
.tok-string { color: #98C379; }
.tok-com    { color: #5C6370; font-style: italic; }
.tok-kw     { color: #C678DD; }
.tok-fn     { color: #61AFEF; }
.tok-num    { color: #D19A66; }
.tok-sel    { color: #E5C07B; }

/* ── Paywall Overlay ── */
.paywall-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-slow);
}
.paywall-overlay.open { opacity: 1; pointer-events: all; }

.paywall-backdrop {
  position: absolute; inset: 0;
  background: rgba(11,15,25,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.paywall-card {
  position: relative; z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-2xl);
  padding: 48px 44px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 80px var(--accent-glow);
  transform: translateY(24px) scale(0.97);
  transition: transform var(--t-slow);
}
.paywall-overlay.open .paywall-card {
  transform: translateY(0) scale(1);
}

.paywall-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-2xl);
  background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 60%);
  pointer-events: none;
}

.paywall-label {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--amber-dim), rgba(255,140,66,0.15));
  border: 1px solid rgba(255,179,71,0.3);
  color: var(--amber);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 14px; border-radius: var(--r-full);
  margin-bottom: 24px;
}

.paywall-title {
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.25;
}

.paywall-desc {
  font-size: 15px; color: var(--text-2);
  line-height: 1.65; margin-bottom: 28px;
}

.paywall-price-block {
  display: flex; align-items: baseline; gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}
.paywall-price { font-size: 52px; font-weight: 900; font-family: var(--font-display); letter-spacing: -2px; }
.paywall-price-note { font-size: 14px; color: var(--text-2); }

.paywall-features {
  text-align: left;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.paywall-feature {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-2);
}
.paywall-feature-icon { color: var(--teal); flex-shrink: 0; }

.paywall-cta { width: 100%; padding: 15px; font-size: 16px; border-radius: var(--r-lg); margin-bottom: 12px; }

.paywall-dismiss {
  font-size: 13px; color: var(--text-3);
  transition: color var(--t-fast);
  background: none; border: none; padding: 6px;
}
.paywall-dismiss:hover { color: var(--text-2); }

/* ── Footer ── */
.footer {
  border-top: 1px solid #111827;
  padding: 32px 0;
  margin-top: 20px;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer__logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.footer__copy { font-size: 13px; color: var(--text-3); }
.footer__links { display: flex; gap: 24px; }
.footer__link { font-size: 13px; color: var(--text-3); transition: color var(--t-fast); }
.footer__link:hover { color: var(--text-2); }

/* ── Component SEO Pages ── */
.comp-page { min-height: 100vh; padding-top: var(--nav-h); }
.comp-page-hero {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 0 48px;
}
.comp-page-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-3);
  margin-bottom: 28px;
  transition: color var(--t-fast);
}
.comp-page-back:hover { color: var(--text-2); }
.comp-page-h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; letter-spacing: -1px; margin-bottom: 14px; }
.comp-page-desc { font-size: 16px; color: var(--text-2); max-width: 580px; line-height: 1.65; }
.comp-page-body { padding: 48px 0 80px; }
.comp-code-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #0A0E18;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 12px 20px;
}
.comp-code-body {
  background: #080C14;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: 24px;
  overflow-x: auto;
  max-height: 600px;
  overflow-y: auto;
}

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

/* ── Responsive ── */
@media (max-width: 1024px) {
  .bento-hero    { grid-column: span 12; min-height: unset; }
  .bento-kanban  { grid-column: span 12; min-height: 340px; }
  .gallery-grid  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav__links  { display: none; }
  .hero-h1     { letter-spacing: -1px; }
  .bento-hero  { padding: 36px 28px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .filter-row  { gap: 8px; }
  .filter-label { display: none; }
  .paywall-card { padding: 32px 24px; }
  .footer__inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  :root { --nav-h: 60px; }
  .hero-h1 { font-size: clamp(32px, 8vw, 64px); }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; min-height: 48px; }
  .card-actions { flex-direction: column; }
  .card-actions .btn { min-height: 44px; }
}
