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

:root {
  --primary-blue: #3698da;
  --secondary-blue: #0ea5e9;
  --dark-navy: #0f172a;
  --text-main: #0f172a;
  --text-muted: #475569;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

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

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

.section {
  padding: 6rem 0;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

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

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

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

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

.btn-primary {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(0, 112, 243, 0.39);
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 112, 243, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
}

.btn-outline:hover {
  background: rgba(0, 112, 243, 0.05);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 8rem 0 2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 15%, #f1f5f9 85%, #ffffff 100%);
}

.hero p {
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.25rem;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

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

@media (max-width: 900px) {
  .roi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .roi-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(0, 112, 243, 0.3);
}

.feature-card h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(14, 165, 233, 0.1);
  color: var(--secondary-blue);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-blue);
  font-weight: bold;
  background: rgba(0, 112, 243, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* Pricing Tables */
.pricing-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 6rem 0;
}

.pricing-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
}

.pricing-table-wrapper {
  overflow-x: auto;
  margin-top: 2rem;
}

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

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

th {
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--bg-main);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

th:first-child { border-top-left-radius: var(--radius-md); }
th:last-child { border-top-right-radius: var(--radius-md); }

td {
  color: var(--text-muted);
  font-size: 1.05rem;
}

tr:last-child td {
  border-bottom: none;
}

/* Call to Action */
.cta-section {
  text-align: center;
  padding: 6rem 0;
  background: var(--dark-navy);
  color: white;
}

.cta-section h2, .cta-section p {
  color: white;
}

.cta-section p {
  opacity: 0.8;
  margin-bottom: 2rem;
}

/* FAQs */
.faq-section {
  padding: 6rem 0;
  background: var(--bg-main);
}

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

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-main);
  padding: 1.5rem;
}

.faq-question:hover {
  color: var(--primary-blue);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
  display: none;
  font-size: 1.05rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.faq-answer.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.icon-chevron {
  transition: transform 0.3s ease;
}
.icon-chevron.active {
  transform: rotate(180deg);
}

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

/* Logo Marquee */
.logo-testimonial-section {
  overflow: hidden;
  background: transparent;
  padding-bottom: 2.5rem;
}

.logo-marquee {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.logo-marquee::before, .logo-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  width: 150px;
  height: 100%;
  z-index: 2;
}

.logo-marquee::before {
  left: 0;
  background: linear-gradient(to right, #ffffff 0%, transparent 100%);
}

.logo-marquee::after {
  right: 0;
  background: linear-gradient(to left, #ffffff 0%, transparent 100%);
}

.logo-marquee-track {
  display: inline-flex;
  gap: 4rem;
  align-items: center;
  animation: marquee 35s linear infinite;
  padding-left: 4rem;
}

.logo-marquee-track img {
  height: 35px;
  width: auto;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.logo-marquee-track img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Unified Calculator */
.unified-calculator {
  margin-top: 3rem;
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.calc-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.calc-results {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
}
.calc-toggles {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.toggle-btn {
  display: inline-block;
  cursor: pointer;
}
.toggle-btn input {
  display: none;
}
.toggle-btn span {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
  background: white;
  white-space: nowrap;
}
.toggle-btn input:checked + span {
  border-color: var(--primary-blue);
  background: rgba(0, 112, 243, 0.05);
  color: var(--primary-blue);
}
.calc-value {
  white-space: nowrap;
}
.calc-control-panel {
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: opacity 0.3s ease;
  position: relative;
}
.calc-control-panel.disabled::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10;
  cursor: not-allowed;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}
.shake-anim {
  animation: shake 0.4s ease-in-out;
}
.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--border-color);
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-blue);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.1s;
}
.slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
}
.number-input {
  width: 120px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  text-align: center;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-main);
}
.number-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.1);
}

/* Markdown Docs Styling */
.docs-section {
  padding: 4rem 0;
  background: var(--bg-main);
  min-height: 80vh;
}
.docs-container {
  max-width: 900px;
  background: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin: 0 auto;
}
.docs-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.back-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
}
.back-link:hover {
  text-decoration: underline;
}
.markdown-body {
  font-size: 1.1rem;
  color: var(--text-main);
  line-height: 1.7;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--dark-navy);
}
.markdown-body h1 {
  font-size: 2.25rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.markdown-body h2 {
  font-size: 1.75rem;
}
.markdown-body p, .markdown-body ul, .markdown-body ol {
  margin-bottom: 1.25rem;
}
.markdown-body ul, .markdown-body ol {
  padding-left: 2rem;
}
.markdown-body li {
  margin-bottom: 0.5rem;
}
.markdown-body strong {
  font-weight: 700;
}
.markdown-body hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}
.markdown-body th, .markdown-body td {
  border: 1px solid var(--border-color);
  padding: 1rem;
  text-align: left;
}
.markdown-body th {
  background: var(--bg-main);
  font-weight: 600;
}

/* Editable fields */
.editable-field {
  background-color: rgba(0, 112, 243, 0.1);
  border-bottom: 1px dashed var(--primary-blue);
  padding: 0 0.25rem;
  border-radius: 3px;
  cursor: text;
  color: var(--primary-blue);
  font-weight: 600;
  transition: all 0.2s ease;
}
.editable-field:hover, .editable-field:focus {
  background-color: rgba(0, 112, 243, 0.2);
  outline: none;
}

/* Print styling */
@media print {
  body {
    background: white !important;
  }
  .navbar, .footer, .cta-section, .btn-print, .back-link {
    display: none !important;
  }
  .docs-section {
    padding: 0 !important;
    background: white !important;
  }
  .docs-container {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
  .docs-header {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .editable-field {
    background-color: transparent !important;
    border-bottom: none !important;
    color: inherit !important;
    font-weight: inherit !important;
    padding: 0 !important;
  }
}

@media (max-width: 768px) {
  .unified-calculator {
    padding: 1.5rem;
  }
  .calc-controls-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .calc-control-panel {
    padding: 1rem;
  }
  .calc-results {
    padding: 1.5rem;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .docs-container {
    padding: 1.5rem;
  }
  .markdown-body h1 {
    font-size: 1.75rem;
  }
  .calc-toggles {
    flex-direction: column;
    align-items: stretch;
  }
  .toggle-btn span {
    display: block;
    text-align: center;
  }
  .calc-result-item#result-combined {
    padding-left: 0 !important;
    border-left: none !important;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
  }
  .number-input {
    width: 80px;
    padding: 0.5rem;
  }
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg-card);
}
