/* SHARED BASE & SCREEN FIT */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  background: #060606;
  color: white;
  font-family: 'Inter', sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Global Draggable Prevention */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

#lightbox-img {
    pointer-events: auto !important;
}

/* Allow text selection in input boxes and textareas */
input, textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
}

body.lock-scroll {
    overflow: hidden;
}

/* CRT POWER-ON */
.power-on-active::before {
  content: "";
  position: fixed;
  inset: 0;
  background: white;
  z-index: 10002;
  pointer-events: none;
  animation: powerOn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes powerOn {
  0% { transform: scaleY(0.005) scaleX(0); opacity: 1; }
  50% { transform: scaleY(0.005) scaleX(1); opacity: 1; }
  100% { transform: scaleY(1) scaleX(1); opacity: 0; }
}

/* VINTAGE OVERLAYS */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('https://grainy-gradients.vercel.app/noise.svg');
  opacity: 0.08;
  pointer-events: none;
  z-index: 9999;
}

.grain::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
              radial-gradient(circle, transparent 20%, black 150%);
  background-size: 100% 3px, 100% 100%;
  pointer-events: none;
  z-index: 9998;
}

.retro-header {
  text-shadow: 2px 0 0 rgba(255,0,0,0.3), -2px 0 0 rgba(0,255,255,0.3);
  animation: glitch-flicker 3s infinite;
}

@keyframes glitch-flicker {
  0% { text-shadow: 2px 0 0 rgba(255,0,0,0.3), -2px 0 0 rgba(0,255,255,0.3); }
  1% { text-shadow: -3px 0 0 rgba(255,0,0,0.5), 3px 0 0 rgba(0,255,255,0.5); }
  2% { text-shadow: 2px 0 0 rgba(255,0,0,0.3), -2px 0 0 rgba(0,255,255,0.3); }
  100% { text-shadow: 2px 0 0 rgba(255,0,0,0.3), -2px 0 0 rgba(0,255,255,0.3); }
}

/* CUSTOM CURSOR */
#cursor-dot, #cursor-outline { display: none; }
@media (pointer: fine) {
  #cursor-dot { display: block; width: 4px; height: 4px; background: white; position: fixed; pointer-events: none; z-index: 10000; border-radius: 50%; transform: translate(-50%, -50%); }
  #cursor-outline { display: block; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,0.3); position: fixed; pointer-events: none; z-index: 9999; border-radius: 50%; transform: translate(-50%, -50%); }
}

/* REVEAL ANIMATIONS */
.reveal { 
  opacity: 0; 
  transform: translateY(40px); 
  transition: opacity 1.2s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible { 
  opacity: 1; 
  transform: translateY(0); 
}

/* LIGHTBOX EFFECTS */
#lightbox-modal {
    opacity: 0;
    backdrop-filter: blur(0px);
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
}

#lightbox-modal.active {
    opacity: 1;
    backdrop-filter: blur(15px);
}

#lightbox-img {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.1s ease-out, opacity 0.4s ease;
    cursor: zoom-in;
    transform-origin: center;
}

#lightbox-modal.active #lightbox-img {
    opacity: 1;
}

/* MASONRY & GALLERY */
#gallery-grid { column-count: 1; column-gap: 1.5rem; width: 100%; }
@media (min-width: 640px) { #gallery-grid { column-count: 2; } }
@media (min-width: 1024px) { #gallery-grid { column-count: 3; } }

.gallery-item { 
  break-inside: avoid; 
  margin-bottom: 1.5rem; 
  background: #0a0a0a; 
  border: 1px solid rgba(255,255,255,0.05); 
  overflow: hidden; 
  cursor: pointer; 
}

.gallery-item img {
  opacity: 0.7;
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  opacity: 1;
  transform: scale(1.05);
}

/* SERVICE SELECTION CARDS */
.service-card {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #0a0a0a;
}
.service-card:hover {
    border-color: rgba(255,255,255,0.4);
}
.service-card.selected {
    background: white;
    color: black;
    border-color: white;
}
.service-card .price-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    opacity: 0.5;
}
.service-card.selected .price-tag {
    opacity: 1;
}

/* PRICE BOX GLOW */
.price-box { border: 1px solid white; background: white; color: black; padding: 2rem; transition: box-shadow 0.3s ease; }
.price-update-glow { animation: priceGlow 0.5s ease; }
@keyframes priceGlow {
    0% { box-shadow: 0 0 0px white; }
    50% { box-shadow: 0 0 30px white; }
    100% { box-shadow: 0 0 0px white; }
}

/* CONTACT NODES */
.contact-node {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.node-bg {
    position: absolute;
    inset: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}
.contact-node:hover .node-bg {
    transform: translateY(0);
}
.contact-node:hover {
    border-color: transparent;
}

/* CUSTOM CHECKBOX STYLING */
.addon-check {
  appearance: none;
  -webkit-appearance: none;
  width: 16px !important;
  height: 16px !important;
  border: 1px solid white !important;
  background-color: transparent !important;
  cursor: pointer;
  position: relative;
  padding: 0 !important; /* Reset padding for the box */
  margin-top: 2px;
  flex-shrink: 0;
}

.addon-check:checked {
  background-color: white !important;
}

/* The black checkmark */
.addon-check:checked::after {
  content: '✓';
  position: absolute;
  color: black;
  font-size: 12px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Selected state for service cards */
.service-card.selected {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: white !important;
}

/* Special case for the Bundle when selected */
.service-card.selected.border-cyan-500\/30 {
    background-color: rgba(6, 182, 212, 0.1) !important;
    border-color: rgb(6, 182, 212) !important;
}