:root {
  /* Premium Light Theme */
  --bg: #FDFCFB;
  /* Very subtle warm white */
  --surface: #FFFFFF;
  --surface-alt: #F3F4F6;

  --text-main: #111827;
  /* Near black */
  --text-muted: #4B5563;
  /* Gray 600 */
  --text-light: #9CA3AF;
  /* Gray 400 */

  --primary: #1E3A8A;
  /* Deep Navy Blue */
  --primary-dark: #1e293b;
  --accent: #B45309;
  /* Deep Gold/Bronze */
  --accent-light: #F59E0B;
  /* Lighter gold for gradients */

  --border: #E5E7EB;
  --border-prominent: #D1D5DB;

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* Subtle background pattern/gradient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(200, 200, 255, 0.05), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(255, 220, 180, 0.08), transparent 25%);
  z-index: -1;
  pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.2;
  margin-top: 0;
  font-weight: 800;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.container {
  max-width: 1280px;
  margin: auto;
  padding: 0 24px;
}

/* --- NAVIGATION --- */
.nav {
  position: sticky;
  top: 10px;
  z-index: 1000;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 20px;
}

.nav-inner {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
  border-radius: 999px;
  /* Pill shape */
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-inner:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
  background: rgba(255, 255, 255, 0.95);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand img {
  height: 70px;
  width: auto;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav nav a:not(.btn):hover {
  color: var(--primary);
}

/* --- HERO --- */
.hero {
  padding: 140px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  color: var(--primary);
}

.hero .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 40px;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 99px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-body);
}

.btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.35);
}

.btn:not(.primary) {
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn:not(.primary):hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F8FAFC;
}

.btn.small {
  padding: 10px 20px;
  font-size: 0.9rem;
  background: var(--primary);
  color: white;
}

.btn.small:hover {
  background: var(--primary-dark);
}

.cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 80px;
}

/* --- VIDEO --- */
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: #000;
  border: 4px solid white;
}

.video-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(180, 83, 9, 0.15) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

canvas {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

.video-badge {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* --- SECTIONS COMMON --- */
.section {
  padding: 100px 0;
}

/* Titles */
.section h2,
.final h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 16px;
}

.lead {
  font-size: 1.125rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
  color: var(--text-muted);
}

/* --- FEATURES GRID --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 40px;
  height: 40px;
  color: var(--primary);
  margin-bottom: 20px;
  stroke-width: 1.5;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 800;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* --- CALCULATOR --- */
.calculator-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  position: relative;
  overflow: hidden;
}

.calculator-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}

.calculator-inputs {
  display: grid;
  gap: 28px;
  margin-bottom: 48px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.input-hint {
  color: var(--text-light);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: -4px;
}

.input-group input[type="number"] {
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-main);
  transition: all 0.2s;
  font-weight: 500;
}

.input-group input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.input-with-prefix {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  transition: all 0.2s;
}

.input-with-prefix:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.input-with-prefix input {
  border: none;
  background: transparent;
  padding: 14px 0;
  flex: 1;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-main);
  font-weight: 500;
}

.input-with-prefix input:focus {
  outline: none;
  box-shadow: none;
}

.prefix,
.suffix {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

.prefix {
  font-weight: 600;
  color: var(--primary);
}

.calculator-result {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 40px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.25);
}

.result-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin-bottom: 16px;
  font-weight: 500;
}

.result-value {
  color: white;
  font-size: 3rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.result-footnote {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-top: 16px;
  margin-bottom: 0;
  font-style: italic;
}

@media (max-width: 768px) {
  .calculator-wrapper {
    padding: 32px 24px;
  }

  .result-value {
    font-size: 2.2rem;
  }
}

/* --- PROCESS --- */
#process {
  background: var(--surface-alt);
  /* Light gray background for contrast */
  position: relative;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.step {
  background: var(--surface);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
}

.step span {
  display: inline-block;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(180, 83, 9, 0.15);
  /* Faded accent */
  font-family: var(--font-heading);
  line-height: 1;
  margin-bottom: 20px;
  position: absolute;
  top: 20px;
  right: 20px;
}

.step h3 {
  font-size: 1.5rem;
  margin-top: 20px;
  margin-bottom: 12px;
}

/* --- FINAL CTA --- */
.final {
  text-align: center;
  padding: 120px 20px;
  background: var(--surface);
}

.final h2 {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 24px;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .nav-inner {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
    border-radius: 16px;
    /* Less pill-like on mobile */
  }

  .nav nav {
    gap: 16px;
    width: 100%;
    justify-content: center;
  }

  .nav nav a {
    font-size: 0.85rem;
  }

  .btn.small {
    display: none;
  }

  /* Hide book demo button on tiny mobile if crowded? Or keep it. Let's keep it but flex it. */
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* FOOTER */
.site-footer {
  background: var(--surface-alt);
  padding: 80px 0;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer .brand span {
  font-size: 1.5rem;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* VIDEO MODAL */
.video-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.video-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  animation: slideUp 0.4s ease;
}

.video-modal-content video {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal-close:hover {
  transform: rotate(90deg);
  color: var(--accent);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .video-modal-content {
    width: 95%;
  }

  .video-modal-close {
    top: -40px;
    font-size: 2rem;
  }
}