/* ============================================
   Union Brewed Coffee Co — Custom Styles
   ============================================ */

/* Custom Properties */
:root {
  --color-navy-900: #1a2744;
  --color-navy-800: #243352;
  --color-navy-700: #2e4061;
  --color-navy-600: #3d5478;
  --color-navy-500: #4a6489;
  --color-navy-400: #6b829e;
  --color-navy-300: #8fa3b8;
  --color-navy-200: #b8c5d4;
  --color-navy-100: #dce5ee;
  --color-navy-50: #eef3f8;
  --color-amber-600: #d97706;
  --color-amber-500: #f59e0b;
  --color-amber-400: #fbbf24;
  --color-amber-200: #fde68a;
  --color-stone-50: #fafaf9;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--color-navy-900);
  background-color: #fafaf9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.font-playfair {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-inter {
  font-family: 'Inter', system-ui, sans-serif;
}

/* Hero clip */
.clip-hero-right {
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Navbar */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(26, 39, 68, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-amber-500);
  transition: width 0.3s ease;
}

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

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

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

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

#mobileMenu.open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#mobileMenu.open .menu-line:nth-child(2) {
  opacity: 0;
}

#mobileMenu.open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

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

/* Scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

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

/* Selection */
::selection {
  background: var(--color-amber-200);
  color: var(--color-navy-900);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-amber-500);
  outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
  background: var(--color-stone-50);
}

::-webkit-scrollbar-thumb {
  background: var(--color-navy-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-navy-500);
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .clip-hero-right {
    clip-path: none;
  }

  #hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  h1 {
    font-size: 2.5rem !important;
  }

  h1 span.text-4xl {
    font-size: 1.75rem !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .clip-hero-right {
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
  }
}

/* Print */
@media print {
  #navbar, #mobileMenu { display: none; }
  body { color: #000; background: #fff; }
}
