:root {
  /* Colors */
  --bg-dark: #08070e;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --primary: #09A7D3;
  --primary-hover: #0283be;
  --accent: rgb(5, 47, 236);
  --security: #fffc56;
  --security-hover: #ffe056;
  --text-security: #fffc56;
  --text-main: #ffffff;
  --text-muted: #a0a0b0;
  --border-light: rgba(255, 255, 255, 0.1);

  /* Gradients */
  --gradient-text: linear-gradient(45deg, var(--primary), var(--accent));
  --gradient-glow: radial-gradient(circle at center, rgba(10, 90, 211, 0.15) 0%, transparent 70%);

  /* Spacing */
  --container-width: 1200px;
  --header-height: 64px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Layout */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(8, 7, 14, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.logo-subtitle {
  font-size: 0.8rem;
  opacity: 0.6;
  font-weight: 500;
  letter-spacing: -0.01em;
}

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

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-height);
  padding-bottom: 4rem;
  overflow: hidden;
  background-image: url('../img/hero.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(1, 62, 112, 0.9) 0%,
      rgba(8, 7, 14, 0.6) 50%,
      var(--bg-dark) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
}



.hero-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}






.hero-text h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-text p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 4px 12px rgba(0, 255, 178, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 255, 178, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
}

.pill-label {
  color: var(--primary);
  opacity: 0.8;
}

.pill-value {
  color: var(--text-main);
}

.pill-sep {
  opacity: 0.3;
}

/* Sections */
section:not(.hero) {
  padding: 8rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 195, 255, 0.3);
  transform: translateY(-5px);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.card p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* PHLEXMOD Feature List */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 195, 255, 0.3);
  transform: translateX(10px);
}

/* Feature Icon Styling */
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(0, 255, 178, 0.1);
  border-radius: 12px;
  color: var(--primary);
  flex-shrink: 0;
}

.feature-content h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-weight: 700;
}

.feature-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-light);
  padding: 4rem 0;
  text-align: center;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

/* Window Frame Component */
.window-frame {
  background: #1e1e1e;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.window-frame:hover {
  transform: translateY(-5px);
}

.window-header {
  background: #2d2d2d;
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-header .dot.red {
  background: #ff5f56;
}

.window-header .dot.yellow {
  background: #ffbd2e;
}

.window-header .dot.green {
  background: #27c93f;
}

/* Culture Grid */
.culture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .culture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .culture-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-text h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .hero-text h1 {
    font-size: 2.5rem;
  }

  .nav-group {
    display: none;
  }
}

/* --- Refactored Utility Classes --- */

/* Text Utilities */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.max-w-800 {
  max-width: 800px;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.mb-20 {
  margin-bottom: 5rem;
}

.text-muted {
  color: var(--text-muted);
}

.text-primary {
  color: var(--primary);
}

.text-accent {
  color: var(--accent);
}

.text-security {
  color: var(--text-security);
}

.text-lg {
  font-size: 1.1rem;
  line-height: 1.6;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.8;
}

.text-2xl {
  font-size: 2.5rem;
  line-height: 1.2;
}

.text-3xl {
  font-size: 3rem;
  line-height: 1.1;
}

/* Backgrounds & Sections */
.section-padding {
  padding: 6rem 0;
}

.bg-subtle {
  background: rgba(255, 255, 255, 0.02);
}

.bg-darker {
  background: #0f1014;
}

.bg-gradient-security {
  background: linear-gradient(to bottom, var(--bg-dark), rgba(10, 90, 211, 0.05));
}

.bg-gradient-cli {
  background: linear-gradient(to top, var(--bg-dark), rgba(10, 90, 211, 0.05));
}

.border-top {
  border-top: 1px solid var(--border-light);
}

/* Grids */
.grid-cols-1 {
  grid-template-columns: 1fr;
}

.grid-cols-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.align-center {
  align-items: center;
}

.align-start {
  align-items: start;
}

.gap-16 {
  gap: 4rem;
}

/* Components */
.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.check-list li {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--text-muted);
}

.code-preview {
  background: #0d0c15;
  border: 1px solid var(--border-light);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  padding: 2rem;
  position: relative;
  border-radius: 12px;
}

.code-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--bg-dark);
  padding: 0 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
}

.cli-code-block {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  margin-bottom: 2rem;
}

/* Syntax Highlighting */
.token-comment {
  color: #6a6a7c;
}

.token-var {
  color: #c792ea;
}

.token-func {
  color: #82aaff;
}

.token-string {
  color: #c3e88d;
}

.token-type {
  color: #f78c6c;
}

.token-white {
  color: #fff;
}

.token-cyan {
  color: #89ddff;
}

/* --- Responsive Overrides --- */

@media (max-width: 900px) {

  /* Collapse grids on smaller screens */
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Adjust padding and spacing */
  .section-padding {
    padding: 3rem 0;
  }

  .gap-16 {
    gap: 2rem;
  }

  .mb-16 {
    margin-bottom: 2rem;
  }

  .mb-20 {
    margin-bottom: 3rem;
  }

  /* Adjust typography */
  .text-3xl {
    font-size: 2rem;
  }

  .text-2xl {
    font-size: 1.75rem;
  }

  .text-xl {
    font-size: 1.1rem;
  }

  /* Comparison cards stack better with some margin */
  .card {
    margin-bottom: 1rem;
  }
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  /* PHLEXMOD Implementation Section */
  #implementacion .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center;
  }

  /* Feature Items Mobile Styling */
  .feature-list {
    max-width: 100%;
    gap: 1rem;
  }

  .feature-item {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  .feature-item:hover {
    transform: translateY(-5px);
  }

  .feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
  }

  /* Adjust PHLEXMOD section spacing */
  #implementacion h2 {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }

  #implementacion p {
    font-size: 1rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Adjust container padding for mobile */
  .container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  /* Even smaller adjustments */
  .feature-item {
    padding: 1rem 0.75rem;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
  }

  #implementacion h2 {
    font-size: 1.75rem !important;
  }

  .container {
    padding: 0 12px;
  }
}