/* 
====================================================================
  Q SQUARE ANALYTICS - MAIN STYLESHEET
==================================================================== 
*/

/* ==========================================================================
   1. CSS RESET + ROOT VARIABLES + GOOGLE FONT IMPORT
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&display=swap');

:root {
  /* Colors */
  --red: #E30613;
  --deep-red: #B00009;
  --white: #fff;
  --black: #111111;
  --light-red: #FFF4F4;
  --grey: #F5F5F5;
  --text-muted: #666;

  /* Typography */
  --font-main: 'Bricolage Grotesque', system-ui, sans-serif;

  /* Layout */
  --container-max-width: 1180px;
  --container-padding: 0 24px;
  --section-padding-desktop: 104px 0;
  --section-padding-tablet: 72px 0;
  --section-padding-mobile: 56px 0;

  /* Transitions */
  --transition-base: cubic-bezier(0.25, 0, 0, 1) 0.35s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--font-main);
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container Utility */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}


/* ==========================================================================
   21. BUTTONS (GLOBAL)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
}

.btn-primary:hover {
  background: var(--deep-red);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 2px solid var(--red);
  color: var(--red);
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 0.95rem;
  background: transparent;
}

.btn-secondary:hover {
  background: var(--red);
  color: var(--white);
}

.btn-ghost {
  border: 2px solid var(--black);
  color: var(--black);
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 0.95rem;
  background: transparent;
}

.btn-ghost:hover {
  background: var(--black);
  color: var(--white);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1rem;
}


/* ==========================================================================
   22. SECTION LABELS + HEADINGS (GLOBAL)
   ========================================================================== */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
  display: block;
}

.section-heading {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
}

.section-subtext {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 600px;
}

.section-cta {
  margin-top: 48px;
  text-align: center;
}


/* ==========================================================================
   2. NAVIGATION
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--black);
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-box {
  width: 32px;
  height: 32px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  border-radius: 4px;
}

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

.nav-link {
  text-decoration: none;
  color: #444;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width var(--transition-base);
}

.nav-link.active,
.nav-link:hover {
  color: var(--red);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--red);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--deep-red);
}

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

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

.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  background: var(--white);
  border-top: 1px solid #eee;
  padding: 24px;
  display: none;
  flex-direction: column;
  gap: 20px;
  z-index: 999;
}

.mobile-menu.open {
  display: flex;
}

.mobile-nav-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
}

.mobile-nav-link:hover {
  color: var(--red);
}

.mobile-cta {
  background: var(--red);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  display: inline-block;
  margin-top: 8px;
  text-align: center;
}

.mobile-cta:hover {
  background: var(--deep-red);
}


/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

.hero-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-animation {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-anim-square {
  width: 80px;
  height: 80px;
  background: var(--red);
  position: absolute;
  transform-origin: center;
  animation: hero-square-grow 1s cubic-bezier(0.25, 0, 0, 1) forwards;
}

@keyframes hero-square-grow {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.hero-word {
  position: absolute;
  background: var(--white);
  border: 2px solid var(--red);
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  opacity: 0;
  transform: scale(0.5);
  animation: hero-word-in 0.5s forwards;
}

/* Position words radially for the animation */
.hero-word:nth-child(1) { top: 20%; left: 30%; animation-delay: 0.4s; }
.hero-word:nth-child(2) { top: 30%; right: 20%; animation-delay: 0.6s; }
.hero-word:nth-child(3) { bottom: 25%; right: 30%; animation-delay: 0.8s; }
.hero-word:nth-child(4) { bottom: 35%; left: 20%; animation-delay: 1.0s; }

