/* ============================================================
   SAGVAN DESIGNS — Main Stylesheet
   Luxury Interior Design · sagvandesigns.com
   ============================================================ */

/* 1. CSS VARIABLES
   ============================================================ */
:root {
  /* Brand colours */
  --cream:         #FAF3EE;
  --cream-tinted:  #F2E8DF;
  --brown-dark:    #6B3829;
  --brown-mid:     #9A5B44;
  --brown-light:   #C89B8A;
  --brown-xlight:  #E8D0C0;
  --text-dark:     #2C1A12;
  --text-mid:      #5C3D2E;
  --text-light:    #9A7060;
  --white:         #FFFFFF;

  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Raleway', system-ui, sans-serif;

  /* Spacing */
  --section-pad:  6rem;
  --container:    1200px;
  --gap:          2rem;

  /* Misc */
  --radius:       3px;
  --transition:   0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm:    0 2px 12px rgba(107, 56, 41, 0.08);
  --shadow-md:    0 6px 30px rgba(107, 56, 41, 0.14);
  --shadow-lg:    0 16px 56px rgba(107, 56, 41, 0.18);
}

/* 2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* 3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.3rem;
  font-weight: 500;
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
}

p {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.8;
}

/* Eyebrow label */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brown-mid);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--brown-mid);
  vertical-align: middle;
  margin-right: 10px;
}

/* 4. LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-pad {
  padding: var(--section-pad) 0;
}

.bg-tinted {
  background-color: var(--cream-tinted);
}

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 4rem;
}

.section-header .eyebrow {
  justify-content: center;
  display: flex;
  align-items: center;
}

.section-header .eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--brown-mid);
  margin-right: 10px;
}

.section-sub {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--text-light);
}

/* 5. BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.9rem 2.4rem;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
}

.btn-dark {
  background: var(--brown-dark);
  color: var(--cream);
  border-color: var(--brown-dark);
}
.btn-dark:hover {
  background: var(--brown-mid);
  border-color: var(--brown-mid);
}

.btn-light {
  background: var(--cream);
  color: var(--brown-dark);
  border-color: var(--cream);
}
.btn-light:hover {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream);
}

.btn-outline {
  background: transparent;
  color: var(--brown-dark);
  border-color: var(--brown-dark);
}
.btn-outline:hover {
  background: var(--brown-dark);
  color: var(--cream);
}

/* 6. REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children inside a grid */
.services-grid .reveal:nth-child(2),
.portfolio-grid .reveal:nth-child(2),
.testimonials-grid .reveal:nth-child(2) {
  transition-delay: 0.1s;
}
.services-grid .reveal:nth-child(3),
.portfolio-grid .reveal:nth-child(3),
.testimonials-grid .reveal:nth-child(3) {
  transition-delay: 0.2s;
}
.services-grid .reveal:nth-child(4) { transition-delay: 0.1s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.2s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.3s; }
.portfolio-grid .reveal:nth-child(4) { transition-delay: 0.1s; }
.portfolio-grid .reveal:nth-child(5) { transition-delay: 0.2s; }
.portfolio-grid .reveal:nth-child(6) { transition-delay: 0.3s; }

/* 7. NAVIGATION
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0;
}

#navbar.scrolled {
  background: var(--cream);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo .logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  transition: filter var(--transition);
}

/* On dark hero: shift brown logo to cream/white */
#navbar:not(.scrolled) .nav-logo .logo-img {
  filter: brightness(0) saturate(0) invert(1);
  opacity: 0.88;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dark);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--brown-dark);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

.nav-links a:hover {
  color: var(--brown-dark);
}

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

/* On transparent navbar (hero), links should be cream */
#navbar:not(.scrolled) .nav-links a {
  color: rgba(250, 243, 238, 0.85);
}
#navbar:not(.scrolled) .nav-links a:hover {
  color: var(--cream);
}
#navbar:not(.scrolled) .nav-links a::after {
  background: var(--cream);
}

.nav-cta {
  padding: 0.55rem 1.4rem;
  border: 1.5px solid currentColor;
  border-radius: var(--radius);
}
.nav-cta:hover {
  background: var(--brown-dark) !important;
  color: var(--cream) !important;
  border-color: var(--brown-dark) !important;
}
.nav-cta::after {
  display: none;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-dark);
  transition: var(--transition);
  transform-origin: center;
}

#navbar:not(.scrolled) .hamburger span {
  background: var(--cream);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* 8. HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 65% 40%, rgba(154, 91, 68, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(107, 56, 41, 0.45) 0%, transparent 50%),
    linear-gradient(155deg, #1C0D08 0%, #2E180F 35%, #3D2015 60%, #1C0D08 100%);
  z-index: 0;
}

