/* Enterprise Skills Custom Styles */

/* Brand colours from Brand Kit */
:root {
  --es-navy: #13162C;
  --es-magenta: #E71E85;
  --es-teal: #00B8A9;
  --es-teal-dark: #008577; /* WCAG AA compliant on white (4.5:1+ contrast) */
  --es-teal-light: #00D4C8; /* For dark backgrounds */
  --es-white: #FFFFFF;
  --es-grey-light: #F4F4F4;

  /* Competency colours */
  --comp-commercial: #3B82F6;
  --comp-decision: #10B981;
  --comp-problem: #F59E0B;
  --comp-financial: #8B5CF6;
  --comp-adaptability: #EC4899;
  --comp-data: #06B6D4;
  --comp-team: #14B8A6;
  --comp-leadership: #F97316;
}

/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  color: var(--es-navy);
  line-height: 1.6;
}

/* Header specific styles - full width, no rounding */
header {
  background: var(--es-white);
}

/* Wavy border using SVG */
.header-wave {
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 10px;
  overflow: visible;
}

.header-wave svg {
  width: 100%;
  height: 10px;
}

/* Navigation dropdown */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown chevron rotation */
.nav-item:hover .chevron-icon {
  transform: rotate(180deg);
}

.chevron-icon {
  transition: transform 0.2s ease-in-out;
}

/* Nav link hover states */
.nav-link {
  color: var(--es-navy);
  transition: color 0.15s ease-in-out;
}

.nav-link:hover,
.nav-item:hover > .nav-link {
  color: var(--es-teal);
}

.dropdown-link {
  color: var(--es-navy);
  transition: color 0.15s ease-in-out;
}

.dropdown-link:hover {
  color: var(--es-magenta);
}

/* CTA Buttons */
.btn-primary {
  display: inline-block;
  background-color: var(--es-teal);
  color: var(--es-white);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #009e91;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--es-magenta);
  border: 2px solid var(--es-magenta);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--es-magenta);
  color: var(--es-white);
  transform: translateY(-1px);
}

.btn-teal {
  display: inline-block;
  background-color: var(--es-teal);
  color: var(--es-white);
  border: 2px solid var(--es-teal);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-teal:hover {
  background-color: var(--es-white);
  color: var(--es-teal);
  border-color: var(--es-teal);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-block;
  background-color: transparent;
  color: var(--es-white);
  border: 2px solid var(--es-white);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-ghost:hover {
  background-color: var(--es-white);
  color: var(--es-navy);
  transform: translateY(-1px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Mobile menu */
.mobile-menu {
  display: none;
}

.mobile-menu.active {
  display: block;
}

/* Mobile hamburger */
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--es-navy);
  transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero-section {
  background-color: var(--es-navy);
  position: relative;
  overflow: hidden;
}

/* Video overlay */
.video-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.video-overlay {
  position: relative;
  cursor: pointer;
}

.video-overlay img {
  width: 100%;
  height: auto;
  display: block;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--es-magenta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: #c91872;
}

.play-button svg {
  width: 32px;
  height: 32px;
  fill: white;
  margin-left: 4px;
}

/* Audience navigation cards */
.audience-card {
  background: var(--es-white);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
  border: 2px solid transparent;
}

.audience-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--es-teal);
}

.audience-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: var(--es-grey-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audience-card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--es-teal);
}

/* Product cards */
.product-card {
  background: var(--es-white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.category-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.category-flagship {
  background: linear-gradient(135deg, var(--es-magenta), #ff6b9d);
  color: white;
}

.category-platform {
  background: linear-gradient(135deg, var(--es-teal), #4fd1c5);
  color: white;
}

/* Dashboard showcase */
.dashboard-panel {
  background: var(--es-white);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide from left */
.animate-slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.animate-slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* SVG line chart - path drawing animation */
.competency-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  fill: none;
  stroke-width: 2;
}

.competency-line.animate {
  animation: drawLine 1.5s ease-out forwards;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

/* Stagger delays for 8 lines */
.competency-line:nth-child(1) { animation-delay: 0s; }
.competency-line:nth-child(2) { animation-delay: 0.1s; }
.competency-line:nth-child(3) { animation-delay: 0.2s; }
.competency-line:nth-child(4) { animation-delay: 0.3s; }
.competency-line:nth-child(5) { animation-delay: 0.4s; }
.competency-line:nth-child(6) { animation-delay: 0.5s; }
.competency-line:nth-child(7) { animation-delay: 0.6s; }
.competency-line:nth-child(8) { animation-delay: 0.7s; }

/* Progress bars */
.progress-bar-container {
  background: var(--es-grey-light);
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 9999px;
  transition: width 0.8s ease-out;
}

.progress-bar.animate {
  width: var(--target-width);
}

/* Horizontal bar chart bars */
.bar-chart-bar {
  height: 24px;
  width: 0;
  border-radius: 4px;
  transition: width 1s ease-out;
}

.bar-chart-bar.animate {
  width: var(--target-width);
}

/* Stagger for bar chart */
.bar-chart-bar:nth-child(1) { transition-delay: 0s; }
.bar-chart-bar:nth-child(2) { transition-delay: 0.05s; }
.bar-chart-bar:nth-child(3) { transition-delay: 0.1s; }
.bar-chart-bar:nth-child(4) { transition-delay: 0.15s; }
.bar-chart-bar:nth-child(5) { transition-delay: 0.2s; }
.bar-chart-bar:nth-child(6) { transition-delay: 0.25s; }
.bar-chart-bar:nth-child(7) { transition-delay: 0.3s; }
.bar-chart-bar:nth-child(8) { transition-delay: 0.35s; }

/* Growth indicator pop-in */
.growth-indicator {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.growth-indicator.animate {
  opacity: 1;
  transform: scale(1);
}

/* Logo carousel */
.logo-carousel {
  overflow: hidden;
  position: relative;
}

.logo-carousel::before,
.logo-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 10;
  pointer-events: none;
}

.logo-carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--es-grey-light), transparent);
}

.logo-carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--es-grey-light), transparent);
}

