/* ========== Theme (auto + toggle) ========== */
:root{
  --bg0:#07090d;
  --bg1:#0a0c10;
  --text:#e8eaf0;
  --muted:#a1a7b6;

  --panel: rgba(255,255,255,.05);
  --border: rgba(255,255,255,.10);

  --shadow: 0 40px 120px rgba(0,0,0,.5);

  --accent1:#5ddcff;
  --accent2:#8b5cf6;

  --btnText:#05060a;
  --link: rgba(93,220,255,.92);
}

html[data-theme="light"]{
  --bg0:#f7f8fb;
  --bg1:#eef1f7;
  --text:#0b1020;
  --muted:#4b5565;

  --panel: rgba(255,255,255,.72);
  --border: rgba(20,30,60,.12);

  --shadow: 0 26px 80px rgba(15,18,35,.18);

  --btnText:#05060a;
  --link: #0ea5e9;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1000px 600px at 10% 10%, rgba(93,220,255,.12), transparent 55%),
    radial-gradient(900px 600px at 90% 20%, rgba(139,92,246,.10), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

a{ color: inherit; text-decoration:none; }
.link{ color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

.container{
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.muted{ color: var(--muted); }

.glass{
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.lift{
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.lift:hover{
  transform: translateY(-2px);
}

/* ========== Topbar ========== */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-top: 20px;
  padding-bottom: 26px;
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  font-weight:650;
  letter-spacing:.2px;
}
.brandMark{ width:38px; height:38px; }
.brandName{ font-size: 14.5px; }
.brandBadge{
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.topbarRight{
  display:flex;
  align-items:center;
  gap:10px;
}
.pill{
  font-size:12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,.02);
  white-space:nowrap;
}
.pill.subtle{
  background: rgba(255,255,255,.03);
}

/* Icon button */
.iconBtn{
  display:inline-grid;
  place-items:center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor:pointer;
  transition: transform .18s ease, background .18s ease;
}
.iconBtn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.06); }

/* ========== Hero ========== */
.hero{
  position:relative;
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow:hidden;
  padding: 64px 56px;
}
.heroContent{ position:relative; z-index:1; }
h1{
  font-size: clamp(36px, 4.5vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.9px;
  margin: 0 0 18px;
  max-width: 20ch;
}
.sub{
  margin:0;
  color: var(--muted);
  font-size: 18px;
  max-width: 62ch;
}
.fine{
  margin-top: 16px;
  font-size: 13px;
  color: rgba(161,167,182,.92);
}

.ctaRow{
  margin-top: 28px;
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border-radius: 14px;
  padding: 14px 20px;
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .18s ease, filter .18s ease, background .18s ease;
  font-weight: 750;
}
.btn.primary{
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: var(--btnText);
  box-shadow: 0 20px 60px rgba(93,220,255,.28);
}
.btn.primary:hover{ transform: translateY(-2px); filter: brightness(1.02); }
.btn.ghost{
  background: rgba(255,255,255,.04);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost:hover{ transform: translateY(-2px); background: rgba(255,255,255,.06); }

.glow{
  position:absolute;
  width:560px;
  height:560px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: .55;
  pointer-events:none;
}
.glow.one{
  left:-240px;
  top:-280px;
  background: radial-gradient(circle at 30% 30%, rgba(93,220,255,.42), transparent 62%);
}
.glow.two{
  right:-260px;
  top:-310px;
  background: radial-gradient(circle at 30% 30%, rgba(139,92,246,.38), transparent 62%);
}

/* ========== Grid Cards ========== */
.grid{
  margin-top: 72px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.card{
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 18px 70px rgba(0,0,0,.28);
}
.cardRow{
  display:flex;
  gap:14px;
  align-items:flex-start;
}
.cardIcon{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.card h2{
  margin:0 0 8px;
  font-size: 16px;
  letter-spacing: .2px;
}
.card p{
  margin:0;
  color: var(--muted);
  font-size: 14.6px;
  line-height: 1.55;
}
.card.wide{
  grid-column: span 12;
}
.grid > article:nth-child(1),
.grid > article:nth-child(2),
.grid > article:nth-child(3){
  grid-column: span 4;
}

/* ========== Trust section ========== */
.trust{
  margin-top: 34px;
  border-radius: 20px;
  padding: 28px;
}
.trustTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.trustGrid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.trustItem{
  grid-column: span 4;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255,255,255,.03);
}
.trustLabel{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.trustValue{
  font-size: 14px;
}

/* ========== Footer ========== */
.footer{
  margin-top: 90px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  justify-content:space-between;
  color: var(--muted);
  font-size: 13px;
}

/* ========== Micro-animations (reveal) ========== */
.reveal{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal.in{
  opacity: 1;
  transform: translateY(0);
}

/* ========== Chat Launcher + Modal ========== */
.chatLauncher{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 16px;
  cursor:pointer;
  color: var(--text);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.chatLauncher .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  box-shadow: 0 0 0 6px rgba(93,220,255,.12);
}

.modalBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 60;
}
.modal{
  position: fixed;
  right: 18px;
  bottom: 82px;
  width: min(420px, calc(100vw - 36px));
  height: min(640px, calc(100vh - 120px));
  border-radius: 20px;
  z-index: 70;
  box-shadow: 0 30px 120px rgba(0,0,0,.55);
  overflow:hidden;
}
.modalTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 12px 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.modalTitle{
  display:flex;
  align-items:center;
  gap:10px;
}
.modalMark{ width:28px; height:28px; }
.modalH{ font-weight: 750; font-size: 14px; }
.modalS{ font-size: 12px; }
.modalBody{ height: calc(100% - 56px); }
.chatFrame{
  width:100%;
  height:100%;
  border:0;
  background: transparent;
}

/* ========== Chat Page ========== */
.chatPage .container{ padding-top: 22px; }
.chatHeader.container{ padding-bottom: 10px; }
.chatShell{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items:start;
}
.chatWrap{
  border-radius: 20px;
  box-shadow: 0 24px 90px rgba(0,0,0,.35);
  overflow:hidden;
}
.chatTop{
  padding: 18px 18px 10px;
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.chatTitle{
  margin:0;
  font-size: 18px;
  letter-spacing: -.2px;
}
.chatSubtitle{
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.chatStream{
  padding: 16px 18px;
  height: 420px;
  overflow:auto;
}
.msg{ margin-bottom: 12px; }
.bubble{
  display:inline-block;
  max-width: 78ch;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  line-height: 1.5;
}
.msg.user{ text-align:right; }
.msg.user .bubble{
  background: linear-gradient(135deg, rgba(93,220,255,.18), rgba(139,92,246,.14));
}
.meta{
  margin-top: 6px;
  font-size: 11px;
}

.chatInputRow{
  display:flex;
  gap:10px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.chatInput{
  flex:1;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding: 12px 12px;
  outline:none;
}
.chatInput::placeholder{ color: rgba(161,167,182,.85); }
.chatFoot{
  padding: 0 14px 14px;
  font-size: 12px;
}

.chatAside{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

@media (max-width: 920px){
  .hero{ padding: 42px 28px; }
  .grid > article:nth-child(1),
  .grid > article:nth-child(2),
  .grid > article:nth-child(3){ grid-column: span 12; }
  .trustItem{ grid-column: span 12; }
  .chatShell{ grid-template-columns: 1fr; }
}
