/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
  --cream:       #F7F3EC;
  --cream-deep:  #EDE6D6;
  --cream-mid:   #F2EDE3;
  --sand:        #D4C5A9;
  --sand-dark:   #B8A88A;
  --bronze:      #9A7B4F;
  --bronze-dark: #7A5F39;
  --charcoal:    #2C2A27;
  --charcoal-mid:#4A4740;
  --warm-grey:   #8A8178;
  --white:       #FDFAF5;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
}

/* ==========================================================================
   1. Base & Reset
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

body.teralune {
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--bronze-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.elementor-widget-heading h1.elementor-heading-title,
.elementor-widget-heading h2.elementor-heading-title,
.elementor-widget-heading h3.elementor-heading-title,
.elementor-widget-heading h4.elementor-heading-title,
.elementor-widget-heading h5.elementor-heading-title,
.elementor-widget-heading h6.elementor-heading-title {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--charcoal);
  margin-top: 0;
  line-height: 1.2;
}

p, .elementor-widget-text-editor {
  font-family: var(--font-body);
  color: var(--charcoal-mid);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   3. Section Labels
   ========================================================================== */
.teralune-section-label {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bronze);
  margin-bottom: 1.5rem;
}

.teralune-section-label::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background-color: var(--bronze);
  margin-right: 15px;
}

/* Utilities */
.teralune-bronze-line {
  height: 1px;
  background-color: var(--bronze);
  width: 100%;
  display: block;
  margin: 2rem 0;
}

.teralune-grain-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml,%3Csvg viewBox=%220 0 200 200%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22noiseFilter%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.65%22 numOctaves=%223%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23noiseFilter)%22 opacity=%220.05%22/%3E%3C/svg%3E');
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.teralune-btn,
.elementor-button.teralune-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  padding: 12px 30px;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.teralune-btn-primary,
.elementor-button.teralune-btn-primary {
  background-color: var(--bronze);
  color: var(--white);
  border: 1px solid var(--bronze);
}

.teralune-btn-primary:hover,
.elementor-button.teralune-btn-primary:hover {
  background-color: var(--bronze-dark);
  border-color: var(--bronze-dark);
  color: var(--white);
}

.teralune-btn-outline,
.elementor-button.teralune-btn-outline {
  background-color: transparent;
  color: var(--bronze);
  border: 1px solid var(--bronze);
}

.teralune-btn-outline:hover,
.elementor-button.teralune-btn-outline:hover {
  background-color: var(--bronze);
  color: var(--white);
}

.teralune-btn-white,
.elementor-button.teralune-btn-white {
  background-color: var(--white);
  color: var(--charcoal);
  border: 1px solid var(--white);
}

.teralune-btn-white:hover,
.elementor-button.teralune-btn-white:hover {
  background-color: transparent;
  color: var(--white);
}

/* ==========================================================================
   5. Navigation Overrides
   ========================================================================== */
.teralune-nav-container {
  transition: all var(--transition);
}

.teralune-nav-container.scrolled {
  background: rgba(247, 243, 236, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

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

.teralune-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--bronze);
  transition: width var(--transition);
}

.teralune-nav-link:hover::after,
.teralune-nav-link.active::after {
  width: 100%;
}

.teralune-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0.05em;
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */
.teralune-hero {
  position: relative;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-deep) 100%);
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.teralune-hero-shape {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-color: var(--sand);
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
}

.teralune-hero-content {
  position: relative;
  z-index: 2;
}

.teralune-hero-image {
  position: relative;
  z-index: 2;
  box-shadow: -20px 20px 0 var(--bronze);
}

.teralune-hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--bronze);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.teralune-hero-scroll::after {
  content: '';
  width: 1px;
  height: 40px;
  background-color: var(--bronze);
  margin-top: 10px;
  animation: scrollPulse 2s infinite;
}

/* ==========================================================================
   7. Marquee Strip
   ========================================================================== */
.teralune-marquee {
  background-color: var(--charcoal);
  color: var(--cream);
  padding: 1.5rem 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.teralune-marquee-track {
  display: inline-block;
  animation: marquee 20s linear infinite;
}

.teralune-marquee-item {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  padding: 0 2rem;
}

.teralune-marquee-item::after {
  content: '✦';
  color: var(--bronze);
  margin-left: 2rem;
  font-style: normal;
  font-size: 1rem;
  vertical-align: middle;
}

/* ==========================================================================
   8. Intro Section
   ========================================================================== */
.teralune-intro-signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--bronze);
  margin-top: 1rem;
}

/* ==========================================================================
   9. Services Grid
   ========================================================================== */
.teralune-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: var(--sand-dark);
  border: 1px solid var(--sand-dark);
}

