/* Import shared design tokens */
@import url('./css/design-tokens.css');

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

* {
  margin: 0;
  padding: 0;
}

/* Responsive Wrapper */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* Typography Basics */
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--text);
  font-weight: 400;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Image Handling */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* Sticky Header Nav */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: 
    linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-2xl) var(--space-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
  min-height: 20vh;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 0%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 100%, rgba(245, 242, 232, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

header h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 3rem + 3vw, 5.5rem);
  font-weight: 700;
  color: #f5f2e8;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  transform-origin: left center;
}

header .subtitle {
  font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.6rem);
  color: #f5f2e8;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: var(--space-sm);
  position: relative;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  transform-origin: left center;
}

header .subtitle::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, #a0523d 0%, rgba(160, 82, 61, 0.6) 70%, transparent 100%);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(255, 221, 0, 0.737);
}
 
/* Modern Navigation */
nav {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--space-xs);
}

/* Desktop Navigation */
.nav-desktop {
  display: flex;
  gap: var(--space-xs);
}

/* Mobile Navigation */
.nav-mobile {
  display: none;
  position: relative;
  z-index: 1003;
}

.hamburger-btn {
  background: rgba(160, 82, 61, 0.2);
  border: 2px solid rgba(160, 82, 61, 0.5);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1003;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.hamburger-btn:hover {
  background: rgba(160, 82, 61, 0.3);
  border-color: rgba(160, 82, 61, 0.7);
}

.hamburger-line {
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
  display: block;
  position: relative;
}

/* Hamburger to X animation */
.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(42deg) translate(5px, 6px)
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-42deg) translate(2px, -4px)
}

.mobile-menu {
  position: fixed;
  top: calc(100% + 8px);
  right: var(--space-lg);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 10px 20px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(160, 82, 61, 0.5);
  backdrop-filter: blur(20px);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
}

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

.mobile-nav-link {
  display: block;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-base);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  transition: all var(--transition-smooth);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  background: rgba(160, 82, 61, 0.3);
  color: #ffffff;
  text-decoration: none;
}

nav a {
  color: #f5f2e8;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-base);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  position: relative;
  transition: all var(--transition-smooth);
  border: 2px solid var(--color-primary);
  backdrop-filter: blur(10px);
  background: var(--color-primary);
  overflow: hidden;
  text-shadow: none;
}

nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left var(--transition-smooth);
}

nav a:hover,
nav a:focus {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #f5f2e8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: underline;
  text-underline-offset: 4px;
}

nav a:hover::before {
  left: 100%;
}

nav a:active {
  transform: translateY(0);
  text-decoration: underline;
  text-underline-offset: 4px;
}

nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Modern Main Content */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
}

main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  height: 100%;
  background: 
    linear-gradient(180deg, rgba(248, 245, 240, 0.9) 0%, rgba(232, 225, 212, 0.95) 100%);
  border-radius: var(--radius-xl);
  box-shadow: 
    var(--shadow-xl),
    inset 0 1px 0 rgba(139, 69, 19, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 69, 19, 0.2);
  z-index: -1;
}

/* Hide main background on homepage with hero */
main:has(.hero)::before {
  display: none;
}

/* Remove padding from main when it has hero */
main:has(.hero) {
  padding: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
  position: relative;
  padding-bottom: var(--space-sm);
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  border-radius: 2px;
}

h3 {
  font-size: var(--font-size-xl);
}

p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
  color: var(--color-neutral-800);
  font-size: var(--font-size-base);
}

/* Modern Gallery Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  position: relative;
}

@supports (grid-template-rows: masonry) {
  .gallery {
    grid-template-rows: masonry;
  }
}
/* Rustic Footer */
footer {
  background: 
    linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: rgba(245, 242, 232, 0.9);
  border-top: 1px solid rgba(245, 242, 232, 0.1);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 0%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 100%, rgba(245, 242, 232, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.footer-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  padding: var(--space-2xl) var(--space-xl) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section h3 {
  color: #f5f2e8;
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  position: relative;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* Contact Info Styling */
.contact-info p {
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-base);
  line-height: 1.7;
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  color: #f5f2e8;
}

.contact-icon {
  font-size: var(--font-size-base);
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-info a {
  color: #f5f2e8;
  text-decoration: none;
  transition: all var(--transition-fast);
  background: var(--color-primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-primary);
  display: inline-block;
  font-weight: 600;
}

.contact-info a:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #f5f2e8;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Social Links Styling */
.social-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: #f5f2e8;
  text-decoration: none;
  font-size: var(--font-size-base);
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-primary);
  background: var(--color-primary);
  backdrop-filter: blur(10px);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-shadow: none;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left var(--transition-smooth);
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent-dark);
  background: var(--color-accent-dark);
  color: #f5f2e8;
  box-shadow: var(--shadow-md);
}

.social-link:hover::before {
  left: 100%;
}

.social-icon {
  font-size: var(--font-size-base);
  flex-shrink: 0;
}

/* Footer Tagline */
.footer-tagline {
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: #f5f2e8;
  font-style: italic;
  margin-bottom: 0;
}

/* Footer Bottom */
.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  background: rgba(0, 0, 0, 0.1);
}

.footer-bottom p {
  margin: 0;
  font-size: var(--font-size-xs);
  color: #f5f2e8;
  font-weight: 400;
}

/* Modern Responsive Design */
@media (max-width: 1024px) {
  :root {
    --space-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --space-2xl: clamp(2rem, 1.6rem + 2vw, 2.5rem);
  }
  
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
  }
  
}

