:root {
  --navy: #102542;
  --navy-soft: #183153;
  --gold: #c89b3c;
  --cream: #f7f7f4;
  --white: #ffffff;
  --text: #152238;
  --shadow: 0 18px 45px rgba(16, 37, 66, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(200, 155, 60, 0.15), transparent 35%),
    linear-gradient(180deg, #fdfdfb 0%, #eff4f9 100%);
}

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

button,
input {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(16, 37, 66, 0.08);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
}

.nav-links {
  display: flex;
  gap: 20px;
  font-weight: 600;
}

.hero {
  padding: 96px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(200, 155, 60, 0.12);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-copy h1,
.section-heading h2,
.about-panel h2 {
  margin: 0 0 16px;
  color: var(--navy);
  line-height: 1.05;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.hero-copy p {
  max-width: 620px;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.chat-form button,
.chat-toggle {
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.chat-form button,
.chat-toggle {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.chat-form button {
  border-radius: 999px;
  padding: 14px 18px;
}

.secondary-btn {
  background: var(--gold);
  color: var(--navy);
}

.ghost-btn {
  background: rgba(16, 37, 66, 0.08);
  color: var(--navy);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.chat-form button:hover,
.chat-toggle:hover {
  transform: translateY(-1px);
}

.hero-card,
.service-card,
.about-panel {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  display: grid;
  gap: 16px;
}

.hero-metric {
  padding: 18px;
  background: linear-gradient(180deg, rgba(16, 37, 66, 0.04), rgba(200, 155, 60, 0.08));
  border-radius: 20px;
}

.hero-metric strong {
  display: block;
  font-size: 1.4rem;
  color: var(--navy);
}

.services,
.about {
  padding: 36px 0 64px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading span {
  color: var(--gold);
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  padding: 24px;
}

.service-card h3 {
  margin-top: 0;
  color: var(--navy);
}

.service-card p {
  margin-bottom: 0;
  line-height: 1.7;
}

.about-panel {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.chatbot-shell {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
}

.chat-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(256px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 24px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(16, 37, 66, 0.96) 0%, rgba(24, 49, 83, 0.95) 58%, rgba(200, 155, 60, 0.82) 140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  animation: gp-bob 4s ease-in-out infinite;
}

@keyframes gp-bob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.chat-toggle:hover {
  animation-play-state: paused;
}

.chat-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 42%);
  pointer-events: none;
}

.chat-toggle-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex: 0 0 42px;
}

.chat-toggle-avatar,
.chat-header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.chat-toggle-presence {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7be495;
  box-shadow: 0 0 0 2px rgba(16, 37, 66, 0.95);
}

.chat-toggle-copy {
  display: grid;
  gap: 1px;
  flex: 1;
}

.chat-toggle-copy strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.chat-toggle-copy small {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.76);
  letter-spacing: 0.02em;
}

.chat-toggle-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.95rem;
  flex: 0 0 30px;
}

.chat-window {
  width: min(440px, calc(100vw - 24px));
  height: min(600px, 80vh);
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(16, 37, 66, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  color: #fff;
  background: linear-gradient(135deg, #102542 0%, #1c385c 100%);
  border-bottom: 2.5px solid #f0c767;
}

.chat-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.chat-header span {
  display: block;
  font-size: 0.8rem;
  opacity: 0.85;
}

.chat-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.chat-close:hover {
  opacity: 1;
}

.chat-messages {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: radial-gradient(circle at top right, rgba(240, 199, 103, 0.02), transparent 60%);
}

.message-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.message-row.user {
  justify-content: flex-end;
}

.message-row.user .message {
  order: 1;
}

.message-row.user .message-avatar {
  order: 2;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  object-fit: cover;
}

.message-avatar.bot {
  background: rgba(16, 37, 66, 0.08);
}

.message-avatar.user {
  background: linear-gradient(180deg, #f0c767, #c89b3c);
  color: #102542;
  box-shadow: 0 4px 10px rgba(200, 155, 60, 0.25);
}

.message {
  max-width: 78%;
  padding: 11px 14px;
  line-height: 1.48;
  white-space: pre-wrap;
  font-size: 0.92rem;
}

.message.bot {
  background: #f0f3f8;
  color: #102542;
  border-radius: 18px 18px 18px 4px;
  border: 1px solid rgba(16, 37, 66, 0.03);
  box-shadow: 0 2px 8px rgba(16, 37, 66, 0.02);
}

.message.user {
  background: linear-gradient(135deg, #102542 0%, #1e3c66 100%);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 4px 12px rgba(16, 37, 66, 0.1);
}

.message-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(16, 37, 66, 0.1);
  background: rgba(255, 255, 255, 0.95);
  color: #102542;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 37, 66, 0.04);
  transition: all 0.2s ease;
}

.message-link:hover {
  background: #102542;
  color: #fff;
  border-color: #102542;
  box-shadow: 0 6px 16px rgba(16, 37, 66, 0.15);
}

.message.bot .message-link {
  color: #102542;
}

.message-link::after {
  content: "↗";
  font-size: 0.85rem;
  line-height: 1;
}

.message.typing {
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: normal;
  opacity: 0.88;
  padding: 12px 18px;
  width: fit-content;
  max-width: 70px;
  justify-content: center;
}

.message-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 38px;
  width: calc(100% - 38px);
}

.message-suggestion {
  border: 1px solid rgba(16, 37, 66, 0.1);
  background: rgba(255, 255, 255, 0.95);
  color: #102542;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 37, 66, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.message-suggestion:hover {
  transform: translateY(-2px);
  background: #102542;
  color: #fff;
  border-color: #102542;
  box-shadow: 0 10px 20px rgba(16, 37, 66, 0.15);
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 20px 8px;
  padding: 4px 6px 4px 16px;
  border: 1px solid rgba(16, 37, 66, 0.12);
  border-radius: 999px;
  background: #f5f7fa;
  transition: all 0.2s ease;
}

.chat-form:focus-within {
  border-color: #102542;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16, 37, 66, 0.1);
}

.chat-form input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 8px 0 !important;
  color: #102542;
  font-size: 0.92rem;
  box-shadow: none !important;
  outline: none !important;
}

.chat-send {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #102542 0%, #1e3c66 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(16, 37, 66, 0.12);
  transition: all 0.2s ease;
  cursor: pointer;
}

.chat-send-icon {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
  transform: translate(-1px, 0.5px) !important;
  transition: transform 0.2s ease !important;
}

.chat-send:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 10px rgba(16, 37, 66, 0.2);
}

.chat-scroll-bottom {
  position: absolute;
  bottom: 124px;
  right: 20px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(16, 37, 66, 0.12);
  color: #102542;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 37, 66, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
  transform: scale(1);
}

.chat-scroll-bottom.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8) translateY(10px);
}

.chat-scroll-bottom:hover {
  background: #f5f7fa;
  transform: scale(1.05);
}

.chat-footer {
  padding: 0 20px 16px;
  background: #fff;
}

.chat-end {
  width: fit-content;
  border: 1px solid rgba(16, 37, 66, 0.12);
  border-radius: 999px;
  padding: 8px 16px;
  background: #f5f7fa;
  color: #102542;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.chat-end:hover {
  background: #eef1f6;
  border-color: rgba(16, 37, 66, 0.2);
}

.message-user-icon {
  width: 16px;
  height: 16px;
}

.typing-label {
  color: var(--navy);
  font-size: 0.92rem;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(16, 37, 66, 0.55);
  animation: chatDots 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes chatDots {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.hidden {
  display: none;
}

@media (max-width: 960px) {
  .hero-grid,
  .about-panel {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 72px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .chatbot-shell {
    right: 12px;
    bottom: 12px;
    left: auto;
    width: auto;
  }

  .chat-toggle {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    padding: 0;
    justify-content: center;
    gap: 0;
    margin-bottom: 0;
    overflow: visible !important;
  }

  .chat-toggle-orb {
    width: 42px;
    height: 42px;
    border-radius: 12px !important;
    flex: 0 0 42px;
  }

  .chat-toggle-avatar {
    border-radius: 12px !important;
  }

  .chat-toggle-copy {
    position: absolute;
    bottom: 68px;
    right: 0;
    background: linear-gradient(135deg, #102542 0%, #183153 100%);
    color: #fff;
    padding: 8px 14px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(16, 37, 66, 0.35);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: flex !important;
    flex-direction: column;
    gap: 2px;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none;
    z-index: 100000;
  }

  .chat-toggle-copy::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 18px;
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #183153 transparent;
    display: block;
    width: 0;
  }

  .chat-toggle-copy strong {
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
  }

  .chat-toggle-copy small {
    display: block !important;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.72);
  }

  .chat-toggle-arrow {
    display: none;
  }

  .chat-window {
    width: min(440px, calc(100vw - 24px));
    height: min(720px, 88vh);
  }
}
