/* Liminal Lights - Solarized Dark Theme */

/* CSS Variables from your HA theme */
:root {
  /* Solarized Colors */
  --bg-primary: #073642;
  --bg-secondary: #002b36;
  --text-primary: #93a1a1;
  --text-secondary: #839496;
  --text-disabled: #586e75;
  --accent-blue: #268bd2;
  --accent-red: #dc322f;
  --accent-green: #859900;
  --accent-yellow: #b58900;
  --accent-violet: #6c71c4;
  --accent-pink: #d33682;

  /* UI */
  --border-radius: 8px;
  --shadow: 0px 4px 16px 0px rgba(0,0,0,0.2);
  --shadow-strong: 0px 4px 16px 0px rgba(0,0,0,0.8);

  /* Font */
  --font-family: 'Raleway', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Container */
  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-violet);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: var(--spacing-sm) 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.nav-logo img {
  height: 70px;
  width: auto;
}

.nav-logo span {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1.1rem;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(38, 139, 210, 0.1);
}

.nav-links a.active {
  color: var(--accent-blue);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(90px + var(--spacing-lg)) var(--spacing-md) var(--spacing-md);
  background: var(--bg-primary);
}

.hero-content {
  max-width: 1100px;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--spacing-xl);
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

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

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.3;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.hero-right {
  display: flex;
  justify-content: center;
}

.hero-gif {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-strong);
}

.hero .btn-group {
  justify-content: flex-start;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  font-weight: 600;
  font-family: var(--font-family);
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-violet);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
  background: var(--accent-blue);
  color: #fff;
}

.btn-group {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-xs);
}

.section-title p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.product-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.product-card-image {
  position: relative;
  padding-top: 75%;
  background: var(--bg-primary);
  overflow: hidden;
}

.product-card-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.product-card-content {
  padding: var(--spacing-md);
}

.product-card h3 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.product-card .led-count {
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.product-card p {
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
}

.product-card .features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

.product-card .feature-tag {
  background: rgba(38, 139, 210, 0.15);
  color: var(--accent-blue);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.feature-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  box-shadow: var(--shadow);
  text-align: center;
}

.feature-card .icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
  margin-bottom: var(--spacing-xs);
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.comparison-table th,
.comparison-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--bg-primary);
}

.comparison-table th {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 600;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: rgba(38, 139, 210, 0.05);
}

/* Demo Section */
.demo-section {
  background: var(--bg-secondary);
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.demo-gif {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-strong);
  justify-self: end;
}

.demo-content h3 {
  margin-bottom: var(--spacing-sm);
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.cta-section h2 {
  margin-bottom: var(--spacing-sm);
}

.cta-section p {
  margin-bottom: var(--spacing-lg);
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--spacing-xs);
}

.footer-section a {
  color: var(--text-secondary);
}

.footer-section a:hover {
  color: var(--accent-blue);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--accent-blue);
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  border-top: 1px solid var(--bg-primary);
  color: var(--text-disabled);
  font-size: 0.9rem;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  width: 48px;
  height: 48px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  font-size: 1.25rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-violet);
  transform: translateY(-4px);
}

/* Product Page Specific */
.product-hero {
  padding: calc(80px + var(--spacing-lg)) 0 var(--spacing-lg);
  background: var(--bg-secondary);
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.product-main-image {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-strong);
}

.product-info h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-xs);
}

.product-info .led-count {
  font-size: 1.5rem;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
}

.product-specs {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.product-specs h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--accent-blue);
}

.product-specs ul {
  list-style: none;
}

.product-specs li {
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--bg-secondary);
  display: flex;
  justify-content: space-between;
}

.product-specs li:last-child {
  border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .hero .btn-group {
    justify-content: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .product-hero-grid {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    font-size: 0.85rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--spacing-xs) var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }

  .btn {
    width: 100%;
  }

  .btn-group {
    flex-direction: column;
  }
}
