/* ── Global Responsive Fixes ── */

/* Prevent horizontal overflow on all pages */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Fix for iOS input zoom */
input, select, textarea {
  font-size: 16px !important;
}

@media (min-width: 769px) {
  input, select, textarea {
    font-size: 15px !important;
  }
}

/* Container max-width safety */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Navigation Responsive ── */
@media (max-width: 480px) {
  .nav-logo {
    font-size: 14px !important;
  }
}

/* ── Hero Responsive ── */
@media (max-width: 380px) {
  .hero-title {
    font-size: 18px !important;
    letter-spacing: 2px !important;
  }
  .hero-tagline {
    font-size: 12px !important;
  }
}

/* ── Cards Touch States (Mobile) ── */
@media (hover: none) {
  .wwd-card:active {
    border-color: rgba(212, 168, 67, 0.4);
    transform: translateY(-2px);
  }

  .fw-item .fw-overlay p {
    max-height: 60px;
    opacity: 1;
  }

  .fw-item .fw-link {
    opacity: 1;
    transform: translateY(0);
  }

  .portfolio-card .portfolio-details {
    max-height: 300px;
    opacity: 1;
  }

  .service-card:active {
    border-color: rgba(212, 168, 67, 0.3);
  }
}

/* ── Accessibility ── */
/* Focus outlines for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #d4a843;
  outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ── Selection Color ── */
::selection {
  background: rgba(212, 168, 67, 0.3);
  color: #f5f5f5;
}

::-moz-selection {
  background: rgba(212, 168, 67, 0.3);
  color: #f5f5f5;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d4a843;
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #333 #0a0a0a;
}

/* ── Image and Media ── */
img, video, canvas {
  max-width: 100%;
  height: auto;
}

/* ── Print Styles ── */
@media print {
  #thunder-canvas,
  #ambient-canvas,
  #hero-canvas,
  .thunder-flash {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}
