html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  z-index: 100;
}

nav .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: #666;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #2563eb;
}

nav a.btn-nav {
  background: #2563eb;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

nav a.btn-nav:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  margin-top: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6rem 2rem;
  text-align: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .container {
  max-width: 700px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
}

.btn-primary {
  background: white;
  color: #667eea;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: #667eea;
}

/* Calculator Sections */
.calculator-section {
  padding: 6rem 2rem;
  background: #f8f9fa;
}

.calculator-section.salary-bg {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.calculator-section.salary-bg .calculator-header h2,
.calculator-section.salary-bg .calculator-header p {
  color: white;
}

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

.calculator-header {
  text-align: center;
  margin-bottom: 3rem;
}

.calculator-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.calculator-header p {
  font-size: 1.1rem;
  opacity: 0.8;
  color: #666;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.calculator-inputs {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

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

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #2563eb;
}

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

.result-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.result-card h3 {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
}

.section-label {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #e0e7ff;
  color: #1e3a8a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.assumptions-card {
  background: #ffffff;
  margin-top: 2.5rem;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  border: 1px solid #e5e7eb;
}

.assumptions-card h3 {
  margin-bottom: 1rem;
  color: #111827;
}

.assumptions-card ul {
  list-style: disc;
  margin-left: 1.25rem;
  color: #374151;
}

.advanced-options {
  margin-top: 1.5rem;
  background: #f8fafc;
  padding: 1.75rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.hint {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}

.calculator-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #eef2ff;
  border-radius: 12px;
  border: 1px solid #c7d2fe;
}

.calculator-cta p {
  margin: 0;
  color: #1e293b;
  font-weight: 700;
}

/* Features Section */
.features {
  padding: 6rem 2rem;
  background: #f8f9fa;
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #1a1a1a;
}

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

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #2563eb;
}

.feature-card p {
  color: #666;
}

/* Testimonials */
.testimonials {
  padding: 6rem 2rem;
  background: white;
}

.testimonials h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

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

.testimonial-card {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  border-left: 4px solid #2563eb;
}

.testimonial-card p {
  margin-bottom: 1.5rem;
  color: #555;
  font-style: italic;
}

.testimonial-author {
  font-weight: 600;
  color: #1a1a1a;
}

/* Signup Section */
.signup {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 5rem 2rem;
  text-align: center;
}

.signup h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.signup p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.signup-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.signup-form input {
  flex: 1;
  min-width: 250px;
  padding: 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

.signup-form button {
  padding: 1rem 2rem;
  background: white;
  color: #667eea;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.signup-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Ad Spaces */
.ad-space {
  background: #e5e7eb;
  border: 2px dashed #999;
  padding: 2rem;
  text-align: center;
  color: #666;
  margin: 2rem 0;
  border-radius: 8px;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-space.banner {
  min-height: 100px;
}

/* Footer */
footer {
  background: #1a1a1a;
  color: white;
  padding: 3rem 2rem;
  text-align: center;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

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

/* Scrolling animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

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

  .features h2,
  .testimonials h2,
  .signup h2,
  .calculator-header h2 {
    font-size: 1.8rem;
  }

  .cta-group {
    flex-direction: column;
  }

  nav .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }

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

  .calculator-results {
    grid-template-columns: 1fr;
  }

  .result-card {
    padding: 1rem;
  }

  .result-value {
    font-size: 1.2rem;
  }
}

/* Advanced assumptions (native disclosure) */
.advanced-options {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
}

.advanced-options summary {
  cursor: pointer;
  font-weight: 700;
  color: #2563eb;
}

.advanced-options[open] summary {
  margin-bottom: 0.5rem;
}

.advanced-options .hint {
  margin: 0 0 1rem;
}

[hidden] {
  display: none !important;
}

/* Form states */
.input-group input[aria-invalid="true"] {
  border-color: #dc2626;
}

.field-error {
  display: block;
  margin-top: 0.35rem;
  color: #b91c1c;
  font-size: 0.875rem;
}

.form-error {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-weight: 600;
}

.calculator-results[aria-busy="true"] .result-value {
  opacity: 0.4;
}

.result-card.highlight {
  grid-column: 1 / -1;
  border: 2px solid #2563eb;
}

.result-card.highlight .result-value {
  font-size: 2rem;
}

.disclaimer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.85;
}

.ad-space small {
  opacity: 0.7;
}

.ad-space.ad-footer {
  margin: 4rem 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* Live calculation status, replaces the old submit button */
.live-status {
  margin-top: 0.5rem;
  min-height: 1.25rem;
  color: #64748b;
  font-size: 0.875rem;
}

.result-note {
  margin-top: 0.5rem;
  color: #64748b;
  font-size: 0.875rem;
}

.yearly-card ol {
  columns: 2;
  column-gap: 2rem;
  padding-left: 1.25rem;
}

@media (max-width: 600px) {
  .yearly-card ol {
    columns: 1;
  }
}
