/* ═══════════════════════════════════
   KC-STYLES 💎 — GALLERY STYLES V3
   ═══════════════════════════════════ */

/* ── LA MONARCHIE FONT ── */
@font-face {
  font-family: 'LaMonarchie';
  src: url('../assets/fonts/LaMonarchie.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}

/* ── GLOBAL FIXES ── */
*, *::before, *::after {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
body { cursor: default; }
a, button, [data-cat], .kcs-demo-card { cursor: pointer; }
canvas { pointer-events: none; }

/* ── HERO ── */
.kcs-hero {
  min-height: 42vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
}
.kcs-eyebrow {
  font-family: 'Outfit',sans-serif;
  font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: #D4AF37; margin-bottom: 1rem;
}
.kcs-title-row {
  display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  overflow: visible;
}
.kcs-title {
  font-family: 'LaMonarchie', 'Cinzel', serif;
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: normal; letter-spacing: 0.04em;
  line-height: 1.25;
  padding: 0.1em 0.05em;
  background: linear-gradient(180deg, #D4AF37 0%, #f5e6b8 40%, #D4AF37 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(212,175,55,0.15));
}
#diamondCanvas {
  width: 70px; height: 70px;
  filter: drop-shadow(0 0 16px rgba(180,220,255,0.3));
}
.kcs-sub {
  font-family: 'Outfit',sans-serif;
  font-size: 0.8rem; color: rgba(245,237,214,0.4);
  margin-top: 0.8rem; letter-spacing: 0.12em;
  max-width: 480px;
}

/* ── DIAMOND FLOATING NAV (always on top) ── */
.diamond-float {
  position: fixed; top: 1rem; right: 1.5rem; z-index: 400;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s, transform 0.4s cubic-bezier(.22,1,.36,1);
}
.diamond-float.visible { opacity: 1; pointer-events: auto; }
.diamond-float:hover { transform: scale(1.08); }
.diamond-float.as-back .diamond-label::before { content: '← '; }
.diamond-float.as-back .diamond-label { color: rgba(180,220,255,0.9); }

#diamondCanvasFloat {
  width: 56px; height: 56px;
  filter: drop-shadow(0 0 14px rgba(180,220,255,0.25));
}
.diamond-label {
  font-family: 'Outfit',sans-serif;
  font-size: 0.45rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(180,220,255,0.45);
  transition: color 0.3s;
  text-align: center;
}

/* ── CATEGORIES GRID ── */
.kcs-categories { padding: 2rem 2rem 6rem; max-width: 1200px; margin: 0 auto; }
.kcs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.kcs-cat-card {
  position: relative; border-radius: 14px; overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
  border: 1px solid rgba(212,175,55,0.08);
  transition: transform 0.4s cubic-bezier(.22,1,.36,1), box-shadow 0.4s, border-color 0.4s;
  -webkit-user-select: none; user-select: none;
}
.kcs-cat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 48px rgba(212,175,55,0.12), 0 0 0 1px rgba(212,175,55,0.2);
  border-color: rgba(212,175,55,0.3);
}
.kcs-cat-card:active { transform: translateY(-2px) scale(0.99); }
.kcs-cat-bg {
  position: absolute; inset: 0;
  transition: transform 0.6s cubic-bezier(.22,1,.36,1);
}
.kcs-cat-card:hover .kcs-cat-bg { transform: scale(1.08); }

.kcs-cat-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.04) 45%, transparent 60%);
  background-size: 200% 100%;
  animation: shimmer 3.5s ease-in-out infinite;
}
@keyframes shimmer { 0%,100%{background-position:200% 0} 50%{background-position:-200% 0} }

.kcs-cat-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  display: flex; flex-direction: column; gap: 0.2rem;
}
.kcs-cat-icon { font-size: 1.6rem; }
.kcs-cat-name {
  font-family: 'Cinzel',serif;
  font-size: 1.1rem; font-weight: 700; color: #f5e6b8;
  letter-spacing: 0.04em;
}
.kcs-cat-count {
  font-family: 'Outfit',sans-serif;
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(212,175,55,0.6);
}

/* ── DEMOS VIEW ── */
.kcs-demos { padding: 0 2rem 6rem; max-width: 1200px; margin: 0 auto; }
.kcs-demos.hidden { display: none; }

.kcs-demos-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2.5rem; padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212,175,55,0.1);
}
.kcs-demos-icon { font-size: 2rem; }
.kcs-demos-title {
  font-family: 'Cinzel',serif;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700; color: #f5e6b8;
}

