/* ============================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================ */
:root {
  --color-bg-primary: #0d1320;
  --color-bg-secondary: #1a2332;
  --color-bg-dark: #0a0f1a;
  --color-text-primary: #d9c7b0;
  --color-text-secondary: rgba(217, 199, 176, 0.8);
  --color-text-muted: rgba(217, 199, 176, 0.6);
  --color-accent: #d9c7b0;
  --color-white: #ffffff;
  --border-color: rgba(217, 199, 176, 0.1);
  --border-color-hover: rgba(217, 199, 176, 0.3);
  --border-color-active: rgba(217, 199, 176, 0.4);
  
  /* Spacing */
  --header-height: 72px;
  --section-padding: 4rem 2rem;
  
  /* Transitions */
  --transition-base: 0.3s ease;
  --transition-fast: 0.2s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  font-weight: 300;
}

/* Main visibility - controlled by JS after load */
main {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
  background: var(--color-bg-primary);
  border-bottom: 1px solid var(--border-color);
  color: var(--color-text-primary);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.logo a {
  display: block;
  line-height: 0;
  transition: opacity var(--transition-base);
  border-radius: 4px;
}

.logo a:hover {
  opacity: 0.8;
}

.logo a:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.logo img {
  height: 40px;
  width: auto;
}

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
  transition: var(--transition-base);
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 3px;
  transition: all var(--transition-base);
  transform-origin: center;
}

.hamburger:hover span {
  background-color: var(--color-white);
}

.hamburger:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin-left: auto;
}

.nav-menu a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-base);
  font-weight: 300;
  position: relative;
  padding: 0.5rem 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-base);
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--color-white);
  outline: none;
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
  width: 100%;
}

.btn-contact {
  background: var(--color-accent);
  color: var(--color-bg-primary) !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: 25px;
  font-weight: 500;
  transition: all var(--transition-base);
}

.btn-contact::after {
  display: none;
}

.btn-contact:hover,
.btn-contact:focus {
  background: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(217, 199, 176, 0.3);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-primary) 100%);
  color: var(--color-text-primary);
  padding: 4rem 2rem;
  text-align: center;
}

.hero-logo {
  max-width: 500px;
  width: 100%;
  height: auto;
  margin: 0 auto 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  font-weight: 300;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--color-accent);
  color: var(--color-bg-primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(217, 199, 176, 0.3);
  outline: none;
}

.btn-primary:focus {
  box-shadow: 0 5px 15px rgba(217, 199, 176, 0.3), 0 0 0 3px rgba(217, 199, 176, 0.5);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--color-accent);
  color: var(--color-bg-primary);
  outline: none;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
#services {
  padding: var(--section-padding);
  max-width: 1200px;
  margin: 0 auto;
}

#services h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--color-text-primary);
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service {
  background: rgba(217, 199, 176, 0.05);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.service:hover {
  transform: translateY(-5px);
  border-color: var(--border-color-hover);
  box-shadow: 0 10px 30px rgba(217, 199, 176, 0.1);
}

.service h3 {
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.service p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-weight: 300;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
#about {
  padding: var(--section-padding);
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(217, 199, 176, 0.03);
}

#about h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--color-text-primary);
  font-weight: 700;
}

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

.about-item {
  text-align: center;
  padding: 2rem;
}

.about-item h3 {
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.about-item p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  font-weight: 300;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
#contact {
  padding: var(--section-padding);
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

#contact h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
  font-weight: 700;
}

#contact p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  font-weight: 300;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.contact-item {
  padding: 1.5rem 2rem;
  background: rgba(217, 199, 176, 0.05);
  border: 1px solid var(--border-color-hover);
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: all var(--transition-base);
  font-size: 1.1rem;
  font-weight: 300;
}

.contact-item:hover,
.contact-item:focus {
  transform: translateY(-5px);
  border-color: var(--border-color-active);
  box-shadow: 0 15px 40px rgba(217, 199, 176, 0.15);
  outline: none;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--color-bg-dark);
  color: var(--color-text-muted);
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  font-weight: 300;
}

/* ============================================
   FADE-IN ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for grid items */
.service.fade-in:nth-child(1),
.about-item.fade-in:nth-child(1) {
  transition-delay: 0.1s;
}

.service.fade-in:nth-child(2),
.about-item.fade-in:nth-child(2) {
  transition-delay: 0.2s;
}

.service.fade-in:nth-child(3),
.about-item.fade-in:nth-child(3) {
  transition-delay: 0.3s;
}

.service.fade-in:nth-child(4),
.about-item.fade-in:nth-child(4) {
  transition-delay: 0.4s;
}

.service.fade-in:nth-child(5) {
  transition-delay: 0.5s;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet and below (1024px) */
@media (max-width: 1024px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    flex-direction: column;
    background-color: var(--color-bg-primary);
    width: 100%;
    text-align: center;
    transition: left var(--transition-base);
    gap: 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li {
    margin: 0;
  }
  
  .nav-menu a {
    display: block;
    padding: 1rem 2rem;
    font-size: 1.2rem;
  }
  
  .btn-contact {
    margin: 1rem auto;
    display: inline-block;
  }
}

/* Mobile styles (768px and below) */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-logo {
    max-width: 300px;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-links {
    flex-direction: column;
    align-items: center;
  }
  
  #services h2,
  #about h2,
  #contact h2 {
    font-size: 2rem;
  }
  
  .service h3,
  .about-item h3 {
    font-size: 1.3rem;
  }
  
  nav {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 3rem 1rem;
  }
  
  #services,
  #about,
  #contact {
    padding: 3rem 1rem;
  }
}

/* ============================================
   HUBSPOT FORM STYLES
   ============================================ */
.hubspot-form {
  max-width: 100%;
}

.hubspot-form input,
.hubspot-form textarea,
.hubspot-form select {
  background: rgba(217, 199, 176, 0.05);
  border: 1px solid var(--border-color);
  color: var(--color-text-primary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  transition: all var(--transition-base);
}

.hubspot-form input:focus,
.hubspot-form textarea:focus,
.hubspot-form select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(217, 199, 176, 0.1);
}

.hubspot-form label {
  color: var(--color-text-primary);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.hs-submit-button,
.hubspot-form input[type="submit"] {
  background: var(--color-accent);
  color: var(--color-bg-primary);
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: 'Montserrat', sans-serif;
}

.hs-submit-button:hover,
.hubspot-form input[type="submit"]:hover {
  background: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(217, 199, 176, 0.3);
}

.hs-submit-button:focus,
.hubspot-form input[type="submit"]:focus {
  outline: none;
  box-shadow: 0 5px 15px rgba(217, 199, 176, 0.3), 0 0 0 3px rgba(217, 199, 176, 0.5);
}

/* HubSpot form error messages */
.hs-error-msgs {
  color: #ff6b6b;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* HubSpot form field groups */
.hs-form-field {
  margin-bottom: 1.5rem;
}

/* ============================================
   FORM LOADING INDICATOR
   ============================================ */
.form-loading {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-secondary);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1; 
  }
  50% { 
    opacity: 0.5; 
  }
}

/* ============================================
   FALLBACK CONTACT STYLING
   ============================================ */
.fallback-contact {
  text-align: center;
  padding: 2rem;
  margin-bottom: 4rem;
  background: rgba(217, 199, 176, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border-color-hover);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.fallback-contact p {
  color: var(--color-text-primary);
  font-weight: 300;
  line-height: 1.6;
}

.fallback-contact p:first-of-type {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.fallback-contact p:last-of-type {
  margin-bottom: 1.5rem;
  color: var(--color-text-secondary);
}

.fallback-contact .btn-primary {
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
}
