@import url("https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap");

:root {
  /* Color Palette */
  --color-bg-global: #f7e7ce; /* Warm cream */
  --color-text-body: #232a26; /* Deep Charcoal */
  --color-accent-cta: #232a26; /* Deep Charcoal (formerly Terracotta) */
  --color-grounding: #b8ad9c; /* Soft Greige */
  --color-brand-minimal: #102c26; /* Dark forest green */

  --color-white: #ffffff;
  --color-overlay: rgba(35, 42, 38, 0.05);

  /* Typography */
  --font-family: "Jost", sans-serif;
  --font-weight-regular: 400;
  --font-weight-bold: 700;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-pill: 9999px;
  --radius-lg: 24px;

  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  background-color: var(--color-bg-global);
  color: var(--color-text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}
h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
p {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
  color: var(--color-text-body);
  opacity: 0.9;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--color-accent-cta);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(35, 42, 38, 0.2);
}

.btn-primary:hover {
  background-color: #111513;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(35, 42, 38, 0.35);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-brand-minimal);
  border: 1.5px solid var(--color-grounding);
}

.btn-outline:hover {
  border-color: var(--color-brand-minimal);
  background-color: var(--color-overlay);
}

/* Header / Navigation */
.site-header {
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(247, 231, 206, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(184, 173, 156, 0.2);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: var(--font-weight-bold);
  font-size: 1.5rem;
  color: var(--color-brand-minimal);
}

.nav-logo img {
  height: 80px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.nav-links a {
  font-weight: var(--font-weight-bold);
  font-size: 1rem;
  color: var(--color-text-body);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-accent-cta);
  transition: var(--transition-fast);
  opacity: 0;
}

.nav-links a:hover {
  color: var(--color-accent-cta);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
  opacity: 1;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-body);
  position: absolute;
  transition: var(--transition-smooth);
}

.mobile-menu-btn span:nth-child(1) {
  top: 0;
}
.mobile-menu-btn span:nth-child(2) {
  top: 9px;
}
.mobile-menu-btn span:nth-child(3) {
  bottom: 0;
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 2;
  position: relative;
}

.hero-tag {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-overlay);
  color: var(--color-brand-minimal);
  font-weight: var(--font-weight-bold);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
  border: 1px solid var(--color-grounding);
}

.hero .hero-visual {
  flex: 1;
  height: 60vh;
  min-height: 400px;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(35, 42, 38, 0.1) 0%,
    rgba(16, 44, 38, 0.05) 100%
  );
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(35, 42, 38, 0.08);
  transition: var(--transition-slow);
}

.hero .hero-visual:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 60px rgba(35, 42, 38, 0.12);
}

.hero .hero-visual img {
  transform: scale(1.05);
  transition: transform 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hero .hero-visual:hover img {
  transform: scale(1);
}

/* Cards & Sections */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid rgba(184, 173, 156, 0.3);
  transition: var(--transition-smooth);
  box-shadow: 0 10px 30px rgba(35, 42, 38, 0.03);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(35, 42, 38, 0.1);
  border-color: var(--color-grounding);
}

.card-dark {
  background-color: var(--color-brand-minimal);
  color: var(--color-bg-global);
  border: none;
}

.card-dark p {
  color: var(--color-bg-global);
  opacity: 0.8;
}

.pill-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
}

.pill-green {
  background-color: rgba(16, 44, 38, 0.1);
  color: var(--color-brand-minimal);
}

.pill-terracotta {
  background-color: rgba(35, 42, 38, 0.1);
  color: var(--color-accent-cta);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--color-brand-minimal);
  color: var(--color-bg-global);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-col h4 {
  color: var(--color-bg-global);
  margin-bottom: var(--space-md);
}

.footer-col p {
  color: rgba(247, 231, 206, 0.7);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(247, 231, 206, 0.7);
}

.footer-links a:hover {
  color: var(--color-accent-cta);
}

.footer-bottom {
  border-top: 1px solid rgba(247, 231, 206, 0.1);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(247, 231, 206, 0.5);
}

/* Decorative Elements */
.divider {
  height: 1px;
  background-color: var(--color-grounding);
  opacity: 0.3;
  margin: var(--space-lg) 0;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: opacity, transform;
}

.animate-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.1s;
}
.delay-2 {
  transition-delay: 0.2s;
}
.delay-3 {
  transition-delay: 0.3s;
}
.delay-4 {
  transition-delay: 0.4s;
}

