/* Base Styles */
:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #3f37c9;
  --accent: #4cc9f0;
  --text: #2b2d42;
  --text-light: #8d99ae;
  --bg: #f8f9fa;
  --bg-dark: #1a1a2e;
  --card-bg: #ffffff;
  --card-bg-dark: #16213e;
  --red: #ef233c;
  --orange: #f77f00;
  --green: #4bb543;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="dark"] {
  --primary: #4cc9f0;
  --primary-dark: #4361ee;
  --secondary: #4895ef;
  --accent: #4361ee;
  --text: #f8f9fa;
  --text-light: #adb5bd;
  --bg: #1a1a2e;
  --bg-dark: #0f0f1a;
  --card-bg: #16213e;
  --card-bg-dark: #0f172a;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
}

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

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: var(--transition);
}

[data-theme="dark"] .header {
  background: rgba(26, 26, 46, 0.9);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle, .menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  padding: 8rem 0 4rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}

/* 3D Label */
.label-3d {
  width: 200px;
  height: 200px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s;
}

.label-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  box-shadow: var(--shadow);
  background: var(--card-bg);
  padding: 1.5rem;
}

.label-front {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

.label-back {
  transform: rotateY(180deg);
}

.label-score {
  font-size: 3rem;
  font-weight: 800;
}

.label-title {
  font-size: 1.25rem;
  margin-top: 0.5rem;
}

.label-pillars {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pillar {
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
}

.pillar.cost { background: rgba(247, 127, 0, 0.2); }
.pillar.software { background: rgba(75, 181, 67, 0.2); }
.pillar.data { background: rgba(75, 181, 67, 0.2); }

/* Sections */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: var(--primary);
  margin: 1rem auto;
  border-radius: 2px;
}
/* Certified Projects */
.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
  color: var(--text-light);
  font-size: 1.1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.project-card:hover {
  transform: translateY(-5px) rotateX(5deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-icon {
  font-size: 2.5rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary);
}

.project-score {
  font-weight: 700;
  font-size: 1.1rem;
}

.project-content h3 {
  margin-bottom: 0.75rem;
}

.project-description {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.project-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pillar-badge {
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pillar-badge.cost { background: rgba(247, 127, 0, 0.1); color: var(--orange); }
.pillar-badge.software { background: rgba(75, 181, 67, 0.1); color: var(--green); }
.pillar-badge.data { background: rgba(75, 181, 67, 0.1); color: var(--green); }

.project-link {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.project-link:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.projects-cta {
  text-align: center;
  margin-top: 3rem;
}

/* 3D Effect for Project Cards */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, transparent 50%);
  z-index: -1;
  transition: var(--transition);
}

.project-card:hover::before {
  opacity: 0.3;
}

/* Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.pillar-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.pillar-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.pillar-levels {
  margin-top: 1.5rem;
}

.level {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.level.red { background: rgba(239, 35, 60, 0.1); color: var(--red); }
.level.orange { background: rgba(247, 127, 0, 0.1); color: var(--orange); }
.level.green { background: rgba(75, 181, 67, 0.1); color: var(--green); }

/* How It Works */
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.how-step {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.how-step:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1rem;
  font-weight: 700;
  font-size: 1.5rem;
}

/* Score Example */
.score-example {
  margin-top: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.score-breakdown {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.score-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.score-item:last-child {
  border-bottom: none;
}

.score-value {
  font-weight: 600;
}

.total-score {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--primary);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Why It Matters */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.why-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.why-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.why-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Get Certified */
.certified-cta {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo p {
  margin-top: 1rem;
  color: var(--text-light);
}

.footer-links h4, .footer-contact h4 {
  margin-bottom: 1rem;
  color: white;
}

.footer-links ul, .footer-contact ul {
  list-style: none;
}

.footer-links li, .footer-contact li {
  margin-bottom: 0.5rem;
}

.footer-links a, .footer-contact a {
  color: var(--text-light);
}

.footer-links a:hover, .footer-contact a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 0.9rem;
}

.footer-legal {
  display: flex;
  gap: 1rem;
}

.footer-legal a {
  color: var(--text-light);
}

/* Floating CTA */
.floating-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
}

.floating-cta .btn {
  box-shadow: var(--shadow-hover);
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 6rem 0 2rem;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    margin-bottom: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-cta {
    justify-content: center;
  }

  .label-3d {
    width: 150px;
    height: 150px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--bg);
    transition: var(--transition);
    padding: 5rem 2rem;
    z-index: 1000;
  }

  .nav-menu.active {
    right: 0;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  z-index: 100;
  transition: top 0.3s;
}

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