:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --dark: #0f172a;
  --dark2: #1e293b;
  --mid: #334155;
  --muted: #64748b;
  --light: #f8fafc;
  --border: #e2e8f0;
  --grad: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: #fff; color: var(--dark); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); transition: box-shadow .3s;
}
nav.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; gap: 32px;
}

/* LOGO, Cotech Innovations BuildTrack Pro */
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1rem; line-height: 1.2;
  white-space: nowrap;
}
.nav-logo-icon {
  width: 38px; height: 38px; background: var(--grad);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.nav-logo-icon i { color: #fff; font-size: 20px; }
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-main { font-size: .95rem; font-weight: 800; color: var(--dark); line-height: 1.1; }
.nav-logo-sub  { font-size: .7rem; font-weight: 600; color: var(--cyan); letter-spacing: .03em; line-height: 1.2; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 16px; border-radius: 8px; font-size: .9rem;
  font-weight: 500; color: var(--mid); transition: .2s;
}
.nav-links a:hover { background: var(--light); color: var(--dark); }
.nav-links a.active { color: var(--blue); font-weight: 600; }
.nav-cta { display: flex; gap: 10px; margin-left: 12px; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 10px; font-size: .9rem;
  font-weight: 600; cursor: pointer; transition: .2s;
  border: none; font-family: inherit;
}
.btn-outline {
  border: 1.5px solid var(--border); color: var(--mid);
  background: transparent;
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); background: #eff6ff; }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(37,99,235,.35); }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }
.btn-cyan {
  background: linear-gradient(135deg,#06b6d4,#0891b2); color: #fff;
  box-shadow: 0 4px 16px rgba(6,182,212,.3);
}
.btn-cyan:hover { opacity: .9; transform: translateY(-1px); }

/* ── BADGES ──────────────────────────────────────────────── */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(6,182,212,.15); border: 1px solid rgba(6,182,212,.3);
  color: #67e8f9; padding: 6px 14px; border-radius: 20px;
  font-size: .8rem; font-weight: 600; letter-spacing: .03em; margin-bottom: 24px;
}

/* ── SECTION LABELS ──────────────────────────────────────── */
.section-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--cyan); margin-bottom: 12px; }
.section-title { font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 16px; }
.section-desc { font-size: 1.05rem; color: var(--muted); max-width: 580px; line-height: 1.7; }

/* ── SCROLL FADE ─────────────────────────────────────────── */
.fade-up { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── CTA BANNER ──────────────────────────────────────────── */
.cta-banner { background: var(--grad); color: #fff; padding: 80px 24px; text-align: center; }
.cta-banner h2 { font-size: clamp(2rem,4vw,3rem); font-weight: 800; margin-bottom: 16px; letter-spacing: -.02em; }
.cta-banner p { font-size: 1.1rem; opacity: .85; margin-bottom: 36px; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer { background: var(--dark); color: #fff; padding: 64px 24px 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: #64748b; font-size: .9rem; margin-top: 12px; line-height: 1.7; max-width: 260px; }
.footer-col h5 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #64748b; margin-bottom: 16px; }
.footer-col a { display: block; color: #94a3b8; font-size: .9rem; margin-bottom: 10px; transition: .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: #475569; }

/* ── CHATBOT ─────────────────────────────────────────────── */
#chatbot-toggle {
  position: fixed; bottom: 28px; right: 28px; width: 60px; height: 60px;
  border-radius: 50%; background: var(--grad); border: none; cursor: pointer;
  box-shadow: 0 8px 32px rgba(37,99,235,.4); display: flex;
  align-items: center; justify-content: center; z-index: 200; transition: .3s;
}
#chatbot-toggle:hover { transform: scale(1.08); }
#chatbot-toggle i { color: #fff; font-size: 26px; }
#chatbot-window {
  position: fixed; bottom: 104px; right: 28px; width: 390px; height: 540px;
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18); display: flex; flex-direction: column;
  z-index: 200; overflow: hidden;
  transform: scale(.9) translateY(20px); opacity: 0; pointer-events: none;
  transition: .3s cubic-bezier(.16,1,.3,1); border: 1px solid var(--border);
}
#chatbot-window.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }
.chat-header { background: var(--grad); color: #fff; padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.chat-avatar { width: 38px; height: 38px; background: rgba(255,255,255,.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.chat-avatar i { font-size: 20px; }
.chat-header-info h4 { font-size: .95rem; font-weight: 700; }
.chat-header-info p { font-size: .75rem; opacity: .8; }
.chat-close { margin-left: auto; background: none; border: none; color: #fff; cursor: pointer; opacity: .7; font-size: 20px; line-height: 1; padding: 4px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: .875rem; line-height: 1.55; }
.chat-msg.bot { background: var(--light); color: var(--dark); border-bottom-left-radius: 4px; align-self: flex-start; }
.chat-msg.user { background: var(--grad); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-msg.typing { display: flex; gap: 4px; align-items: center; padding: 14px; }
.chat-msg.typing span { width: 7px; height: 7px; background: #94a3b8; border-radius: 50%; animation: typingDot 1.2s infinite; }
.chat-msg.typing span:nth-child(2) { animation-delay: .2s; }
.chat-msg.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
.chat-input-wrap { border-top: 1px solid var(--border); padding: 12px 16px; display: flex; gap: 8px; }
.chat-input-wrap input {
  flex: 1; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: .875rem; font-family: inherit; outline: none; transition: .2s;
}
.chat-input-wrap input:focus { border-color: var(--blue); }
.chat-send { width: 40px; height: 40px; border-radius: 10px; background: var(--grad); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: .2s; }
.chat-send:hover { opacity: .85; }
.chat-send i { color: #fff; font-size: 18px; }
.chat-suggestions { padding: 8px 16px 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.chat-pill { background: var(--light); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; font-size: .8rem; cursor: pointer; transition: .2s; color: var(--mid); }
.chat-pill:hover { border-color: var(--blue); color: var(--blue); background: #eff6ff; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media(max-width:900px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media(max-width:600px) {
  .footer-grid { grid-template-columns: 1fr; }
  #chatbot-window { width: calc(100vw - 32px); right: 16px; bottom: 96px; }
  .nav-cta .btn-outline { display: none; }
  .nav-logo-sub { display: none; }
}

/* ── Small screens: stack inline two-column grids ── */
@media(max-width:600px){
  main [style*="grid-template-columns:1fr 1fr"]{grid-template-columns:1fr!important}
  main [style*="grid-template-columns:repeat(4,1fr)"]{grid-template-columns:repeat(2,1fr)!important}
}