.logo-track {
  display: flex;
  animation: scroll 30s linear infinite;
}

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

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logo-item {
  flex-shrink: 0;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-item img {
  max-height: 60px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.logo-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Logo carousel animation */
.logo-carousel-container {
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-carousel {
  animation: scroll 40s linear infinite;
  width: max-content;
}

.logo-carousel:hover {
  animation-play-state: paused;
}

/* Testimonials carousel */
.testimonials-carousel-container {
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.testimonials-carousel {
  animation: scrollTestimonials 60s linear infinite;
  width: max-content;
}

.testimonials-carousel:hover {
  animation-play-state: paused;
}

@keyframes scrollTestimonials {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Statistics */
.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--es-teal);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--es-navy);
  opacity: 0.8;
  margin-top: 0.5rem;
}

/* Tabs */
.tab-button {
  padding: 1rem 1.5rem;
  font-weight: 500;
  color: var(--es-navy);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: var(--es-teal);
}

.tab-button.active {
  color: var(--es-teal);
  border-bottom-color: var(--es-teal);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Testimonials carousel */
.testimonial-card {
  background: var(--es-white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.testimonial-quote {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--es-navy);
  font-style: italic;
}

.testimonial-author {
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--es-navy);
}

.testimonial-role {
  font-size: 0.875rem;
  color: #64748b;
}

/* Team cards */
.team-card {
  text-align: center;
}

.team-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 4px solid var(--es-teal);
}

/* Footer */
footer {
  background: var(--es-navy);
  color: var(--es-white);
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--es-teal);
}

/* Newsletter input */
.newsletter-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 0.75rem 1rem;
  color: white;
  width: 100%;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--es-teal);
}

/* Competency pills */
.competency-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.competency-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-slide-left,
  .animate-slide-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .competency-line {
    stroke-dashoffset: 0;
    animation: none;
  }

  .progress-bar {
    width: var(--target-width);
    transition: none;
  }

  .bar-chart-bar {
    width: var(--target-width);
    transition: none;
  }

  .logo-track {
    animation: none;
  }

  .growth-indicator {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Utility for screen readers */
.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;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--es-navy);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 22, 44, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-container {
  background: var(--es-white);
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(1);
  transition: transform 0.3s ease;
}

.modal-container-large {
  max-width: 800px;
}

.modal-container-calendly {
  background: var(--es-navy);
  max-width: 900px;
  height: 700px;
  padding: 0;
  overflow: hidden;
}

.modal-close-light {
  color: var(--es-white);
  z-index: 10;
}

.modal-overlay.hidden .modal-container {
  transform: scale(0.95);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--es-navy);
  opacity: 0.6;
  transition: opacity 0.2s ease;
  padding: 0.5rem;
}

.modal-close:hover {
  opacity: 1;
}

.modal-tool-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.modal-tool-card:hover {
  border-color: var(--es-teal);
  box-shadow: 0 4px 12px rgba(0, 184, 169, 0.15);
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Router pills for solutions page */
.router-pill {
  display: inline-block;
  background: var(--es-white);
  color: var(--es-navy);
  border: 2px solid var(--es-navy);
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
}

.router-pill:hover {
  background: var(--es-navy);
  color: var(--es-white);
  transform: translateY(-2px);
}

/* FAQ accordion */
.faq-item {
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--es-teal);
}

.faq-summary {
  list-style: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

/* Scroll margin for anchor links */
.scroll-mt-20 {
  scroll-margin-top: 5rem;
}

/* Exam board logos */
.exam-board-logo {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.exam-board-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Accessibility: High contrast text utilities */
.text-es-teal-accessible {
  color: var(--es-teal-dark); /* 4.5:1+ contrast on white */
}

/* Links on white backgrounds should use darker teal for readability */
.text-es-teal {
  color: var(--es-teal-dark);
}

/* Teal text on dark backgrounds can use the lighter variant */
.dark .text-es-teal,
.bg-es-navy .text-es-teal,
.hero-section .text-es-teal {
  color: var(--es-teal-light);
}