/* Responsive */
@media (max-width: 992px) {
  .hero .hero-visual {
    width: 100%;
    height: 400px;
    margin-top: var(--space-lg);
  }
  .hero {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding-top: var(--space-xl);
  }
  .hero-content {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) { .container { padding: 0 20px; }
  .nav-links {
    position: fixed;
    top: 73px;
    left: 0;
    width: 100%;
    background-color: var(--color-bg-global);
    flex-direction: column;
    padding: var(--space-md) 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: var(--transition-smooth);
  }

  .nav-links.open {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .mobile-menu-btn {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

/* =========================================
   GLOBAL ANIMATIONS & FEATURES 
   ========================================= */

/* 1. Scroll Progress Bar */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: transparent;
  z-index: 9999;
  pointer-events: none;
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background-color: var(--color-brand-minimal);
  transform-origin: left;
  transition: width 0.1s ease-out;
}

/* 2. Custom Magnetic Cursor */
body {
  /* Hide default cursor on desktop when custom cursor is active */
  cursor: none; 
}
a, button, input, select, textarea {
  cursor: none;
}
.custom-cursor-dot,
.custom-cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
}
.custom-cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-white);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}
.custom-cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
  /* Faster transition for smooth trailing */
  transition-duration: 0.15s; 
  transition-property: top, left, width, height, background-color, border-color;
  transition-timing-function: ease-out;
}

/* Cursor Hover States */
.cursor-hover .custom-cursor-dot {
  width: 0;
  height: 0;
  background-color: transparent;
}
.cursor-hover .custom-cursor-outline {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.2);
  border-color: var(--color-white);
  backdrop-filter: blur(2px);
}

/* 3. Magnetic Hover Target wrapper */
.magnetic-wrap {
  display: inline-block;
}

/* 4. Enhanced Card Hover Glow */
.card {
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.8), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}
.card > * {
  position: relative;
  z-index: 1;
}
.card:hover::before {
  opacity: 0.15;
}
.card-dark:hover::before {
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.4), transparent 40%);
  opacity: 0.3;
}

/* 5. Parallax Image FX */
.parallax-img {
  will-change: transform;
}

/* 6. Page Load Transition */
.page-transition {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}
.page-loaded {
  opacity: 1;
}

/* 7. Smart Header (Hide on scroll down) */
.site-header {
  transition: transform 0.4s ease, background-color 0.4s ease;
}
.header-hidden {
  transform: translateY(-100%);
}

/* 8. Scroll-to-Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-brand-minimal);
  color: var(--color-bg-global);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.3s ease;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  border: none;
}
.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.scroll-top-btn:hover {
  background-color: var(--color-accent-cta);
  transform: translateY(-5px);
}

/* 9. Interactive FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--color-grounding);
  overflow: hidden;
}
.faq-question {
  padding: 1.5rem 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
  color: var(--color-brand-minimal);
  font-weight: bold;
  transition: color 0.3s ease;
}
.faq-question:hover {
  color: var(--color-accent-cta);
}
.faq-icon {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  background-color: currentColor;
  transition: transform 0.3s ease;
}
.faq-icon::before {
  top: 11px; left: 4px; right: 4px; height: 2px;
}
.faq-icon::after {
  top: 4px; bottom: 4px; left: 11px; width: 2px;
}
.faq-item.active .faq-icon::after {
  transform: rotate(90deg) scale(0);
}
.faq-answer {
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), opacity 0.5s ease, padding 0.5s ease;
  padding: 0 0;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  opacity: 1;
  padding: 0 0 1.5rem 0;
  transition: max-height 0.5s ease-in-out, opacity 0.5s ease, padding 0.5s ease;
}

/* 10. Floating Animation Utility */
@keyframes floatAnimation {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
.animate-float {
  animation: floatAnimation 6s ease-in-out infinite;
}
.delay-float-1 { animation-delay: 1s; }
.delay-float-2 { animation-delay: 2s; }

/* 11. Image Reveal Wipe FX */
.image-reveal-container {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  height: 100%;
}
.image-reveal-container img {
  opacity: 0;
  transform: scale(1.1);
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.1s;
}
.image-reveal-container::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--color-brand-minimal);
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 2;
}
.image-reveal-container.in-view img {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.2s; /* Wait for block to start moving */
}
.image-reveal-container.in-view::after {
  transform: scaleX(0);
}
