/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #111827;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Layout */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 720px; }
.text-center { text-align: center; }
.relative { position: relative; z-index: 1; }
.text-blue { color: #2563eb; }
.text-lg { font-size: 1.125rem; color: #6b7280; line-height: 1.75; margin-bottom: 16px; }
.text-lg strong { color: #111827; }

/* Nav */
.nav {
  position: fixed; top: 0; width: 100%; z-index: 50;
  background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-brand span { font-size: 1.25rem; font-weight: 700; color: #f1f5f9; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: #94a3b8; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none; background: none; border: none; color: #94a3b8; cursor: pointer; padding: 4px;
}
.nav-mobile {
  display: none; flex-direction: column; gap: 4px;
  max-width: 1120px; margin: 0 auto; padding: 0 24px 16px;
}
.nav-mobile a { font-size: 0.9375rem; font-weight: 500; color: #94a3b8; padding: 8px 0; transition: color 0.2s; }
.nav-mobile a:hover { color: #fff; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-open .nav-mobile { display: flex; }
  .hide-mobile { display: none !important; }
  .proj-desktop { display: none !important; }
  .proj-mobile { display: block !important; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; border-radius: 12px; transition: all 0.2s; border: none; cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-sm { font-size: 0.875rem; padding: 10px 20px; border-radius: 8px; }
.btn-lg { font-size: 1.125rem; padding: 16px 32px; box-shadow: 0 10px 25px -5px rgba(37,99,235,0.2); }
.btn-lg:hover { box-shadow: 0 10px 25px -5px rgba(37,99,235,0.3); }

/* Hero */
.hero { padding: 128px 0 80px; background: #0f172a; position: relative; overflow: hidden; }
.hero-glow {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 500px;
  background: linear-gradient(to bottom, rgba(37,99,235,0.15), transparent);
  border-radius: 50%; filter: blur(60px); opacity: 0.6; pointer-events: none;
}
.hero h1 { font-size: 3.75rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 24px; line-height: 1.15; color: #fff; }
.hero-subtitle { font-size: 1.25rem; color: #94a3b8; max-width: 640px; margin: 0 auto 16px; }
.hero-note { font-size: 0.875rem; color: #64748b; margin-top: 16px; }
.hero-screenshot { margin-top: 64px; padding: 0 24px; }

.screenshot-frame {
  border-radius: 16px; overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
}
.hero-screenshot .screenshot-frame {
  transform: rotate(0.5deg);
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow:
    0 0 30px rgba(59, 130, 246, 0.25),
    0 0 60px rgba(59, 130, 246, 0.1),
    0 25px 50px -12px rgba(0,0,0,0.4);
}

/* Sections */
.section { padding: 80px 0; }
.bg-gray { background: #f9fafb; }
.section-title { font-size: 1.875rem; font-weight: 700; margin-bottom: 16px; text-align: center; }
.section-subtitle { color: #6b7280; text-align: center; max-width: 640px; margin: 0 auto 56px; }

/* Grid */
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Cards */
.card {
  background: #fff; border-radius: 16px; padding: 32px;
  border: 1px solid #f3f4f6; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 0.875rem; color: #6b7280; line-height: 1.7; }
.card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.card-desc { color: #6b7280; margin-bottom: 20px; }
.card-question { font-size: 1rem; font-weight: 500; color: #374151; line-height: 1.6; font-style: italic; }
.card-row { display: flex; align-items: flex-start; gap: 16px; padding: 20px; border-radius: 12px; }
.card-hover { transition: all 0.3s; }
.card-hover:hover { box-shadow: 0 10px 40px rgba(0,0,0,0.08); transform: translateY(-4px); }

/* Icon boxes */
.icon-box {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.icon-box-sm {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-red { background: #fef2f2; color: #ef4444; }
.icon-amber { background: #fffbeb; color: #f59e0b; }
.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-violet { background: #f5f3ff; color: #7c3aed; }
.icon-green { background: #f0fdf4; color: #16a34a; }

/* Checklists */
.check-list { list-style: none; font-size: 0.875rem; color: #6b7280; }
.check-list li {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px;
}
.check-list li::before {
  content: '';
  display: inline-block; width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0;
  background-size: contain; background-repeat: no-repeat;
}
.check-blue li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
.check-violet li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* Split feature */
.split-feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; margin-bottom: 56px;
}
.split-feature.reverse { direction: rtl; }
.split-feature.reverse > * { direction: ltr; }
.feature-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; }
.split-feature p { color: #6b7280; line-height: 1.7; }

/* Steps */
.steps { display: flex; flex-direction: column; gap: 16px; }
.step {
  display: flex; align-items: flex-start; gap: 20px;
  background: #fff; border-radius: 12px; border: 1px solid #f3f4f6;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); padding: 20px;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: #eff6ff; color: #2563eb;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem; flex-shrink: 0;
}
.step h3 { font-weight: 600; margin-bottom: 4px; }
.step p { font-size: 0.875rem; color: #6b7280; line-height: 1.7; }

/* The Maths */
.maths-section { background: #0f172a; padding: 96px 0; }
.maths-heading { color: #fff; }
.maths-subtitle { color: #94a3b8; }

.maths-equation {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  flex-wrap: wrap; margin-bottom: 64px;
}
/* Force = and result card onto a second centred column */
.maths-operator--equals-break {
  flex-basis: 100%; height: 0;
}
.maths-operator--equals-group {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.maths-operand {
  text-align: center; padding: 24px 32px;
  background: rgba(255,255,255,0.05); border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
}
.stat-number { font-size: 2.75rem; font-weight: 800; color: #60a5fa; margin-bottom: 4px; letter-spacing: -0.02em; }
.stat-label { font-size: 0.8125rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.maths-operator { font-size: 2rem; font-weight: 700; color: #475569; }

.maths-reveal { text-align: center; }
.maths-total-wrapper {
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(37,99,235,0.05));
  border: 1px solid rgba(37,99,235,0.25); border-radius: 24px;
  padding: 48px 40px; display: inline-block; margin-bottom: 32px;
}
.maths-total-label { font-size: 1rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.maths-total { font-size: 5rem; font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; }
.maths-plus { color: #ef4444; }
.maths-total-sub { font-size: 1.25rem; color: #60a5fa; font-weight: 600; }

.maths-kicker { max-width: 520px; margin: 40px auto 0; }
.maths-kicker p { font-size: 1.125rem; color: #94a3b8; line-height: 1.7; }
.maths-kicker strong { color: #fff; }

/* Editable number inputs styled as stat text */
.stat-number--editable {
  background: transparent;
  border: none;
  border-bottom: 2px dashed rgba(96, 165, 250, 0.3);
  color: #60a5fa;
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  width: 100%;
  outline: none;
  padding: 0;
  margin-bottom: 4px;
  font-family: inherit;
  -moz-appearance: textfield;
}
.stat-number--editable::-webkit-outer-spin-button,
.stat-number--editable::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stat-number--editable:focus {
  border-bottom-color: #60a5fa;
  border-bottom-style: solid;
}

/* Interactive calculator */
.maths-operand--input {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.maths-operand--input:hover,
.maths-operand--input:focus-within {
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.08);
}

.maths-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #60a5fa var(--progress, 0%), rgba(255,255,255,0.1) var(--progress, 0%));
  outline: none;
  margin: 12px 0 4px;
  cursor: pointer;
}
.maths-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #60a5fa;
  border: 3px solid #0f172a;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
  cursor: grab;
  transition: box-shadow 0.15s, transform 0.15s;
}
.maths-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.2);
  transform: scale(1.1);
}
.maths-range::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(0.95);
}
.maths-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #60a5fa;
  border: 3px solid #0f172a;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
  cursor: grab;
}
.maths-range::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #60a5fa var(--progress, 0%), rgba(255,255,255,0.1) var(--progress, 0%));
}

.maths-rate-control {
  text-align: center;
  max-width: 320px;
  margin: -32px auto 48px;
}
.maths-rate-label {
  font-size: 0.875rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}
.maths-rate-label output {
  color: #60a5fa;
  font-weight: 700;
}
.maths-range--rate {
  margin-top: 8px;
}

@keyframes pulse-total {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.maths-total.is-updating {
  animation: pulse-total 0.3s ease-out;
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #f9fafb; border-radius: 12px; border: 1px solid #e5e7eb;
  padding: 0; overflow: hidden;
}
.faq-question {
  font-weight: 600; font-size: 1rem; padding: 20px 24px;
  cursor: pointer; list-style: none; display: flex; align-items: center;
  justify-content: space-between;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+'; font-size: 1.25rem; color: #9ca3af; flex-shrink: 0; margin-left: 16px;
}
details[open] .faq-question::after { content: '\2212'; }
.faq-answer {
  padding: 0 24px 20px; font-size: 0.9375rem; color: #6b7280; line-height: 1.75;
}

/* Footer */
.footer { background: #0f172a; border-top: 1px solid rgba(255,255,255,0.08); padding: 48px 0 24px; color: #94a3b8; }
.footer-grid {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.footer-tagline { font-size: 0.875rem; color: #9ca3af; margin-top: 12px; line-height: 1.7; }
.footer-built-by { font-size: 0.8125rem; color: #6b7280; margin-top: 12px; line-height: 1.6; }
.footer-built-by a { color: #2563eb; font-weight: 500; }
.footer-built-by a:hover { text-decoration: underline; }
.footer-bottom a { color: #9ca3af; }
.footer-bottom a:hover { color: #e2e8f0; }
.footer-heading { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #e2e8f0; margin-bottom: 12px; }
.footer-nav { list-style: none; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { font-size: 0.875rem; color: #9ca3af; transition: color 0.2s; }
.footer-nav a:hover { color: #e2e8f0; }
.footer-bottom {
  max-width: 1120px; margin: 0 auto; padding: 24px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08); margin-top: 32px;
  font-size: 0.875rem; color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .split-feature { grid-template-columns: 1fr; }
  .split-feature.reverse { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 48px 0; }
  .maths-equation { gap: 12px; flex-direction: column; align-items: center; }
  .maths-operand { width: 100%; max-width: 280px; }
  .maths-operator--equals-break { display: none; }
  .maths-operand { padding: 16px 20px; }
  .stat-number { font-size: 2rem; }
  .maths-operator { font-size: 1.5rem; }
  .maths-total { font-size: clamp(1.75rem, 8vw, 3.5rem); word-break: break-word; }
  .maths-total-wrapper { padding: 32px 16px; max-width: 100%; box-sizing: border-box; }
  .maths-section { padding: 64px 0; }
  .stat-number--editable { font-size: 2rem; }
  .maths-rate-control { max-width: 260px; margin: -16px auto 32px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 3rem; }
}
