/* ====================
   KNABBEL & BABBEL
   Vanilla CSS - No Framework
   ==================== */

/* CSS Variables - Color Palette */
:root {
  --color-dark-brown: #1a1410;
  --color-warm-brown: #2d1f1a;
  --color-amber: #8b6f47;
  --color-light-wood: #d4a574;
  --color-off-white: #f5f5f0;
  --color-gold: #c9a961;
  --color-espresso: #3d2817;
  --color-orange: #d97639;
  --color-beige: #e8d5b7;
  --background: #f5f5f0;
  --foreground: #1a1410;
  --font-heading: 'Bebas Neue', Impact, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.7;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

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

/* Header - Fixed Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 1000;
  height: 80px;
  background: rgba(26, 20, 16, 0.98);
  transition: all 0.3s ease;
  box-sizing: border-box;
  will-change: transform;
}

.header.scrolled {
  background: rgba(26, 20, 16, 1);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0.5rem 0;
}

.logo img {
  height: 70px;
  width: auto;
  aspect-ratio: 1;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

/* Navigation */
.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-menu a {
  color: var(--color-off-white);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--color-gold);
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
  margin-left: 1rem;
}

.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-amber);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
}

.lang-dropdown-btn:hover {
  background: var(--color-gold);
  transform: translateY(-2px);
}

.lang-dropdown-btn .lang-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.lang-dropdown-btn .lang-code {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lang-dropdown-btn .lang-arrow {
  font-size: 0.625rem;
  transition: transform 0.3s ease;
}

.lang-dropdown-btn.active .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
  will-change: opacity, transform;
  contain: layout;
}

.lang-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--color-beige);
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover {
  background: var(--color-beige);
}

.lang-option .lang-flag {
  font-size: 1.5rem;
  line-height: 1;
}

.lang-option .lang-name {
  color: var(--color-dark-brown);
  font-weight: 600;
  font-size: 0.875rem;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-off-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Slider */
.hero-slider {
  position: relative;
  width: 100%;
  height: calc(100vh - 80px);
  min-height: 600px;
  margin-top: 80px;
  overflow: hidden;
  contain: layout;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img,
.slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.slide img {
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(26,20,16,0.7));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  text-align: center;
  padding: 2rem;
}

.hero-logo {
  width: 250px;
  height: 250px;
  aspect-ratio: 1;
  margin-bottom: 2rem;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
  animation: fadeIn 1s ease-out;
}

.hero-subtitle {
  color: var(--color-off-white);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-family: var(--font-heading);
  letter-spacing: 0.3em;
  font-weight: 300;
  margin-bottom: 2rem;
  animation: slideUp 1s ease-out 0.2s backwards;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: slideUp 1s ease-out 0.4s backwards;
}

.hero-cta {
  display: inline-block;
  background: var(--color-orange);
  color: white;
  padding: 1.25rem 3rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  border: 2px solid var(--color-orange);
  cursor: pointer;
}

.hero-cta:hover {
  background: #c06530;
  border-color: #c06530;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(217, 118, 57, 0.4);
}

.hero-cta-secondary {
  background: transparent;
  color: var(--color-off-white);
  border-color: var(--color-off-white);
}

.hero-cta-secondary:hover {
  background: var(--color-off-white);
  color: var(--color-dark-brown);
  border-color: var(--color-off-white);
  box-shadow: 0 10px 30px rgba(245, 245, 240, 0.3);
}

/* Slider Controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(26, 20, 16, 0.7);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

.slider-btn:hover {
  background: rgba(26, 20, 16, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev { left: 1rem; }
.slider-btn.next { right: 1rem; }

.slider-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 20;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(245, 245, 240, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--color-gold);
  width: 32px;
  border-radius: 6px;
}

/* Sections */
.section {
  padding: 5rem 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.section-label {
  display: inline-block;
  color: var(--color-amber);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-divider {
  width: 96px;
  height: 4px;
  background: var(--color-orange);
  margin: 2rem auto;
}

/* Welcome Section */
.welcome-section {
  background: white;
  text-align: center;
}

.welcome-content {
  max-width: 900px;
  margin: 0 auto;
}

.welcome-text {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--color-espresso);
  line-height: 1.8;
  margin-bottom: 3rem;
  font-weight: 300;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 1.25rem 3rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-orange);
  color: white;
}

.btn-primary:hover {
  background: #c06530;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(217, 118, 57, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--color-dark-brown);
  border: 2px solid var(--color-dark-brown);
}

.btn-secondary:hover {
  background: var(--color-dark-brown);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(26, 20, 16, 0.2);
}

/* Brand Carousel */
.brand-carousel {
  background: var(--color-dark-brown);
  padding: 4rem 0;
  overflow: hidden;
}

.brand-track {
  display: flex;
  gap: 3rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) var(--color-warm-brown);
  padding: 1rem 0;
}

/* Custom scrollbar for webkit browsers */
.brand-track::-webkit-scrollbar {
  height: 8px;
}

.brand-track::-webkit-scrollbar-track {
  background: var(--color-warm-brown);
  border-radius: 4px;
}

.brand-track::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 4px;
}

.brand-track::-webkit-scrollbar-thumb:hover {
  background: var(--color-amber);
}

.brand-item {
  flex-shrink: 0;
  width: 128px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.brand-item:hover img {
  transform: scale(1.1);
}

/* Specialties Grid */
.specialties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.specialty-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.specialty-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.specialty-image {
  position: relative;
  height: 320px;
  overflow: hidden;
}

.specialty-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.specialty-card:hover .specialty-image img {
  transform: scale(1.1);
}

.specialty-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--color-orange);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.specialty-content {
  padding: 2rem;
}

.specialty-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--color-dark-brown);
}

.specialty-content p {
  color: var(--color-espresso);
  line-height: 1.7;
}

/* Footer */
.footer {
  background: var(--color-dark-brown);
  color: var(--color-off-white);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--color-gold);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
  color: var(--color-beige);
  line-height: 1.8;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(201, 169, 97, 0.2);
  color: var(--color-beige);
  font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* Language Dropdown Mobile */
  .lang-dropdown {
    margin-left: 0.5rem;
  }

  .lang-dropdown-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    gap: 0.375rem;
  }

  .lang-dropdown-btn .lang-flag {
    font-size: 1rem;
  }

  .lang-dropdown-btn .lang-code {
    display: none;
  }

  .lang-dropdown-btn .lang-arrow {
    font-size: 0.5rem;
  }

  .lang-dropdown-menu {
    min-width: 160px;
    right: -0.5rem;
  }

  .lang-option {
    padding: 0.75rem 0.875rem;
    gap: 0.625rem;
  }

  .lang-option .lang-flag {
    font-size: 1.125rem;
  }

  .lang-option .lang-name {
    font-size: 0.9375rem;
  }

  .hero-logo {
    width: 180px;
    height: 180px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-cta {
    padding: 1rem 2rem;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
  }

  .section {
    padding: 3rem 0;
  }

  .specialties-grid {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
  }

  .slider-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .brand-track {
    gap: 2rem;
    padding: 1rem 1rem 1.5rem 1rem;
  }

  .brand-track::-webkit-scrollbar {
    height: 6px;
  }

  .brand-item {
    width: 96px;
    height: 72px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .container {
    padding: 0 1rem;
  }

  .header-content {
    padding: 0 1rem;
  }

  .welcome-content,
  .specialties-grid,
  .footer-bottom {
    max-width: 100%;
  }
}

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