/* ============================================
   D-MAPPERS — Premium Cinematic Portfolio
   ============================================ */

:root {
  --bg-primary: #0D0A0A;
  --bg-secondary: #171111;
  --burgundy-dark: #351719;
  --wine: #5B2027;
  --muted-rose: #8D4A4F;
  --warm-cream: #D8C2B4;
  --soft-beige: #B9A49A;
  --off-white: #F3ECE7;
}

/* Film grain */
.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Custom Cursor */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--warm-cream);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s;
}
.cursor-ring {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(216, 194, 180, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.35s cubic-bezier(0.23,1,0.32,1),
              height 0.35s cubic-bezier(0.23,1,0.32,1),
              border-color 0.3s,
              background 0.3s;
}
.cursor-label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg-primary);
  opacity: 0;
  transition: opacity 0.25s;
  white-space: nowrap;
  pointer-events: none;
}
.cursor.is-hover .cursor-dot {
  width: 0;
  height: 0;
}
.cursor.is-hover .cursor-ring {
  width: 72px;
  height: 72px;
  background: var(--warm-cream);
  border-color: var(--warm-cream);
}
.cursor.is-hover .cursor-label {
  opacity: 1;
}
.cursor.is-explore .cursor-ring {
  width: 88px;
  height: 88px;
}
body.custom-cursor-active {
  cursor: none;
}
body.custom-cursor-active a,
body.custom-cursor-active button {
  cursor: none;
}

/* Navigation scroll state */
#nav.scrolled {
  background: rgba(13, 10, 10, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(216, 194, 180, 0.06);
}

/* Glass panels */
.glass-panel {
  background: rgba(13, 10, 10, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(216, 194, 180, 0.1);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  background: var(--wine);
  color: var(--off-white);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--wine);
  transition: background 0.35s, border-color 0.35s, transform 0.3s cubic-bezier(0.23,1,0.32,1);
}
.btn-primary:hover {
  background: var(--muted-rose);
  border-color: var(--muted-rose);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  background: transparent;
  color: var(--warm-cream);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid rgba(216, 194, 180, 0.25);
  transition: border-color 0.35s, background 0.35s, transform 0.3s cubic-bezier(0.23,1,0.32,1);
}
.btn-secondary:hover {
  border-color: var(--warm-cream);
  background: rgba(216, 194, 180, 0.05);
}
.btn-primary .arrow,
.btn-secondary .arrow {
  transition: transform 0.3s cubic-bezier(0.23,1,0.32,1);
}
.btn-primary:hover .arrow,
.btn-secondary:hover .arrow {
  transform: translateX(4px);
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--soft-beige);
  border: 1px solid rgba(216, 194, 180, 0.15);
}

/* Stack items */
.stack-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.5rem;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft-beige);
  border: 1px solid rgba(216, 194, 180, 0.1);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.stack-item:hover {
  border-color: var(--wine);
  color: var(--warm-cream);
  background: rgba(91, 32, 39, 0.15);
}

/* Project visual hover */
.project-visual {
  transition: transform 0.6s cubic-bezier(0.23,1,0.32,1);
}
.project-visual:hover {
  transform: scale(1.015);
}

/* Service item */
.service-item {
  transition: background 0.4s;
}
.service-item:hover {
  background: rgba(53, 23, 25, 0.25);
}

/* Mobile menu open */
#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

/* Hero typography sizing */
.hero-title {
  font-size: clamp(3.5rem, 12vw, 9.5rem);
}

/* Smooth reveal helpers */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--wine);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cursor { display: none !important; }
  body.custom-cursor-active { cursor: auto; }
}

/* Selection */
::selection {
  background: var(--wine);
  color: var(--off-white);
}
