/* ==========================================================================
   FreeInvoicer Theme Stylesheet
   Modern, Dark-Mode, Glassmorphism, Neon Accents (Purple/Cyan)
   ========================================================================== */

/* Variables & Base System */
:root {
  --bg-color: #030712;
  --bg-card: rgba(17, 24, 39, 0.7);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --secondary: #06b6d4;
  --secondary-hover: #0891b2;
  --accent: #3b82f6;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Utilities */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body.freeinvoicer-dark {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

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

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 1.5rem;
  text-shadow: 0 0 10px var(--primary);
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 30%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.main-nav a:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-glow);
  border-radius: 16px;
  overflow: hidden;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 92, 246, 0.45);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid var(--glass-border);
}

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

.btn-block {
  display: flex;
  width: 100%;
}

/* Landing Page Hero */
.landing-main {
  padding-top: 5rem; /* navbar offset */
}

.hero-section {
  position: relative;
  min-height: calc(100vh - 5rem);
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
  z-index: 1;
}

.hero-background-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.15;
}

.glow-orb-1 {
  width: 500px;
  height: 500px;
  background-color: var(--primary);
  top: -10%;
  right: -5%;
}

.glow-orb-2 {
  width: 450px;
  height: 450px;
  background-color: var(--secondary);
  bottom: 10%;
  left: -5%;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-tag {
  align-self: flex-start;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c084fc;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sparkle {
  color: var(--secondary);
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-metrics {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  align-items: center;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-num {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.hero-metrics .divider {
  width: 1px;
  height: 40px;
  background-color: var(--glass-border);
}

/* AI AP Agent Simulator Widget */
.hero-visual {
  width: 100%;
}

.simulator-card {
  padding: 1.5rem;
}

.simulator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.window-dots {
  display: flex;
  gap: 6px;
}

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

.dot-red { background-color: var(--error); }
.dot-yellow { background-color: var(--warning); }
.dot-green { background-color: var(--success); }

.window-title {
  font-size: 0.85rem;
  font-family: var(--font-title);
  color: var(--text-muted);
  font-weight: 600;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse {
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.demo-selectors {
  margin-bottom: 1rem;
}

.selector-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.selector-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.btn-select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-select:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-select.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--primary);
  color: #d8b4fe;
}

.invoice-meta-screen {
  background: rgba(3, 7, 18, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.screen-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.scr-label {
  color: var(--text-dim);
}

.scr-value {
  color: #fff;
  font-weight: 500;
}

/* Simulator pipeline checklist */
.pipeline-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.check-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  position: relative;
  transition: var(--transition-smooth);
}

.status-pending {
  border-color: var(--text-dim);
}

.status-checking {
  border-color: var(--accent);
  background-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.status-success {
  border-color: var(--success);
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-warning {
  border-color: var(--warning);
  background-color: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.status-error {
  border-color: var(--error);
  background-color: var(--error);
  box-shadow: 0 0 8px var(--error);
}

.agent-logs {
  background: rgba(3, 7, 18, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.logs-header {
  font-family: var(--font-title);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 0.3rem;
  margin-bottom: 0.5rem;
}

.logs-terminal {
  height: 80px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.log-line {
  color: var(--text-muted);
}

.log-line.text-dim { color: var(--text-dim); }
.log-line.text-success { color: var(--success); }
.log-line.text-warning { color: var(--warning); }
.log-line.text-error { color: var(--error); }
.log-line.text-accent { color: var(--accent); }

/* Decision Panel */
.decision-panel {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  transition: var(--transition-smooth);
}

.decision-panel.panel-warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.2);
}

.decision-panel.panel-error {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
}

.decision-header {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 700;
}

.decision-badge {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0.1rem 0 0.3rem 0;
  color: var(--success);
}

.decision-badge.badge-warning { color: var(--warning); }
.decision-badge.badge-error { color: var(--error); }

.decision-reason {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* Features Grid Section */
.features-section {
  padding: 6rem 2rem;
  border-top: 1px solid var(--glass-border);
}

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

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
}

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

.feature-card {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feat-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.feature-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Dashboard Showcase Section */
.dashboard-section {
  padding: 6rem 2rem;
  background: rgba(3, 7, 18, 0.4);
  border-top: 1px solid var(--glass-border);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge-small {
  align-self: flex-start;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #22d3ee;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
}

.dashboard-p {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.dashboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.dashboard-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--secondary);
  font-weight: bold;
}

.dashboard-img-container {
  position: relative;
  display: flex;
  justify-content: center;
}

.dashboard-glass-border {
  padding: 6px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.15);
}

.dashboard-img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

/* Pricing Section */
.pricing-section {
  padding: 6rem 2rem;
  border-top: 1px solid var(--glass-border);
}

.pricing-cards {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.price-card {
  padding: 3rem 2.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: var(--transition-smooth);
}

.price-card:hover {
  transform: translateY(-5px);
}

.price-card.premium {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.05) 0%, rgba(3, 7, 18, 0.7) 100%);
  box-shadow: 0 25px 50px rgba(139, 92, 246, 0.15);
}

.card-badge-dim {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

.card-badge-glow {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.price-value {
  display: flex;
  align-items: baseline;
}

.currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.number {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: var(--font-title);
  line-height: 1;
}

.period {
  font-size: 1rem;
  color: var(--text-dim);
}

.plan-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.plan-features li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.plan-features li span {
  font-weight: bold;
  color: var(--primary);
}

.price-card.premium .plan-features li span {
  color: var(--secondary);
}

/* FAQ Section */
.faq-section {
  padding: 6rem 2rem;
  background: rgba(3, 7, 18, 0.2);
  border-top: 1px solid var(--glass-border);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  transition: var(--transition-smooth);
}

.faq-item summary {
  padding: 1.5rem 2rem;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--secondary);
}

.faq-answer {
  padding: 0 2rem 1.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  margin-top: -0.5rem;
  padding-top: 1rem;
}

/* Waitlist Ingestion Form */
.waitlist-section {
  padding: 6rem 2rem;
  border-top: 1px solid var(--glass-border);
}

.waitlist-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.waitlist-title {
  font-size: 2.25rem;
  font-weight: 800;
}

.waitlist-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
}

.waitlist-form {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 520px;
  margin-top: 1rem;
}

.form-input {
  flex-grow: 1;
  background: rgba(3, 7, 18, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

/* Interior Pages Structure */
.interior-main {
  padding: 8rem 2rem 6rem 2rem;
}

.interior-container {
  max-width: 800px;
  margin: 0 auto;
}

.interior-article {
  padding: 3rem;
}

.meta-category {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.meta-date {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.article-body {
  margin-top: 2rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-body h2 {
  font-size: 1.75rem;
  margin-top: 1.5rem;
}

.article-body h3 {
  font-size: 1.35rem;
  margin-top: 1rem;
}

.article-body ul, .article-body ol {
  padding-left: 1.5rem;
}

.article-body strong {
  color: #fff;
}

.article-back-nav {
  margin-top: 3rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 2rem;
}

/* Footer styling */
.site-footer {
  background: #02040a;
  border-top: 1px solid var(--glass-border);
  padding: 4rem 2rem 2rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-tagline {
  color: var(--text-dim);
  max-width: 250px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Responsive Grid Adaptation */
@media (max-width: 968px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .pricing-cards {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 640px) {
  .header-container {
    padding: 1rem;
  }
  .main-nav {
    display: none; /* simple mobile fallback, hiding secondary links */
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .waitlist-form {
    flex-direction: column;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .interior-article {
    padding: 1.5rem;
  }
  .article-title {
    font-size: 2rem;
  }
}
