/* ==========================================================================
   ScribeFlux PRO — Brink High-Contrast Dark & Sunset Coral Palette
   Matches the desktop application UI 1:1
   ========================================================================== */

:root {
  /* Exact App Palette from AppColors (Dark Default) */
  --bg-canvas: #0A0E17;
  --bg-canvas-elevated: #0F1420;
  --bg-surface: #131926;
  --bg-surface-elevated: #1A2234;
  --bg-surface-secondary: #161E2E;
  --bg-surface-hover: #1E283D;

  --border-subtle: #1A2234;
  --border-surface: #232D42;
  --border-focused: #384766;
  --border-coral-glow: rgba(251, 79, 27, 0.4);

  /* Sunset Coral Brand Accent */
  --brand-coral: #FB4F1B;
  --brand-coral-hover: #FF6436;
  --brand-coral-pressed: #DE3B0A;
  --brand-coral-muted: rgba(251, 79, 27, 0.15);
  --brand-coral-glow: rgba(251, 79, 27, 0.28);

  /* Status Colors */
  --status-success: #10B981;
  --status-info: #38BDF8;
  --status-warning: #F59E0B;
  --status-error: #EF4444;

  /* Typography */
  --text-primary: #FFFFFF;
  --text-secondary: #8E9BAE;
  --text-muted: #55657E;
  --text-dimmed: #5F6E85;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-canvas: #F8FAFC;
  --bg-canvas-elevated: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-surface-secondary: #E2E8F0;
  --bg-surface-hover: #F1F5F9;

  --border-subtle: #F1F5F9;
  --border-surface: #E2E8F0;
  --border-focused: #CBD5E1;
  --border-coral-glow: rgba(251, 79, 27, 0.25);

  --brand-coral: #E03B0C;
  --brand-coral-hover: #FB4F1B;
  --brand-coral-pressed: #C42F05;
  --brand-coral-muted: rgba(224, 59, 12, 0.08);
  --brand-coral-glow: rgba(224, 59, 12, 0.18);

  --status-success: #059669;
  --status-info: #0284C7;
  --status-warning: #D97706;
  --status-error: #DC2626;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-dimmed: #94A3B8;
}

[data-theme="light"] {
  color-scheme: light;
}

[data-theme="light"] .header {
  background: rgba(248, 250, 252, 0.88);
  border-bottom: 1px solid #E2E8F0;
}

[data-theme="light"] .brand {
  color: #0F172A;
}

[data-theme="light"] .nav-links a {
  color: #475569;
}

[data-theme="light"] .nav-links a:hover {
  color: var(--brand-coral);
}

[data-theme="light"] .text-gradient {
  background: linear-gradient(135deg, #0F172A 20%, #E03B0C 85%, #FB4F1B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .ambient-glow {
  background: radial-gradient(circle, rgba(251, 79, 27, 0.09) 0%, rgba(56, 189, 248, 0.04) 45%, transparent 70%);
}

[data-theme="light"] .ambient-glow-bottom {
  background: radial-gradient(circle, rgba(251, 79, 27, 0.06) 0%, transparent 60%);
}

[data-theme="light"] .mockup-container {
  box-shadow: 0 20px 50px -15px rgba(15, 23, 42, 0.15), 0 0 35px rgba(251, 79, 27, 0.1);
  background: #FFFFFF;
}

[data-theme="light"] .pricing-card.featured {
  background: #FFFFFF;
  box-shadow: 0 12px 40px -10px rgba(251, 79, 27, 0.22);
}

[data-theme="light"] .pricing-amount {
  color: #0F172A;
}

[data-theme="light"] .pricing-currency {
  color: #0F172A;
}

[data-theme="light"] .pricing-feature-item.highlight {
  color: #0F172A;
}

[data-theme="light"] .legal-content h2 {
  color: #0F172A;
}

/* Light Theme Download Section */
[data-theme="light"] .download-section {
  background: #F1F5F9;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
}

[data-theme="light"] .download-section .section-title {
  color: #0F172A;
}

[data-theme="light"] .download-section .section-subtitle {
  color: #475569;
}

/* Light Theme Footer */
[data-theme="light"] .footer {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
}

[data-theme="light"] .footer-brand .brand {
  color: #0F172A;
}

[data-theme="light"] .footer-brand p {
  color: #64748B;
}

[data-theme="light"] .footer-col h4 {
  color: #0F172A;
}

[data-theme="light"] .footer-links a {
  color: #64748B;
}

[data-theme="light"] .footer-links a:hover {
  color: var(--brand-coral);
}

[data-theme="light"] .footer-bottom {
  border-top: 1px solid #E2E8F0;
  color: #64748B;
}

[data-theme="light"] .footer-bottom a {
  color: #64748B;
}

[data-theme="light"] .footer-bottom a:hover {
  color: var(--brand-coral);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-surface);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--brand-coral);
  color: var(--brand-coral);
  transform: translateY(-2px);
  background: var(--bg-surface-elevated);
}

.theme-toggle-btn svg {
  transition: transform 0.3s ease;
}

