/* Amazon Connect Chat – Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --aws-orange: #ff9900;
  --aws-blue: #232f3e;
  --aws-light-blue: #37475a;
  --aws-teal: #00a1c9;
  --aws-teal-dark: #007a99;
  --white: #ffffff;
  --light-bg: #f8f9fa;
  --border: #dee2e6;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --shadow: 0 4px 24px rgba(0,0,0,.10);
  --radius: 12px;
}

body {
  font-family: "Amazon Ember", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--light-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────── */
.site-header {
  background: var(--aws-blue);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--aws-orange);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--aws-blue);
  font-weight: 900;
}
.logo-text {
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .3px;
}
.logo-text span { color: var(--aws-orange); }
.header-nav { display: flex; gap: 8px; }
.btn-header {
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.btn-header:hover { background: rgba(255,255,255,.1); }
.btn-header.primary {
  background: var(--aws-orange);
  border-color: var(--aws-orange);
  color: var(--aws-blue);
  font-weight: 700;
}
.btn-header.primary:hover { background: #e68900; }

/* ── Hero ──────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--aws-blue) 0%, var(--aws-light-blue) 60%, #2d5a7a 100%);
  color: var(--white);
  padding: 72px 24px 80px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,153,0,.15);
  border: 1px solid var(--aws-orange);
  color: var(--aws-orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--aws-orange); }
.hero p {
  font-size: clamp(15px, 2vw, 19px);
  opacity: .85;
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--aws-orange);
  color: var(--aws-blue);
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-hero-primary:hover { background: #e68900; transform: translateY(-1px); }
.btn-hero-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
  padding: 13px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.btn-hero-secondary:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

/* ── Stats bar ──────────────────────────────── */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.stat-item {
  padding: 20px 40px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--aws-teal);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* ── Main content ──────────────────────────────── */
main { flex: 1; }
.section { padding: 64px 24px; }
.section-alt { background: var(--white); }
.container { max-width: 1100px; margin: 0 auto; }
.section-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--aws-teal);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.25;
}
.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.65;
  margin-bottom: 48px;
}

/* ── Feature grid ──────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow .2s, transform .2s;
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.icon-teal { background: rgba(0,161,201,.12); }
.icon-orange { background: rgba(255,153,0,.12); }
.icon-blue { background: rgba(35,47,62,.10); }
.icon-green { background: rgba(40,167,69,.12); }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ── How it works ──────────────────────────────── */
.steps { display: flex; flex-wrap: wrap; gap: 0; position: relative; }
.steps::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 28px;
  right: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--aws-teal), var(--aws-orange));
  z-index: 0;
}
.step {
  flex: 1;
  min-width: 180px;
  text-align: center;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}
.step-num {
  width: 56px;
  height: 56px;
  background: var(--aws-teal);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 16px;
  border: 4px solid var(--light-bg);
}
.step h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

/* ── Demo preview ──────────────────────────────── */
.demo-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.demo-info h2 { font-size: clamp(20px, 3vw, 32px); font-weight: 800; margin-bottom: 16px; }
.demo-info p { font-size: 15px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 24px; }
.demo-features { list-style: none; margin-bottom: 32px; }
.demo-features li {
  padding: 6px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-features li::before {
  content: "✓";
  background: var(--aws-teal);
  color: var(--white);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.btn-demo {
  background: var(--aws-teal);
  color: var(--white);
  border: none;
  padding: 13px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-demo:hover { background: var(--aws-teal-dark); }

/* Chat widget preview */
.chat-preview {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow), 0 0 0 1px var(--border);
  overflow: hidden;
  max-width: 360px;
  margin: 0 auto;
}
.chat-preview-header {
  background: var(--aws-blue);
  color: var(--white);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.agent-avatar {
  width: 36px;
  height: 36px;
  background: var(--aws-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--aws-blue);
  flex-shrink: 0;
}
.agent-info .agent-name { font-size: 14px; font-weight: 600; }
.agent-info .agent-status { font-size: 11px; opacity: .7; }
.status-dot {
  width: 8px;
  height: 8px;
  background: #28a745;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.chat-preview-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 220px; }
.msg { max-width: 80%; }
.msg-agent { align-self: flex-start; }
.msg-user { align-self: flex-end; }
.msg-bubble {
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.msg-agent .msg-bubble { background: var(--light-bg); border-bottom-left-radius: 4px; }
.msg-user .msg-bubble { background: var(--aws-teal); color: var(--white); border-bottom-right-radius: 4px; }
.msg-time { font-size: 10px; color: var(--text-secondary); margin-top: 3px; text-align: right; }
.msg-agent .msg-time { text-align: left; }
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: var(--light-bg);
  border-radius: 12px;
  width: fit-content;
  border-bottom-left-radius: 4px;
}
.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typing .9s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }
.chat-preview-input {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-preview-input input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 13px;
  outline: none;
}
.send-btn {
  background: var(--aws-teal);
  border: none;
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── CTA ──────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--aws-blue), var(--aws-light-blue));
  color: var(--white);
  text-align: center;
  padding: 72px 24px;
}
.cta-section h2 { font-size: clamp(22px, 3.5vw, 38px); font-weight: 800; margin-bottom: 16px; }
.cta-section p { font-size: 16px; opacity: .8; max-width: 520px; margin: 0 auto 36px; line-height: 1.6; }

/* ── Footer ──────────────────────────────── */
.site-footer {
  background: var(--aws-blue);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 24px;
  font-size: 13px;
}
.site-footer a { color: var(--aws-orange); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Chat Modal ──────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
}
.modal-overlay.active { display: flex; }
.chat-modal {
  width: 360px;
  max-height: 560px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  animation: slideUp .3s ease;
  overflow: hidden;
}
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-header {
  background: var(--aws-blue);
  color: var(--white);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-header .agent-info { flex: 1; }
.modal-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--white); }
.modal-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
}
.modal-input-row {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.modal-input-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 13px;
  outline: none;
}
.modal-input-row input:focus { border-color: var(--aws-teal); }
.modal-send {
  background: var(--aws-teal);
  border: none;
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.modal-send:hover { background: var(--aws-teal-dark); }

/* Floating chat button */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: var(--aws-teal);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,161,201,.4);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
}
.chat-fab:hover { background: var(--aws-teal-dark); transform: scale(1.08); }
.chat-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--aws-orange);
  color: var(--aws-blue);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .demo-wrapper { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .stat-item { padding: 16px 24px; }
  .chat-modal { width: 100%; max-width: 100%; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .chat-modal { border-radius: 16px 16px 0 0; max-height: 85vh; }
}
