/* Import luxury fonts */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

:root{
  /* Updated luxury color palette */
  --ivory: #F7F5F2;
  --champagne: #d0ba98;
  --bronzed-bark: #4b3316;
  --truffle-smoke: #615042;
  --onyx: #242525;
  --merlot-rouge: #5a2720;
  --muted-emerald: #425049;
  
  /* New accent colors from palette */
  --sage-green: #8b9d83;
  --forest-green: #2d4a37;
  --coral-red: #d4756b;
  --burgundy-red: #8b2635;
  
  /* Primary brand colors */
  --ink: var(--onyx);
  --bg: var(--ivory);
  --card: #ffffff;
  --accent: var(--champagne);
  --primary: var(--merlot-rouge);
  --secondary: var(--truffle-smoke);
  
  /* Layout variables */
  --max-content-width:980px;
  --container-gap:1rem;
  --radius:14px;
  
  /* Updated gradient with new colors */
  --bg-gradient:
    radial-gradient(1200px 600px at 10% 10%, rgba(90,39,32,.06), transparent 60%),
    radial-gradient(1000px 500px at 90% 20%, rgba(208,186,152,.08), transparent 60%),
    linear-gradient(180deg, #fff, var(--ivory));
  
  /* Typography variables */
  --font-caviar: 'Raleway', sans-serif;
  --font-louis: 'Crimson Text', serif;
  --font-newyork: 'Playfair Display', serif;
}

/* ensure full-height baseline */
html, body { height: 100%; }

/* baseline tweaks */
html,body{
  background:var(--bg);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
}

/* page background + font stack */
body {
  font-family: var(--font-caviar);
  background: var(--bg-gradient);
}

/* container refinement */
.container-narrow{
  max-width:var(--max-content-width);
  margin-inline:auto;
  padding-inline:var(--container-gap);
}

/* hero: mobile-first, then scale up */
/* header.hero{
  padding:4.5rem 0 2rem;
  background:
    radial-gradient(1200px 560px at 50% -10%, #fff, transparent),
    linear-gradient(180deg,#fff,var(--bg));
} */

/* glass utility used in the hero */
.glass {
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.8);
}

/* heading / lead styles for luxury tone */
.brand{
  letter-spacing:.28rem;
  font-weight:700;
  font-size:2.25rem;
  font-family: var(--font-newyork);
}
.sub.lead{
  margin-top:.25rem;
  font-size:1.05rem;
  color:#333;
  font-weight:500;
  font-family: var(--font-louis);
}

/* Typography utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-newyork);
}

.font-caviar { font-family: var(--font-caviar); }
.font-louis { font-family: var(--font-louis); }
.font-newyork { font-family: var(--font-newyork); }

/* Subheadings use Louis George Cafe */
.subheading {
  font-family: var(--font-louis);
  font-style: italic;
}

/* Body text uses Caviar Dreams */
p, span, div, input, button, label {
  font-family: var(--font-caviar);
}

/* Collection card typography */
.collection-title {
  font-family: var(--font-louis);
  font-weight: 600;
}

.collection-brand {
  font-family: var(--font-newyork);
  font-weight: 500;
}

.collection-description {
  font-family: var(--font-caviar);
  line-height: 1.5;
  max-height: 4.5rem; /* 3 lines at 1.5 line-height */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--champagne) transparent;
  scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
.collection-description::-webkit-scrollbar {
  width: 4px;
}

.collection-description::-webkit-scrollbar-track {
  background: transparent;
}

.collection-description::-webkit-scrollbar-thumb {
  background: var(--champagne);
  border-radius: 2px;
}

.collection-description::-webkit-scrollbar-thumb:hover {
  background: var(--sage-green);
}

/* Fade effect for scrollable content */
.collection-description {
  position: relative;
}

.collection-description:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1rem;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.8));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.collection-description:hover:after {
  opacity: 1;
}

/* card utility */
.card-lite{
  background:var(--card);
  border:1px solid #eee;
  border-radius:var(--radius);
  box-shadow:0 8px 28px rgba(0,0,0,.06);
  overflow:hidden;
}
.card-pad{
  padding:1rem;
  margin-top:1rem;
}

/* hero image and body */
.hero-img{
  width:100%;
  height:320px;
  object-fit:cover;
  border-radius:14px 14px 0 0;
  border-bottom:1px solid #eee;
  display:block;
}
.card-body{
  padding:1rem;
}

