/*
 * ai-chatbot.css — WC Digital Studio brand styling for the /ai-chatbot/ landing page.
 * Base rules mirror the homepage dark-glass design (index.html inline styles);
 * chat-console rules style the live assistant demo (ai-chatbot.js).
 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: #070711;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #070711; }
::-webkit-scrollbar-thumb { background: #0CA678; border-radius: 2px; }

/* ── Noise texture overlay ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── Gradient orbs ── */
.orb {
  position: fixed; border-radius: 50%; filter: blur(120px);
  pointer-events: none; z-index: 0;
}
.orb-1 { width: 600px; height: 600px; background: rgba(12,166,120,0.12); top: -200px; left: -200px; }
.orb-2 { width: 500px; height: 500px; background: rgba(79,216,176,0.10); bottom: 10%; right: -150px; }

/* ── Glass card ── */
.glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
}
.glass-strong {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.10);
}

/* ── Gradient text ── */
.grad-text {
  background: linear-gradient(135deg, #0CA678 0%, #4FD8B0 50%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glow button ── */
.btn-glow {
  background: linear-gradient(135deg, #0CA678, #4FD8B0);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.btn-glow:hover {
  box-shadow: 0 0 30px rgba(12,166,120,0.5);
  transform: translateY(-2px);
}
.btn-outline-glow {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
}
.btn-outline-glow:hover {
  border-color: #0CA678;
  background: rgba(12,166,120,0.1);
  transform: translateY(-2px);
}

/* ── Navbar ── */
#navbar {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 48px); max-width: 1200px;
  z-index: 100;
  border-radius: 16px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#navbar.scrolled {
  background: rgba(7,7,17,0.85) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
}

/* ── Hero ── */
.hero-section {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(135deg, rgba(7,7,17,0.85) 0%, rgba(7,7,17,0.65) 50%, rgba(7,7,17,0.80) 100%);
}
.hero-content { position: relative; z-index: 3; }

/* Floating stat badges */
.stat-badge {
  animation: float 4s ease-in-out infinite;
}
.stat-badge:nth-child(2) { animation-delay: 1s; }
.stat-badge:nth-child(3) { animation-delay: 2s; }
.stat-badge:nth-child(4) { animation-delay: 0.5s; }
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Section title ── */
.section-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: #0CA678;
}

/* ── Stats counter ── */
.stat-number { font-family: 'Syne', sans-serif; }

/* ── Portfolio ── */
.proj-card {
  border-radius: 16px; overflow: hidden;
  cursor: pointer; transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex; flex-direction: column;
}
.proj-card:hover { transform: translateY(-8px); box-shadow: 0 24px 60px rgba(12,166,120,0.2); }

/* Image wrapper — fixed height, clips the screenshot */
.proj-img-wrap {
  position: relative; height: 200px; overflow: hidden; flex-shrink: 0;
}
.proj-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.6s ease; display: block;
}
.proj-card:hover .proj-img-wrap img { transform: scale(1.06); }

/* Scrim over the screenshot so its own text is hidden */
.proj-img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(7,7,17,0.25) 0%,
    rgba(7,7,17,0.15) 40%,
    rgba(7,7,17,0.70) 100%);
}

/* Text body sits BELOW the image, not overlapping it */
.proj-body {
  padding: 18px 20px 20px;
  background: #0E0E1A;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex: 1; display: flex; flex-direction: column;
}
.proj-actions {
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  margin-top: auto; padding-top: 10px;
}
.proj-card:hover .proj-actions { opacity: 1; transform: translateY(0); }

/* Filter buttons */
.filter-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.25s ease;
}
.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, #0CA678, #4FD8B0);
  border-color: transparent; color: #fff;
}

/* ── Service cards ── */
.svc-card {
  border-radius: 20px; padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: default;
}
.svc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(12,166,120,0.15);
  border-color: rgba(12,166,120,0.3) !important;
}
.svc-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(12,166,120,0.2), rgba(79,216,176,0.2));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  transition: box-shadow 0.3s ease;
}
.svc-card:hover .svc-icon {
  box-shadow: 0 0 20px rgba(12,166,120,0.4);
}

