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

:root {
  --navy: #0a1045;
  --deep-blue: #1b3a5c;
  --gold: #d4a373;
  --blush: #f8e1e4;
  --bg: #f4f5f0;
  --white: #ffffff;
  --text: #0a1045;
  --text-secondary: #6b7b8c;
  --text-muted: #a0abb8;
  --border: rgba(10, 16, 69, 0.1);
  --border-light: rgba(10, 16, 69, 0.06);
  --green: #10b981;
  --red: #ef4444;
  --radius: 12px;
  --radius-pill: 100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

ul {
  list-style: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.1;
}

.mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.narrow {
  max-width: 800px;
}

.section {
  padding: clamp(60px, 8vw, 120px) 0;
}

.section-sm {
  padding: 40px 0;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(244, 245, 240, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.navbar-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.logo-text span {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.navbar.scrolled .logo-text,
.navbar.scrolled .logo-text span {
  color: var(--text);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.3s ease;
}

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

.btn-nav {
  display: none;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-nav:hover {
  background: var(--gold);
  color: var(--navy);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

.hamburger.active span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(244, 245, 240, 0.98);
  backdrop-filter: blur(12px);
  z-index: 40;
  padding-top: 100px;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
}

.mobile-menu a:hover {
  color: var(--gold);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(to top, rgba(10,16,69,0.65) 0%, rgba(10,16,69,0.2) 50%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding-bottom: clamp(64px, 10vh, 120px);
}

.hero-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
  line-height: 1.05;
}

.hero h1 span {
  display: block;
}

.hero p {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  max-width: 540px;
  margin-top: 20px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  margin-bottom: 16px;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  border-radius: var(--radius-pill);
  padding: 14px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(212,163,115,0.25);
}

.btn-primary:hover {
  background: #fff;
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-pill);
  padding: 14px 32px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ===== DARK SECTIONS ===== */
.dark-section {
  background: var(--navy);
  color: #fff;
}

.dark-section h2 {
  color: #fff;
}

/* ===== TRUSTED BY ===== */
.trusted-by {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.trusted-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
}

.logo-row span {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.logo-row span:hover {
  color: var(--text);
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-header h2 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  color: var(--text);
  margin-top: 12px;
}

.dark-section .section-header h2 {
  color: #fff;
}

/* ===== GRID LAYOUTS ===== */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 40px;
}

.card-dark {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 16px;
}

.gold-line {
  width: 40px;
  height: 2px;
  background: var(--gold);
}

/* ===== PROBLEM SECTION ===== */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 700;
  color: var(--gold);
  opacity: 0.4;
  line-height: 1;
}

/* ===== DEMO SECTION ===== */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.demo-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(10,16,69,0.12);
}

.step {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* ===== PRICING ===== */
.pricing-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.toggle-track {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
}

.toggle-btn {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.toggle-btn.active {
  background: var(--navy);
  color: #fff;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 40px 32px;
  position: relative;
}

.pricing-card.popular {
  border-color: var(--gold);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.pricing-price {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 700;
  color: var(--text);
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.feature-list svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
}

.btn-outline {
  display: block;
  text-align: center;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 32px;
}

.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}

.btn-filled {
  display: block;
  text-align: center;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 32px;
}

.btn-filled:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

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

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.3s ease;
}

.faq-question.open svg {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.faq-answer.open {
  max-height: 300px;
  opacity: 1;
}

.faq-answer p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-bottom: 24px;
}

/* ===== CTA FORM ===== */
.cta-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 520px;
  margin: 40px auto 0;
}

.cta-form input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  padding: 16px 24px;
  color: #fff;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.cta-form input::placeholder {
  color: rgba(255,255,255,0.4);
}

.cta-form input:focus {
  border-color: var(--gold);
}

.cta-form button {
  background: var(--gold);
  color: var(--navy);
  border-radius: var(--radius-pill);
  padding: 16px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 12px;
  transition: all 0.3s ease;
}

.cta-form button:hover {
  background: #fff;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--navy);
  color: #fff;
  padding: 80px 0 40px;
}

.footer a {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  transition: color 0.3s ease;
  line-height: 2.2;
  display: block;
}

.footer a:hover {
  color: #fff;
}

.footer h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.3);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: inline-block;
  color: rgba(255,255,255,0.4);
  line-height: 1;
}

.footer-social a:hover {
  color: #fff;
}

/* ===== CHAT WIDGET ===== */
.chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}

.chat-bubble:hover {
  background: var(--gold);
  color: var(--navy);
}

.chat-panel {
  display: none;
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 50;
  width: 340px;
  max-height: 480px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  border: 1px solid var(--border-light);
  flex-direction: column;
  overflow: hidden;
}

.chat-panel.open {
  display: flex;
}

.chat-header {
  background: var(--navy);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.875rem;
}

.chat-header p {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.chat-header span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 200px;
}

.chat-msg {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.chat-msg.bot {
  background: var(--bg);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  background: var(--navy);
  color: #fff;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-light);
}

.chat-input-row input {
  flex: 1;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-size: 0.875rem;
  outline: none;
}

.chat-input-row input:focus {
  border-color: var(--gold);
}

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.chat-send:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ===== CONTACT FORM ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s ease;
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* ===== TABLE ===== */
.comparison-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: center;
  font-size: 0.9375rem;
}

.comparison-table th {
  font-weight: 600;
  border-bottom: 2px solid var(--navy);
}

.comparison-table td:first-child,
.comparison-table th:first-child {
  text-align: left;
}

.comparison-table tbody tr:nth-child(even) {
  background: var(--bg);
}

.comparison-table tbody tr {
  border-bottom: 1px solid var(--border);
}

/* ===== TAB NAV ===== */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
  justify-content: center;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--white);
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: var(--navy);
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===== TIMELINE ===== */
.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.timeline-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.timeline-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin: 8px auto 0;
}

/* ===== BLOG ===== */
.blog-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.blog-card:hover {
  box-shadow: 0 10px 40px rgba(10,16,69,0.08);
}

.blog-card:hover h3 {
  color: var(--gold);
}

.blog-thumb {
  width: 100%;
  height: 128px;
  background: linear-gradient(135deg, rgba(10,16,69,0.03), rgba(212,163,115,0.08));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.blog-thumb svg {
  color: var(--gold);
  opacity: 0.3;
}

.blog-card:hover .blog-thumb svg {
  opacity: 0.6;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SUCCESS STATE ===== */
.success-box {
  text-align: center;
  padding: 48px 0;
}

.success-box svg {
  width: 64px;
  height: 64px;
  color: var(--green);
  margin: 0 auto 16px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .cta-form {
    flex-direction: row;
  }

  .cta-form input {
    border-radius: var(--radius-pill) 0 0 var(--radius-pill);
    border-right: none;
  }

  .cta-form button {
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
    margin-top: 0;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .btn-nav { display: inline-block; }
  .hamburger { display: none; }
  .mobile-menu { display: none !important; }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .problem-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
  }

  .problem-grid > div:not(:first-child) {
    border-left: 1px solid var(--border);
    padding-left: 32px;
  }

  .demo-grid {
    grid-template-columns: 55% 45%;
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pricing-card.popular {
    transform: translateY(-8px);
  }

  .contact-grid {
    grid-template-columns: 1.2fr 1fr;
  }

  .hero-buttons {
    margin-bottom: 0;
  }
}

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

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .solutions-grid {
    grid-template-columns: 1fr 1fr;
  }
}
