/* Landing Page Enhanced Styles */

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.6);
  }
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  20% { transform: translate(-15%, 5%); }
  30% { transform: translate(7%, -25%); }
  40% { transform: translate(-5%, 25%); }
  50% { transform: translate(-15%, 10%); }
  60% { transform: translate(15%, 0%); }
  70% { transform: translate(0%, 15%); }
  80% { transform: translate(3%, 35%); }
  90% { transform: translate(-10%, 10%); }
}

/* Hero Section Enhancements */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 159, 28, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  animation: grain 8s steps(10) infinite;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero h1 {
  animation: fadeInUp 0.8s ease-out;
  font-family: 'Space Grotesk', sans-serif;
  text-shadow: 0 0 40px rgba(0, 217, 255, 0.3);
}

.hero p {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-gradient {
  background: linear-gradient(135deg, #00d9ff 0%, #ff9f1c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Tech Specs Cards */
.tech-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 4rem auto;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.spec-card {
  padding: 2rem;
  background: rgba(26, 31, 46, 0.6);
  border: 1px solid rgba(0, 217, 255, 0.15);
  border-radius: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.spec-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00d9ff 0%, #ff9f1c 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.spec-card:hover::before {
  transform: scaleX(1);
}

.spec-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 217, 255, 0.4);
  box-shadow: 0 20px 60px rgba(0, 217, 255, 0.15);
}

.spec-primary {
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.08) 0%, rgba(255, 159, 28, 0.05) 100%);
  border: 2px solid rgba(0, 217, 255, 0.3);
}

.spec-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.spec-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 217, 255, 0.1);
  border: 2px solid rgba(0, 217, 255, 0.3);
  border-radius: 0.75rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.spec-card:hover .spec-icon {
  background: rgba(0, 217, 255, 0.2);
  border-color: rgba(0, 217, 255, 0.5);
  transform: rotate(-10deg) scale(1.1);
}

.spec-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: #00d9ff;
}

.spec-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ff9f1c;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.spec-meta h3 {
  margin: 0;
  font-size: 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--sl-color-white);
}

.spec-card p {
  color: var(--text-color-text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Integration Matrix */
.integration-matrix {
  margin: 4rem auto;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.integration-matrix h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.matrix-section {
  padding: 2rem;
  background: rgba(26, 31, 46, 0.6);
  border: 1px solid rgba(0, 217, 255, 0.15);
  border-radius: 1.5rem;
  transition: all 0.3s ease;
}

.matrix-section:hover {
  border-color: rgba(0, 217, 255, 0.4);
  transform: translateY(-4px);
}

.matrix-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(0, 217, 255, 0.2);
}

.matrix-header svg {
  width: 1.75rem;
  height: 1.75rem;
  color: #00d9ff;
}

.matrix-header span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--sl-color-white);
  font-family: 'Space Grotesk', sans-serif;
}

.matrix-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.matrix-tag {
  padding: 0.5rem 1rem;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sl-color-white);
  transition: all 0.2s ease;
}

.matrix-tag:hover {
  background: rgba(0, 217, 255, 0.2);
  border-color: rgba(0, 217, 255, 0.4);
  transform: translateY(-2px);
}

/* Code Showcase */
.code-showcase {
  margin: 4rem auto;
  padding: 3rem;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.05) 0%, rgba(255, 159, 28, 0.03) 100%);
  border: 2px solid rgba(0, 217, 255, 0.2);
  border-radius: 2rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.code-showcase::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

.showcase-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 159, 28, 0.1);
  border: 1px solid rgba(255, 159, 28, 0.3);
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ff9f1c;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.header-badge svg {
  width: 1rem;
  height: 1rem;
}

.showcase-header h2 {
  margin: 1rem 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
}

.showcase-header p {
  color: var(--text-color-text);
  font-size: 1.125rem;
}

.code-showcase pre {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 1rem;
  overflow: hidden;
}

.showcase-footer {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 217, 255, 0.2);
  position: relative;
  z-index: 1;
}

.footer-metric {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--sl-color-white);
}

.metric-icon {
  font-size: 1.5rem;
}

/* Terminal CTA */
.terminal-cta {
  margin: 4rem auto;
  background: rgba(10, 15, 28, 0.9);
  border: 2px solid rgba(0, 217, 255, 0.3);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.8s ease-out 1.4s both;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 217, 255, 0.1);
  border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

.terminal-dots {
  display: flex;
  gap: 0.5rem;
}

.terminal-dots span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.terminal-dots span:nth-child(1) {
  background: #ff5f57;
}

.terminal-dots span:nth-child(2) {
  background: #ffbd2e;
}

.terminal-dots span:nth-child(3) {
  background: #28ca42;
}

.terminal-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.875rem;
  color: var(--sl-color-white);
  font-weight: 600;
}

.terminal-body {
  padding: 2rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
}

.terminal-line {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.4s ease-out both;
}

.terminal-line:nth-child(1) { animation-delay: 1.6s; }
.terminal-line:nth-child(2) { animation-delay: 1.8s; }
.terminal-line:nth-child(3) { animation-delay: 2s; }

