/* ---------- GLOBAL ENHANCEMENTS ---------- */

/* ---------- HERO SECTION ENHANCEMENT ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  background: radial-gradient(
      1200px 600px at 70% 30%,
      rgba(212, 175, 55, 0.08),
      transparent 60%
    ),
    var(--gradient-steel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--space-lg);
}

/* Enhanced Grain Layer */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
  opacity: 0.1;
  pointer-events: none;
  animation: grainMove 8s steps(10) infinite;
}

@keyframes grainMove {
  0%,
  100% {
    background-position: 0% 0%;
  }
  20% {
    background-position: -5% 10%;
  }
  40% {
    background-position: 15% -15%;
  }
  60% {
    background-position: 7% 20%;
  }
  80% {
    background-position: -10% 5%;
  }
}

/* Animated Light Sweep */
.hero::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    110deg,
    transparent 40%,
    rgba(212, 175, 55, 0.1) 50%,
    transparent 60%
  );
  filter: blur(60px);
  pointer-events: none;
  animation: lightSweep 8s ease-in-out infinite;
}

@keyframes lightSweep {
  0%,
  100% {
    transform: translateX(-100%) rotate(15deg);
    opacity: 0.3;
  }
  50% {
    transform: translateX(100%) rotate(15deg);
    opacity: 0.6;
  }
}

/* Hero Content */
.hero > * {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

/* Subtitle */
.hero p:first-of-type {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 1rem;
  color: var(--gold-primary);
  margin-bottom: var(--space-md);
  opacity: 0.9;
  font-weight: 500;
}

/* Main Heading */
.hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  background: linear-gradient(
    to right,
    #ffffff 0%,
    #f0f0f0 30%,
    var(--gold-primary) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

/* Tagline */
.hero p:last-of-type {
  max-width: 520px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
  opacity: 0.9;
}

/* ---------- HERO BUTTONS ENHANCEMENT ---------- */
.hero div {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.hero a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
  min-width: 160px;
  gap: 8px;
}

/* Primary Button - EXPLORE DESIGNS */

.hero div > a:first-child {
  background: var(--gradient-gold);
  color: var(--steel-darker);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2),
    0 10px 30px rgba(212, 175, 55, 0.3);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.4s ease;
}

.hero a:first-child:hover {
  transform: translateY(-5px);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.3),
    0 15px 40px rgba(212, 175, 55, 0.4);
}

.hero a:first-child:active {
  transform: translateY(-2px);
}

/* Secondary Button - LEARN MORE */
.hero div > a:last-child {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.5);
  position: relative;
  transition: all 0.3s ease-in-out;
}

.hero a:last-child::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-gold);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  z-index: -1;
  border-radius: var(--radius-full);
}

.hero a:last-child:hover {
  color: var(--steel-darker);
  border-color: transparent;
  transform: translateY(-5px);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.3),
    0 15px 40px rgba(212, 175, 55, 0.4);
}

.hero a:last-child:hover::after {
  opacity: 1;
}

/* ---------- SECTION BASE ENHANCEMENT ---------- */
main section:not(.hero) {
  /* 1. Optimized Mobile Padding */
  padding: clamp(3rem, 8vw, var(--space-xxl)) var(--space-lg);
  background: var(--gradient-steel);
  position: relative;
  overflow: hidden;
}

/* Section Heading Enhancement */
main section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  color: #ffffff;
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-sm);
}

main section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  transition: width 0.4s ease-out;
}

/* 3. Bonus Animation Trigger */
main section:hover h2::after {
  width: 90px;
}

