*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background-color: #d4a22e;
  color: #0d1424;
}

::-moz-selection {
  background-color: #d4a22e;
  color: #0d1424;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f3f9;
}

::-webkit-scrollbar-thumb {
  background: #8da2d1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6783c1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #d4a22e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Link transitions */
a {
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Smooth image loading */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

img[src=""] {
  background: linear-gradient(135deg, #d9e0f0 0%, #f0f3f9 50%, #d9e0f0 100%);
  background-size: 200% 200%;
  animation: imagePlaceholderShimmer 2s ease-in-out infinite;
  min-height: 180px;
  border-radius: 8px;
}

@keyframes imagePlaceholderShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* FAQ animations */
.faq-content {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-toggle:hover {
  background-color: #f9fafb;
}

/* Button hover effects */
button,
[role="button"] {
  cursor: pointer;
  transition: all 0.2s ease;
}

button:active,
[role="button"]:active {
  transform: scale(0.98);
}

/* Card hover lift */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Cookie banner entrance animation */
#cookie-banner {
  animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Cookie panel backdrop */
#cookie-panel {
  animation: fadeInBackdrop 0.3s ease;
}

@keyframes fadeInBackdrop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#cookie-panel > div {
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Toggle switch custom styles */
.peer:checked ~ div {
  background-color: #d4a22e;
}

/* Mobile menu animation */
#mobile-menu {
  animation: fadeInMenu 0.3s ease;
}

@keyframes fadeInMenu {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#mobile-menu nav a {
  animation: slideInMenuItem 0.4s ease both;
}

#mobile-menu nav a:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu nav a:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu nav a:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu nav a:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu nav a:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu nav a:nth-child(6) { animation-delay: 0.3s; }
#mobile-menu nav a:nth-child(7) { animation-delay: 0.35s; }

@keyframes slideInMenuItem {
  from {
    transform: translateY(15px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Form styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
textarea,
select {
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #d4a22e;
  box-shadow: 0 0 0 3px rgba(212, 162, 46, 0.15);
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: #22c55e;
}

/* Header shrink on scroll handled by classes */
.header-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Gradient text utility */
.text-gradient {
  background: linear-gradient(135deg, #d4a22e 0%, #eecb7f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section divider */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #d4a22e, #eecb7f);
  border-radius: 2px;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f3f9 25%, #d9e0f0 50%, #f0f3f9 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s ease-in-out infinite;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-banner,
  #cookie-panel,
  #mobile-menu,
  .no-print {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }
}

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

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
  .faq-item {
    border-width: 2px;
  }

  button, a {
    text-decoration-thickness: 2px;
  }
}