.terminal-prompt {
  color: #00d9ff;
  font-weight: 700;
}

.terminal-command {
  color: var(--sl-color-white);
}

.terminal-command.typing {
  position: relative;
  overflow: hidden;
  border-right: 2px solid #00d9ff;
  white-space: nowrap;
  animation: typing 2s steps(40, end) 2.2s both, blink 0.75s step-end infinite 2.2s;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: #00d9ff; }
}

.terminal-output {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(0, 217, 255, 0.05);
  border-left: 3px solid #00d9ff;
  border-radius: 0.5rem;
  margin-top: 1rem;
  color: var(--sl-color-white);
  animation: fadeIn 0.4s ease-out 4.5s both;
}

.output-success {
  color: #28ca42;
  font-weight: 700;
}

.terminal-cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(0, 217, 255, 0.2);
  flex-wrap: wrap;
}

.terminal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  font-size: 1rem;
  border: 2px solid transparent;
}

.terminal-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.terminal-btn:hover svg {
  transform: translateX(4px);
}

.terminal-primary {
  background: linear-gradient(135deg, #00d9ff 0%, #0094c6 100%);
  color: #0a0f1c;
  box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
}

.terminal-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 217, 255, 0.5);
}

.terminal-secondary {
  background: rgba(255, 159, 28, 0.1);
  color: #ff9f1c;
  border-color: rgba(255, 159, 28, 0.3);
}

.terminal-secondary:hover {
  background: rgba(255, 159, 28, 0.2);
  border-color: rgba(255, 159, 28, 0.5);
  transform: translateY(-2px);
}

.terminal-outline {
  background: transparent;
  color: var(--sl-color-white);
  border-color: rgba(255, 255, 255, 0.2);
}

.terminal-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Resource Grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 4rem auto;
  animation: fadeInUp 0.8s ease-out 1.6s both;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .terminal-cta-actions {
    flex-direction: column;
  }

  .terminal-btn {
    width: 100%;
    justify-content: center;
  }

  .integration-matrix h2 {
    font-size: 2rem;
  }

  .showcase-header h2 {
    font-size: 1.75rem;
  }
}

/* Problem → Solution Section */
.problem-solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 4rem auto;
  padding: 3rem;
  background: rgba(26, 31, 46, 0.4);
  border: 1px solid rgba(0, 217, 255, 0.15);
  border-radius: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.problem-solution .problem-block {
  padding-right: 2rem;
  border-right: 1px solid rgba(0, 217, 255, 0.15);
}

.problem-solution .solution-block {
  padding-left: 1rem;
}

.problem-solution .block-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
  margin-bottom: 1.25rem;
}

.problem-block .block-label {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  color: #ff6b6b;
}

.solution-block .block-label {
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  color: #00d9ff;
}

.problem-solution p {
  color: var(--text-color-text);
  line-height: 1.75;
  font-size: 1.05rem;
  margin: 0;
}

@media (max-width: 768px) {
  .problem-solution {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }

  .problem-block {
    border-right: none !important;
    padding-right: 0 !important;
    border-bottom: 1px solid rgba(0, 217, 255, 0.15);
    padding-bottom: 2rem;
  }

  .solution-block {
    padding-left: 0 !important;
  }
}

/* =========================================================
   Benchmark comparison bars (homepage section ②)
   ========================================================= */

.bench-section {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--sl-color-gray-6);
  border: 1px solid var(--sl-color-hairline);
  border-radius: 0.75rem;
}

.bench-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.25rem 0 0.375rem;
  line-height: 1.2;
}

.bench-tag {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sl-color-gray-3);
}

.bench-subtitle {
  color: var(--sl-color-gray-3);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  margin-top: 0;
}

.bench-grid {
  display: grid;
  gap: 0.875rem;
}

.bench-row {
  display: grid;
  grid-template-columns: 8rem 1fr 13rem;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 640px) {
  .bench-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
  }
}

.bench-label {
  font-size: 0.8rem;
  color: var(--sl-color-gray-2);
}

.bench-track {
  height: 1.5rem;
  background: var(--sl-color-gray-5);
  border-radius: 0.25rem;
  display: flex;
  overflow: hidden;
}

.bench-bar-rust {
  background: #238636;
  flex-shrink: 0;
  border-radius: 0.25rem 0 0 0.25rem;
  display: flex;
  align-items: center;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}

.bench-bar-java {
  background: #da3633;
  opacity: 0.45;
  flex: 1;
  border-radius: 0 0.25rem 0.25rem 0;
}

.bench-delta {
  font-size: 0.8rem;
  color: var(--sl-color-gray-2);
  text-align: right;
}

.bench-delta strong {
  color: #3fb950;
}

.bench-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--sl-color-gray-3);
}

.bench-legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.bench-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 0.125rem;
  display: inline-block;
  flex-shrink: 0;
}

.bench-dot-rust { background: #238636; }
.bench-dot-java { background: #da3633; opacity: 0.6; }

.bench-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--sl-color-accent);
  text-decoration: underline;
}

.showcase-source-link {
  font-size: 0.8rem;
  color: var(--sl-color-accent);
  text-decoration: underline;
}
