/* VARIABLES */
:root {
  --color-primary: #5A4E3C;
  --color-accent: #C9D6CA;
  --color-bg: #F8F7F5;
  --color-text: #2E2E2E;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
}

*, *:before, *:after {
  box-sizing: border-box;
}

/* GLOBAL */
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

.section {
  padding: 5rem 0;
  text-align: center;
  scroll-margin-top: 90px;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: 2.4rem;
}

/* NAVIGATION */
.nav {
  background: var(--color-bg);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
}

.contact-btn {
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 3px;
}

/* --- HERO (ABOVE THE FOLD) --- */

.hero {
  height: 100vh; 
  min-height: 570px; 
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('../assets/hero.jpg'); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; 
  position: relative;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(248, 247, 245, 0.25); 
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 3.5rem;
  background: rgba(255, 255, 255, 0.85); 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(90, 78, 60, 0.1);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.2rem); 
  color: var(--color-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto 2.2rem;
  color: #4a4a4a;
  line-height: 1.6;
}

#home.hero {
  scroll-margin-top: 0;
}

/* CTA BUTTON */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.6rem;
  font-size: 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.3s ease;
}

.btn-outline {
  padding: 0.8rem 1.6rem;
  border-radius: 5px;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* --- TEMPLATES SECTION (BELOW THE FOLD) --- */

.section.templates {
  padding-top: 3rem;
  padding-bottom: 4rem;
  background-color: var(--color-bg);
  position: relative;
  z-index: 3;
}

#home + main #templates,
#templates.section {
  padding-top: 2rem; /* Reduces the massive gap on desktop */
}

.section.pricing {
  padding-top: 2rem; /* Pulls Pricing up closer to the Template grid */
  padding-bottom: 5rem;
}

/* TEMPLATES */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2.2rem;
  margin-top: 3rem;
}

.template-card {
  padding: 2.5rem;
  background: #ffffff;
  border-radius: 8px;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
  text-align: center;
}

/* --- PROJECT IMAGE & SHADOW --- */
.template-card .img-box {
  height: auto;
  background: transparent;
  margin-bottom: 2rem;
  overflow: visible;
}

.project-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 15px 35px rgba(90, 78, 60, 0.15); 
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

/* INTERACTIVE HOVER EFFECT */

.template-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(90, 78, 60, 0.1);
}

.template-card:hover .project-img {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(90, 78, 60, 0.22);
}

/* PRICING */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.pricing-card {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.pricing-card.featured {
  border: 2px solid var(--color-primary);
}

.price {
  font-size: 2rem;
  font-family: var(--font-heading);
  color: var(--color-primary);
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 2rem;
}

.pricing-card li {
  margin-bottom: 0.6rem;
}

/* ABOUT */
.about-text {
  max-width: 700px;
  margin: 2rem auto 0;
  color: #444;
  font-size: 1.1rem;
}

/* CONTACT */
.contact-form {
  max-width: 700px;
  margin: 3rem auto 0;
  display: grid;
  gap: 1.2rem;
}

input, textarea {
  width: 100%;
  padding: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  font-family: var(--font-body);
}

textarea {
  height: 150px;
}

/* INITIAL STATE */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s ease-out;
}

/* ACTIVE STATE */
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- UNIVERSAL FOOTER STYLING --- */

.footer {
  background: #ffffff !important; /* Pure white background as requested */
  padding: 3rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  text-align: center;
}

.footer p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #666;
  margin: 0.5rem 0;
  letter-spacing: 0.02em;
}

.studio-tagline {
  opacity: 0.8;
  font-size: 0.8rem !important;
}

.footer a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.footer a:hover {
  opacity: 0.6;
}

/* Ensure the footer-inner centers everything on mobile */
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #333;
  transition: 0.3s ease;
}

/* hamburger animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile nav */
.nav-links {
  display: flex;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .hero {
    margin-bottom: 0; 
  }
  
  .section.templates {
    padding-top: 3rem; 
  }

  #home + main #templates,
  #templates.section {
    padding-top: 3rem; 
  }
  
  .pricing-grid {
    margin-top: 2rem;
  }
}

@media (max-width: 900px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    gap: 5px;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 8px;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
  }

  .hamburger span {
    width: 25px;
    height: 2px;
    background: var(--color-primary);
    transition: 0.3s ease;
    border-radius: 2px;
  }

  /* Hamburger to 'X' Animation */
  .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 80%;
    height: calc(100vh - 70px);
    flex-direction: column;
    background: var(--color-bg);
    padding: 3rem 0;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 10px 20px rgba(0,0,0,0.02);
  }

  .nav-links.open {
    right: 0;
  }
}

/* Base hidden state */
.reveal, .reveal-left, .reveal-right {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s ease-out;
}

/* Left + Right variants */
.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

/* Active (visible) state */
.reveal.active,
.reveal-left.active,
.reveal-right.active {
  opacity: 1;
  transform: translate(0, 0);
}

#scrollToTopBtn {
  display: none;
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 100;
  background-color: #333;
  color: white;
  border: none;
  outline: none;
  padding: 12px 18px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#scrollToTopBtn:hover {
  background-color: #555;
}

@media (max-width: 768px) {
  .hero {
    height: 85vh;
    background-attachment: scroll;
  }
  
  .hero-inner {
    width: 90%;
    padding: 2rem;
  }
}
