/* =================================================================
   1. Root Variables & Base Styles
   ================================================================= */
:root {
  --bg: #0b0a1a;
  --text: #e5e7eb;
  --text-secondary: #9ca3af;
  --header-text: #f3f4f6;
  --footer-text: #9ca3af;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --timeline-border: #4c1d95;
  --timeline-dot: #A78BFA;
  --logo-card-bg: #111827;
  --violet: #8b5cf6;
  --pink: #f472b6;
}

.light-mode {
  --bg: #F9FAFB;
  --text: #1F2937;
  --text-secondary: #4B5563;
  --header-text: #111827;
  --footer-text: #4B5563;
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(229, 231, 235, 1);
  --timeline-border: #ddd6fe;
  --timeline-dot: #8B5CF6;
  --logo-card-bg: #FFFFFF;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.4s ease, color 0.4s ease;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.gradient-text {
  background: linear-gradient(90deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =================================================================
   2. Language-Aware Typography & Layout Resilience
   ================================================================= */

h1, h2, h3, .btn, .impact-number {
  text-wrap: balance;
}

header nav a, .case-card h3, .case-study h3, .faq-item h3 button, label, button, .impact-number {
  overflow-wrap: anywhere;
}

html:lang(de), html:lang(fr), html:lang(ro), html:lang(es) {
  hyphens: auto;
}

.impact-number {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  header nav {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }
  header nav a {
    white-space: nowrap;
    margin-right: 0.25rem;
  }
}

/* =================================================================
   3. Accessibility & Interaction Styles
   ================================================================= */

:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 2px;
}

.section-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.glassmorphism {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, background-color 0.3s ease;
}

.glassmorphism:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.active-link {
  color: var(--violet);
  font-weight: 600;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  margin-top: 1rem;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
}

#mouse-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.5) 0%, rgba(244, 114, 182, 0.3) 100%);
  filter: blur(15px);
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease-out, height 0.2s ease-out;
  opacity: 0;
}

body:hover #mouse-follower {
  opacity: 1;
}

a, button {
  cursor: none;
}

/* =================================================================
   4. Component-Specific Styles
   ================================================================= */

.timeline-border { border-color: var(--timeline-border); }
.timeline-dot { background-color: var(--timeline-dot); }

.dot-li { display: flex; gap: 0.6rem; align-items: flex-start; }
.dot-li:before {
  content: "";
  margin-top: 0.5rem;
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--violet), var(--pink));
}

/* --- UPDATED: 3D Carousel Styles --- */
.stage {
  width: 100%;
  height: 400px;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.carousel-container {
  width: 210px;
  height: 140px;
  position: relative;
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%) rotateX(-10deg);
  transform-style: preserve-3d;
}

.ring {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: spin 25s infinite linear;
}

.ring:hover {
  animation-play-state: paused;
}

.img {
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: 150px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Assigning the actual images to each slide */
.ring .img:nth-child(1) { transform: rotateY(0deg) translateZ(350px); background-image: url('../assets/images/photos/Google-Cloud-Summit.jpeg'); }
.ring .img:nth-child(2) { transform: rotateY(60deg) translateZ(350px); background-image: url('../assets/images/photos/Away-Day-Westminster.jpeg'); }
.ring .img:nth-child(3) { transform: rotateY(120deg) translateZ(350px); background-image: url('../assets/images/photos/PwC-Bakesale-Charity.jpeg'); }
.ring .img:nth-child(4) { transform: rotateY(180deg) translateZ(350px); background-image: url('../assets/images/photos/Pagerduty-social.jpeg'); }
.ring .img:nth-child(5) { transform: rotateY(240deg) translateZ(350px); background-image: url('../assets/images/photos/CDG.jpeg'); }
.ring .img:nth-child(6) { transform: rotateY(300deg) translateZ(350px); background-image: url('../assets/images/photos/AgentCon.jpeg'); }

@keyframes spin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}
/* --- End 3D Carousel Styles --- */


footer p {
  color: var(--footer-text);
}

[data-translate-key] {
  color: inherit;
}

.logo-card {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 110px;
  padding: 1rem;
  background-color: var(--logo-card-bg);
  border-radius: 1rem;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.logo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(167, 139, 250, 0.2), 0 5px 15px rgba(244, 114, 182, 0.15);
}

.logo-card img {
  max-height: 50px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: filter 0.3s ease;
}

body:not(.light-mode) .logo-card img {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

body:not(.light-mode) .logo-card:hover img {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* =================================================================
   5. Stylish Header & Icon Overhaul
   ================================================================= */

#header {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: rgba(18, 18, 20, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.light-mode #header {
  background-color: rgba(249, 249, 251, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#language-toggle svg,
#theme-toggle svg {
    transition: color 0.3s ease, transform 0.3s ease;
}

#language-toggle:hover svg,
#theme-toggle:hover svg {
    color: var(--violet);
    transform: scale(1.1);
}

#sun-icon {
    display: none;
}


/* =================================================================
   6. Desktop Navigation SVG Animation
   ================================================================= */
@media (min-width: 992px) {
  #header {
    /* **REMOVED** overflow: hidden; */
  }

  /* This container for the main header content needs to be positioned
     above the SVG lines to allow clicking */
  #header > .container {
    position: relative;
    z-index: 2;
  }
  
  .line-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15px;
    z-index: 1;
    pointer-events: none; /* Make SVG non-interactive */
  }

  .line-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    transform: translateY(100%);
    z-index: 1;
    pointer-events: none; /* Make SVG non-interactive */
  }

  .line-dash {
    stroke: var(--violet);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 180, 1200;
    stroke-dashoffset: -35;
  }

  .lb {
    stroke-width: 2px;
    stroke: var(--violet);
    fill: var(--violet);
  }

  header nav a {
      position: relative; /* Crucial for alignment */
  }

  header nav a.active-anim-link {
    color: var(--violet);
    transform: scale(1.1);
    font-weight: 700;
  }
}

/* =================================================================
   7. Gallery Lightbox Styles
   ================================================================= */
#lightbox {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

#lightbox.visible {
  opacity: 1;
}

.ring .img {
  cursor: pointer;
}

body.cursor-pointer-alt .ring .img {
    cursor: none;
}

#lightbox-img {
  animation: zoomIn 0.4s ease-in-out;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
