/* Core Design System & CSS Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-main: #0b0f19;
  --bg-surface: rgba(17, 24, 39, 0.7);
  --bg-surface-solid: #111827;
  --bg-card: rgba(31, 41, 55, 0.4);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.15);
  
  --primary: #6366f1; /* Indigo */
  --primary-glow: rgba(99, 102, 241, 0.5);
  --primary-hover: #4f46e5;
  --secondary: #a855f7; /* Purple */
  --accent: #10b981; /* Emerald */
  --accent-glow: rgba(16, 185, 129, 0.2);
  
  /* Text colors */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-inverse: #0b0f19;

  /* Fonts */
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Glassmorphism */
  --glass-bg: rgba(17, 24, 39, 0.6);
  --glass-blur: blur(12px);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 15, 25, 0.8);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

header.scrolled {
  background: #0b0f19;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo i {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  color: var(--text-main);
  padding: 0.35rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

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

nav a:hover, nav a.active {
  color: var(--text-main);
  text-shadow: 0 0 10px var(--primary-glow);
}

/* Mobile Menu Hamburger */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 0.4rem;
  padding: 0.5rem;
  z-index: 1000;
}

.hamburger-line {
  width: 24px;
  height: 2.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(15, 20, 38, 0.95), rgba(20, 25, 50, 0.95));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  z-index: 999;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  gap: 0;
  align-items: stretch;
  padding: 0 1rem;
  margin: 0;
}

.mobile-nav li {
  width: 100%;
  list-style: none;
}

.mobile-nav a {
  display: block;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  margin-bottom: 0.5rem;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-main);
  text-shadow: 0 0 10px var(--primary-glow);
}

.mobile-nav .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

/* Desktop Navigation (larger than 768px) */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }
  
  .mobile-nav {
    display: flex !important;
    position: static;
    background: none;
    backdrop-filter: none;
    border-bottom: none;
    padding: 0;
    z-index: auto;
  }
  
  .mobile-nav ul {
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
  }
  
  .mobile-nav li {
    width: auto;
  }
  
  .mobile-nav a {
    display: inline;
    padding: 0;
    border-radius: 0;
    font-size: 0.95rem;
    margin-bottom: 0;
  }
  
  .mobile-nav a:hover,
  .mobile-nav a.active {
    background: none;
    color: var(--text-main);
    text-shadow: 0 0 10px var(--primary-glow);
  }
  
  .mobile-nav .btn {
    width: auto;
    margin-top: 0;
  }
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--text-inverse);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Hero Section */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40rem;
  height: 40rem;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.badge-promo {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 40%, var(--primary) 70%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 auto 2.5rem;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px);
}

/* How It Works Section */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 36rem;
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.step-card {
  position: relative;
  text-align: center;
}

.step-num {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.8;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.step-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

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

/* Showcase Section */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.showcase-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.showcase-img {
  width: 100%;
  height: 14rem;
  min-height: 14rem;
  display: block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  transition: var(--transition-slow);
}

.showcase-card:hover .showcase-img {
  transform: scale(1.05);
}

.showcase-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: var(--glass-blur);
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.showcase-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.showcase-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.showcase-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Why Us / Benefits */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.why-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.why-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Pricing Section */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 0.25rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-header {
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.price-amount {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.price-period {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.price-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.price-features li i {
  color: var(--accent);
}

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

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  cursor: pointer;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 600;
}

.faq-question i {
  transition: var(--transition-normal);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
  color: var(--text-muted);
  margin-top: 0;
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  margin-top: 1rem;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
  background: #060911;
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Form Styles */
.form-card {
  max-width: 650px;
  margin: 8rem auto 4rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
  background: rgba(17, 24, 39, 0.8);
}

.form-section-title {
  font-size: 1.25rem;
  color: var(--primary);
  margin: 2rem 0 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.form-section-title:first-of-type {
  margin-top: 0;
}

.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Admin Dashboard Styles */
.admin-layout {
  display: flex;
  margin-top: 5rem;
  min-height: calc(100vh - 5rem);
}

.admin-sidebar {
  width: 16rem;
  border-right: 1px solid var(--border-color);
  padding: 2rem 1rem;
  background: #060911;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-main {
  flex-grow: 1;
  padding: 3rem;
  overflow-y: auto;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-muted);
}

.sidebar-menu li a:hover, .sidebar-menu li.active a {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-main);
  border-left: 3px solid var(--primary);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

/* Admin Table */
.table-card {
  padding: 0;
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.admin-table tbody tr:hover {
  background: rgba(255,255,255,0.01);
}

.status-badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-new { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.status-inprogress { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.status-generated { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.status-needsreview { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.status-approved { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.status-sent { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
.status-customer { background: rgba(236, 72, 153, 0.15); color: #f472b6; }

/* Grid layout for Dashboard panels */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

/* Detail View Modal/Drawer */
.details-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-section-title {
  font-size: 1rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
}

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

.detail-label {
  color: var(--text-muted);
}

.detail-value {
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn var(--transition-normal) forwards;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .header-container {
    gap: 1rem;
  }

  nav ul {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  header {
    position: sticky;
  }

  .header-container {
    height: auto;
    min-height: 5rem;
    padding: 0.75rem 1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }

  .logo {
    font-size: 1.2rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  nav {
    display: none;
  }

  nav.mobile-nav {
    display: none;
    position: absolute;
  }

  nav.mobile-nav.active {
    display: block;
  }

  nav ul {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    flex-wrap: wrap !important;
    padding: 0 1rem;
    margin: 0;
  }

  nav li {
    width: 100%;
    list-style: none;
  }

  nav a {
    font-size: 0.95rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    transition: background var(--transition-fast), color var(--transition-fast);
  }

  nav a:hover,
  nav a.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-main);
  }

  .hero {
    padding-top: 8rem;
  }

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

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

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 320px);
    margin: 0 auto;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
  
  .why-grid {
    grid-template-columns: 1fr;
  }
  
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  
  .steps-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-layout {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .showcase-content,
  .showcase-img {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .section-header h2 {
    font-size: 2rem;
  }

  .hero h1 {
    font-size: 2.2rem;
    line-height: 1.1;
  }

  .badge-promo {
    font-size: 0.7rem;
    padding: 0.4rem 0.85rem;
  }

  .glass-card {
    padding: 1.25rem;
  }

  .showcase-content {
    padding: 1.25rem;
  }

  .showcase-img {
    height: 11rem;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }

  .btn {
    width: 100%;
  }

  .btn-primary,
  .btn-secondary,
  .btn-accent {
    justify-content: center;
  }
}