@keyframes hero-word-in {
  0% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

.scroll-indicator {
  display: none !important;
}


/* ==========================================================================
   4. CLIENTS SECTION
   ========================================================================== */
.clients-section {
  padding: 80px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.marquee {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-item {
  padding: 0 60px;
  font-size: 1rem;
  font-weight: 700;
  color: #999;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
  transition: all 0.3s;
  display: flex;
  align-items: center;
}

.marquee-item:hover {
  color: var(--red);
  transform: scale(1.05);
}

.marquee-separator {
  color: #ddd;
  padding: 0 20px;
}


/* ==========================================================================
   5. ABOUT SECTION
   ========================================================================== */
.about-section {
  padding: var(--section-padding-desktop);
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.about-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.brand-square {
  background: var(--red);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  cursor: default;
  transition: transform 0.3s;
}

.brand-square:hover {
  transform: scale(1.04);
}

.brand-square:nth-child(even) {
  background: var(--deep-red);
}


/* ==========================================================================
   6. SERVICES SECTION
   ========================================================================== */
.services-section {
  background: var(--grey);
  padding: var(--section-padding-desktop);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.service-card {
  background: var(--white);
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: var(--red);
  transition: height var(--transition-base);
}

.service-card:hover::before {
  height: 100%;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: var(--red);
}

.service-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.service-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-desc {
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.service-link {
  margin-top: 24px;
  color: var(--red);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


/* ==========================================================================
   7. WHY Q SQUARE (PILLARS)
   ========================================================================== */
.why-section {
  padding: var(--section-padding-desktop);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.pillar-card {
  background: var(--light-red);
  border-radius: 12px;
  padding: 32px 28px;
  transition: all 0.3s;
}

.pillar-card:hover {
  background: var(--red);
  color: var(--white);
}

.pillar-card:hover .pillar-desc {
  color: rgba(255, 255, 255, 0.8);
}

.pillar-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  transition: color 0.3s;
}

.pillar-card:hover .pillar-number {
  color: rgba(255, 255, 255, 0.7);
}

.pillar-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.pillar-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  transition: color 0.3s;
}


/* ==========================================================================
   8. PROCESS SECTION
   ========================================================================== */
.process-section {
  background: var(--grey);
  padding: var(--section-padding-desktop);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  position: relative;
  max-width: var(--container-max-width);
  margin: 40px auto 0;
  padding: var(--container-padding);
}

.timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: var(--red);
  z-index: 0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: 56px;
  height: 56px;
  background: var(--white);
  border: 3px solid var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--red);
  font-size: 0.9rem;
  z-index: 2;
  position: relative;
}

.timeline-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  max-width: 140px;
  margin: 0 auto;
}


/* ==========================================================================
   9. INDUSTRIES SECTION
   ========================================================================== */
.industries-section {
  padding: var(--section-padding-desktop);
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.industry-card {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s;
  background: var(--white);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.industry-card:hover {
  border-color: var(--red);
  background: var(--light-red);
}

.industry-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: block;
}

.industry-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
}


/* ==========================================================================
   10. PORTFOLIO SECTION
   ========================================================================== */
.portfolio-section {
  background: var(--grey);
  padding: var(--section-padding-desktop);
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  justify-content: center;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 50px;
  border: 1px solid #ddd;
  background: var(--white);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.portfolio-card {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.portfolio-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.portfolio-image img,
.portfolio-image .placeholder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.portfolio-card:hover .portfolio-image img,
.portfolio-card:hover .portfolio-image .placeholder-img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(227, 6, 19, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.3s;
  text-align: center;
  padding: 20px;
}

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

.portfolio-overlay h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.portfolio-overlay span {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 16px;
}

.portfolio-overlay .view-link {
  border: 2px solid var(--white);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.portfolio-card-info {
  padding: 16px;
  background: var(--white);
}

.portfolio-card-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.portfolio-card-info span {
  font-size: 0.8rem;
  color: #999;
}

.portfolio-item.hidden {
  display: none;
}


/* ==========================================================================
   11. PHILOSOPHY SECTION
   ========================================================================== */
.philosophy-section {
  padding: var(--section-padding-desktop);
  background: var(--black);
}

.philosophy-heading {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.05;
  text-align: center;
}

.underline-animate {
  display: inline-block;
  position: relative;
}

.underline-animate::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--red);
  transition: width 1s cubic-bezier(0.25, 0, 0, 1);
}

.underline-animate.revealed::after {
  width: 100%;
}

.philosophy-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  text-align: center;
  margin-top: 24px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}


/* ==========================================================================
   12. AI SECTION
   ========================================================================== */
.ai-section {
  padding: var(--section-padding-desktop);
}

.ai-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.ai-flow {
  display: flex;
  gap: 0;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.ai-step {
  background: var(--light-red);
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--red);
  white-space: nowrap;
}

.ai-arrow {
  color: #ccc;
  font-size: 1.2rem;
  padding: 0 8px;
}


/* ==========================================================================
   13. SOCIAL SECTION
   ========================================================================== */
.social-section {
  background: var(--grey);
  padding: var(--section-padding-desktop);
}

.social-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.social-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}

.social-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.social-card-body {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  background: #333; /* Default placeholder background if needed */
}


/* ==========================================================================
   14. PERFORMANCE SECTION
   ========================================================================== */
.performance-section {
  padding: var(--section-padding-desktop);
}

.performance-flow {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.flow-step {
  background: var(--light-red);
  border-radius: 10px;
  padding: 24px 20px;
  text-align: center;
  min-width: 140px;
}

.flow-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.flow-step span {
  font-size: 0.9rem;
  font-weight: 600;
}

.flow-arrow {
  color: var(--red);
  font-size: 1.5rem;
  padding: 0 12px;
}

.performance-services {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.perf-tag {
  background: var(--grey);
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #e0e0e0;
}


/* ==========================================================================
   15. RED STATEMENT
   ========================================================================== */
.red-statement {
  background: var(--red);
  padding: var(--section-padding-desktop);
  text-align: center;
}

.red-statement-heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 40px;
}

.btn-white {
  background: var(--white);
  color: var(--red);
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 700;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-white:hover {
  background: rgba(255, 255, 255, 0.9);
}


/* ==========================================================================
   16. RESULTS SECTION
   ========================================================================== */
.results-section {
  padding: var(--section-padding-desktop);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.result-block {
  text-align: center;
  padding: 32px 24px;
  border: 1px solid #eee;
  border-radius: 12px;
}

.result-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.result-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.result-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.tech-section {
  background: var(--grey);
  padding: 60px 0;
}

.tech-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 32px;
}

.tech-tag {
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tech-tag:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}


/* ==========================================================================
   17. VALUES SECTION
   ========================================================================== */
.values-section {
  padding: var(--section-padding-desktop);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.value-card {
  padding: 36px 28px;
  border-radius: 12px;
  background: var(--light-red);
}

.value-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--red);
}

.value-desc {
  color: #555;
  line-height: 1.6;
  font-size: 0.9rem;
}


/* ==========================================================================
   18. WHY NOW SECTION
   ========================================================================== */
.why-now-section {
  background: var(--black);
  padding: var(--section-padding-desktop);
  text-align: center;
}

.why-now-section .section-heading {
  color: var(--white);
}

.why-now-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 620px;
  margin: 24px auto 40px;
}


/* ==========================================================================
   19. FINAL CTA
   ========================================================================== */
.final-cta {
  padding: var(--section-padding-desktop);
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--white);
}

.expanding-square {
  position: absolute;
  width: 200px;
  height: 200px;
  background: var(--red);
  border-radius: 8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 0;
  transition: transform 2s cubic-bezier(0.25, 0, 0, 1);
}

.expanding-square.revealed {
  transform: translate(-50%, -50%) scale(4);
}

.final-cta-container {
  position: relative;
  z-index: 1;
}

.final-cta-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 32px;
}

