/* ================================================
   MEHFILAALEY — Global Stylesheet
   ================================================ */

/* --- CSS Variables --- */
:root {
  --color-bg:           #3D0F18;
  --color-bg-light:     #521520;
  --color-gold:         #C4942A;
  --color-gold-muted:   #A87820;
  --color-leaf:         #8B9E3A;
  --color-cream:        #F5EDD6;
  --color-cream-muted:  #C8B99A;
  --color-border:       rgba(196, 148, 42, 0.2);

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --container-max: 1200px;
  --nav-height:    76px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
}

/* --- Grain texture overlay --- */
.grain::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.06;
  z-index: 9999;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}

/* --- Section padding --- */
.section {
  padding: clamp(72px, 10vw, 128px) 0;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.1;
}

p {
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-cream-muted);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(36px, 5.5vw, 68px);
  color: var(--color-cream);
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
}

.section-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--color-cream-muted);
  max-width: 680px;
  margin-bottom: 3rem;
  line-height: 1.55;
}

.section-sub.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* --- Section dividers --- */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.divider-mark {
  width: 52px;
  height: 52px;
  object-fit: contain;
  opacity: 0.22;
}

/* --- Buttons --- */
.btn-outline {
  display: inline-block;
  padding: 14px 38px;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: background 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--color-gold);
  color: #1A0508;
  box-shadow: 0 0 0 4px rgba(196, 148, 42, 0.18);
}

.btn-gold {
  display: inline-block;
  padding: 16px 52px;
  background: var(--color-gold);
  color: #1A0508;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.28s ease, box-shadow 0.28s ease, transform 0.2s ease;
}

.btn-gold:hover {
  background: var(--color-gold-muted);
  box-shadow: 0 6px 28px rgba(196, 148, 42, 0.35);
  transform: translateY(-1px);
}

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


/* ================================================
   NAVIGATION
   ================================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(38, 8, 14, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 18px clamp(24px, 5vw, 80px);
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 3px;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  color: var(--color-cream);
  letter-spacing: 0.07em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.09em;
  color: var(--color-cream-muted);
  transition: color 0.22s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-gold);
  transform: scaleX(0);
  transition: transform 0.22s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-cream);
}

.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-links a.nav-cta {
  padding: 8px 22px;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  border-radius: 100px;
  letter-spacing: 0.11em;
  transition: background 0.28s ease, color 0.28s ease;
}

.nav-links a.nav-cta::after {
  display: none;
}

.nav-links a.nav-cta:hover {
  background: var(--color-gold);
  color: #1A0508;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-cream);
  transition: opacity 0.2s, transform 0.2s;
}

/* Mobile overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.nav-overlay-close {
  position: absolute;
  top: 24px;
  right: 30px;
  background: none;
  border: none;
  color: var(--color-cream-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color 0.2s;
}

.nav-overlay-close:hover {
  color: var(--color-cream);
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
}

.nav-overlay-links a {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 52px);
  font-weight: 300;
  color: var(--color-cream);
  letter-spacing: 0.06em;
  transition: color 0.22s;
}

.nav-overlay-links a:hover {
  color: var(--color-gold);
}


/* ================================================
   HERO
   ================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 100px;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: 600px;
  width: 100%;
  padding: 0 24px;
}

.hero-logo {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hero Instagram embed container */
.hero-embed {
  width: 100%;
  max-width: 540px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.hero-embed .instagram-media {
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(52px, 12vw, 96px);
  color: var(--color-cream);
  letter-spacing: 0.12em;
  line-height: 1;
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--color-cream-muted);
  line-height: 1.4;
}

/* Hero stagger fade-up animations */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-1 { opacity: 0; animation: heroFadeUp 0.75s ease forwards; animation-delay: 0.15s; }
.animate-2 { opacity: 0; animation: heroFadeUp 0.75s ease forwards; animation-delay: 0.35s; }
.animate-3 { opacity: 0; animation: heroFadeUp 0.75s ease forwards; animation-delay: 0.55s; }
.animate-4 { opacity: 0; animation: heroFadeUp 0.75s ease forwards; animation-delay: 0.72s; }
.animate-5 { opacity: 0; animation: heroFadeUp 0.75s ease forwards; animation-delay: 0.88s; }

/* Scroll cue — pulsing vertical line */
.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-scroll-cue span {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--color-gold), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.75) translateY(-4px); }
  50%       { opacity: 0.9;  transform: scaleY(1)    translateY(0);    }
}


/* ================================================
   ABOUT
   ================================================ */
#about {
  background: var(--color-bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 64px;
  align-items: center;
}