/* typography & subtle muted text */
.muted{color: var(--truffle-smoke);}
.badge{
  display:inline-block;
  background: var(--champagne);
  color: var(--bronzed-bark);
  border-radius:999px;
  padding:.35rem .7rem;
  font-size:.75rem;
  margin-bottom:.75rem;
  font-weight: 500;
}
.badge-dot {
  box-shadow: 0 0 0 4px rgba(139, 157, 131, .15); /* sage green */
}

/* form & grid tweaks */
.grid{display:grid;gap:1rem;}
.grid-2{grid-template-columns:1fr}
.grid-3{grid-template-columns:1fr}
@media(min-width:768px){
  .grid{gap:1.25rem;}
  .grid-2{grid-template-columns:1.15fr .85fr;}
  .grid-3{grid-template-columns:repeat(3,1fr)}
}
@media(min-width:992px){
  header.hero{padding:6.5rem 0 3rem;}
  .brand{font-size:2.75rem}
  .hero-img{height:420px}
}

/* gallery responsiveness */
.gallery{display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.gallery img{width:100%;height:220px;object-fit:cover;border-radius:12px;border:1px solid #eee}
@media(min-width:768px){
  .gallery img{height:260px}
}
@media(min-width:1200px){
  .gallery img{height:300px}
}

/* trust row and benefits */
.trust-row{display:flex;gap:.75rem;flex-wrap:wrap}
.trust-row small{
  display:flex;
  align-items:center;
  gap:.5rem;
  background: var(--ivory);
  color: var(--truffle-smoke);
  padding:.5rem .75rem;
  border-radius:999px;
  border:1px solid var(--champagne);
  font-weight: 500;
}

/* sticky CTA: mobile-only, less intrusive on desktop */
.sticky-cta{
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(8px);
  border-top:1px solid #eee;
  padding:.75rem;
  box-shadow:0 -6px 20px rgba(0,0,0,.06);
}
.mobile-only{display:block;position:fixed;left:0;right:0;bottom:0;z-index:60}
@media(min-width:768px){
  .mobile-only{display:none;position:static}
}
.cta-grid{grid-template-columns:1fr auto;align-items:center;gap:1rem}

/* small refinements */
.hp{position:absolute;left:-5000px}
nav ul{gap:1rem}
footer{border-top:1px solid #eee;margin-top:2.5rem;padding:2rem 0}

/* subtle luxury accent for buttons */
.btn-dark{
  background: var(--onyx);
  border-color: var(--onyx);
  color: var(--ivory);
  padding:0.65rem 1rem;
  border-radius:8px;
}
.btn-outline{
  background:transparent;
  border:1px solid var(--merlot-rouge);
  color: var(--merlot-rouge);
}

/* Forms: slightly larger inputs and gap for easier touch targets */
input[type="text"], input[type="tel"]{
  padding:.65rem .75rem;
  border-radius:8px;
  border:1px solid #e6e6e6;
}

/* hero waitlist form (single action) */
#hero-waitlist { padding: 0.25rem; }
#hero-waitlist input[type="text"],
#hero-waitlist input[type="tel"]{
  display:block;
  width:100%;
  border:1px solid #e6e6e6;
  padding:.75rem 1rem;
  border-radius:999px;
  font-size:1rem;
}
#hero-waitlist button[type="submit"]{
  border-radius:999px;
  padding:.9rem 1rem;
  font-weight:600;
  box-shadow:0 8px 20px rgba(23,0,30,0.06);
}
#hero-waitlist .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ensure the hp honeypot remains hidden and non-interactive */
.hp{position:absolute;left:-5000px;top:auto;width:1px;height:1px;overflow:hidden}

/* small spacing tweaks for the hero form on very small screens */
@media(max-width:420px){
  #hero-waitlist input[type="text"],
  #hero-waitlist input[type="tel"]{padding:.65rem .9rem}
  #hero-waitlist button{padding:.85rem}
}

/* Collection card carousel styles */
.carousel-container {
  position: relative;
  overflow: hidden;
}

/* Line clamp utility for descriptions */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth transitions for carousel */
.carousel-container img {
  transition: opacity 0.3s ease-in-out;
}

/* Hover effects for carousel navigation */
.carousel-nav-btn {
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.carousel-nav-btn:hover {
  backdrop-filter: blur(8px);
  transform: scale(1.05);
}

/* Collection grid responsive updates */
#collection-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr); /* 2 per row on mobile */
}

#collection-grid article {
  display: flex;
  flex-direction: column;
  min-height: 280px; /* Ensure minimum height for mobile */
}

