/* Critical CSS - Above the fold only (Navigation + Hero) */

/* Essential CSS Variables for Critical Path */
:root {
  /* Colors - Essential Professional Grey Palette (Critical Only) */
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #EEEEEE;
  --gray-300: #E0E0E0;
  --gray-400: #BDBDBD;
  --gray-500: #9E9E9E;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  
  --coffee: #8B4513;
  --coffee-light: #D2691E;
  --coffee-dark: #654321;
  --coffee-cream: #F5E6D3;
  --cream: #FFF8DC;
  --warm-white: #FDFCFA;
  --gold: #DAA520;
  --terracotta: #E2725B;
  --sage: #9CAF88;
  --sage-light: #B8D4A0;
  --success: #2D5A27;
  --warning: #B8860B;
  --danger: #8B0000;
  --white: #FFFFFF;
  --black: #1A1613;
  
  /* Spacing Scale - Essential only */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Typography - Essential only */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-display: 'Playfair Display', Georgia, serif;
  
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Layout - Essential only */
  --max-w: 1200px;
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows - Essential only */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: #000000;
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--coffee);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  font-weight: var(--font-weight-semibold);
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 6px;
}

/* Critical Navigation */
.capsule-header {
  position: sticky;
  top: var(--space-4);
  z-index: 1000;
  padding: 0 var(--space-6);
  margin-bottom: var(--space-8);
}

.capsule-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(45, 45, 45, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: var(--space-3) var(--space-6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(70, 70, 70, 0.3);
  max-width: 1000px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.capsule-nav.scrolled {
  background: rgba(35, 35, 35, 0.98);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(60, 60, 60, 0.4);
}

.capsule-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.capsule-logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.capsule-logo h1 {
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--coffee);
  margin: 0;
}

.capsule-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.capsule-nav-links a {
  color: var(--warm-white);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  padding: var(--space-2) var(--space-3);
  border-radius: 25px;
  transition: all 0.2s ease;
  background: rgba(70, 70, 70, 0.3);
}

.capsule-nav-links a:hover {
  background: var(--coffee);
  color: var(--warm-white);
  transform: translateY(-1px);
}

.capsule-nav-links a.active {
  background: var(--coffee);
  color: var(--warm-white);
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.capsule-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gray-700);
  font-size: var(--font-size-xl);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.capsule-mobile-toggle:hover {
  background: var(--gray-100);
  color: var(--coffee);
}

.capsule-mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(253, 252, 250, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 0 0 20px 20px;
  padding: var(--space-4);
  box-shadow: 0 4px 20px rgba(26, 22, 19, 0.1);
  border: 1px solid rgba(245, 230, 211, 0.3);
  border-top: none;
  text-align: center;
}

.capsule-mobile-nav.active {
  display: block;
}

.capsule-mobile-nav a {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--gray-700);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  margin-bottom: var(--space-2);
}

.capsule-mobile-nav a:hover,
.capsule-mobile-nav a.active {
  background: var(--coffee);
  color: var(--warm-white);
}

/* Social Icons */
.capsule-socials {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.capsule-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gray-100);
  border-radius: 50%;
  transition: all 0.2s ease;
}

/* Hover effects removed for social icons */

.capsule-social-icon {
  width: 20px;
  height: 20px;
}

/* Icon hover effects removed */

/* Hamburger Menu */
.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gray-700);
  margin: 4px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.capsule-mobile-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.capsule-mobile-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.capsule-mobile-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Social Icons */
.mobile-socials {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-200);
}

.mobile-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gray-100);
  border-radius: 50%;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
}

.mobile-social-link:hover {
  background: var(--coffee);
  transform: translateY(-1px);
}

.mobile-social-icon {
  width: 20px;
  height: 20px;
  transition: filter 0.2s ease;
  display: block;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.mobile-social-link:hover .mobile-social-icon {
  filter: brightness(0) invert(1);
}

/* Mobile Navigation */
@media (max-width: 767px) {
  .capsule-header {
    padding: 0 var(--space-4);
    margin-bottom: var(--space-6);
  }
  
  .capsule-nav {
    padding: var(--space-2) var(--space-4);
  }
  
  .capsule-logo h1 {
    font-size: var(--font-size-lg);
  }
  
  .capsule-logo img {
    width: 40px;
    height: 40px;
  }
  
  .capsule-nav-links {
    display: none;
  }
  
  .capsule-socials {
    display: none;
  }
  
  .capsule-mobile-toggle {
    display: block;
  }
}

/* Hero Section - Critical for above-the-fold */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(26,22,19,0.7) 0%, rgba(60,36,21,0.8) 50%, rgba(139,69,19,0.6) 100%);
  color: var(--warm-white);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../img/hero/webp/hero.webp");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 0 var(--space-6);
  z-index: 1;
}

.hero h1 {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-6);
  text-shadow: 0 4px 8px rgba(26, 22, 19, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  color: var(--warm-white);
}

.hero p {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-8);
  text-shadow: 0 2px 4px rgba(26, 22, 19, 0.7), 0 1px 2px rgba(0, 0, 0, 0.4);
  line-height: 1.4;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: var(--warm-white);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
  margin-top: var(--space-6);
}

.actions .btn {
  min-width: 180px;
  padding: var(--space-4) var(--space-8) !important;
  font-size: var(--font-size-base) !important;
  font-weight: var(--font-weight-semibold);
  box-shadow: 0 4px 12px rgba(26, 22, 19, 0.3) !important;
  border: 2px solid transparent;
}

.actions .btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(26, 22, 19, 0.4) !important;
}

.actions .btn-outline {
  background: rgba(253, 252, 250, 0.1);
  border: 2px solid var(--warm-white);
  color: var(--warm-white);
  backdrop-filter: blur(10px);
}

.actions .btn-outline:hover {
  background: var(--warm-white);
  color: var(--coffee);
}

@media (min-width: 640px) {
  .actions {
    flex-direction: row;
    gap: var(--space-6);
  }
}

/* Mobile Responsive */
@media (max-width: 767px) {
  .hero {
    min-height: 500px;
    padding: var(--space-4);
  }
  
  .hero::before {
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    background-repeat: no-repeat;
  }
  
  .hero-content {
    padding: 0 var(--space-4);
  }
  
  .hero h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-4);
  }

  .hero p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-6);
  }
  
  .actions {
    margin-top: var(--space-4);
  }
  
  .actions .btn {
    min-width: 160px;
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-sm);
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .hero {
    min-height: 450px;
  }
  
  .hero::before {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }
  
  .hero h1 {
    font-size: var(--font-size-3xl);
  }
  
  .hero p {
    font-size: var(--font-size-base);
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 50px;
  height: 50px;
  background: var(--coffee);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--coffee-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}