:root {
  /* Colors */
  --color-bg: #F9F8F6;
  --color-text: #2C2C2C;
  --color-text-light: #555555;
  --color-primary: #1A1A1A;
  /* Dark charcoal/black for primary actions */
  --color-secondary: #E5E5E5;
  /* Borders, subtle backgrounds */
  --color-white: #FFFFFF;
  --color-accent-navy: #1B2631;
  --color-accent-sage: #778472;
  --color-accent-anthracite: #36454F;
  --color-accent-white: #F0F0F0;
  --color-accent-neutral: #D3CFC0;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  --h1: clamp(2.5rem, 5vw, 4rem);
  --h2: clamp(2rem, 4vw, 3rem);
  --h3: clamp(1.5rem, 3vw, 2rem);
  --h4: clamp(1.2rem, 2vw, 1.5rem);
  --body: 1rem;
  --small: 0.875rem;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Layout */
  --container-width: 1400px;
  --header-height: 80px;

  /* Components */
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.08);
  --transition: 0.3s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  /* Force high quality */
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

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

h2 {
  font-size: var(--h2);
}

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

h4 {
  font-size: var(--h4);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-light);
}

.text-center {
  text-align: center;
}

.text-serif {
  font-family: var(--font-serif);
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-header {
  margin-bottom: var(--spacing-lg);
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
  gap: var(--spacing-md);
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: #000;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--color-text);
  color: var(--color-text);
}

.btn-secondary:hover {
  background-color: var(--color-text);
  color: var(--color-white);
}

.btn-link {
  padding: 0;
  border-bottom: 1px solid currentColor;
}

/* Header & Nav */
.site-header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(249, 248, 246, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.site-header.scrolled {
  border-bottom-color: var(--color-secondary);
  background-color: var(--color-white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-primary);
  z-index: 1100;
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mobile-toggle {
  display: block;
  z-index: 1100;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1000;
}

.mobile-nav.is-open {
  right: 0;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-nav a {
  font-family: var(--font-serif);
  font-size: 2rem;
}

/* Footer */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-col a {
  display: block;
  margin-bottom: 0.8rem;
  color: #CCC;
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  font-size: var(--small);
  color: #888;
}

/* Utilities */
.bg-white {
  background-color: var(--color-white);
}

.bg-light {
  background-color: #F2F0EB;
}

@media (min-width: 900px) {
  .nav-desktop {
    display: block;
  }

  .mobile-toggle {
    display: none;
  }

  .mobile-nav {
    display: none;
  }
}

/* Hero Grid Styles */
.hero-card:hover img {
  transform: scale(1.05);
}

.hero-card:hover .hero-overlay {
  background: rgba(0, 0, 0, 0.1) !important;
}

@media (max-width: 768px) {
  .grid-4-hero {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .grid-4-hero {
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(4, 1fr);
  }
}

/* Interactive Hero */
.hero-interactive {
  height: 100vh;
  min-height: 700px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out, transform 8s ease;
  z-index: 1;
  transform: scale(1.05);
  /* Slight zoom for movement effect */
}

.hero-bg.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 3;
}

.hero-content-center {
  position: relative;
  z-index: 10;
  text-align: center;
}

.hero-nav-list {
  display: flex;
  flex-direction: row;
  /* Horizontal */
  justify-content: center;
  align-items: center;
  gap: 4vw;
  /* Generous spacing */
  width: 100%;
  padding: 0 2rem;
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
}

.hero-nav-list a {
  font-family: 'Bodoni Moda', serif;
  /* Requested font */
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  /* Scaled down slightly for horizontal fit */
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s, transform 0.3s;
  display: inline-block;
  white-space: nowrap;
}

.hero-nav-list a:hover {
  color: #fff;
  transform: translateY(-5px);
  /* Subtle lift instead of scale */
}

@media (max-width: 768px) {
  .hero-nav-list {
    flex-direction: column;
    /* Stack on mobile */
    gap: 2rem;
  }
}

/* Color Selector Mini Doors */
.finish-selector-btn {
  border: none;
  background: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.finish-selector-btn:hover {
  transform: translateY(-5px);
}

.finish-selector-img-container {
  width: 60px;
  height: 80px;
  /* Rectangular aspect ratio for door */
  overflow: hidden;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
  position: relative;
}

.finish-selector-btn.active .finish-selector-img-container {
  border: 2px solid var(--color-primary);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.finish-selector-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Feature Carousel Split */
.feature-carousel-container {
  background: #f4f4f4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16/9;
}

/* Infinite Marquee Animation */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 40s linear infinite;
  display: flex;
  /* Ensure flex behavior */
}

.animate-marquee:hover {
  animation-play-state: paused;
}