/* 2. Fixed Selector (Removed '>') */
main section p {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

/* ---------- CRAFTED WITH PRECISION SECTION ---------- */

section[aria-labelledby="philosophy-heading"] {
  background: radial-gradient(
      circle at 20% 50%,
      rgba(212, 175, 55, 0.05) 0%,
      transparent 50%
    ),
    var(--gradient-steel);
  text-align: center;
}

section[aria-labelledby="philosophy-heading"] p {
  font-size: 1.25rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  padding: clamp(1rem, 5vw, var(--space-xl));
  max-width: 800px;
  margin: 0 auto;
  font-family: var(--font-secondary);
  font-weight: 400;
  line-height: 1.8;
}

/* Quote Marks */

section[aria-labelledby="philosophy-heading"] p::before,
section[aria-labelledby="philosophy-heading"] p::after {
  /* 1. Shared Styling */
  font-family: var(--font-secondary);
  font-size: 6rem;
  color: var(--gold-primary);
  position: absolute;
  opacity: 0.3;
  line-height: 1;
  pointer-events: none;
}

section[aria-labelledby="philosophy-heading"] p::before {
  content: "\201C";
  top: -1rem;
  left: -1rem;
}

section[aria-labelledby="philosophy-heading"] p::after {
  content: "\201D";
  bottom: -2rem;
  right: 0;
}

/* Craftsmanship Image */
section[aria-labelledby="philosophy-heading"] figure {
  max-width: 400px;
  margin: var(--space-xl) auto;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: var(--space-lg);
  background: linear-gradient(
    145deg,
    rgba(26, 29, 36, 0.6),
    rgba(10, 12, 16, 0.8)
  );
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: var(--shadow-strong);
}

section[aria-labelledby="philosophy-heading"] figcaption {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-style: italic;
  margin-top: var(--space-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* For Safari */
}

/* ---------- WHAT WE DO SECTION - PROFESSIONAL REDESIGN ---------- */

section[aria-labelledby="services-heading"] {
  background: radial-gradient(
      ellipse at 80% 50%,
      rgba(212, 175, 55, 0.03) 0%,
      transparent 50%
    ),
    var(--gradient-steel);
}

section[aria-labelledby="services-heading"] ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
}

section[aria-labelledby="services-heading"] li {
  padding: var(--space-xl);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: var(--radius-lg);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

/* Hover Effect */
section[aria-labelledby="services-heading"] li:hover {
  transform: translateY(-10px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-glow);
}

/* Gold Accent Bar */
section[aria-labelledby="services-heading"] li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--gradient-gold);
  transition: height 0.4s ease;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

section[aria-labelledby="services-heading"] li:hover::before {
  height: 100%;
}

section[aria-labelledby="services-heading"] h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
  color: var(--gold-primary);
  font-weight: 600;
}

section[aria-labelledby="services-heading"] p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* ---------- FEATURED PROJECTS ENHANCEMENT ---------- */
section[aria-labelledby="projects-heading"] {
  background: radial-gradient(
      circle at 30% 70%,
      rgba(212, 175, 55, 0.04) 0%,
      transparent 50%
    ),
    var(--gradient-steel);
}

section[aria-labelledby="projects-heading"] ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

section[aria-labelledby="projects-heading"] li {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  aspect-ratio: 4 / 3;
}

section[aria-labelledby="projects-heading"] li:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-strong);
}

section[aria-labelledby="projects-heading"] figure {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: linear-gradient(145deg, #1a1d24, #0d0f14);
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
}

/* Project Image Overlay */
section[aria-labelledby="projects-heading"] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: transform 0.6s ease;
}

section[aria-labelledby="projects-heading"] li:hover img {
  transform: scale(1.1);
}
section[aria-labelledby="projects-heading"] figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 12, 16, 0.9) 0%,
    transparent 50%,
    rgba(212, 175, 55, 0.1) 100%
  );
  transition: opacity 0.3s ease;
  opacity: 0.7;
}

section[aria-labelledby="projects-heading"] li:hover figure::before {
  opacity: 0.9;
}

section[aria-labelledby="projects-heading"] figcaption {
  position: relative;
  z-index: 2;
  padding: var(--space-lg);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  transform: translateY(101%);
  transition: transform 0.4s ease;
  will-change: transform;
}

section[aria-labelledby="projects-heading"] li:hover figcaption {
  transform: translateY(0);
}