/* Adjust image to content ratio for better mobile fit */
#collection-grid article > div:first-child {
  flex: 0 0 65%; /* Image takes 65% of card height */
}

#collection-grid article > div:last-child {
  flex: 1; /* Content takes remaining space */
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0; /* Allow flex shrinking */
}

/* Adjust text sizing for mobile cards */
#collection-grid .collection-brand {
  font-size: 0.625rem; /* Slightly smaller on mobile */
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

#collection-grid .collection-title {
  font-size: 0.75rem; /* Smaller title on mobile */
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

#collection-grid article > div:last-child p {
  font-size: 0.625rem; /* Smaller color text */
  line-height: 1.2;
  margin: 0;
}

@media (min-width: 640px) {
  #collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  #collection-grid article {
    min-height: 320px;
  }
  
  /* Reset text sizes for larger screens */
  #collection-grid .collection-brand {
    font-size: 0.75rem;
  }
  
  #collection-grid .collection-title {
    font-size: 0.875rem;
  }
  
  #collection-grid article > div:last-child p {
    font-size: 0.75rem;
  }
}

@media (min-width: 768px) {
  #collection-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  #collection-grid article {
    min-height: 350px;
  }
  
  /* Restore original proportions on desktop */
  #collection-grid article > div:first-child {
    flex: 0 0 75%; /* Image takes 75% on larger screens */
  }
}

@media (min-width: 1024px) {
  #collection-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  #collection-grid article {
    min-height: 380px;
  }
}

/* Three-card feature layout */
#featurequickstats .grid {
  gap: 1.5rem;
}

#featurequickstats .grid > div {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

#featurequickstats .grid > div > div {
  margin-bottom: 1rem;
  line-height: 1.2;
}

#featurequickstats .grid > div > p {
  flex: 1;
  display: flex;
  align-items: center;
  line-height: 1.5;
}

/* Mobile: 1 column */
@media (max-width: 639px) {
  #featurequickstats .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  #featurequickstats .grid > div {
    min-height: 220px;
    padding: 1.5rem;
  }
  
  #featurequickstats .grid > div > div {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  #featurequickstats .grid > div > p {
    font-size: 0.875rem;
  }
}

/* Tablet and up: 3 columns */
@media (min-width: 640px) {
  #featurequickstats .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  #featurequickstats .grid > div {
    min-height: 300px;
    padding: 2rem;
  }
  
  #featurequickstats .grid > div > div {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  #featurequickstats .grid > div > p {
    font-size: 0.875rem;
  }
}

/* Large screens: slightly more spacing */
@media (min-width: 1024px) {
  #featurequickstats .grid {
    gap: 2rem;
  }
  
  #featurequickstats .grid > div {
    min-height: 320px;
  }
  
  #featurequickstats .grid > div > p {
    font-size: 1rem;
  }
}

/* Remove the old 5-card specific styles */
/* #featurequickstats .grid > div:nth-child(5) styles removed */

/* Smooth scrolling for navigation links */
html {
  scroll-behavior: smooth;
}

/* Offset for sticky header when scrolling to sections */
section[id] {
  scroll-margin-top: 60px; /* Reduced for smaller navbar */
}

/* Brand filter styling */
.brand-filter-btn {
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: capitalize;
}

.brand-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 157, 131, 0.15);
}

.brand-filter-btn:active {
  transform: translateY(0);
}

/* Filter container spacing */
#brand-filter {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero form styling */
#application-form {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(208, 186, 152, 0.2);
  border-radius: 1.5rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

#application-form label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

#application-form input:disabled,
#application-form textarea:disabled {
  background-color: #f8f9fa;
  opacity: 0.7;
  cursor: not-allowed;
}

/* Success state for button */
#hero-submit-btn:disabled {
  cursor: not-allowed;
}

#hero-submit-btn:disabled:hover {
  background-color: #5a2720;
}

/* Success states using green accents */
.success-message {
  background-color: rgba(139, 157, 131, 0.1);
  border-color: var(--sage-green);
  color: var(--forest-green);
}

/* Error states using red accents */
.error-message {
  background-color: rgba(212, 117, 107, 0.1);
  border-color: var(--coral-red);
  color: var(--burgundy-red);
}

/* Updated collection grid with subtle accent highlights */
#collection-grid article:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(139, 157, 131, 0.08);
  transition: all 0.3s ease;
}

/* Updated filter buttons with green accents */
.brand-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 157, 131, 0.15);
}

.brand-filter-btn.active {
  background-color: var(--sage-green);
  border-color: var(--sage-green);
  color: white;
}