/* Added dynamically if expanding square turns background red, ensure text is readable */
.expanding-square.revealed ~ .final-cta-container .final-cta-heading {
  color: var(--white);
}

.final-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}


/* ==========================================================================
   20. FOOTER
   ========================================================================== */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 80px 0 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 60px;
  margin-bottom: 60px;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding: var(--container-padding);
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-cta-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 32px 0;
  margin-bottom: 40px;
  text-align: center;
}

.footer-cta-link {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  transition: color 0.2s;
}

.footer-cta-link:hover {
  color: var(--red);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: var(--container-padding);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
}


/* ==========================================================================
   23. SCROLL ANIMATIONS
   ========================================================================== */
.reveal {
  opacity: 1;
  transform: none;
}

.reveal.animate-ready {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.25, 0, 0, 1);
}

.reveal.animate-ready.revealed {
  opacity: 1;
  transform: none;
}

.reveal-left.animate-ready {
  transform: translateX(-24px);
}

.reveal-right.animate-ready {
  transform: translateX(24px);
}

.reveal-scale.animate-ready {
  transform: scale(0.94);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .reveal.animate-ready,
  .reveal-left.animate-ready,
  .reveal-right.animate-ready,
  .reveal-scale.animate-ready {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ==========================================================================
   24. CUSTOM CURSOR (DESKTOP ONLY)
   ========================================================================== */
.cursor {
  width: 12px;
  height: 12px;
  background: var(--red);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s;
}

.cursor-follower {
  width: 36px;
  height: 36px;
  border: 2px solid var(--red);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.5;
  transition: all 0.15s;
}

@media (hover: none) {
  .cursor,
  .cursor-follower {
    display: none;
  }
}


/* ==========================================================================
   25. LOADER
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.4s;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-squares {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 48px;
  height: 48px;
}

.loader-square {
  background: var(--red);
  border-radius: 2px;
  animation: loader-pulse 0.8s ease-in-out infinite alternate;
}

.loader-square:nth-child(2) { animation-delay: 0.2s; }
.loader-square:nth-child(3) { animation-delay: 0.4s; }
.loader-square:nth-child(4) { animation-delay: 0.6s; }

@keyframes loader-pulse {
  from { transform: scale(1); }
  to { transform: scale(0.5); }
}

.loader-text {
  margin-top: 16px;
  font-weight: 700;
  color: var(--black);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}


/* ==========================================================================
   26. PAGE TRANSITION
   ========================================================================== */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--red);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-transition.active {
  transform: translateX(0);
}


/* ==========================================================================
   27. BACK TO TOP
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 998;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--deep-red);
  transform: translateY(-3px);
}


/* ==========================================================================
   28. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* 1024px */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

/* 940px */
@media (max-width: 940px) {
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hero-animation {
    display: none;
  }
}

/* 768px (Tablet) */
@media (max-width: 768px) {
  :root {
    --section-padding-desktop: var(--section-padding-tablet);
  }

  .about-container {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .pillars-grid,
  .values-grid,
  .results-grid,
  .industries-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .timeline {
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 40px 0 0;
    padding-left: 40px;
  }
  
  .timeline::before {
    top: 0;
    left: 28px;
    width: 3px;
    height: 100%;
    z-index: 0;
  }
  
  .timeline-step {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  
  .timeline-dot {
    margin-bottom: 12px;
  }

  .timeline-desc {
    max-width: 100%;
    margin: 0;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
  }
  
  .ai-container {
    grid-template-columns: 1fr;
  }
}

/* 480px (Mobile) */
@media (max-width: 480px) {
  :root {
    --section-padding-desktop: var(--section-padding-mobile);
  }

  .hero-container {
    grid-template-columns: 1fr;
  }

  .hero-headline {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .services-grid,
  .pillars-grid,
  .values-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
