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

/* --- DESIGN SYSTEM & CSS TOKENS --- */
:root {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* HSL Color Palette */
  --bg-dark: hsl(222, 47%, 4%);
  --bg-card: hsla(222, 47%, 8%, 0.6);
  --bg-card-hover: hsla(222, 47%, 12%, 0.85);
  
  --primary: hsl(263, 90%, 62%);
  --primary-glow: hsla(263, 90%, 62%, 0.25);
  --primary-hover: hsl(263, 90%, 68%);
  
  --accent: hsl(187, 92%, 45%);
  --accent-glow: hsla(187, 92%, 45%, 0.25);
  --accent-hover: hsl(187, 92%, 52%);
  
  --success: hsl(142, 70%, 45%);
  --success-glow: hsla(142, 70%, 45%, 0.2);
  
  --warning: hsl(38, 92%, 50%);
  --danger: hsl(346, 84%, 55%);
  
  --text-main: hsl(210, 20%, 94%);
  --text-muted: hsl(215, 15%, 65%);
  --text-dark: hsl(220, 15%, 45%);
  
  --border: hsla(217, 30%, 20%, 0.4);
  --border-light: hsla(217, 30%, 30%, 0.6);
  --border-glow: hsla(263, 90%, 62%, 0.4);
  
  /* Glassmorphism utility values */
  --glass-blur: blur(16px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* --- LIGHT THEME OVERRIDES --- */
[data-theme="light"] {
  --bg-dark: hsl(220, 30%, 96%);
  --bg-card: hsla(0, 0%, 100%, 0.7);
  --bg-card-hover: hsla(0, 0%, 100%, 0.95);
  
  --primary: hsl(263, 85%, 52%);
  --primary-glow: hsla(263, 85%, 52%, 0.15);
  
  --accent: hsl(187, 90%, 38%);
  --accent-glow: hsla(187, 90%, 38%, 0.15);
  
  --text-main: hsl(222, 47%, 12%);
  --text-muted: hsl(222, 15%, 40%);
  --text-dark: hsl(222, 10%, 60%);
  
  --border: hsla(222, 15%, 85%, 0.6);
  --border-light: hsla(222, 15%, 75%, 0.8);
  --border-glow: hsla(263, 85%, 52%, 0.3);
  
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

/* --- RESET & BASIC STYLES --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

html, body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  scroll-behavior: smooth;
  transition: background-color 0.5s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- REUSABLE GLASS COMPONENTS & LAYOUT --- */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.glass-panel:hover {
  border-color: var(--border-light);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

.glass-panel.glow-primary:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 25px var(--primary-glow);
}

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

.bg-gradient-glow {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, hsl(263, 90%, 55%) 100%);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
  filter: brightness(1.1);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
  border-color: var(--text-muted);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, hsl(187, 92%, 38%) 100%);
  color: black;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
  filter: brightness(1.1);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

/* --- MARKETING LANDING PAGE STYLES --- */
header.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  z-index: 100;
  background: hsla(222, 47%, 4%, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

header.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

header.navbar .logo svg {
  width: 32px;
  height: 32px;
}

header.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

header.navbar .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}
header.navbar .nav-links a:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero-section {
  padding: 160px 4% 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Vibrant Ambient Backlights */
.ambient-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}
.glow-purple {
  background: var(--primary);
  top: 10%;
  left: 20%;
}
.glow-cyan {
  background: var(--accent);
  bottom: 10%;
  right: 20%;
}

.hero-section h1 {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  max-width: 900px;
  margin: 0 auto 20px;
}

.hero-section p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 35px;
}

/* Interactive Split Sandbox */
.sandbox-container {
  max-width: 1200px;
  margin: 0 auto 100px;
  padding: 0 20px;
}

.split-sandbox {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  min-height: 600px;
}

@media (max-width: 968px) {
  .split-sandbox {
    grid-template-columns: 1fr;
  }
  .hero-section h1 {
    font-size: 2.5rem;
  }
}

/* Builder Form Styles */
.builder-card {
  padding: 30px;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: hsla(222, 47%, 4%, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Milestones Builder List */
.milestones-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 15px;
}

.milestone-item-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 10px;
  align-items: center;
}

/* --- CLIENT VIEW STYLES --- */
.client-portal-wrapper {
  padding: 80px 4% 120px;
  max-width: 900px;
  margin: 0 auto;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
}

.portal-title-block {
  text-align: left;
}

.portal-title-block h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 5px;
}