/* Success form styling with green accents */
#application-form .success-state {
  border-color: var(--sage-green);
  background: rgba(139, 157, 131, 0.05);
}

#application-form .success-state input,
#application-form .success-state textarea {
  border-color: var(--sage-green);
  background-color: rgba(139, 157, 131, 0.05);
}

/* Subtle red accent for required field indicators */
#application-form label::after {
  content: ' *';
  color: var(--coral-red);
}

#application-form label:not([for*="required"])::after {
  display: none;
}

/* Green accent for focus states */
#application-form input:focus,
#application-form textarea:focus {
  border-color: var(--sage-green);
  box-shadow: 0 0 0 3px rgba(139, 157, 131, 0.1);
}

/* Enhanced form validation styling - only after user interaction */
#application-form input:not(:placeholder-shown):invalid,
#application-form textarea:not(:placeholder-shown):invalid {
  border-color: var(--coral-red);
  box-shadow: 0 0 0 2px rgba(212, 117, 107, 0.1);
}

#application-form input:not(:placeholder-shown):valid,
#application-form textarea:not(:placeholder-shown):valid {
  border-color: var(--sage-green);
  box-shadow: 0 0 0 2px rgba(139, 157, 131, 0.1);
}

/* Alternative approach - only validate on blur/focus */
#application-form input:focus:invalid,
#application-form textarea:focus:invalid {
  border-color: var(--coral-red);
  box-shadow: 0 0 0 2px rgba(212, 117, 107, 0.1);
}

#application-form input:focus:valid,
#application-form textarea:focus:valid {
  border-color: var(--sage-green);
  box-shadow: 0 0 0 2px rgba(139, 157, 131, 0.1);
}

/* Remove the blanket invalid/valid styling that was showing on page load */
/* #application-form input:invalid,
#application-form textarea:invalid {
  border-color: var(--coral-red);
  box-shadow: 0 0 0 2px rgba(212, 117, 107, 0.1);
}

#application-form input:valid,
#application-form textarea:valid {
  border-color: var(--sage-green);
  box-shadow: 0 0 0 2px rgba(139, 157, 131, 0.1);
} */

/* Required field indicator styling */
#application-form label[for] {
  position: relative;
}

#application-form label::after {
  content: ' *';
  color: var(--coral-red);
  font-weight: bold;
}

/* Only show asterisk for required fields */
#application-form label:not(:has(+ input[required], + textarea[required]))::after {
  display: none;
}

/* Remove hero header styles that were causing conflicts */
header {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}

/* Fixed navbar styling */
nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 50 !important;
  background: white !important;
  border-bottom: 1px solid rgba(208, 186, 152, 0.3) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* Ensure navbar never moves */
nav * {
  position: static !important;
}

/* Flash animation for application form */
@keyframes flash {
  0% { 
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(208, 186, 152, 0.2);
    transform: scale(1);
  }
  25% { 
    background: rgba(139, 157, 131, 0.1);
    border-color: var(--sage-green);
    transform: scale(1.02);
  }
  50% { 
    background: rgba(139, 157, 131, 0.15);
    border-color: var(--sage-green);
    transform: scale(1.02);
  }
  75% { 
    background: rgba(139, 157, 131, 0.1);
    border-color: var(--sage-green);
    transform: scale(1.01);
  }
  100% { 
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(208, 186, 152, 0.2);
    transform: scale(1);
  }
}

.flash-animation {
  animation: flash 2s ease-in-out;
}

/* Image loading optimization */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
  animation: fadeInImage 0.3s ease forwards;
}

@keyframes fadeInImage {
  to {
    opacity: 1;
  }
}

/* Placeholder background for loading images */
.aspect-\[4\/5\] {
  background: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
              linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
              linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  animation: loading-shimmer 1.5s infinite linear;
}

@keyframes loading-shimmer {
  0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
  100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}

/* Stop shimmer when image loads */
.aspect-\[4\/5\]:has(img[complete]) {
  animation: none;
  background: #f3f4f6;
}

/* Mobile menu specific styling */
#mobile-menu {
  visibility: hidden;
  height: 0;
  transition: all 0.3s ease-in-out;
}

#mobile-menu.mobile-menu-open {
  visibility: visible;
  height: auto;
}

/* Ensure mobile menu doesn't interfere when hidden */
#mobile-menu:not(.mobile-menu-open) {
  pointer-events: none;
}

#mobile-menu.mobile-menu-open {
  pointer-events: all;
}
