@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* =========================================================
   DESIGN TOKENS & SYSTEM PALETTE
   ========================================================= */
:root {
  --brand: #2F5BFF;
  --brand-2: #7B61FF;
  --signal: #0FB8CF;
  --wa: #1F8A4C;
  --wa-tint: #E7F8EE;
  --warn: #C2410C;

  --bg: #FFFFFF;
  --soft: #F5F7FB;
  --tint: #EEF2FF;
  --ink: #0F172A;
  --slate: #5B6478;
  --line: #E4E8F0;
  --wire: #CBD4E6;

  /* Dark section tokens */
  --night: #060C22;
  --night-2: #0B1536;
  --night-ink: #EEF2FF;
  --night-slate: #97A3C8;
  --night-line: #1D2A55;
  --surface: #FFFFFF;
  --accent: #2F5BFF;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.02em;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Buttons & Badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.96rem; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--brand); }
.btn-glow {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(47, 91, 255, 0.55);
}
.btn-glow:hover { box-shadow: 0 10px 36px -6px rgba(47, 91, 255, 0.75); }
.btn-line { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.88rem; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-weight: 600; font-size: 0.88rem; cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Site Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-in { display: flex; align-items: center; gap: 14px; height: 76px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; margin-right: auto; }
.brand-glyph, .brand-logo, .brand .brand-logo { width: 36px; height: 36px; object-fit: contain; flex: none; display: block; }
.brand-mark { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; color: var(--ink); }
.brand-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.brand-unit { font-weight: 600; font-size: 0.95rem; color: var(--slate); }

.head-nav { margin: 0 20px 0 auto; }
.head-nav-list { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.head-nav-list a {
  font-weight: 600; font-size: 0.94rem; color: var(--slate); text-decoration: none;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color 0.2s, border-bottom-color 0.2s;
  white-space: nowrap;
}
.head-nav-list a:hover { color: var(--ink); border-bottom-color: var(--brand); }
.head-nav-list a.active { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }

.head-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.head-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-weight: 700; font-size: 0.92rem; cursor: pointer; text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s; white-space: nowrap;
}
.head-btn:hover { border-color: var(--ink); }
.head-btn.plain { border-color: transparent; }
.head-btn.plain:hover { background: var(--soft); }
.spark { width: 16px; height: 16px; color: var(--brand); flex: none; }
.menu-lines { display: grid; gap: 5px; width: 18px; }
.menu-lines span { height: 1.5px; background: currentColor; border-radius: 2px; }
.menu-lines span:last-child { width: 12px; }

/* ---------- In-page Subnav ---------- */
.subnav { border-bottom: 1px solid var(--line); background: #fff; }
.subnav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  display: block; padding: 14px 0; font-weight: 600; font-size: 0.92rem; color: var(--slate);
  text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent;
  transition: color 0.2s, border-bottom-color 0.2s;
}
.subnav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Full-Screen Menu Modal ---------- */
.menu {
  position: fixed; inset: 0; z-index: 60; background: #fff; display: none;
  overflow-y: auto; padding-top: env(safe-area-inset-top, 0px);
}
.menu.open { display: block; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } }
.menu-body {
  display: grid; grid-template-columns: 1.3fr 1.2fr 1fr;
  gap: clamp(28px, 5vw, 72px); padding-top: 48px; padding-bottom: 64px;
}
.menu h2 { margin: 0 0 16px; font-size: 0.95rem; font-weight: 700; color: var(--slate); text-transform: uppercase; letter-spacing: 0.04em; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menu-big a {
  display: block; padding: 6px 0; font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600; letter-spacing: -0.02em; text-decoration: none;
  transition: color 0.2s;
}
.menu-big a:hover, .menu-small a:hover { color: var(--brand); }
.menu-small a { display: block; padding: 6px 0; text-decoration: none; color: var(--slate); font-weight: 600; transition: color 0.2s; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 calc(36px + env(safe-area-inset-bottom, 0px));
  font-size: 0.95rem;
}
.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.25fr 1.05fr;
  gap: clamp(24px, 3.5vw, 44px);
}
.foot h4 { margin: 0 0 16px; font-size: 1rem; font-weight: 700; color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { color: rgba(255, 255, 255, 0.75); text-decoration: none; transition: color 0.2s; }
.foot a:hover { color: #fff; }
.copyright {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem; color: rgba(255, 255, 255, 0.5);
}

/* ---------- Assistant Chat Drawer & FAB ---------- */
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(15,23,42,0.35); display: none; }
.scrim.open { display: block; animation: fade 0.2s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 56;
  width: min(440px, 100vw); background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), visibility 0.3s;
  box-shadow: -20px 0 60px -20px rgba(15,23,42,0.3);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.badge {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: #f8fafc; border: 1px solid var(--line); flex: none;
}
.badge .badge-logo { width: 24px; height: 24px; object-fit: contain; display: block; }
.badge .spark { color: var(--brand); }
.drawer-head strong { display: block; }
.drawer-head div > span { display: block; font-size: 0.84rem; color: var(--slate); }
.online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--wa); margin-right: 5px; vertical-align: 1px; }
.drawer-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.drawer-actions .icon-btn { margin-left: 0; }
.icon-btn {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center;
  transition: all 0.2s ease;
}
.icon-btn:hover { border-color: var(--ink); background: var(--soft); }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--soft); }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 0.95rem; line-height: 1.5; animation: evin 0.25s ease both; }
.msg.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.me { background: var(--ink); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick button, .quick a {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 0.84rem; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink);
  transition: all 0.2s ease;
}
.quick button:hover, .quick a:hover { border-color: var(--brand); color: var(--brand); }
.quick a.link-cta {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.quick a.link-cta:hover {
  background: var(--ink); border-color: var(--ink); color: #fff;
}
.quick a.link-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #fff !important;
  border-color: #20BA5A;
  font-weight: 700;
}
.quick a.link-wa:hover {
  background: #1EBE5D;
  border-color: #179E4B;
  color: #fff !important;
  transform: translateY(-1px);
}
.quick a.link-wa svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex: none;
}
.thinking { display: inline-flex; align-items: center; gap: 5px; padding: 6px 4px; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--slate); opacity: 0.35; animation: blink 1s infinite; display: inline-block; }
.thinking i:nth-child(2) { animation-delay: 0.15s; }
.thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 50% { opacity: 1; } }
.msg a { color: var(--brand); text-decoration: underline; font-weight: 600; }
.msg a:hover { color: var(--brand-2); }
.chat-form { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; font-size: 1rem; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; background: #fff; }
.chat-form input:focus { outline: none; border-color: var(--brand); }
.fab {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 20px 0 16px;
  border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-weight: 700;
  cursor: pointer; box-shadow: 0 14px 34px -10px rgba(15,23,42,0.55);
  transition: opacity 0.25s, transform 0.25s, background-color 0.2s;
}
.fab:hover { background: var(--brand); }
.fab .spark { color: #9DB2FF; }
.fab.hide { opacity: 0; transform: translateY(12px); pointer-events: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .head-nav { display: none; }
  .brand { margin-right: auto; }
}
@media (max-width: 1000px) {
  .menu-body { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .brand-unit, .brand-sep, .head-label, .hide-sm { display: none; }
  .head-btn { padding: 0 12px; }
  .foot { grid-template-columns: 1fr; }
  .fab { width: 52px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
