/* ======================================================
   HOMEPAGE STYLES (scoped under body.home)
   ====================================================== */

/* ── Homepage tokens ── */
:root {
  --color-bg: #FAFAF8;
  --color-text: #1A1A1A;
  --color-accent: #0B7297;
  --color-accent-dark: #0F4B61;
  --color-accent-light: #4FD6EB;
  --color-secondary: #2C3E50;
  --color-muted: #6B7280;
  --color-border: #E5E7EB;
  --color-card-bg: #FFFFFF;
  --color-orange-hp: #FF5722;
  --color-orange-dark-hp: #CD491F;
  --spacing-unit: 8px;
  --font-display: 'Playfair Display', serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
}

/* ── Body override ── */
body.home {
  line-height: 1.6;
  overflow-x: hidden;
}

/* Reset base-element margins/styles inside homepage */
body.home h1,
body.home h2,
body.home h3,
body.home h4 { margin-top: 0; margin-bottom: 0; }
body.home p { margin-bottom: 0; }
body.home a:hover { text-decoration: none; }

/* ── Accessibility (homepage overrides) ── */
body.home .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body.home .sr-only:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 16px 24px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--color-accent);
  color: white;
  font-weight: 700;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

/* ── Navigation ── */
body.home .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(250, 250, 248, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

body.home .nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.home .logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}
body.home .logo:hover { color: var(--color-accent); }

body.home .logo-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

body.home .mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
  padding: 8px;
  line-height: 1;
}

body.home .nav-links {
  display: flex;
  gap: calc(var(--spacing-unit) * 5);
  list-style: none;
  margin: 0;
  padding: 0;
}

body.home .nav-links a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
  transition: color 0.3s ease;
}

body.home .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
  display: block;
  transform: none;
}

body.home .nav-links a:hover { color: var(--color-accent); }
body.home .nav-links a:hover::after { width: 100%; }

/* ── Hero Section ── */
body.home .hero {
  margin-top: 80px;
  padding: calc(var(--spacing-unit) * 15) calc(var(--spacing-unit) * 4);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
  background: none;
  border-bottom: none;
}

body.home .hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: calc(var(--spacing-unit) * 8);
  align-items: center;
}

body.home .hero-content {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

body.home .hero-label {
  display: inline-block;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

body.home .hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.125rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: calc(var(--spacing-unit) * 4);
  letter-spacing: -2px;
}

body.home .hero-title .highlight {
  color: var(--color-accent);
  position: relative;
  display: inline-block;
}

body.home .hero-description {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--color-muted);
  margin-bottom: calc(var(--spacing-unit) * 6);
  max-width: 600px;
}

body.home .cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--color-accent-dark);
  color: white;
  padding: 18px 36px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
}

body.home .cta-button:hover {
  background: #15212B;
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

body.home .cta-button::after {
  content: '\2192';
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

body.home .cta-button:hover::after {
  transform: translateX(4px);
}

body.home .hero-visual {
  position: relative;
  animation: fadeIn 1s ease-out 0.4s both;
  grid-column: auto;
  padding: 0;
  align-self: auto;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.home .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(var(--spacing-unit) * 4);
}

body.home .hero-metric {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 1);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  position: relative;
  padding-top: calc(var(--spacing-unit) * 2);
  border-top: none;
}

body.home .hero-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
}

body.home .hero-metric.visible {
  opacity: 1;
  transform: translateY(0);
}

body.home .metric-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
  display: inline;
  letter-spacing: normal;
}

body.home .metric-label {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline;
  margin-top: 0;
}

/* ── Expertise Section ── */
body.home .expertise {
  padding: calc(var(--spacing-unit) * 15) calc(var(--spacing-unit) * 4);
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(11, 114, 151, 0.03) 0%, rgba(44, 62, 80, 0.03) 100%);
}

body.home .section-header {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 10);
}

body.home .section-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  display: block;
}

body.home .section-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

body.home .section-description {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

body.home .expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: calc(var(--spacing-unit) * 4);
}

body.home .expertise-card {
  background: var(--color-card-bg);
  padding: calc(var(--spacing-unit) * 5);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
  position: relative;
  transition: none;
}

body.home .expertise-card:nth-child(1) { animation-delay: 0.1s; }
body.home .expertise-card:nth-child(2) { animation-delay: 0.2s; }
body.home .expertise-card:nth-child(3) { animation-delay: 0.3s; }
body.home .expertise-card:nth-child(4) { animation-delay: 0.4s; }

body.home .expertise-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: calc(var(--spacing-unit) * 3);
  box-shadow: 0 4px 12px rgba(11, 114, 151, 0.3);
  color: white;
}

body.home .expertise-icon i {
  font-size: 2rem;
}

body.home .expertise-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  letter-spacing: -0.5px;
  color: var(--color-text);
  padding-bottom: 0;
  border-bottom: none;
}

body.home .expertise-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.home .expertise-list li {
  padding: calc(var(--spacing-unit) * 1.5) 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.9375rem;
  margin: 0;
}

body.home .expertise-list li:last-child {
  border-bottom: none;
}

/* ── Case Studies Section ── */
body.home .case-studies {
  padding: calc(var(--spacing-unit) * 15) calc(var(--spacing-unit) * 4);
  max-width: 1400px;
  margin: 0 auto;
}

body.home .case-study-card {
  background: var(--color-card-bg);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: calc(var(--spacing-unit) * 6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: all 0.5s ease;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

body.home .case-study-card:nth-child(2) { animation-delay: 0.2s; }
body.home .case-study-card:nth-child(3) { animation-delay: 0.4s; }

body.home .case-study-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border);
}

