/* ==========================================================================
   PowerInfo Landing Page CSS - Clean, Natural Light/White Theme
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Design Tokens / CSS Variables --- */
:root {
  /* Fonts */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Color Palette - Premium Light Mode (Natural Theme) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;  /* Soft cool slate white */
  --bg-tertiary: #f1f5f9;   /* Slightly darker slate for containment */
  
  --text-primary: #0f172a;   /* Slate 900 - High legibility */
  --text-secondary: #475569; /* Slate 600 - Secondary text */
  --text-muted: #64748b;     /* Slate 500 - Captions and details */
  
  --accent: #2563eb;         /* Royal Blue 600 */
  --accent-hover: #1d4ed8;   /* Royal Blue 700 */
  --accent-rgb: 37, 99, 235;
  
  --border-color: #e2e8f0;    /* Slate 200 */
  --border-hover: #cbd5e1;    /* Slate 300 */
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(15, 23, 42, 0.06);
  --glass-shadow: rgba(15, 23, 42, 0.03);

  /* Natural Status Badges */
  --status-success-bg: #d1fae5;
  --status-success-text: #065f46;
  --status-warning-bg: #fef3c7;
  --status-warning-text: #92400e;
  --status-danger-bg: #fee2e2;
  --status-danger-text: #991b1b;

  /* Sizing */
  --navbar-height: 80px;
  --navbar-shrink-height: 64px;
  --container-width: 1100px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.04), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  padding-top: var(--navbar-height);
}

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

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  outline: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  text-align: center;
  margin-bottom: 0.75rem;
  font-weight: 800;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
}

.text-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

/* --- Layout Components --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 6rem 0;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
  border-bottom: none;
}

section:nth-child(even) {
  background-color: var(--bg-secondary);
}

/* --- Sticky Header / Navbar --- */
.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  z-index: 1000;
  background-color: var(--bg-primary);
  border-bottom: 1px solid transparent;
  transition: height var(--transition-normal), background var(--transition-normal), border var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  align-items: center;
}

.header-wrapper.scrolled {
  height: var(--navbar-shrink-height);
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

/* CSS Scroll-driven animations (Progressive Enhancement) */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .header-wrapper {
    animation: shrinkHeader auto linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 80px;
  }
  
  .header-wrapper.scrolled {
    height: unset;
    background-color: unset;
    backdrop-filter: unset;
    -webkit-backdrop-filter: unset;
    border-bottom: unset;
    box-shadow: unset;
  }
}

@keyframes shrinkHeader {
  to {
    height: var(--navbar-shrink-height);
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  }
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 28px;
  height: 28px;
  background-color: var(--text-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--bg-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

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

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

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

.btn-primary:hover {
  background-color: #1e293b;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-download-hero {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.25rem;
  z-index: 1100;
  color: var(--text-primary);
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  padding: 5rem 0 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top center, rgba(37, 99, 235, 0.02) 0%, transparent 50%);
}

.hero-content {
  max-width: 800px;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-badge span {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
}

.hero-title {
  margin-bottom: 1rem;
}

.hero-subtitle {
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --- Features Section --- */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 2.25rem 2rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.feature-card h3 {
  font-weight: 700;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --- How it Works / Setup Section --- */
.setup-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.step-item {
  display: flex;
  gap: 1.25rem;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.step-details p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.setup-visual {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.code-block {
  background-color: #0f172a; /* Keep dark background for code readability */
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.8rem;
  color: #94a3b8;
  border-left: 3px solid var(--accent);
  overflow-x: auto;
  line-height: 1.5;
}

.code-keyword { color: #f43f5e; }
.code-string { color: #10b981; }
.code-comment { color: #64748b; }

/* --- Compatibility Section --- */
.compatibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.compatibility-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.compat-status-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compat-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.compat-badge.success {
  background-color: var(--status-success-bg);
  color: var(--status-success-text);
}

.compat-badge.warning {
  background-color: var(--status-warning-bg);
  color: var(--status-warning-text);
}

.compat-badge.danger {
  background-color: var(--status-danger-bg);
  color: var(--status-danger-text);
}

.compat-spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.compat-spec-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compat-spec-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: bold;
}

/* --- FAQ Section --- */
.faq-container {
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.faq-question:hover {
  background-color: var(--bg-secondary);
}

.faq-icon {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  transition: transform var(--transition-fast);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal), padding var(--transition-normal);
  padding: 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Active FAQ styles (managed via JS) */
.faq-item.active {
  border-color: var(--border-hover);
}

.faq-item.active .faq-question {
  background-color: var(--bg-secondary);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  fill: var(--text-primary);
}

.faq-item.active .faq-answer {
  padding-bottom: 1.25rem;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  background: radial-gradient(circle at bottom center, rgba(37, 99, 235, 0.02) 0%, transparent 50%);
}

.cta-box {
  max-width: 750px;
  margin: 0 auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3.5rem 2rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.cta-box h2 {
  margin-bottom: 0;
}

/* --- Footer --- */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-primary);
  font-weight: 700;
}

.footer-logo svg {
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
}

/* --- Media Queries / Responsive Rules --- */
@media (max-width: 991px) {
  section {
    padding: 4.5rem 0;
  }
  
  .setup-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 1.25rem;
    display: none;
    box-shadow: var(--shadow-md);
  }
  
  .nav-menu.open {
    display: flex;
  }
  
  .nav-actions {
    display: none;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
