/* ============================================================
   Boongon — Components :: buttons, cards, chips, nav, footer
   ============================================================ */

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform 160ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-600); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink-3); background: var(--surface-2); }

.btn-ghost { background: transparent; color: var(--ink); padding: 0 6px; }
.btn-ghost:hover { color: var(--green-ink); }

.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* link with animated arrow */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-ink);
  font-weight: 500;
  font-size: 15px;
}
.arrow-link svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card-hover { transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.card-hover:hover { border-color: var(--line); transform: translateY(-3px); }

/* ── Chips ───────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--hairline);
}
.chip-green { background: var(--green-050); color: var(--green-ink); border-color: var(--green-100); }

/* ── Status: dot (calm) vs pill (negative) ───────── */
.dot {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex: none;
}
.pill-neg {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  background: var(--neg-050); color: var(--neg-ink);
  font-size: 12px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--neg) 24%, transparent);
}

/* ── Icon tile (line icon container) ─────────────── */
.itile {
  width: 44px; height: 44px;
  border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-050);
  color: var(--green-ink);
  border: 1px solid var(--green-100);
}
.itile svg { width: 22px; height: 22px; stroke-width: 1.6; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0; z-index: 80;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
}
.brand img { width: 28px; height: 28px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav-links a {
  padding: 8px 12px;
  border-radius: var(--r-xs);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.nav-links a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.nav-links a.is-active { color: var(--ink); }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-signin {
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  padding: 8px 10px;
}
.nav-signin:hover { color: var(--ink); }

/* theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  background: var(--surface);
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-3); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* mobile */
.nav-burger { display: none; }
@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-signin { display: none; }
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--r-sm);
    border: 1px solid var(--line); color: var(--ink);
  }
  .nav-burger svg { width: 20px; height: 20px; }
}

/* mobile menu sheet */
.mobile-menu {
  display: none;
  position: fixed; inset: 68px 0 0 0; z-index: 79;
  background: var(--bg);
  padding: 24px var(--gutter);
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--hairline);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 8px;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu .btn { margin-top: 18px; }

/* ============================================================
   FOOTER (dark, echoes login panel)
   ============================================================ */
.footer {
  background: #0E0F0E;
  color: #C9CCC6;
  padding: 84px 0 40px;
}
[data-theme="dark"] .footer { border-top: 1px solid rgba(255,255,255,0.08); }

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer .brand-name { color: #fff; }
.footer-blurb {
  margin-top: 16px;
  color: #8B8F89;
  font-size: 15px;
  max-width: 34ch;
  line-height: 1.6;
}
.footer-col h4 {
  color: #8B8F89;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: #C9CCC6;
  font-size: 15px;
  padding: 7px 0;
  transition: color 160ms var(--ease);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  color: #6E726C;
  font-size: 14px;
}
.footer-bottom .secure {
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-bottom .secure::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
}
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand-col { grid-column: 1 / -1; }
}

/* ── Big closing CTA block ───────────────────────── */
.cta-block {
  text-align: center;
  padding: 96px 0;
}
.cta-block h2 { font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -0.03em; }
.cta-block .lede { margin-inline: auto; }
.cta-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 32px;
}

/* ── Section header (centered) ───────────────────── */
.shead { max-width: 720px; }
.shead.center { margin-inline: auto; text-align: center; }
.shead.center .lede { margin-inline: auto; }

/* ── Small-screen nav + footer ───────────────────── */
@media (max-width: 600px) {
  .nav-inner { height: 60px; gap: 12px; }
  .brand-name { font-size: 18px; }
  .nav-right { gap: 8px; }
  .footer { padding: 60px 0 32px; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cta-block { padding: 64px 0; }
  .cta-actions .btn { width: 100%; }
}
@media (max-width: 400px) {
  /* keep only the essentials in the bar; full menu lives in the sheet */
  .nav-right .btn-primary { display: none; }
}