body.home .case-study-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  min-height: 500px;
}

body.home .case-study-visual {
  background: linear-gradient(135deg, #FF5722 0%, #E64A19 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.home .case-study-card:nth-child(even) .case-study-visual {
  background: linear-gradient(135deg, #2C3E50 0%, #1A252F 100%);
}

body.home .case-study-number {
  position: absolute;
  top: 30px;
  left: 30px;
  font-family: var(--font-display);
  font-size: 11.25rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.1);
  line-height: 1;
}

body.home .case-study-icon {
  font-size: 7.5rem;
  opacity: 0.9;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
  color: white;
}

body.home .case-study-icon i {
  font-size: 7.5rem;
}

body.home .case-study-content {
  padding: calc(var(--spacing-unit) * 7);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.home .case-study-tags {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 3);
  flex-wrap: wrap;
}

body.home .tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  background: rgba(11, 114, 151, 0.1);
  color: var(--color-accent);
  border-radius: 20px;
  font-weight: 700;
  border: none;
}

body.home .case-study-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: calc(var(--spacing-unit) * 3);
  line-height: 1.2;
  letter-spacing: -1px;
  color: var(--color-text);
}

body.home .case-study-description {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-muted);
  margin-bottom: calc(var(--spacing-unit) * 5);
}

body.home .metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--spacing-unit) * 4);
  margin-bottom: calc(var(--spacing-unit) * 5);
}

body.home .metric {
  border-left: 3px solid var(--color-accent);
  padding-left: calc(var(--spacing-unit) * 2);
}

body.home .metric-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 6px;
}

body.home .case-study-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-accent-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: gap 0.3s ease;
  position: relative;
  z-index: 1;
}

body.home .case-study-link:hover {
  gap: 16px;
  color: var(--color-accent);
  text-decoration: none;
}

body.home .case-study-link::after {
  content: '\2192';
  font-size: 1.25rem;
}

/* ── CTA Section (homepage overrides) ── */
body.home .cta-section {
  padding: calc(var(--spacing-unit) * 15) calc(var(--spacing-unit) * 4);
}

body.home .cta-content {
  position: relative;
  z-index: 1;
}

body.home .cta-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 900;
  color: white;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

body.home .cta-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: calc(var(--spacing-unit) * 6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

body.home .cta-button-white {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: white;
  color: var(--color-accent-dark);
  padding: 18px 36px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

body.home .cta-button-white:hover {
  background: #F5F5F5;
  color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  text-decoration: none;
}

/* ── Footer ── */
body.home .footer {
  background: #0d0d0d;
  padding: calc(var(--spacing-unit) * 10) calc(var(--spacing-unit) * 4);
  max-width: none;
  margin: 0 auto;
  margin-top: 0;
  border-top: none;
}

body.home .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: calc(var(--spacing-unit) * 8);
  margin-bottom: calc(var(--spacing-unit) * 6);
}

body.home .footer-brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: #f0f0f0;
}

body.home .footer-tagline {
  color: #a0a0a0;
  font-size: 0.9375rem;
  line-height: 1.7;
}

body.home .footer-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: #f0f0f0;
}

body.home .footer-links {
  list-style: none;
  display: block;
  margin: 0;
  padding: 0;
  gap: 0;
  justify-content: initial;
}

body.home .footer-links li {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

body.home .footer-links a {
  color: #4fd6eb;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.3s ease;
}

body.home .footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

body.home .footer-bottom {
  padding-top: calc(var(--spacing-unit) * 4);
  border-top: 1px solid #2a2a2a;
  text-align: center;
  color: #a0a0a0;
  font-size: 0.875rem;
}

/* ── Scroll to Top ── */
body.home .scroll-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent-dark);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  z-index: 999;
  font-size: 1.5rem;
  line-height: 1;
}
body.home .scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}
body.home .scroll-to-top:hover {
  background: #15212B;
  transform: translateY(-2px);
}
body.home .scroll-to-top svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ── Homepage Responsive ── */
@media (max-width: 968px) {
  body.home .hero-grid {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 6);
  }
  body.home .case-study-grid {
    grid-template-columns: 1fr;
  }
  body.home .case-study-visual {
    min-height: 300px;
  }
  body.home .metrics {
    grid-template-columns: 1fr;
  }
  body.home .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.home .mobile-menu-btn {
    display: block;
  }
  body.home .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(250, 250, 248, 0.98);
    backdrop-filter: blur(10px);
    padding: 16px 32px 24px;
    border-bottom: 1px solid var(--color-border);
    gap: 0;
  }
  body.home .nav-links.mobile-open {
    display: flex;
  }
  body.home .nav-links li {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }
  body.home .nav-links li:last-child {
    border-bottom: none;
  }
  body.home .nav-links a {
    font-size: 1rem;
  }
  body.home .case-study-content {
    padding: calc(var(--spacing-unit) * 4);
  }
}

@media (max-width: 640px) {
  body.home .stats-grid {
    grid-template-columns: 1fr;
  }
  body.home .hero {
    padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 3);
  }
  body.home .metric-number {
    font-size: 2.625rem;
  }
}

/* ── Homepage scroll animations ── */
@media (prefers-reduced-motion: no-preference) {
  body.home .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
  }
  body.home .reveal.active {
    opacity: 1;
    transform: translateY(0);
  }
}