.about-text .section-title {
  margin-bottom: 1.75rem;
}

.about-text p {
  margin-bottom: 1.4rem;
  font-size: 16px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.watermark-logo {
  width: 240px;
  height: 240px;
  object-fit: contain;
  opacity: 0.12;
}


/* ================================================
   WHAT WE DO
   ================================================ */
#what-we-do {
  background: var(--color-bg);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 3.5rem;
}

.card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 36px 28px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: rgba(196, 148, 42, 0.45);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card-icon {
  margin-bottom: 20px;
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--color-cream);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  line-height: 1.25;
}

.card p {
  font-size: 15px;
  line-height: 1.72;
}

.instruments-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--color-cream-muted);
  text-align: center;
  opacity: 0.75;
}


/* ================================================
   GALLERY
   ================================================ */
#gallery {
  background: var(--color-bg-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 2.5rem;
  align-items: start;
}

.embed-wrapper {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

/* Override Instagram embed styles */
.embed-wrapper .instagram-media {
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  min-width: unset !important;
  width: 100% !important;
}

.embed-placeholder {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.embed-placeholder span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--color-cream-muted);
  opacity: 0.35;
}

.gallery-footer {
  text-align: center;
}

.ig-link {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--color-cream-muted);
  transition: color 0.22s;
}

.ig-link:hover {
  color: var(--color-gold);
}


/* ================================================
   PERFORMANCES
   ================================================ */
#performances {
  background: var(--color-bg);
  text-align: center;
}

#performances .section-title {
  text-align: center;
}

.stats-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 80px;
  margin-bottom: 3rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(52px, 8vw, 84px);
  color: var(--color-gold);
  line-height: 1;
  letter-spacing: 0.02em;
}

.stat-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-cream-muted);
}

.geo-note {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.07em;
  color: var(--color-cream-muted);
  opacity: 0.6;
}


/* ================================================
   TESTIMONIALS
   ================================================ */
#testimonials {
  background: var(--color-bg-light);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 36px 28px;
}

.testimonial-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--color-cream);
  line-height: 1.6;
  margin-bottom: 20px;
}

.testimonial-attr {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-cream-muted);
  opacity: 0.6;
}


/* ================================================
   BOOKING / CONTACT
   ================================================ */
#booking {
  background: var(--color-bg);
}

.booking-container {
  max-width: 780px;
}

.tally-wrapper {
  margin-top: 2rem;
}

.tally-wrapper iframe {
  display: block;
  border: none;
}

.booking-ig {
  margin-top: 2.75rem;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-cream-muted);
  opacity: 0.7;
}

.booking-ig a {
  color: var(--color-gold);
  transition: color 0.22s;
}

.booking-ig a:hover {
  color: var(--color-cream);
}


/* ================================================
   FOOTER
   ================================================ */
#footer {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  padding: 48px 24px 40px;
  text-align: center;
}

.footer-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.footer-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  opacity: 0.18;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 300;
  color: var(--color-cream-muted);
  opacity: 0.55;
  letter-spacing: 0.07em;
}

.footer-copy a {
  transition: color 0.22s, opacity 0.22s;
}

.footer-copy a:hover {
  color: var(--color-gold);
  opacity: 1;
}


/* ================================================
   SCROLL REVEAL
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.62s ease, transform 0.62s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger sibling reveals */
.cards-grid .reveal:nth-child(2),
.stats-row .reveal:nth-child(2),
.testimonials-grid .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.cards-grid .reveal:nth-child(3),
.stats-row .reveal:nth-child(3),
.testimonials-grid .reveal:nth-child(3) {
  transition-delay: 0.2s;
}


/* ================================================
   RESPONSIVE — Tablet (640–1024px)
   ================================================ */
@media (min-width: 641px) and (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-decoration {
    display: none;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row {
    gap: 52px;
  }
}


/* ================================================
   RESPONSIVE — Mobile (< 640px)
   ================================================ */
@media (max-width: 640px) {
  :root {
    --nav-height: 64px;
  }

  /* Nav */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Hero */
  #hero {
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 80px;
  }

  .hero-content {
    gap: 24px;
  }

  .hero-logo {
    width: 88px;
    height: 88px;
  }

  /* Sections */
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-decoration {
    display: none;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  /* Stats — stack vertically on small screens */
  .stats-row {
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }

  .stat-number {
    font-size: 64px;
  }

  /* Footer — prevent awkward mid-word wrapping */
  .footer-copy {
    line-height: 2;
  }

  /* Typography */
  .section-sub {
    font-size: 17px;
  }

  /* Prevent horizontal overflow */
  .section {
    overflow-x: hidden;
  }
}
