/*
Theme Name: WP AI Explainer
Description: A modern, conversion-optimised marketing theme for WP AI Explainer plugin with a warm, approachable design.
Version: 1.0.0
Author: WP AI Explainer Team
Text Domain: wp-ai-explainer
*/


/* Smooth scrolling for the entire document */
html {
  scroll-behavior: smooth;
}

/* Hide WordPress Admin Toolbar */
#wpadminbar {
  display: none !important;
}

html {
  margin-top: 0 !important;
}

body.admin-bar {
  margin-top: 0 !important;
}

:root {
  --parchment: #fdfdf8;
  --parchment-dark: #f5f5ef;
  --sage-cream: #eeefe9;
  --sage-light: #e5e7e0;
  --sage-border: #bfc1b7;
  --sage-border-dark: #b6b7af;
  --olive-ink: #4d4f46;
  --olive-muted: #65675e;
  --olive-deep: #23251d;
  --cta-dark: #1e1f23;
  --accent-orange: #F54E00;
  --amber-gold: #F7A501;
  --tan-surface: #d4c9b8;
  --sage-placeholder: #9ea096;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
}

/* Scroll Animation Class */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 253, 248, 0.95);
  border-bottom: 1px solid var(--sage-border);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(253, 253, 248, 0.98);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--olive-deep);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--cta-dark);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--olive-deep);
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.nav-menu a {
  color: var(--olive-ink);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--accent-orange);
}

.cta-button {
  background: var(--cta-dark);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  opacity: 0.7;
  color: var(--amber-gold);
}

/* Mobile Download Button - Hidden on desktop/tablet */
.mobile-download-container {
  display: flex;
  justify-content: flex-end;
}

.mobile-download-container a {
  white-space: nowrap;
  min-width: max-content;
}

/* Hide mobile download button on tablet and desktop */
@media (min-width: 768px) {
  .mobile-download-container {
    display: none !important;
  }
}

/* Mobile header improvements */
@media (max-width: 767px) {
  .site-header {
    padding: 0.25rem 0;
  }

  .site-header .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Additional responsive breakpoints */
@media (max-width: 480px) {
  .mobile-download-container a {
    font-size: 0.625rem;
    padding: 0.375rem 0.5rem;
    line-height: 1.2;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .mobile-download-container a {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Hero Section */
.hero-section {
  padding: 10rem 1rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  background: var(--parchment);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 10;
}

.demo-browser-bar {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

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

.browser-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red {
  background: #ef4444;
}
.dot-yellow {
  background: #eab308;
}
.dot-green {
  background: #22c55e;
}

.demo-url {
  color: var(--olive-muted);
  font-size: 0.875rem;
}

.highlighted-text {
  background: var(--sage-cream);
  border-bottom: 2px solid var(--accent-orange);
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.highlighted-text:hover {
  background: var(--sage-light);
}

.tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: var(--olive-ink);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--sage-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 100;
}

.highlighted-text:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* Section Styles */
.section {
  padding: 5rem 1rem;
  position: relative;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.section-description {
  font-size: 1.25rem;
  color: var(--olive-ink);
  max-width: 600px;
  margin: 0 auto;
}

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

.feature-card {
  background: white;
  border: 1px solid var(--sage-border);
  border-radius: 6px;
  padding: 2rem;
  transition: border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  border-color: var(--accent-orange);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--olive-deep);
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--olive-ink);
  line-height: 1.6;
}

/* Stats Section */
.stats-section {
  border-top: 1px solid var(--sage-border);
  border-bottom: 1px solid var(--sage-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--olive-deep);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--olive-muted);
}

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

.pricing-card {
  background: white;
  border: 1px solid var(--sage-border);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: border-color 0.2s ease;
}

.pricing-card.featured {
  border-color: var(--cta-dark);
  border-width: 2px;
}

.pricing-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cta-dark);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.pricing-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--olive-deep);
  margin-bottom: 1rem;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--olive-deep);
  margin-bottom: 0.5rem;
}

.pricing-period {
  color: var(--olive-muted);
  margin-bottom: 2rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--olive-ink);
}

