/* Complete rewrite with cinema-themed styling and new color palette */

/* Cinema Color Palette */
:root {
  --dark-room-black: #111216;
  --projector-gold: #e6b84d;
  --red-curtain: #c43d3d;
  --screen-white: #f3f2ef;
  --shadow-gold: rgba(230, 184, 77, 0.22);
}

/* Base styles with cinema foundation */
* {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  background-color: var(--screen-white);
  color: var(--dark-room-black);
}

/* Cinema button styling */
.cinema-button {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 26px var(--shadow-gold);
}

.cinema-button:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 16px 32px var(--shadow-gold);
}

.cinema-button:active {
  transform: translateY(0);
}

/* Header enhancements with cinema styling */
header {
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
}

header.backdrop-blur-md {
  background-color: rgba(17, 18, 22, 0.95);
}

/* Film grain texture */
.bg-film-grain {
  background-image: radial-gradient(
      circle at 20% 50%,
      transparent 20%,
      rgba(255, 255, 255, 0.3) 21%,
      rgba(255, 255, 255, 0.3) 34%,
      transparent 35%,
      transparent
    ),
    linear-gradient(
      0deg,
      transparent 24%,
      rgba(255, 255, 255, 0.05) 25%,
      rgba(255, 255, 255, 0.05) 26%,
      transparent 27%,
      transparent 74%,
      rgba(255, 255, 255, 0.05) 75%,
      rgba(255, 255, 255, 0.05) 76%,
      transparent 77%,
      transparent
    );
  background-size: 3px 3px;
}

/* Image masks and effects */
.mask-frame {
  position: relative;
}

.mask-frame::before {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--projector-gold);
  border-radius: 12px;
  opacity: 0.3;
}

.mask-perf {
  position: relative;
}

.mask-perf::before,
.mask-perf::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 8px,
    var(--dark-room-black) 8px,
    var(--dark-room-black) 12px
  );
  opacity: 0.2;
}

.mask-perf::before {
  left: 0;
}

.mask-perf::after {
  right: 0;
}

.mask-softrect {
  border-radius: 12px;
  box-shadow: inset 0 0 20px rgba(17, 18, 22, 0.1);
}

.duotone-warm {
  filter: sepia(0.3) saturate(1.2) hue-rotate(15deg);
}

.polaroid-style {
  border: 8px solid var(--screen-white);
  border-bottom: 24px solid var(--screen-white);
  box-shadow: 0 4px 12px rgba(17, 18, 22, 0.2);
  transform: rotate(-1deg);
}

/* Film perforation effects */
.film-perf {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 12px,
    rgba(17, 18, 22, 0.1) 12px,
    rgba(17, 18, 22, 0.1) 16px
  );
}

.film-perf-small {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 8px,
    rgba(230, 184, 77, 0.2) 8px,
    rgba(230, 184, 77, 0.2) 10px
  );
}

/* Storyboard FAQ styling */
.storyboard-card {
  transition: all 0.3s ease;
  position: relative;
}

.storyboard-card:hover {
  transform: translateY(-4px);
}

.storyboard-card button {
  transition: all 0.3s ease;
}

.storyboard-card button:focus {
  outline: 2px solid var(--projector-gold);
  outline-offset: 2px;
}

.faq-content {
  transition: max-height 0.5s ease-out, opacity 0.3s ease-out;
}

/* Timeline track styling */
.timeline-track {
  background: linear-gradient(
    to bottom,
    var(--projector-gold) 0%,
    rgba(230, 184, 77, 0.6) 50%,
    var(--projector-gold) 100%
  );
}

/* Enhanced animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Hero section enhancements */
#hero {
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--dark-room-black) 0%, rgba(17, 18, 22, 0.95) 50%, rgba(17, 18, 22, 0.9) 100%);
  z-index: 1;
}

#hero > * {
  position: relative;
  z-index: 2;
}

/* Card hover effects with cinema styling */
.hover\:shadow-xl:hover {
  transform: translateY(-8px);
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(17, 18, 22, 0.15);
}

/* Form enhancements with cinema styling */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(230, 184, 77, 0.2);
  border-color: var(--projector-gold);
  transform: scale(1.02);
}

/* Button enhancements */
button,
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-2px);
}

button:active,
.btn:active {
  transform: translateY(0);
}

/* Loading states with cinema styling */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(243, 242, 239, 0.3);
  border-top: 2px solid var(--projector-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Section dividers with cinema effects */
.section-divider {
  position: relative;
  height: 64px;
  background: linear-gradient(to right, transparent 0%, rgba(230, 184, 77, 0.12) 50%, transparent 100%);
}

.section-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent 0%, rgba(230, 184, 77, 0.4) 50%, transparent 100%);
}