/* ── Process timeline ── */
.process-step {
  position: relative; padding-left: 60px;
}
.process-num {
  position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #0CA678, #4FD8B0);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 800;
  box-shadow: 0 0 20px rgba(12,166,120,0.4);
  flex-shrink: 0;
}
.process-line {
  position: absolute; left: 19px; top: 40px;
  width: 2px; bottom: -32px;
  background: linear-gradient(to bottom, rgba(12,166,120,0.5), transparent);
}

/* ── Testimonials ── */
.testi-card {
  border-radius: 20px; padding: 32px;
  transition: transform 0.3s ease;
}
.testi-card:hover { transform: translateY(-4px); }
.star { color: #F59E0B; }

/* ── Pricing ── */
.price-card {
  border-radius: 24px; padding: 36px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.price-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
}
.price-card.featured {
  background: linear-gradient(135deg, rgba(12,166,120,0.15), rgba(79,216,176,0.10));
  border-color: rgba(12,166,120,0.4) !important;
  box-shadow: 0 0 60px rgba(12,166,120,0.15);
}
.check-icon { color: #0CA678; flex-shrink: 0; }

/* ── Contact ── */
.cform-input, .cform-select, .cform-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  color: #fff;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
}
.cform-input::placeholder, .cform-textarea::placeholder { color: rgba(255,255,255,0.3); }
.cform-input:focus, .cform-select:focus, .cform-textarea:focus {
  border-color: #0CA678;
  box-shadow: 0 0 0 3px rgba(12,166,120,0.15);
}
.cform-select option { background: #13131F; color: #fff; }
.cform-label { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.7); margin-bottom: 6px; display: block; }

/* Service chips */
.svc-chip input { display: none; }
.svc-chip span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.6); cursor: pointer;
  transition: all 0.2s ease;
}
.svc-chip input:checked + span {
  background: linear-gradient(135deg, rgba(12,166,120,0.25), rgba(79,216,176,0.25));
  border-color: #0CA678; color: #fff;
}
.svc-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── AI instant estimate ── */
.est-card {
  margin-top: 24px; padding: 26px;
  border: 1px solid rgba(12,166,120,0.35); border-radius: 16px;
  background: linear-gradient(135deg, rgba(12,166,120,0.10), rgba(79,216,176,0.05));
}
.est-tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #0CA678;
  border: 1px solid rgba(12,166,120,0.4); border-radius: 999px;
  padding: 3px 12px; margin-bottom: 12px;
}
.est-price { font-family: 'Syne', sans-serif; font-size: 30px; font-weight: 800; color: #4FD8B0; line-height: 1.1; }
.est-scope { list-style: none; padding: 0; }
.est-scope li { display: flex; gap: 8px; align-items: flex-start; color: rgba(255,255,255,0.65); font-size: 13px; margin-bottom: 7px; }
.est-scope li::before { content: "✓"; color: #0CA678; font-weight: 700; flex-shrink: 0; }
.est-spin {
  display: inline-block; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  animation: estspin 0.8s linear infinite;
}
@keyframes estspin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.footer-link { color: rgba(255,255,255,0.5); font-size: 14px; transition: color 0.2s ease; text-decoration: none; }
.footer-link:hover { color: #0CA678; }

/* ── Reveal animations ── */
.reveal { opacity: 0; transform: translateY(30px); }
.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity 0.7s ease, transform 0.7s ease; }

/* ── Mobile nav ── */
#mobile-menu { display: none; }
#mobile-menu.open { display: flex; }

/* ── WhatsApp float ── */
.wa-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 99;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 12px 32px rgba(37,211,102,0.5); }

.proj-hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 768px) {
  #navbar { width: calc(100% - 24px); top: 8px; }
  .hero-section { min-height: 100svh; }
}

