/* Custom Font Import */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400;700&display=swap");

/* Variables */
:root {
  --color-bg: #f5f2eb;
  --color-text: #2d2a26;
  --color-accent: #a67b5b;
  --color-secondary: #e5e0d8;
  --color-border: #d1cdc7;
  --color-text-light: #6b655f;
  --color-dark-bg: #2d2a26;
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Lato", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Footer Sticky Logic: Ensure main content stretches */
main {
  flex: 1;
}

h1,h2,h3,h4 { font-family: "Playfair Display", serif; }
button { cursor: pointer; font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* Container Utility */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Utilities */
.text-center { text-align: center; }
.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-20 { margin-bottom: 5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.pt-6 { padding-top: 1.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.text-xs { font-size: 0.75rem; }
.text-xl { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.3; }
.text-2xl { font-size: clamp(1.35rem, 2.5vw, 1.5rem); line-height: 1.25; }
.text-3xl { font-size: clamp(1.5rem, 3.5vw, 2.5rem); line-height: 1.2; }

/* Hero Paragraphs on Subpages */
header.bg-secondary-fade p {
    font-size: clamp(1rem, 2vw, 1.35rem);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.text-gray-500 { color: #6b7280; }
.w-full { width: 100%; }
.bg-white { background-color: white; }
.border { border: 1px solid var(--color-border); }
.text-light { color: var(--color-text-light); }
.section-subtitle {
  opacity: 0.7;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}
.no-scroll { overflow: hidden; }

/* Grid System */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Opacity utilities */
.opacity-100 { opacity: 1; }
.opacity-50 { opacity: 0.5; }
.opacity-20 { opacity: 0.2; }

/* Blur utilities */
.blur-sm { filter: blur(4px); }
.blur-md { filter: blur(8px); }

/* Border Radius */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:text-7xl { font-size: 4.5rem; }
  .md\:text-2xl { font-size: 1.5rem; }
  .md\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .md\:mb-0 { margin-bottom: 0; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:flex { display: flex; }
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(245, 242, 235, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--color-border);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  font-style: italic;
}

.nav-links {
  gap: 2rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-link {
  background: none;
  border: none;
  transition: color 0.3s;
  color: var(--color-text);
}
.nav-link:hover, .nav-link.active {
  color: var(--color-accent);
}
.nav-link.active {
  border-bottom: 2px solid var(--color-accent);
}

/* Mobile Navigation & Animation */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 2rem;
  height: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 100;
}

@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}

.bar {
  width: 100%;
  height: 3px;
  background-color: var(--color-text);
  transition: all 0.3s ease-in-out;
  transform-origin: left;
}

/* Hamburger Transformations */
.mobile-menu-btn.open .bar:nth-child(1) {
  transform: translateY(9px) rotate(0deg); 
  opacity: 0;
}
.mobile-menu-btn.open .bar:nth-child(2) {
  transform: rotate(180deg); 
  background-color: var(--color-accent);
}
.mobile-menu-btn.open .bar:nth-child(3) {
  transform: translateY(-9px) rotate(0deg);
  opacity: 0;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(245, 242, 235, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 90;
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 0.6s ease-in-out;
  pointer-events: none;
}

.mobile-menu.open {
  clip-path: circle(150% at 50% 50%);
  pointer-events: all;
}

.mobile-link {
  display: block;
  width: auto;
  text-align: center;
  padding: 1rem;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 2rem;
  font-weight: 700;
  font-family: "Playfair Display", serif;
  transition: color 0.3s;
}
.mobile-link:hover, .mobile-link.active {
  color: var(--color-accent);
}
.mobile-link.active {
  text-decoration: underline;
}

/* Button Components */
.btn {
  padding: 0.75rem 2rem;
  border-radius: 0;
  transition: background-color 0.3s, color 0.3s;
  border: 1px solid transparent;
  font-weight: 500;
  display: inline-block;
}


.btn-secondary {
  background-color: transparent;
  color: #2D2A26;
  border-color: #2D2A26;
  width: 200px; /* Equal width hint */
  text-align: center;
}
.btn-secondary:hover {
  background-color: var(--color-secondary);
}

/* Footer & Subscribe Form */
.footer {
  background-color: var(--color-secondary);
  padding-top: 3rem;
  padding-bottom: 3rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-top: auto; /* Fallback for sticky if flex not used correctly on parent, but main flex:1 is better */
}
.footer-links a { margin: 0 0.5rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--color-text); }

/* Premium Subscribe Form */
.subscribe-form {
  margin-top: 2rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.subscribe-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subscribe-label {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-left: 0.25rem;
}

.subscribe-input, 
.subscribe-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.subscribe-textarea {
  min-height: 100px;
  resize: vertical;
}

.subscribe-input:focus,
.subscribe-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(166, 123, 91, 0.1);
  transform: translateY(-2px);
}

.subscribe-btn {
  background-color: var(--color-dark-bg);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  cursor: pointer;
}

.subscribe-btn:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(166, 123, 91, 0.3);
}

.subscribe-btn:active {
  transform: translateY(0);
}

.subscribe-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Scroll to Top Button (Shared) */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--color-accent);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  padding-top: 7px;
  line-height: 1;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 50;
  font-weight: bold;
  
  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(50px);
  transition: all 0.3s ease-in-out;
}

.scroll-top-btn.visible {
  opacity: 0.67; 
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-5px); 
  background-color: var(--color-text);
}

@media (min-width: 768px) {
  .scroll-top-btn {
    display: none;
  }
}