/* Map wrapper enhancements */
.map-wrapper {
  box-shadow: 0 10px 25px rgba(17, 18, 22, 0.1);
  transition: box-shadow 0.3s ease;
  border: 4px solid rgba(230, 184, 77, 0.3);
}

.map-wrapper:hover {
  box-shadow: 0 20px 40px rgba(17, 18, 22, 0.15);
}

/* Cookie notice enhancements */
#cookieNotice {
  backdrop-filter: blur(12px);
  border: 2px solid rgba(230, 184, 77, 0.3);
  box-shadow: 0 20px 40px rgba(17, 18, 22, 0.1);
}

/* Responsive enhancements */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 2rem;
  }

  .text-xl {
    font-size: 1.125rem;
  }

  .cinema-button {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--projector-gold);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .text-gray-600 {
    color: var(--dark-room-black);
  }

  .text-gray-300 {
    color: var(--screen-white);
  }

  .bg-gray-50 {
    background-color: #f9f9f9;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  #cookieNotice {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: white;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .bg-gradient-to-br,
  .bg-gradient-to-r {
    background: white !important;
  }

  .text-white {
    color: black !important;
  }

  .cinema-button {
    background: white !important;
    border: 1px solid black !important;
    color: black !important;
  }
}

/* Custom scrollbar with cinema styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--screen-white);
}

::-webkit-scrollbar-thumb {
  background: var(--projector-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--red-curtain);
}

/* Selection styles */
::selection {
  background-color: var(--projector-gold);
  color: var(--dark-room-black);
}

::-moz-selection {
  background-color: var(--projector-gold);
  color: var(--dark-room-black);
}

/* Image optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Form validation styles */
.border-red-500 {
  border-color: var(--red-curtain) !important;
  box-shadow: 0 0 0 3px rgba(196, 61, 61, 0.1) !important;
}

/* Enhanced mobile responsiveness */
@media (max-width: 640px) {
  .text-4xl {
    font-size: 2rem;
  }

  .text-6xl {
    font-size: 3rem;
  }

  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .py-16 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .storyboard-card {
    margin-bottom: 1rem;
  }
}

/* Cinema-specific utility classes */
.projector-beam {
  background: linear-gradient(to right, transparent 0%, rgba(230, 184, 77, 0.2) 50%, transparent 100%);
  filter: blur(2px);
}

.film-border {
  border: 2px solid rgba(230, 184, 77, 0.3);
  border-radius: 8px;
}

.cinema-shadow {
  box-shadow: 0 8px 32px rgba(17, 18, 22, 0.12);
}

.cinema-glow {
  box-shadow: 0 0 20px rgba(230, 184, 77, 0.3);
}

/* Counter animation styling */
.counter-animate {
  transition: text-shadow 0.3s ease;
}

/* Timeline specific styling */
.timeline-marker {
  position: relative;
  z-index: 10;
}

.timeline-marker::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 184, 77, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-marker:hover::before {
  opacity: 1;
}

/* Service cards clapboard styling */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    45deg,
    var(--dark-room-black) 25%,
    var(--projector-gold) 25%,
    var(--projector-gold) 50%,
    var(--dark-room-black) 50%,
    var(--dark-room-black) 75%,
    var(--projector-gold) 75%
  );
  background-size: 8px 8px;
}

/* FAQ scene numbering */
.scene-number {
  font-family: "Courier New", monospace;
  font-weight: bold;
  letter-spacing: 1px;
}

/* Letterbox effect */
.letterbox::before,
.letterbox::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--dark-room-black);
  z-index: 10;
}

.letterbox::before {
  top: 0;
}

.letterbox::after {
  bottom: 0;
}

/* Performance optimizations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Cinema-themed gradients */
.gradient-cinema-dark {
  background: linear-gradient(135deg, var(--dark-room-black) 0%, rgba(17, 18, 22, 0.95) 50%, rgba(17, 18, 22, 0.9) 100%);
}

.gradient-cinema-light {
  background: linear-gradient(
    135deg,
    var(--screen-white) 0%,
    rgba(243, 242, 239, 0.95) 50%,
    rgba(243, 242, 239, 0.9) 100%
  );
}

/* Final cinema touches */
.cinema-text-shadow {
  text-shadow: 2px 2px 4px rgba(17, 18, 22, 0.3);
}

.cinema-backdrop {
  backdrop-filter: blur(12px) saturate(1.2);
}

/* Ensure proper contrast ratios */
.text-contrast-high {
  color: var(--dark-room-black);
  text-shadow: 1px 1px 2px rgba(243, 242, 239, 0.8);
}

.bg-contrast-high {
  background-color: var(--screen-white);
  border: 1px solid rgba(17, 18, 22, 0.1);
}
