/* ═══════════════════════════════════════════════════════════════════════
   AIShield — Shared styles
   Color theme matches the app exactly. Glass treatment Apple-inspired.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Backgrounds */
  --bg: #0a0a0f;
  --surface: #13131a;
  --card: #1a1a24;
  --card-hi: #22222e;

  /* Borders */
  --border: #252535;
  --border-hi: #35355a;

  /* Brand accents */
  --indigo: #6366f1;
  --indigo-light: #818cf8;
  --indigo-dim: #1e1e4a;
  --indigo-glow: rgba(99, 102, 241, 0.35);

  /* Status */
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --teal: #14b8a6;
  --purple: #a855f7;

  /* Text */
  --text: #f4f4f8;
  --muted: #9898b0;
  --dim: #4a4a65;

  /* Glass */
  --glass-bg: rgba(26, 26, 36, 0.55);
  --glass-bg-hi: rgba(34, 34, 46, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hi: rgba(99, 102, 241, 0.3);

  /* Type */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Subtle grain overlay across the whole page */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  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.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Ambient indigo glow blobs in background */
body::after {
  content: '';
  position: fixed;
  top: -20%; left: -10%;
  width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: float-blob 20s ease-in-out infinite;
}

@keyframes float-blob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20%, 30%); }
}

main, header, footer, section { position: relative; z-index: 2; }

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

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

button {
  font-family: var(--font-display);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ── GLASS ─────────────────────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.3s ease;
}

.glass:hover {
  background: var(--glass-bg-hi);
  border-color: var(--glass-border-hi);
}

/* ── BUTTONS ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--indigo);
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: var(--indigo-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border-hi);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--indigo);
}

.btn-ghost {
  color: var(--muted);
  padding: 10px 16px;
}
.btn-ghost:hover { color: var(--text); }

.btn-sm { padding: 8px 14px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: 14px; }

/* ── NAV ───────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 0;
  transition: all 0.25s ease;
}
.nav.scrolled {
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.nav-logo-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: radial-gradient(circle at 30% 30%, var(--indigo-light), var(--indigo) 70%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.nav-links {
  display: flex; gap: 4px; align-items: center;
}
.nav-link {
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-cta { display: flex; gap: 8px; align-items: center; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
}

/* ── CONTAINERS ────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}
.container-narrow { max-width: 880px; }
.container-prose { max-width: 720px; }

section { padding: 80px 0; }

@media (max-width: 768px) {
  section { padding: 56px 0; }
  .container { padding: 0 20px; }
}

/* ── TYPE ──────────────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo-light);
  background: var(--indigo-dim);
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 18px;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.022em;
  font-weight: 700;
  line-height: 1.1;
}
h1 { font-size: clamp(36px, 6vw, 64px); }
h2 { font-size: clamp(28px, 4.4vw, 44px); margin-bottom: 14px; }
h3 { font-size: 20px; margin-bottom: 8px; }
h4 { font-size: 15px; font-weight: 600; }

.lede {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  line-height: 1.55;
  max-width: 640px;
}
.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head .lede { margin: 0 auto; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ── ANIMATIONS ────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 0 14px rgba(99, 102, 241, 0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes liveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.live-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: liveDot 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--green);
}

/* ── FORMS ─────────────────────────────────────────────────────────────── */
.input, textarea.input, select.input {
  width: 100%;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.input::placeholder { color: var(--dim); }

label.field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}

/* ── FOOTER ────────────────────────────────────────────────────────────── */
footer.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 13px; color: var(--muted); line-height: 1.6;
  max-width: 320px;
  margin-top: 12px;
}
.footer-col h5 {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--indigo-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--dim);
}
.footer-status {
  display: flex; align-items: center; gap: 8px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ── COOKIE CONSENT BANNER ─────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 20px; left: 20px; right: 20px;
  max-width: 580px;
  margin: 0 auto;
  padding: 18px 20px;
  z-index: 200;
  display: none;
  animation: fadeUp 0.4s ease;
}
.cookie-banner.show { display: block; }
.cookie-banner p {
  font-size: 13px; color: var(--text);
  margin-bottom: 12px; line-height: 1.55;
}
.cookie-banner p .accent { color: var(--indigo-light); }
.cookie-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* ── CHAT WIDGET ───────────────────────────────────────────────────────── */
.chat-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 150;
  display: flex; align-items: center; gap: 10px;
}
.chat-fab-label {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  animation: fadeUp 0.5s ease 1s backwards;
}
.chat-fab-button {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-light));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--indigo-glow);
  animation: pulseGlow 2.5s infinite;
  transition: transform 0.2s ease;
}
.chat-fab-button:hover { transform: scale(1.06) rotate(-4deg); }

.chat-panel {
  position: fixed;
  bottom: 100px; right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 140px);
  z-index: 150;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeUp 0.3s ease;
}
.chat-panel.open { display: flex; }
.chat-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-header h4 { font-size: 14px; }
.chat-header .muted { font-size: 11px; }
.chat-close {
  color: var(--muted); padding: 4px;
}
.chat-close:hover { color: var(--text); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: fadeUp 0.3s ease;
}
.chat-msg.bot {
  background: var(--card);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: var(--indigo);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-input-wrap {
  padding: 12px;
  border-top: 1px solid var(--glass-border);
  display: flex; gap: 8px;
}
.chat-input-wrap input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-body);
}
.chat-input-wrap input:focus { outline: none; border-color: var(--indigo); }
.chat-typing {
  display: inline-flex; gap: 4px; padding: 4px 0;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  animation: liveDot 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@media (max-width: 480px) {
  .chat-panel {
    bottom: 0; right: 0; left: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    height: 80vh;
  }
}

/* ── MOBILE STICKY CTA ─────────────────────────────────────────────────── */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  z-index: 90;
}
.mobile-cta .btn { width: 100%; }

@media (max-width: 768px) {
  .mobile-cta { display: block; }
  .chat-fab { bottom: 76px; }
  .cookie-banner { bottom: 76px; }
  body { padding-bottom: 70px; }
}

/* ── UTILITY ───────────────────────────────────────────────────────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-center { text-align: center; }
.hidden { display: none; }

@media (max-width: 768px) {
  .hide-mobile { display: none; }
}
