/* assets/styles.css */
:root {
  color-scheme: light;
  --brand-600: #0f766e;
  --brand-500: #0ea5e9;
  --accent-blue: #3b82f6;
  --accent-red: #fb7185;
  --ink: #0f172a;
  --surface: #f8fafc;
}
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(120% 120% at 8% 8%, rgba(59,130,246,0.16), transparent),
              radial-gradient(120% 120% at 95% 5%, rgba(251,113,133,0.14), transparent),
              radial-gradient(120% 120% at 50% 0%, rgba(14,165,233,0.10), transparent),
              #f8fafc;
}
a { text-underline-offset: 3px; }

/* Accent pills + hero glow */
.accent-pill {
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.10);
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.12);
}
.hero-glow {
  background: radial-gradient(90% 90% at 15% 10%, rgba(59, 130, 246, 0.25), transparent),
              radial-gradient(90% 90% at 85% 20%, rgba(251, 113, 133, 0.22), transparent),
              radial-gradient(90% 90% at 50% 90%, rgba(14, 165, 233, 0.20), transparent);
}
.hero-card {
  border-color: rgba(59, 130, 246, 0.18);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

/* Spotlight pill (home page dynamic element) */
.spotlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}
.spotlight-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-blue);
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.18);
  animation: dotPulse 2.2s ease-in-out infinite;
}
.spotlight-value {
  color: #1e3a8a;
  transition: opacity 300ms ease;
}
.spotlight-value.is-fading {
  opacity: 0;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 0.6; }
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
}
.auth-tab {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  background: transparent;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.auth-tab:hover {
  color: var(--brand-600);
}
.auth-tab.is-active {
  background: #ffffff;
  color: var(--brand-600);
  border-color: rgba(15, 118, 110, 0.2);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

/* Logo sizing: larger and responsive for better visibility */
.logo-badge {
  width: 64px;
  height: 64px;
}
.logo-img {
  width: 52px;
  height: 52px;
}
@media (min-width: 640px) {
  .logo-badge {
    width: 80px;
    height: 80px;
  }
  .logo-img {
    width: 65px;
    height: 65px;
  }
}
@media (min-width: 1024px) {
  .logo-badge {
    width: 88px;
    height: 88px;
  }
  .logo-img {
    width: 72px;
    height: 72px;
  }
}

/* Header navigation styling */
header nav a,
#mobileNav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
header nav a:hover,
#mobileNav a:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 16px 35px rgba(59, 130, 246, 0.22);
  transform: translateY(-1px);
}
header nav a.is-active,
#mobileNav a.is-active {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: linear-gradient(145deg, rgba(59,130,246,0.12), rgba(251,113,133,0.10));
}

/* Portal drop zone */
#portalDropZone.is-dragging {
  border-color: var(--brand-600);
  background: rgba(14,165,233,0.08);
}

/* Chat widget */
.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: linear-gradient(145deg, #0f766e, #0ea5e9);
  color: #fff;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms ease, box-shadow 150ms ease;
  z-index: 60;
}
.chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.24);
}
.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 86px;
  width: min(360px, calc(100vw - 40px));
  max-height: 70vh;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 60;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: #f8fafc;
}
.chat-body {
  padding: 12px 16px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  background: #ffffff;
}
.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: #f8fafc;
}
.chat-input {
  flex: 1;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.chat-input:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.18);
}
.chat-send {
  border: none;
  border-radius: 12px;
  background: #0f766e;
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}
.chat-send:hover {
  background: #0d5f5a;
}
.chat-msg {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  white-space: pre-wrap;
  word-wrap: break-word;
  animation: slideIn 0.3s ease;
}
.chat-bot {
  background: #f1f5f9;
  color: #0f172a;
  margin-right: auto;
}
.chat-user {
  background: linear-gradient(145deg, #0f766e, #0ea5e9);
  color: #fff;
  margin-left: auto;
}

/* Typing indicator */
.chat-typing {
  padding: 12px 16px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  animation: typing 1.4s infinite;
}
.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes typing {
  0%, 60%, 100% {
    opacity: 0.5;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-10px);
  }
}

/* Suggestions */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 8px;
  background: #f8fafc;
}
.chat-suggestion-btn {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  background: #fff;
  color: #0f766e;
  font-size: 13px;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;
}
.chat-suggestion-btn:hover {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

/* Slide in animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Light animation on page sections */
main section {
  animation: fadeInUp 0.5s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#map { height: 360px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main section { animation: none; }
  .spotlight-dot { animation: none; }
  .spotlight-value { transition: none; }
}