/* Subtle texture overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(250, 243, 238, 0.015) 2px,
      rgba(250, 243, 238, 0.015) 4px
    );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 2rem;
  max-width: 820px;
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: var(--cream);
  font-style: italic;
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(250, 243, 238, 0.65);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.8;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: rgba(250, 243, 238, 0.45);
  transition: color var(--transition);
  animation: heroScrollBounce 2.5s ease-in-out infinite;
}

.hero-scroll svg {
  width: 22px;
  height: 22px;
}

.hero-scroll:hover {
  color: var(--cream);
}

@keyframes heroScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* 9. ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 25% 15%, rgba(250, 243, 238, 0.55) 0%, transparent 45%),
    linear-gradient(155deg, #E0CAB5 0%, #C09070 35%, #7A4A35 68%, #3E1E10 100%);
}

.about-accent-box {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  width: 110px;
  height: 110px;
  background: var(--brown-dark);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-accent-box span {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--cream);
  letter-spacing: 0.05em;
}

.about-text {
  padding-left: 1rem;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1.2rem;
}

.about-text .btn {
  margin-top: 1rem;
}

/* 10. SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  border: 1px solid var(--brown-xlight);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brown-light);
}

.service-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1.5rem;
  color: var(--brown-mid);
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.service-card p {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* 11. PORTFOLIO
   ============================================================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}

.portfolio-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .portfolio-img {
  transform: scale(1.06);
}

/* Portfolio image gradient placeholders */
.p-img-1 {
  background:
    linear-gradient(160deg, #D4A889 0%, #A0624A 45%, #6B3829 100%);
}
.p-img-2 {
  background:
    linear-gradient(160deg, #8DA882 0%, #5C7A50 45%, #384F30 100%);
}
.p-img-3 {
  background:
    linear-gradient(160deg, #4A5568 0%, #2D3A4A 45%, #1A2330 100%);
}
.p-img-4 {
  background:
    linear-gradient(160deg, #D4C5A8 0%, #B09260 45%, #7A6040 100%);
}
.p-img-5 {
  background:
    linear-gradient(160deg, #C4A8A4 0%, #9A6B68 45%, #6B3A38 100%);
}
.p-img-6 {
  background:
    linear-gradient(160deg, #D4B880 0%, #C49848 45%, #8A6520 100%);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 13, 8, 0.85) 0%, rgba(28, 13, 8, 0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--cream);
  display: block;
  line-height: 1.2;
}

.portfolio-tag {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brown-light);
  display: block;
  margin-top: 0.4rem;
}

/* 12. TESTIMONIALS
   ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem;
  border: 1px solid var(--brown-xlight);
  position: relative;
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
}

.quote-mark {
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 1;
  color: var(--brown-xlight);
  position: absolute;
  top: 1rem;
  left: 1.75rem;
  pointer-events: none;
  user-select: none;
}

.testimonial-card p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-top: 1.5rem;
}

.testimonial-card footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--brown-xlight);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.testimonial-card footer strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.testimonial-card footer span {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

/* 13. CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.contact-left h2 {
  margin-bottom: 1.25rem;
}

.contact-left p {
  max-width: 380px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--brown-xlight);
  background: var(--white);
  transition: var(--transition);
  text-decoration: none;
}

.contact-item:hover {
  border-color: var(--brown-mid);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.contact-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--brown-mid);
}

.contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contact-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
}

.contact-value {
  font-size: 0.92rem;
  color: var(--text-dark);
  font-weight: 400;
}

/* 14. FOOTER
   ============================================================ */
.footer {
  background: var(--text-dark);
  color: var(--cream);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(250, 243, 238, 0.1);
}

.footer-brand .footer-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1.25rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  color: rgba(250, 243, 238, 0.55);
  line-height: 1.6;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(250, 243, 238, 0.6);
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--cream);
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(250, 243, 238, 0.6);
  transition: color var(--transition);
}

.footer-social a:hover {
  color: var(--cream);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.footer-bottom {
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: rgba(250, 243, 238, 0.3);
  letter-spacing: 0.08em;
}

/* 15. RESPONSIVE — TABLET (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --section-pad: 4.5rem;
  }

  .about-grid {
    gap: 3rem;
  }

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

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

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

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* 16. RESPONSIVE — MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --section-pad: 3.5rem;
  }

  /* Nav mobile */
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 80vw);
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(44, 26, 18, 0.15);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    color: var(--text-dark) !important;
    font-size: 1rem;
    letter-spacing: 0.12em;
  }

  .nav-cta {
    border-color: var(--brown-dark) !important;
    color: var(--brown-dark) !important;
    padding: 0.7rem 1.6rem;
    width: 100%;
    text-align: center;
    display: block;
  }

  /* Hero */
  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-text {
    padding-left: 0;
  }

  .about-accent-box {
    right: 1rem;
    bottom: -1rem;
    width: 88px;
    height: 88px;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-overlay {
    opacity: 1;
  }

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

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-left p {
    max-width: 100%;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: auto;
  }
}

/* 17. FINE DETAILS
   ============================================================ */
/* Smooth focus outlines for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brown-mid);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
