/* ============================================================
   OLA ELECTRIC DESIGN SYSTEM — SHOWCASE PAGE STYLES
   Styles specific to the design system documentation page
   ============================================================ */

/* ─── Section Headers ─── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-4);
}

/* ─── Nav Logo Icon ─── */
.nav-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-primary-500);
  border-radius: var(--radius-md);
  font-size: 16px;
}

/* ─── Pulse Dot (hero overline) ─── */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary-400);
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ─── Color Swatches ─── */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: var(--space-4);
}

.color-grid--semantic {
  grid-template-columns: repeat(4, 1fr);
  max-width: 600px;
}

.color-swatch {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-default);
}

.color-swatch:hover {
  transform: translateY(-2px);
}

.color-swatch__block {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--swatch);
  border: 1px solid var(--border-subtle);
  transition: box-shadow var(--duration-normal) var(--ease-default);
}

.color-swatch:hover .color-swatch__block {
  box-shadow: 0 0 20px var(--swatch);
}

.color-swatch--hero .color-swatch__block {
  border: 2px solid var(--color-primary-300);
  animation: glow-pulse 3s ease-in-out infinite;
}

.color-swatch__name {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.color-swatch__hex {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Copy Feedback */
.color-swatch.copied .color-swatch__hex {
  color: var(--color-primary-400);
}
.color-swatch.copied .color-swatch__hex::after {
  content: ' ✓';
}

/* ─── Typography Showcase ─── */
.type-showcase {
  max-width: 900px;
  margin-inline: auto;
}

.type-row {
  padding: var(--space-6) 0;
}

.type-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

/* Gradient Box */
.gradient-text-box {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-12) var(--space-8);
}

.gradient-text-box code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--surface-glass);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--color-primary-400);
}

/* ─── Showcase Blocks ─── */
.showcase-block {
  padding: var(--space-8);
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
}

/* ─── Demo Blocks ─── */
.demo-block {
  position: relative;
}

.demo-label {
  display: inline-flex;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-card);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-4);
}

.demo-frame {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  padding: var(--space-10);
}

/* Demo: Product Hero */
.demo-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
  position: relative;
  min-height: 400px;
}

.demo-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  opacity: 0.3;
}

.demo-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-hero__content {
  position: relative;
  z-index: 1;
}

.demo-hero__image {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-hero__image img {
  max-height: 350px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(37, 99, 235, 0.15));
  animation: float-product 4s ease-in-out infinite;
}

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

@media (max-width: 768px) {
  .demo-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .demo-hero__image {
    order: -1;
  }
  .spec-bar {
    justify-content: center !important;
  }
}

/* Demo: EMI Calculator */
.emi-calculator {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.emi-calculator__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

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

/* Demo: Newsletter */
.newsletter-cta {
  padding: var(--space-8);
}

.newsletter-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.newsletter-form .input {
  flex: 1;
  min-width: 250px;
}

/* ─── Mobile Nav Toggle (hidden on desktop) ─── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-2);
}

@media (max-width: 1024px) {
  .nav-toggle {
    display: flex;
  }
  .navbar__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--surface-elevated);
    flex-direction: column;
    padding: var(--space-20) var(--space-6);
    gap: var(--space-2);
    border-left: 1px solid var(--border-subtle);
    transition: right var(--duration-slow) var(--ease-default);
    z-index: var(--z-modal);
  }
  .navbar__links.open {
    right: 0;
  }
  .navbar__actions {
    display: none;
  }
}

/* ─── Smooth Section Separators ─── */
.section + .section {
  border-top: 1px solid var(--border-subtle);
}

/* ─── Particle Canvas (behind hero) ─── */
#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