/* ---------- PROCESS SECTION ENHANCEMENT ---------- */
section[aria-labelledby="process-heading"] {
  background: radial-gradient(
      ellipse at 50% 20%,
      rgba(212, 175, 55, 0.05) 0%,
      transparent 50%
    ),
    var(--gradient-steel);
}

section[aria-labelledby="process-heading"] ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  counter-reset: process-counter;
  list-style: none;
  position: relative;
  padding-top: var(--space-lg);
}

section[aria-labelledby="process-heading"] li {
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 175, 55, 0.1);
  position: relative;
  transition: var(--transition-smooth);
}

section[aria-labelledby="process-heading"] li:hover {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.05);
  transform: translateY(-5px);
}

/* Process Numbers */
section[aria-labelledby="process-heading"] li::before {
  counter-increment: process-counter;
  content: counter(process-counter);
  position: absolute;
  top: -20px;
  left: var(--space-lg);
  width: 40px;
  height: 40px;
  background: var(--gradient-gold);
  color: var(--steel-darker);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  font-family: var(--font-mono);
  z-index: 2;
  border: 2px solid var(--steel-darker);
  box-shadow: 0 0 0 2px var(--gold-primary), var(--shadow-glow);
}

section[aria-labelledby="process-heading"] li::after {
  content: "";
  position: absolute;
  background: var(--gold-primary);
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
}

@media (min-width: 769px) {
  section[aria-labelledby="process-heading"] li::after {
    top: 0;
    right: 0;
    transform: translateX(100%);
    width: var(--space-xl);
    height: 2px;
    background: linear-gradient(90deg, var(--gold-primary) 50%, transparent);
  }

  section[aria-labelledby="process-heading"] li:last-child::after {
    display: none;
  }
}

section[aria-labelledby="process-heading"] h3 {
  color: var(--gold-primary);
  margin-bottom: var(--space-xs);
  font-size: 1.1rem;
}

section[aria-labelledby="process-heading"] p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ============================================ */

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-column {
    padding: var(--space-sm);
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }

  .whatsapp-float {
    width: 44px;
    height: 44px;
    bottom: 15px;
    right: 15px;
  }

  .whatsapp-float svg {
    width: 22px;
    height: 22px;
  }

  .whatsapp-text {
    display: none;
  }
}

/* ---------- RESPONSIVE DESIGN ---------- */

@media (max-width: 768px) {
  :root {
    --space-xl: 2rem;
    --space-xxl: 3rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
  }

  .hero div {
    flex-direction: column;
    align-items: center;
  }

  .hero a {
    width: 100%;
    max-width: 300px;
  }

  section[aria-labelledby="services-heading"] ul,
  section[aria-labelledby="projects-heading"] ul,
  section[aria-labelledby="process-heading"] ol {
    grid-template-columns: 1fr;
  }

  section[aria-labelledby="process-heading"] li::after {
    left: calc(var(--space-lg) + 20px);
    top: 20px;
    width: 2px;
    height: calc(100% + var(--space-xl));

    background: linear-gradient(
      180deg,
      var(--gold-primary),
      rgba(212, 175, 55, 0.2)
    );
  }

  main section:not(.hero) {
    padding: var(--space-xl) var(--space-md);
  }
}

/* ---------- UTILITY CLASSES ---------- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: var(--space-xs);
}
.mt-2 {
  margin-top: var(--space-sm);
}
.mt-3 {
  margin-top: var(--space-md);
}
.mt-4 {
  margin-top: var(--space-lg);
}
.mt-5 {
  margin-top: var(--space-xl);
}

/* ---------- SCROLL ANIMATIONS ---------- */
.fade-in {
  opacity: 1;
  transform: none;
}

/* Only animate when JS is present */
.js .fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Reveal state */
.js .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* @media (hover: none) targets touch devices */
@media (hover: none) {
  section[aria-labelledby="projects-heading"] figcaption {
    transform: translateY(0); /* Always show text on mobile */
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.9),
      transparent
    ); /* Make text background slightly darker for readability */
  }
}