.kcs-demos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.8rem;
}

/* ── DEMO CARD ── */
.kcs-demo-card {
  position: relative; border-radius: 16px; overflow: hidden;
  background: rgba(10,10,10,0.8);
  border: 1px solid rgba(212,175,55,0.06);
  transition: transform 0.4s cubic-bezier(.22,1,.36,1), box-shadow 0.4s, border-color 0.4s;
  -webkit-user-select: none; user-select: none;
}
.kcs-demo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(212,175,55,0.1);
  border-color: rgba(212,175,55,0.25);
}
.kcs-demo-card:active { transform: translateY(-1px); }

.kcs-demo-preview {
  position: relative; aspect-ratio: 9/16; max-height: 380px;
  overflow: hidden; background: #080808;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.kcs-demo-preview video {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.85; transition: opacity 0.4s;
  pointer-events: none;
}
.kcs-demo-card:hover .kcs-demo-preview video { opacity: 1; }

.kcs-demo-preview .kcs-no-preview {
  font-family: 'Outfit',sans-serif;
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(245,237,214,0.2);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}

/* Phone mockup frame */
.kcs-demo-preview::before {
  content: '';
  position: absolute; inset: 8px; z-index: 2;
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  pointer-events: none;
}
.kcs-demo-preview::after {
  content: '';
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.08); z-index: 3;
  pointer-events: none;
}

.kcs-demo-info {
  padding: 1.2rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.kcs-demo-name {
  font-family: 'Cinzel',serif;
  font-size: 0.85rem; font-weight: 600; color: #f5e6b8;
  letter-spacing: 0.03em;
}
.kcs-demo-actions { display: flex; gap: 0.6rem; }
.kcs-btn-demo {
  flex: 1; padding: 0.6rem 0.8rem;
  font-family: 'Outfit',sans-serif;
  font-size: 0.55rem; letter-spacing: 0.18em; text-transform: uppercase;
  text-align: center; text-decoration: none;
  border-radius: 6px; transition: all 0.3s;
  -webkit-user-select: none; user-select: none;
  border: none; outline: none;
}
.kcs-btn-demo.primary {
  background: linear-gradient(135deg, #D4AF37, #b8941e);
  color: #050505; font-weight: 600;
}
.kcs-btn-demo.primary:hover {
  box-shadow: 0 4px 20px rgba(212,175,55,0.3);
  transform: translateY(-1px);
}
.kcs-btn-demo.ghost {
  background: transparent;
  border: 1px solid rgba(212,175,55,0.2);
  color: #D4AF37;
}
.kcs-btn-demo.ghost:hover {
  border-color: #D4AF37;
  background: rgba(212,175,55,0.06);
}

/* ── DEMO IFRAME OVERLAY ── */
.demo-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: #000;
}
.demo-overlay.hidden { display: none; }
.demo-overlay iframe {
  width: 100%; height: 100%; border: none;
}
.demo-overlay-nav {
  position: fixed; top: 1rem; right: 1.5rem; z-index: 510;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  cursor: pointer;
  transition: transform 0.3s;
}
.demo-overlay-nav:hover { transform: scale(1.1); }
#diamondCanvasOverlay {
  width: 56px; height: 56px;
  filter: drop-shadow(0 0 14px rgba(180,220,255,0.35));
  pointer-events: none;
}
.demo-overlay-label {
  font-family: 'Outfit',sans-serif;
  font-size: 0.5rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(180,220,255,0.8);
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .kcs-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .kcs-cat-card { aspect-ratio: 3/4; }
  .kcs-demos-grid { grid-template-columns: 1fr; }
  #diamondCanvas { width: 48px; height: 48px; }
  #diamondCanvasFloat, #diamondCanvasOverlay { width: 44px; height: 44px; }
  .kcs-hero { padding: 4rem 1.5rem 2rem; }
  .kcs-title-row { gap: 0.5rem; }
  .demo-overlay-nav { top: 0.8rem; right: 0.8rem; }
}

/* ── Back-to-Studio diamond — top-left corner ── */
.diamond-back-studio {
  position: fixed;
  top: 1.2rem;
  left: 1.2rem;
  bottom: auto;
  right: auto;
  z-index: 500;
  flex-direction: row;
  gap: 0.5rem;
}
.diamond-back-studio .diamond-label {
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  opacity: 0.7;
}