.check-icon {
  color: #22c55e;
  font-weight: bold;
}

/* Footer */
.site-footer {
  background: var(--cta-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4rem 1rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-description {
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-title {
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.newsletter-signup {
  display: flex;
  gap: 1rem;
}

.newsletter-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  color: var(--olive-deep);
  min-width: 300px;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--accent-orange);
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-navigation {
    display: none;
  }

  .site-header .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-header .flex.justify-between {
    gap: 1rem;
  }

  .mobile-download-container {
    flex-shrink: 0;
  }

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

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card.featured {
    transform: none;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-signup {
    flex-direction: column;
    width: 100%;
  }

  .newsletter-input {
    min-width: auto;
  }

  .nav-menu {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-button {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
  }
}

/* Mobile Navigation Styles */
.mobile-menu-toggle {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: rgba(191, 193, 183, 0.3) !important;
  border: 1px solid var(--sage-border) !important;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1001;
  padding: 0 !important;
  margin: 0;
}

.mobile-menu-toggle:hover {
  background: rgba(191, 193, 183, 0.5) !important;
  border-color: var(--accent-orange) !important;
}

.burger-line {
  display: block !important;
  width: 20px !important;
  height: 2px !important;
  background: var(--olive-ink) !important;
  margin: 2px 0 !important;
  transition: all 0.3s ease;
  transform-origin: center;
  border: none !important;
  border-radius: 0 !important;
}

/* Burger to X animation */
.mobile-menu-toggle.active .burger-line-1 {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active .burger-line-2 {
  opacity: 0;
  transform: scale(0);
}

.mobile-menu-toggle.active .burger-line-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(253, 253, 248, 0.95);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu Container */
.mobile-menu-container {
  background: var(--parchment) !important;
  height: 100vh !important;
  width: 100% !important;
  transform: translateY(-100%) !important;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  border-bottom: 1px solid var(--sage-border) !important;
  position: relative !important;
  z-index: 1001 !important;
}

#mobile-menu-overlay.active .mobile-menu-container {
  transform: translateY(0) !important;
}

.mobile-menu-overlay.active .mobile-menu-container {
  transform: translateY(0) !important;
}

/* Mobile Menu Header */
.mobile-menu-header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--sage-border);
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(191, 193, 183, 0.3);
  border: 1px solid var(--sage-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-close:hover {
  background: rgba(245, 78, 0, 0.1);
  border-color: var(--accent-orange);
}

/* Mobile Navigation */
.mobile-menu-nav {
  flex: 1;
  padding: 2rem 0;
  overflow-y: auto;
}

.mobile-nav-link {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--olive-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--sage-border);
  transition: all 0.2s ease;
  position: relative;
}

.mobile-nav-link:hover {
  color: var(--accent-orange);
  background: var(--sage-cream);
}

.mobile-nav-link.nav-link-active {
  color: var(--accent-orange);
  background: var(--sage-cream);
  font-weight: 700;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--sage-border);
}

/* Hide mobile menu on desktop */
@media (min-width: 1024px) {
  .mobile-menu-toggle,
  .mobile-menu-overlay {
    display: none !important;
  }
}

/* Body scroll lock when menu is open */
body.mobile-menu-open {
  overflow: hidden;
  position: static;
  width: 100%;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .mobile-menu-container {
    transition: none;
  }

  .mobile-menu-overlay {
    transition: none;
  }

  .burger-line {
    transition: none;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--sage-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--sage-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--olive-muted);
}

/* Demo try-it prompt */
.demo-try-prompt {
  display: flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  bottom: -16px;
  right: 24px;
  background: var(--cta-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  animation: demo-prompt-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes demo-prompt-pulse {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50%      { opacity: 0.7; transform: translateY(-3px); }
}

/* Tabbed admin features (features page) */
.tab-button.active {
  background-color: var(--cta-dark);
  border-color: var(--cta-dark);
  color: #fff;
}

.tab-content {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-in-out;
}

.tab-content.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

.tab-content.hidden {
  display: none;
}

@media (min-width: 1024px) {
  .interface-preview--bleed {
    margin-right: -200px;
  }
}