.theme-toggle-btn:hover svg {
  transform: rotate(25deg);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Ambient glow backgrounds matching Sunset Coral & Emerald */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 550px;
  background: radial-gradient(circle, rgba(251, 79, 27, 0.14) 0%, rgba(16, 185, 129, 0.06) 45%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-bottom {
  position: absolute;
  bottom: 0;
  right: 5%;
  width: 700px;
  height: 450px;
  background: radial-gradient(circle, rgba(251, 79, 27, 0.1) 0%, rgba(56, 189, 248, 0.05) 50%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 14, 23, 0.88);
  border-bottom: 1px solid var(--border-surface);
  transition: var(--transition-fast);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 0 16px var(--brand-coral-glow);
}

.brand-text span {
  color: var(--brand-coral);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.94rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--brand-coral-hover);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--brand-coral);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(251, 79, 27, 0.35);
}

.btn-primary:hover {
  background: var(--brand-coral-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(251, 79, 27, 0.5);
}

.btn-primary:active {
  background: var(--brand-coral-pressed);
  transform: translateY(0);
}

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

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--brand-coral);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  background: var(--brand-coral-muted);
  border: 1px solid rgba(251, 79, 27, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-coral);
  margin-bottom: 28px;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  background: var(--brand-coral);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--brand-coral);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

.hero-title {
  font-size: clamp(2.5rem, 5.2vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 24px;
}

.text-coral {
  color: var(--brand-coral);
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 20%, #FB4F1B 85%, #FF6436 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-specs {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-dimmed);
}

.hero-specs span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* App Real Screenshot Frame */
.mockup-container {
  margin: 46px auto 0;
  max-width: 1080px;
  background: var(--bg-surface);
  border: 1px solid var(--border-surface);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: 0 25px 65px -12px rgba(0, 0, 0, 0.9), 0 0 45px rgba(251, 79, 27, 0.12);
  position: relative;
  overflow: hidden;
}

.mockup-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-coral), transparent);
}

.mockup-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius-lg) - 6px);
  border: 1px solid var(--border-subtle);
}

/* Feature Grid */
.section {
  padding: 90px 0;
  position: relative;
}

.download-section {
  background: rgba(16, 22, 34, 0.6);
  border-top: 1px solid var(--border-surface);
  border-bottom: 1px solid var(--border-surface);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 55px;
}

.section-tag {
  color: var(--brand-coral);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

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

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

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-coral);
  opacity: 0;
  transition: var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-coral);
  background: var(--bg-surface-elevated);
  box-shadow: 0 16px 36px -12px rgba(251, 79, 27, 0.15);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--brand-coral-muted);
  border: 1px solid rgba(251, 79, 27, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* Benchmark / Accuracy Comparison */
.benchmark-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  overflow-x: auto;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

.benchmark-table th, .benchmark-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-surface);
}

.benchmark-table th {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-surface-elevated);
}

.benchmark-table td {
  font-size: 0.94rem;
}

.badge-fail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-pass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: stretch;
}

@media (max-width: 992px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
}

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-surface);
  border-radius: var(--radius-lg);
  padding: 38px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focused);
}

.pricing-card.featured {
  background: var(--bg-surface-elevated);
  border: 2px solid var(--brand-coral);
  box-shadow: 0 0 45px rgba(251, 79, 27, 0.22);
  transform: scale(1.03);
  z-index: 2;
}

.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 0 55px rgba(251, 79, 27, 0.35);
}

.pricing-ribbon {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-coral);
  color: #FFFFFF;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(251, 79, 27, 0.4);
}

.pricing-tier {
  font-size: 1.32rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.pricing-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  min-height: 42px;
  margin-bottom: 22px;
}

.pricing-price-box {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-surface);
}

.pricing-currency {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pricing-amount {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}

.pricing-period {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.pricing-savings {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-coral-hover);
  background: var(--brand-coral-muted);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 32px;
  flex-grow: 1;
}

.pricing-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.91rem;
  color: var(--text-secondary);
}

.pricing-feature-item.highlight {
  color: #fff;
  font-weight: 600;
}

.feature-check {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--brand-coral-muted);
  color: var(--brand-coral);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  font-weight: 800;
}

.moneyback-guarantee {
  margin-top: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-surface);
  padding: 16px 28px;
  border-radius: var(--radius-full);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.moneyback-icon {
  font-size: 1.4rem;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.faq-item.active {
  border-color: var(--brand-coral);
}

.faq-question {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
}

.faq-arrow {
  transition: transform var(--transition-fast);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  color: var(--brand-coral);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding-bottom: 20px;
}

/* Legal Pages Styling */
.legal-content {
  padding: 60px 0 100px;
  max-width: 840px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-surface);
}

.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 34px 0 14px;
  color: #fff;
}

.legal-content p, .legal-content ul, .legal-content ol {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

.legal-content ul, .legal-content ol {
  padding-left: 26px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-box {
  background: var(--brand-coral-muted);
  border-left: 4px solid var(--brand-coral);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
  color: var(--text-primary);
}

/* Footer */
.footer {
  background: #070A11;
  border-top: 1px solid var(--border-surface);
  padding: 60px 0 30px;
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 45px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  max-width: 320px;
  margin-top: 14px;
}

.footer-col h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand-coral-hover);
}

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