/*
Theme Name: Coast FIRE Calculator
Theme URI: https://yoursite.com/coast-fire
Author: Your Name
Author URI: https://yoursite.com
Description: A sleek, modern Coast FIRE calculator theme with dark mode design and interactive wealth projections.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coast-fire
Tags: one-column, custom-colors, custom-menu, featured-images, theme-options, translation-ready
*/

/* ===== CSS Variables ===== */
:root {
  --primary: #14b8a6;
  --primary-glow: #5eead4;
  --background: #0a0f1a;
  --background-secondary: #111827;
  --foreground: #f8fafc;
  --muted: #94a3b8;
  --card-bg: #1e293b;
  --card-border: #334155;
  --accent: #06b6d4;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --gradient-primary: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
  --gradient-glow: linear-gradient(135deg, rgba(20, 184, 166, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
  --shadow-glow: 0 0 40px rgba(20, 184, 166, 0.3);
  --shadow-card: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 15, 26, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo span {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}

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

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.main-nav a:hover {
  color: var(--primary);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  color: var(--muted);
  font-size: 0.875rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--background);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(20, 184, 166, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: var(--card-bg);
  border-color: var(--primary);
}

/* ===== Calculator Section ===== */
.calculator-section {
  background: var(--background-secondary);
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .calculator-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Cards ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--muted);
  font-size: 0.875rem;
}

/* ===== Form Elements ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 1px solid var(--card-border);
  border-radius: 0.5rem;
  color: var(--foreground);
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.form-input::placeholder {
  color: var(--muted);
}

/* Range Slider */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--card-border);
  border-radius: 3px;
  margin-top: 0.5rem;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
  transition: var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

/* ===== Results Display ===== */
.results-card {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(20, 184, 166, 0.1) 100%);
  border-color: var(--primary);
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--card-border);
}

.result-item:last-child {
  border-bottom: none;
}

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

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.coast-fire-number {
  text-align: center;
  padding: 2rem;
  background: var(--gradient-glow);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
}

.coast-fire-number .label {
  color: var(--muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.coast-fire-number .value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--card-border);
  border-radius: 6px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 6px;
  transition: width 0.5s ease;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.status-badge.info {
  background: rgba(20, 184, 166, 0.2);
  color: var(--primary);
}

/* ===== Chart ===== */
.chart-container {
  width: 100%;
  height: 400px;
  margin-top: 2rem;
}

/* ===== How It Works ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.step-card {
  text-align: center;
  padding: 2rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--background);
  margin-bottom: 1.5rem;
}

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

.step-card p {
  color: var(--muted);
}

/* Formula Box */
.formula-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.formula {
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  color: var(--primary);
  background: var(--background);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  overflow-x: auto;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--background-secondary);
  border-top: 1px solid var(--card-border);
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

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

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-nav a:hover {
  color: var(--primary);
}

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

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
    gap: 1rem;
  }
  
  .main-nav ul {
    gap: 1rem;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-nav ul {
    justify-content: center;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
