/* Base */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: rgba(232, 115, 74, 0.25);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #141414;
}
::-webkit-scrollbar-thumb {
  background: #404040;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #e8734a;
}

/* Navigation */
#nav {
  background: transparent;
}

#nav.scrolled {
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(64, 64, 64, 0.5);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #e8734a;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile menu */
.menu-line {
  display: block;
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.open .mobile-link {
  animation: fadeUp 0.4s ease forwards;
  opacity: 0;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* Hero animations */
.hero-title {
  animation: heroIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-subtitle {
  animation: heroIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

.hero-lead {
  animation: heroIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.hero-cta {
  animation: heroIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.55s;
  opacity: 0;
}

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

.hero-scroll {
  animation: heroIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.9s;
  opacity: 0;
}

/* Scroll reveal — below the fold only, progressive enhancement */
.reveal-up,
.reveal-left,
.reveal-right {
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-up {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal-up.visible,
  .reveal-left.visible,
  .reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Menu items */
.menu-item {
  padding-bottom: 0;
  border-bottom: 1px solid rgba(64, 64, 64, 0.5);
  padding-bottom: 16px;
}

.menu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Form */
#contact-form button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Image hover */
img {
  display: block;
  max-width: 100%;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 1px solid #e8734a;
  outline-offset: 4px;
}
