/* ============================================================
   KeplerTrust Design System
   Color Tokens:
     Primary (Teal)   : #18BDB9
     Secondary (Navy) : #25394A
     Background       : #EDF4F4
     White            : #FFFFFF
     Dark Text        : #1a1a2e
   ============================================================ */

/* --- Demo Banner --- */
.demo-banner {
  background: #d4a017;
  color: #1a1a2e;
  text-align: center;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10001;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a2e;
  background: #EDF4F4;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #18BDB9; text-decoration: none; transition: color .2s; }
a:hover { color: #139e9b; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .25s ease;
  text-decoration: none;
}
.btn-primary {
  background: #18BDB9;
  color: #fff;
  border-color: #18BDB9;
}
.btn-primary:hover {
  background: #139e9b;
  border-color: #139e9b;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-outline:hover {
  background: #fff;
  color: #25394A;
}
.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 30px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all .3s ease;
  background: transparent;
}
.navbar.scrolled {
  background: rgba(37, 57, 74, .97);
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.15);
}
.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
}
.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}
.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: 15px;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: #fff; }
.nav-login {
  padding: 10px 24px;
  font-size: 14px;
}
.nav-toggle { display: none; }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }
  .nav-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #25394A;
    padding: 20px 24px;
    gap: 16px;
  }
  .nav-links.active { display: flex; }
  .nav-login {
    display: none;
  }
}

/* --- Hero --- */
.hero {
  background: linear-gradient(180deg, #25394A 0%, #1e3040 100%);
  color: #fff;
  text-align: center;
  padding: 160px 0 100px;
}
.hero-content {
  max-width: 720px;
  margin: 0 auto;
}
.hero-eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #18BDB9;
  margin-bottom: 20px;
  font-weight: 500;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}
.hero-sub {
  font-size: 18px;
  line-height: 1.7;
  opacity: .8;
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .hero { padding: 120px 0 70px; }
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}
.section-alt {
  background: #fff;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-size: 36px;
  color: #25394A;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-header p {
  font-size: 18px;
  color: #5a6a7a;
}

/* --- Product Categories (Chase-style) --- */
.product-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 60px;
  max-width: 960px;
  margin: 0 auto;
}
.product-category h3 {
  font-size: 22px;
  color: #25394A;
  font-weight: 700;
  margin-bottom: 8px;
}
.product-category hr {
  border: none;
  border-top: 2px solid #18BDB9;
  width: 48px;
  margin: 0 0 16px 0;
}
.product-category p {
  color: #5a6a7a;
  font-size: 15px;
  line-height: 1.7;
}
.product-category a {
  color: #18BDB9;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}
.product-category a:hover {
  color: #139e9b;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .product-categories { grid-template-columns: 1fr; gap: 36px; }
}

/* --- Stats --- */
.stats-section {
  background: #25394A;
  padding: 60px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 42px;
  font-weight: 800;
  color: #18BDB9;
  letter-spacing: -1px;
}
.stat-label {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,.7);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.about-image img {
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.1);
}
.about-content h2 {
  font-size: 36px;
  color: #25394A;
  margin-bottom: 20px;
}
.about-content p {
  color: #5a6a7a;
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 1.7;
}
.about-content blockquote {
  margin-top: 24px;
  padding: 20px 24px;
  border-left: 4px solid #18BDB9;
  background: #EDF4F4;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #25394A;
  font-size: 16px;
  line-height: 1.6;
}
.about-content cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  color: #18BDB9;
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* --- Photo Strip --- */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}
.photo-strip-item {
  text-align: center;
}
.photo-strip-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.photo-strip-item img:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.photo-strip-item span {
  font-size: 13px;
  color: #5a6a7a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
@media (max-width: 600px) {
  .photo-strip { grid-template-columns: 1fr; max-width: 320px; }
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, #25394A 0%, #1a2a38 100%);
  color: #fff;
  text-align: center;
}
.cta-content h2 {
  font-size: 36px;
  margin-bottom: 16px;
  color: #fff;
}
.cta-content > p {
  font-size: 18px;
  opacity: .8;
  max-width: 600px;
  margin: 0 auto 36px;
}
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.cta-details {
  display: flex;
  gap: 60px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-detail {
  text-align: center;
}
.cta-detail strong {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #18BDB9;
  margin-bottom: 4px;
}
.cta-detail span {
  font-size: 15px;
  opacity: .7;
}

/* --- Footer --- */
.footer {
  background: #1a2a38;
  color: rgba(255,255,255,.7);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
}
.footer-links h4 {
  color: #fff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,.6);
  font-size: 14px;
  transition: color .2s;
}
.footer-links a:hover { color: #18BDB9; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
}
.footer-disclaimer {
  margin-top: 8px;
  font-size: 12px;
  opacity: .5;
  font-style: italic;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --- Chat Widget --- */
.chat-button {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #18BDB9;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(24,189,185,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
  z-index: 9999;
}
.chat-button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(24,189,185,.5);
}
.chat-button svg {
  width: 28px;
  height: 28px;
}

.chat-panel {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 380px;
  height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 60px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  overflow: hidden;
  animation: chatSlideUp .3s ease;
}
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-header {
  background: #25394A;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-header-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #18BDB9;
}
.chat-header h3 {
  font-size: 15px;
  font-weight: 600;
}
.chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  line-height: 1;
  transition: color .2s;
}
.chat-close:hover { color: #fff; }

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

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg.user {
  align-self: flex-end;
  background: #18BDB9;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant {
  align-self: flex-start;
  background: #f0f2f5;
  color: #1a1a2e;
  border-bottom-left-radius: 4px;
}
.chat-msg.typing {
  align-self: flex-start;
  background: #f0f2f5;
  color: #8a9aaa;
  font-style: italic;
}
.chat-msg.blocked {
  align-self: flex-start;
  background: #fff3e0;
  color: #b35900;
  border: 1px solid #ffcc80;
  border-bottom-left-radius: 4px;
  font-weight: 500;
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
}
.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
}
.chat-input:focus { border-color: #18BDB9; }
.chat-send {
  padding: 10px 16px;
  background: #18BDB9;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.chat-send:hover { background: #139e9b; }
.chat-send:disabled { opacity: .5; cursor: not-allowed; }

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