@media (max-width: 768px) {
  header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    text-align: left;
  }
  
  .header-left {
    align-items: flex-start;
  }
  
  nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
  
  main {
    padding: var(--space-lg) var(--space-md);
  }
  
  main::before {
    width: calc(100% - 1rem);
  }
  
  .gallery {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-md);
  }
  

  
  /* Footer responsive */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    text-align: center;
  }
  
  .footer-section h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* Center contact info on mobile */
  .contact-info p {
    justify-content: center;
    text-align: center;
  }
  
  .social-links {
    align-items: center;
  }
  
  .footer-bottom {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  :root {
    --space-lg: clamp(1rem, 0.8rem + 1vw, 1.25rem);
    --space-xl: clamp(1.25rem, 1rem + 1.25vw, 1.5rem);
    --space-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  }
  
  header {
    padding: var(--space-sm) var(--space-md);
  }
  
  header h1 {
    font-size: var(--font-size-3xl);
  }
  
  nav {
    gap: var(--space-xs);
  }
  
  nav a {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
  }
  
  main {
    padding: var(--space-md) var(--space-sm);
  }
  
  /* Footer mobile optimization */
  .footer-content {
    padding: var(--space-lg) var(--space-sm) var(--space-md);
  }
  
  .social-links {
    gap: var(--space-xs);
  }
  
  .social-link {
    padding: var(--space-xs);
    font-size: var(--font-size-xs);
  }
  
  .footer-bottom {
    padding: var(--space-sm);
  }
}

/* Hero Section */
.hero {
  background-size: cover;
  background-position: center;
  height: calc(100vh - 20vh);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: calc(-1 * var(--space-2xl));
  left: 0;
  right: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: var(--space-4);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  color: white;
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.7);
  font-weight: 700;
}

.hero p {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* Grid Layout */
.grid {
  display: grid;
  gap: var(--space-4);
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-smooth);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
}

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

.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-neutral-200);
  color: var(--color-neutral-800);
  border: 2px solid var(--color-neutral-200);
}

.btn-secondary:hover {
  background: var(--color-neutral-300);
  border-color: var(--color-neutral-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Continuous Scroll Homepage Styles */

/* Section Layouts */
.section {
  padding: var(--space-2xl) 0;
  scroll-margin-top: calc(var(--space-xl) + 80px); /* Account for sticky header */
}

/* First section after hero gets top padding */
.hero + .section {
  padding-top: var(--space-2xl);
}

.section-alt {
  background: rgba(26, 24, 22, 0.3);
  backdrop-filter: blur(10px);
}

.section-header {
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

/* Two-column header layout */
.section-header-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.section-description {
  display: flex;
  align-items: center;
}

.section-description p {
  font-size: var(--font-size-lg);
  color: var(--color-neutral-600);
  margin: 0;
  line-height: 1.7;
}

.section-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.section-header p {
  font-size: var(--font-size-lg);
  color: var(--color-neutral-600);
  max-width: 800px;
  margin: 0 auto;
}

.section-actions {
  margin-top: var(--space-xl);
}

/* Preview Gallery Adjustments */
.preview-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

/* Smooth Scroll Enhancement */
html {
  scroll-behavior: smooth;
}

/* Navigation Active States for Homepage */
.nav-link {
  position: relative;
}

.nav-link.active {
  color: var(--accent) !important;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Enhanced Responsive Design for New Sections */
@media (max-width: 768px) {
  .hero {
    min-height: calc(100vh - 12vh); /* Account for mobile header height */
    margin-top: 0;
  }
  
  .hero h1 {
    font-size: var(--font-size-3xl);
  }
  
  .hero p {
    font-size: var(--font-size-lg);
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  /* Mobile header adjustments */
  
  header h1 {
    font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem) !important; /* Smaller on mobile */
  }
  
  header .subtitle {
    font-size: clamp(0.9rem, 0.8rem + 0.4vw, 1.2rem) !important; /* Smaller on mobile */
  }
  
  /* Mobile Navigation */
  .nav-desktop {
    display: none;
  }
  
  .nav-mobile {
    display: block;
  }
  
  .section {
    padding: var(--space-xl) 0;
  }
  
  .section-header h2 {
    font-size: var(--font-size-2xl);
  }
  
  .section-header p {
    font-size: var(--font-size-base);
  }
  
  /* Mobile section header layout */
  .section-header-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }
  
  .section-action {
    justify-content: center;
  }
  
  .preview-gallery {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .contact-highlight {
    padding: var(--space-md);
    margin: var(--space-md) auto;
  }
  
  .contact-highlight p {
    font-size: var(--font-size-base);
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 50vh;
  }
  
  .hero-content {
    padding: var(--space-2);
  }
  
  .section {
    padding: var(--space-lg) 0;
  }
}

/* Contact Section with Map */
.contact-with-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info-side {
  padding: var(--space-lg);
}

.contact-info-side h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.contact-info-side p {
  font-size: var(--font-size-lg);
  color: var(--color-neutral-600);
  margin-bottom: var(--space-lg);
}

.map-container {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  height: fit-content;
}

.map-container iframe {
  display: block;
  width: 100%;
  min-height: 400px;
}

/* Responsive Map Layout */
@media (max-width: 768px) {
  .contact-with-map {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .contact-info-side {
    padding: var(--space-md);
    text-align: center;
  }
  
  .contact-info-side h2 {
    font-size: var(--font-size-2xl);
  }
  
  .map-container iframe {
    min-height: 300px;
  }
}

@media (max-width: 480px) {
  .map-container iframe {
    min-height: 250px;
  }
}


/* Responsive Detail Pages */
@media (max-width: 768px) {
  .btn {
    justify-content: center;
  }
}