.teralune-service-tile {
  background-color: var(--cream);
  padding: 4rem 3rem;
  position: relative;
  transition: background-color var(--transition);
}

.teralune-service-tile:hover {
  background-color: var(--white);
}

.teralune-service-tile::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--bronze);
  transition: width var(--transition);
}

.teralune-service-tile:hover::after {
  width: 100%;
}

/* ==========================================================================
   10. Why Us Section
   ========================================================================== */
.teralune-why-us-box {
  background-color: var(--cream-deep);
  padding: 3rem;
  border-left: 4px solid var(--bronze);
}

/* ==========================================================================
   11. Testimonials
   ========================================================================== */
.teralune-testimonials-section {
  background-color: var(--charcoal);
  color: var(--cream);
}

.teralune-testimonial-card {
  background-color: var(--charcoal-mid);
  padding: 3rem;
  border-top: 4px solid transparent;
  transition: all var(--transition);
}

.teralune-testimonial-card:hover {
  transform: translateY(-5px);
  border-top-color: var(--bronze);
  background-color: #55524B;
}

/* ==========================================================================
   12. CTA Strip
   ========================================================================== */
.teralune-cta-strip {
  background-color: var(--bronze);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.teralune-cta-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 15vw;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  pointer-events: none;
}

/* ==========================================================================
   13. Page Heroes
   ========================================================================== */
.teralune-page-hero {
  background-color: var(--charcoal);
  color: var(--cream);
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
}

/* ==========================================================================
   14. About Sections
   ========================================================================== */
.teralune-mission-quote {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-style: italic;
  color: var(--bronze);
  border-left: 4px solid var(--bronze);
  padding-left: 2rem;
  line-height: 1.3;
}

.teralune-value-card {
  padding: 2rem;
  background-color: var(--white);
  border: 1px solid var(--cream-deep);
  height: 100%;
}

.teralune-team-card {
  text-align: center;
}

.teralune-team-photo {
  border-radius: 50%;
  width: 200px;
  height: 200px;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 4px solid var(--cream-deep);
}

/* ==========================================================================
   15. Services Detail
   ========================================================================== */
.teralune-service-tabs {
  position: sticky;
  top: 100px;
}

.teralune-service-tab {
  display: block;
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--charcoal-mid);
  border-left: 2px solid var(--cream-deep);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.teralune-service-tab:hover,
.teralune-service-tab.active {
  color: var(--bronze);
  border-left-color: var(--bronze);
  background-color: rgba(154, 123, 79, 0.05);
}

.teralune-service-detail {
  display: none;
  animation: fadeUp 0.5s ease forwards;
}

.teralune-service-detail.active {
  display: block;
}

/* ==========================================================================
   16. Contact Section
   ========================================================================== */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  padding: 1rem;
  background-color: var(--cream);
  border: 1px solid var(--sand);
  font-family: var(--font-body);
  color: var(--charcoal);
  margin-bottom: 1rem;
  transition: border-color var(--transition-fast);
  border-radius: 0;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--bronze);
}

.wpcf7-form label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--charcoal-mid);
  margin-bottom: 0.5rem;
  display: block;
}

.wpcf7-form input[type="submit"] {
  background-color: var(--bronze);
  color: var(--white);
  border: none;
  padding: 12px 30px;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.wpcf7-form input[type="submit"]:hover {
  background-color: var(--bronze-dark);
}

/* ==========================================================================
   17. Footer
   ========================================================================== */
.teralune-footer {
  background-color: var(--charcoal);
  color: var(--cream);
  padding: 4rem 0 2rem;
}

.teralune-footer a {
  color: var(--cream-deep);
}

.teralune-footer a:hover {
  color: var(--bronze);
}

.teralune-footer-bottom {
  border-top: 1px solid var(--charcoal-mid);
  padding-top: 2rem;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--warm-grey);
}

/* ==========================================================================
   18. Animations
   ========================================================================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scrollPulse {
  0% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  50% { opacity: 0.5; transform: scaleY(1.5); transform-origin: top; }
  100% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

.teralune-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ==========================================================================
   19. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .teralune-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .teralune-hero-shape {
    width: 60%;
  }
}

@media (max-width: 768px) {
  .teralune-services-grid {
    grid-template-columns: 1fr;
  }
  .teralune-hero-shape {
    display: none;
  }
  .teralune-hero {
    text-align: center;
  }
  .teralune-mission-quote {
    font-size: 2rem;
  }
  .teralune-service-tabs {
    position: static;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
  }
  .teralune-service-tab {
    border-left: none;
    border-bottom: 2px solid var(--cream-deep);
  }
  .teralune-service-tab.active {
    border-bottom-color: var(--bronze);
  }
}