.portal-title-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.portal-badge {
  background: var(--primary-glow);
  border: 1px solid var(--border-glow);
  color: hsl(263, 90%, 75%);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Big Global Progress Card */
.progress-card {
  padding: 30px;
  margin-bottom: 35px;
  text-align: left;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.progress-percent {
  font-size: 2rem;
  font-weight: 800;
  font-mono: true;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 25px;
}

.progress-bar {
  height: 100%;
  border-radius: 50px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px var(--accent-glow);
}

.progress-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 20px;
}

.progress-stat-box p {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.progress-stat-box span {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Milestones Timeline Grid */
.timeline-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: left;
}

.milestones-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 45px;
}

.milestone-card {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  text-align: left;
}

.milestone-info {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.milestone-status-indicator {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  shrink: 0;
  border: 1px solid var(--border);
}

.status-done {
  background: var(--success-glow);
  border-color: var(--success);
  color: var(--success);
}

.status-current {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
  animation: pulse 2s infinite;
}

.status-locked {
  background: var(--bg-dark);
  border-color: var(--border);
  color: var(--text-dark);
}

.milestone-details h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.milestone-details .amount {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Keyframe animations */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 hsla(187, 92%, 45%, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px hsla(187, 92%, 45%, 0);
  }
  100% {
    box-shadow: 0 0 0 0 hsla(187, 92%, 45%, 0);
  }
}

/* Deliverables Resource Grid */
.deliverables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 60px;
}

@media (max-width: 600px) {
  .deliverables-grid {
    grid-template-columns: 1fr;
  }
  .portal-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.deliverable-card {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  text-decoration: none;
  color: var(--text-main);
  text-align: left;
}

.deliverable-meta {
  display: flex;
  align-items: center;
  gap: 15px;
}

.deliverable-icon-box {
  width: 42px;
  height: 42px;
  background: var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
}

.deliverable-card:hover .deliverable-icon-box {
  background: var(--primary-glow);
  color: var(--primary);
}

.deliverable-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.deliverable-card span {
  font-size: 0.8rem;
  color: var(--text-dark);
}

.deliverable-arrow {
  color: var(--text-dark);
  transition: var(--transition);
}

.deliverable-card:hover .deliverable-arrow {
  color: var(--text-main);
  transform: translateX(3px);
}

/* Brand footer */
.brand-footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dark);
}

.brand-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}
.brand-footer a:hover {
  color: var(--primary);
}

/* Interactive preview box inside sandbox */
.preview-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

.preview-header-bar {
  background: rgba(0,0,0,0.2);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

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

.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dark);
}

.preview-tab-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.preview-viewport {
  flex-1: 1;
  padding: 25px;
  overflow-y: auto;
  text-align: left;
}

/* Share modal details */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.share-modal {
  width: 90%;
  max-width: 500px;
  padding: 30px;
  text-align: center;
}

.share-modal svg {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.share-url-container {
  display: flex;
  gap: 10px;
  margin: 25px 0 15px;
}

.share-url-container input {
  flex: 1;
  padding: 12px 15px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}

/* Dark/Light mode switch button */
.theme-switch {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  background: var(--bg-card);
  border: 1px solid var(--border);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  color: var(--text-main);
  transition: var(--transition);
}

.theme-switch:hover {
  transform: scale(1.1);
  border-color: var(--primary);
}

/* Pricing Page Styling */
.pricing-section {
  padding: 100px 4%;
  text-align: center;
  background: rgba(0,0,0,0.1);
  position: relative;
}

.pricing-title {
  margin-bottom: 60px;
}

.pricing-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 45px 35px;
  position: relative;
  overflow: hidden;
  border-color: var(--primary);
}

.pricing-badge {
  position: absolute;
  top: 25px;
  right: -35px;
  background: var(--accent);
  color: black;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 40px;
  transform: rotate(45deg);
  letter-spacing: 1px;
}

.pricing-price {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  margin: 25px 0 10px;
}

.pricing-price span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 35px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.pricing-features svg {
  color: var(--accent);
  shrink: 0;
}
