/* AffiMachine - Light Theme: White bg + Blue/Green/Yellow text + Red buttons */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f4f7fb;
  --bg-card: #ffffff;
  --bg-elevated: #f0f4fa;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #059669;
  --green-dark: #047857;
  --yellow: #d97706;
  --yellow-bright: #f59e0b;
  --red: #dc2626;
  --red-hover: #b91c1c;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.12);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 1.3rem; color: var(--blue); }
h3 { font-size: 1.3rem; margin-bottom: 0.85rem; color: var(--green); }

p {
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
  font-size: 1.05rem;
}

a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.section { padding: 85px 0; }
.section-dark { background: var(--bg-secondary); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

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

.logo {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  z-index: 1001;
}
.logo span { color: var(--red); }

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--blue); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== BUTTONS - RED PROMINENT ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--red);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}
.btn-primary:hover {
  background: var(--red-hover);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
  transform: translateY(-2px);
  color: #fff !important;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: #fff;
}

.btn-click {
  background: var(--red);
  color: #fff !important;
  padding: 11px 22px;
  font-size: 0.92rem;
  margin: 6px 5px;
  border-radius: 8px;
  display: inline-block;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.btn-click:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
  color: #fff !important;
}

/* ===== HERO ===== */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px 20px 70px;
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 60%);
  position: relative;
}

.hero-content { position: relative; z-index: 1; max-width: 880px; }

.hero-badge {
  display: inline-block;
  padding: 7px 18px;
  background: linear-gradient(90deg, rgba(37,99,235,0.12), rgba(5,150,105,0.1));
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--blue);
  margin-bottom: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero h1 {
  margin-bottom: 20px;
  color: var(--text-primary);
}
.hero h1 span { color: var(--red); }

.hero p {
  font-size: 1.2rem;
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 40px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}
.card:hover {
  border-color: var(--blue);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(5,150,105,0.12));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.5rem;
}

.card h3 { color: var(--blue); }

/* Forms */
.form-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 460px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.form-section h2 { text-align: center; margin-bottom: 8px; color: var(--blue); }
.form-section > p { text-align: center; margin-bottom: 26px; }

.form-group { margin-bottom: 16px; }

.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-group input::placeholder { color: var(--text-muted); }

.form-section button[type="submit"] {
  width: 100%;
  padding: 15px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}
.form-section button[type="submit"]:hover {
  background: var(--red-hover);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 70px 0 35px;
}

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

.footer-brand p { margin-top: 12px; max-width: 280px; color: var(--text-secondary); }

.footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--green);
  margin-bottom: 16px;
}

.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--text-secondary); font-size: 0.93rem; }
.footer ul a:hover { color: var(--blue); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Page hero */
.page-hero {
  padding: 140px 20px 60px;
  text-align: center;
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
}
.page-hero h1 {
  margin-bottom: 12px;
  color: var(--blue);
}

.content-block { max-width: 780px; margin: 0 auto; }
.content-block h2 { margin-top: 40px; margin-bottom: 12px; color: var(--blue); }
.content-block h3 { margin-top: 26px; color: var(--green); }
.content-block ul, .content-block ol {
  margin: 12px 0 20px 22px;
  color: var(--text-secondary);
}
.content-block li { margin-bottom: 8px; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
  margin-top: 40px;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px 26px;
  text-align: center;
  box-shadow: var(--shadow);
}
.pricing-card.featured {
  border: 2px solid var(--red);
  box-shadow: 0 8px 30px rgba(220, 38, 38, 0.15);
}
.pricing-card .price {
  font-size: 2.7rem;
  font-weight: 800;
  margin: 12px 0;
  color: var(--yellow);
}
.pricing-card .price span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}
.pricing-card ul {
  list-style: none;
  text-align: left;
  margin: 26px 0;
}
.pricing-card ul li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.pricing-card ul li::before {
  content: '✓ ';
  color: var(--green);
  font-weight: bold;
}

/* CTA */
.cta-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 16px;
  padding: 52px 32px;
  text-align: center;
  margin: 36px 0;
}

/* Images */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 36px;
}
.img-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}
.img-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.img-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.img-card .img-caption { padding: 18px; }
.img-card .img-caption h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--blue); }
.img-card .img-caption p { font-size: 0.9rem; margin-bottom: 0; }

.full-bleed-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ===== FUTURISTIC INTERACTIVE CHATBOT ===== */
.chatbot-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, var(--red) 0%, #f97316 50%, var(--blue) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 6px 25px rgba(220, 38, 38, 0.4);
  border: none;
  font-size: 1.6rem;
  transition: all 0.3s;
  animation: pulse-glow 2.5s infinite;
}
.chatbot-toggle:hover { transform: scale(1.1); }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  50% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); }
}

.chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 370px;
  max-width: calc(100vw - 28px);
  height: 520px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: none;
  flex-direction: column;
  z-index: 9998;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}
.chatbot-window.open { display: flex; animation: slideUp 0.3s ease; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chatbot-header {
  background: linear-gradient(135deg, var(--red), var(--blue));
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbot-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chatbot-header h4::before {
  content: '';
  width: 9px;
  height: 9px;
  background: #4ade80;
  border-radius: 50%;
  animation: blink 1.5s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chatbot-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.chatbot-close:hover { background: rgba(255,255,255,0.35); }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.chat-msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: msgIn 0.25s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot {
  background: #fff;
  color: var(--text-primary);
  align-self: flex-start;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.chat-msg.user {
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg.typing {
  background: #fff;
  border: 1px solid var(--border);
  align-self: flex-start;
  padding: 14px 18px;
}
.chat-msg.typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--blue);
  border-radius: 50%;
  margin: 0 2px;
  animation: bounce 1.2s infinite;
}
.chat-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 10px;
  background: #f8fafc;
}
.quick-replies button {
  background: #fff;
  border: 1px solid var(--blue);
  color: var(--blue);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-replies button:hover {
  background: var(--blue);
  color: #fff;
}

.chatbot-input-area {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: #fff;
}
.chatbot-input-area input {
  flex: 1;
  padding: 11px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.chatbot-input-area input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.chatbot-input-area button {
  background: var(--red);
  border: none;
  color: #fff;
  padding: 0 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.chatbot-input-area button:hover { background: var(--red-hover); }

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 90px 28px 40px;
    gap: 20px;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.08);
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.1rem; color: var(--text-primary); }
  .hamburger { display: flex; }

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

@media (max-width: 600px) {
  .section { padding: 55px 0; }
  .hero { padding: 115px 16px 55px; min-height: auto; }
  .hero h1 { font-size: 1.9rem; }
  .hero p { font-size: 1.05rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; }

  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .form-section { padding: 28px 18px; }
  .cta-banner { padding: 36px 18px; }
  .page-hero { padding: 120px 16px 45px; }

  .pricing-card, .card { padding: 24px 18px; }

  .chatbot-window {
    bottom: 90px;
    right: 10px;
    left: 10px;
    width: auto;
    height: 70vh;
    max-height: 520px;
  }
  .full-bleed-img { height: 220px; }
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 1.7rem; }
.mb-4 { margin-bottom: 1.7rem; }
.lead { font-size: 1.15rem; color: var(--text-secondary); }

.prose p { margin-bottom: 1.25rem; }
.prose h2 {
  border-bottom: 2px solid rgba(37,99,235,0.15);
  padding-bottom: 10px;
}
