/* --- Projects (Where We Work) Section --- */

.projects-section {
  background-color: #1c1c1c; /* Matches the flowing menu section */
  color: #ffffff;
  padding: 40px 0 120px 0; /* Decreased top padding to reduce gap between sections */
  position: relative;
  z-index: 10;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.projects-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 80px;
}

/* Common Typography */
.projects-white {
  color: #ffffff;
}
.projects-muted {
  color: rgba(255, 255, 255, 0.4);
}

/* --- Top Block --- */
.projects-top {
  max-width: 700px;
  margin-bottom: 90px;
}

.projects-top-title {
  font-family: 'Instrument Sans', 'Instrument Sans Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.035em;
  margin: 0 0 32px 0;
}

.projects-button-outline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 100px;
  color: #ffffff;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
  transition: all 0.35s ease;
  overflow: hidden;
}

.projects-button-outline:hover {
  background-color: #ffffff;
  color: #111111;
  border-color: #ffffff;
}

.projects-button-outline svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s ease;
}

.projects-button-outline:hover svg {
  transform: translateX(4px);
}

/* --- Middle Block --- */
.projects-middle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  margin-bottom: 80px;
}

.projects-middle-left {
  flex: 1;
}

.projects-middle-title {
  font-family: 'Instrument Sans', 'Instrument Sans Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: clamp(3.2rem, 5.5vw, 5.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0;
}

.projects-middle-right {
  flex: 1;
  max-width: 700px;
}

.projects-middle-text {
  font-family: 'Instrument Sans', 'Instrument Sans Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: clamp(1.4rem, 2.1vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin: 0 0 32px 0;
}

.projects-button-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 34px;
  background-color: #ffffff;
  color: #111111;
  border-radius: 100px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  transition: all 0.35s ease;
  overflow: hidden;
}

.projects-button-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.projects-button-pill svg {
  width: 18px;
  height: 18px;
  transition: transform 0.35s ease;
}

.projects-button-pill:hover svg {
  transform: translateX(4px);
}

/* Slide Button Text Physics */
.btn-cta-slide .slide {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  position: relative;
}
.btn-cta-slide .slide > span {
  display: block;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.btn-cta-slide .slide > span > span {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
}
.btn-cta-slide:hover .slide > span {
  transform: translateY(-100%);
}

/* --- Bottom Block (Grid to Flex Accordion) --- */
.projects-grid {
  display: flex;
  gap: 24px;
  width: 100%;
}

.project-card {
  position: relative;
  flex: 1;
  height: 550px;
  overflow: hidden;
  cursor: pointer;
  background-color: #222; /* Fallback */
  transition: flex 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
  flex: 1.4;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
  z-index: 2;
  pointer-events: none;
}

.project-card-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 40px;
  box-sizing: border-box;
}

.project-card-title {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: #ffffff;
  max-width: 80%;
}

.project-card-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 100px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 500;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.project-card:hover .project-card-button {
  background-color: #ffffff;
  color: #111111;
  border-color: #ffffff;
}

.project-card-button svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-button svg {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1024px) {
  .projects-middle {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }
  
  .projects-middle-right {
    max-width: 100%;
  }

  .projects-grid {
    flex-direction: column; /* Changed from grid to flex column */
  }
}

@media (max-width: 768px) {
  .projects-container {
    padding: 0 24px;
  }

  .projects-section {
    padding: 40px 0 80px 0;
  }
  
  .projects-top {
    margin-bottom: 80px;
  }

  .projects-grid {
    flex-direction: column; /* Stack the cards vertically on mobile */
    gap: 20px;
  }
  
  .project-card {
    height: 400px;
  }
}

/* --- Footer Styling --- */
.capital-footer {
  background-color: #090a0c !important; /* Premium ultra-dark */
  color: #ffffff !important;
  position: relative;
  z-index: 1 !important; /* Must be behind the page content */
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin-top: -1px !important; 
  padding: 80px 0 0 0; /* Removed side padding here, moved to container */
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* --- Fix WordPress Wrapper Gaps --- */
footer, 
.wp-block-template-part,
.wp-block-html {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}

.wp-block-html:has(.parallax-master-wrapper) {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

footer:has(.capital-footer),
.wp-block-template-part:has(.capital-footer) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.capital-footer-container {
  width: 100% !important;
  max-width: 1700px !important;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.capital-footer-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 80px;
  flex-wrap: wrap;
  gap: 40px;
  width: 100%;
}

.capital-footer-left {
  flex: 1;
  max-width: 800px; /* Made it wider to accommodate bigger text */
}

.footer-heading {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 40px;
  line-height: 1.2;
}

.newsletter-input-wrapper {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 15px;
  margin-bottom: 60px;
}

.newsletter-input {
  background: transparent;
  border: none;
  color: #fff;
  flex: 1;
  font-size: 1.2rem;
  outline: none;
  padding: 10px 0;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.5); }

.newsletter-submit {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}
.newsletter-submit svg { width: 24px; height: 24px; }

.footer-contact-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-text {
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
}

.capital-footer-right {
  display: flex;
  gap: 120px;
}

.footer-nav, .footer-social {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-nav a, .footer-social a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 500;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-social a {
  font-size: 1.4rem;
  color: #888888; /* Grey font for social links */
}

.footer-nav a:hover, .footer-social a:hover {
  color: #ffffff;
  opacity: 1;
}

.capital-footer-bottom {
  text-align: left;
  margin-top: 40px;
  width: 100%;
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: 8vh; /* Lift the text significantly off the bottom */
}

/* Subtle gradient glow behind the huge text */
.capital-footer-bottom::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 300px;
  background: radial-gradient(ellipse at bottom, rgba(0,255,204,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.huge-footer-text {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(6rem, 18vw, 25rem);
  font-weight: 900;
  line-height: 0.85; /* Relax line height slightly to prevent clipping */
  margin: 0;
  letter-spacing: -0.05em;
  color: #ffffff;
  display: block;
  transform: none; /* Use padding instead of transform for lifting */
  user-select: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .capital-footer {
    padding: 60px 0 0 0 !important;
  }
  .capital-footer-container {
    padding: 0 20px !important;
  }
  .capital-footer-top {
    flex-direction: column;
    gap: 50px;
    margin-bottom: 50px;
  }
  .footer-heading {
    font-size: 1.4rem !important;
    margin-bottom: 20px !important;
  }
  .footer-contact-info {
    flex-direction: column;
    gap: 30px;
  }
  .capital-footer-right {
    gap: 60px;
    flex-direction: row;
    justify-content: flex-start;
    width: 100%;
  }
  .huge-footer-text {
    font-size: 19vw; /* Slightly larger on mobile to perfectly fill width */
    margin-bottom: -10px; /* Pull it slightly down */
  }
}