/* ═══════════ AI Chatbot page additions ═══════════ */
.skip-link {
  position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px;
  color: #fff; background: #0CA678; border-radius: 10px; transform: translateY(-150%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 2px solid #4FD8B0; outline-offset: 3px; }

.chat-console {
  background: rgba(255,255,255,0.05);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column;
}
.chat-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 14px; color: #fff;
}
.chat-toolbar .utility-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,0.35); }
.status-light {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #4FD8B0; margin-right: 8px; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.preset-area { padding: 14px 20px 4px; }
.preset-area > span { display: block; font-size: 12px; color: rgba(255,255,255,0.45); margin-bottom: 8px; }
.preset-list { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-list button {
  border: 1px solid rgba(12,166,120,0.4); background: rgba(12,166,120,0.08);
  color: #4FD8B0; font-size: 12.5px; padding: 7px 12px; border-radius: 999px;
  cursor: pointer; transition: background .2s ease, color .2s ease;
}
.preset-list button:hover:not(:disabled) { background: rgba(12,166,120,0.22); color: #fff; }
.preset-list button:disabled { opacity: .45; cursor: not-allowed; }

.chat-transcript {
  list-style: none; margin: 0; padding: 16px 20px; min-height: 200px; max-height: 340px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
}
.chat-transcript li { max-width: 88%; font-size: 14px; line-height: 1.55; }
.chat-transcript .system-note {
  display: flex; gap: 8px; align-items: flex-start; color: rgba(255,255,255,0.4);
  font-size: 12.5px; max-width: 100%;
}
.chat-transcript .system-note span {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25); display: grid; place-items: center; font-size: 11px;
}
.chat-transcript .chat-message { display: flex; flex-direction: column; }
.chat-transcript .chat-message-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,0.4); margin-bottom: 4px; }
.chat-transcript .chat-message p { margin: 0; }
.chat-transcript .chat-message-user {
  align-self: flex-end; background: rgba(12,166,120,0.25);
  border: 1px solid rgba(12,166,120,0.35); color: #fff;
  padding: 10px 14px; border-radius: 16px 16px 4px 16px;
}
.chat-transcript .chat-message-assistant {
  align-self: flex-start; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.85);
  padding: 10px 14px; border-radius: 16px 16px 16px 4px;
}

.chat-fallback[hidden] { display: none !important; }
.chat-fallback {
  margin: 0 20px 8px; padding: 14px 16px; border-radius: 14px;
  background: rgba(79,216,176,0.1); border: 1px solid rgba(79,216,176,0.3);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.chat-fallback strong { color: #fff; font-size: 14px; display: block; }
.chat-fallback p { color: rgba(255,255,255,0.6); font-size: 12.5px; margin: 2px 0 0; }

.chat-form { padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,0.08); }
.chat-form > label { display: block; font-size: 12px; color: rgba(255,255,255,0.45); margin-bottom: 8px; }
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea {
  flex: 1; resize: vertical; min-height: 48px; max-height: 140px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; color: #fff; font-size: 14px; padding: 12px 14px;
  font-family: inherit;
}
.composer textarea::placeholder { color: rgba(255,255,255,0.3); }
.composer textarea:focus { outline: none; border-color: rgba(12,166,120,0.6); }
.composer-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 11.5px; color: rgba(255,255,255,0.35); }
.chat-status { margin: 8px 0 0; font-size: 12.5px; color: rgba(255,255,255,0.55); min-height: 1.2em; }
.chat-status[data-state="error"] { color: #ff8787; }

.scope-card ul { list-style: none; margin: 0; padding: 0; }
.scope-card li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.scope-card li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; margin-top: 8px; background: #0CA678; }
.scope-card.scope-out li::before { background: rgba(255,255,255,0.25); }

.step-num {
  flex: none; width: 34px; height: 34px; border-radius: 12px;
  background: rgba(12,166,120,0.15); border: 1px solid rgba(12,166,120,0.35);
  color: #4FD8B0; font-weight: 700; font-size: 14px; display: grid; place-items: center;
}

@media (max-width: 640px) {
  .chat-transcript { max-height: 300px; }
  .composer { flex-direction: column; align-items: stretch; }
  .composer .send-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
