/* =============================================
   AI HUB v2 — SHARED LAYOUT & COMPONENTS
   ============================================= */

/* ── RESET & UTILITY ─────────────────────── */
.container  { width: 100%; margin: 0 auto; padding: 0 80px; }
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid rgba(10,132,255,0.2);
  padding: 5px 13px;
  border-radius: 100px;
  margin-bottom: 18px;
}
[data-theme="dark"] .eyebrow {
  background: rgba(10,132,255,0.12);
  border-color: rgba(10,132,255,0.25);
}
.eyebrow::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

.h-display {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--txt-1);
}
.h-display em { font-style: italic; color: var(--blue); }
.h-xl  { font-size: clamp(2.4rem, 4.5vw, 3.6rem); }
.h-lg  { font-size: clamp(2rem, 3.5vw, 2.9rem); }
.h-md  { font-size: clamp(1.5rem, 2.5vw, 2rem); }

.body-lg { font-size: 1.08rem; color: var(--txt-2); line-height: 1.75; }
.body-md { font-size: 0.95rem; color: var(--txt-2); line-height: 1.7; }

.text-center { text-align: center; }
.text-center .body-lg { max-width: 580px; margin: 14px auto 0; }

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--r-lg);
  transition: all var(--t-med) var(--spring);
  white-space: nowrap;
  outline: none;
}
.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(10,132,255,0.38); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--txt-1);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

.btn-ghost {
  background: var(--bg-subtle);
  color: var(--txt-2);
}
.btn-ghost:hover { background: var(--blue-soft); color: var(--blue); }

.btn-lg { padding: 15px 32px; font-size: 16px; border-radius: var(--r-xl); }
.btn-sm { padding: 9px 18px; font-size: 13px; border-radius: var(--r-md); }
.btn-block { width: 100%; justify-content: center; }

/* ── NAVBAR ──────────────────────────────── */
.navbar {
    display: flex;
  border-bottom:  1px solid var(--border);
  padding: 30px 0px;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  transition: all var(--t-med) var(--ease);
}
.navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.nav-logo-mark {
    width: 55px; height: 55px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
}
.nav-logo-text {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  color: var(--txt-1);
  letter-spacing: -0.02em;
}
.nav-logo-text span { color: var(--blue); }

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--txt-2);
  padding: 8px 14px;
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  position: relative;
}
.nav-links a:hover { color: var(--blue); background: var(--blue-soft); }
.nav-links a.active { color: var(--blue); font-weight: 600; }
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active { background: rgba(10,132,255,0.1); }

/* Right group */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-theme {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: var(--txt-2);
  transition: all var(--t-med) var(--spring);
}
.nav-theme:hover { border-color: var(--blue); color: var(--blue); transform: rotate(15deg) scale(1.08); }

/* Mobile hamburger — hidden on desktop */
.nav-ham {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
}
.nav-ham span {
  display: block;
  width: 18px; height: 2px;
  background: var(--txt-1);
  border-radius: 2px;
  transition: all var(--t-med) var(--ease);
}
.nav-ham.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-ham.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-ham.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── SIDEBAR (mobile only) ──────────────── */
.mob-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  z-index: 910;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease);
}
.mob-overlay.show { opacity: 1; pointer-events: all; }

.mob-sidebar {
  display: none;
  position: fixed;
  top: 0; right: -300px;
  width: 280px; height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 920;
  flex-direction: column;
  transition: right var(--t-slow) var(--spring);
  box-shadow: -12px 0 48px rgba(0,0,0,0.2);
}
.mob-sidebar.open { right: 0; }
.mob-sidebar-head {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.mob-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--txt-2);
  transition: all var(--t-fast);
}
.mob-close:hover { background: #ff4444; color: #fff; border-color: transparent; }

.mob-nav { padding: 16px 0; flex: 1; }
.mob-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 500;
  color: var(--txt-2);
  border-left: 3px solid transparent;
  transition: all var(--t-fast);
}
.mob-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.mob-nav a:hover, .mob-nav a.active {
  color: var(--blue);
  border-left-color: var(--blue);
  background: rgba(10,132,255,0.06);
}
.mob-foot {
  padding: 20px 22px;
  border-top: 1px solid var(--border);
}

/* ── PAGE LOADER ─────────────────────────── */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s, visibility 0.4s;
}
.loader.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SCROLL TOP ──────────────────────────── */
.scroll-up {
  position: fixed;
  bottom: 26px; right: 26px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  box-shadow: var(--shadow-blue);
  z-index: 800;
  opacity: 0; transform: translateY(14px);
  transition: all var(--t-med) var(--spring);
  pointer-events: none;
}
.scroll-up.show { opacity: 1; transform: translateY(0); pointer-events: all; }
.scroll-up:hover { transform: translateY(-4px) scale(1.08); }

/* ── AOS ─────────────────────────────────── */
[data-aos] {
  opacity: 0;
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
[data-aos="fade-up"]    { transform: translateY(36px); }
[data-aos="fade-left"]  { transform: translateX(36px); }
[data-aos="fade-right"] { transform: translateX(-36px); }
[data-aos="zoom-in"]    { transform: scale(0.92); }
[data-aos].visible      { opacity: 1; transform: none; }

/* ── FOOTER ──────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 68px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.footer-brand-tagline {
  font-size: 14px;
  color: var(--txt-3);
  line-height: 1.7;
  max-width: 280px;
  margin: 14px 0 22px;
}
.footer-socials { display: flex; gap: 10px; }
.footer-social {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--txt-3);
  transition: all var(--t-med) var(--spring);
}
.footer-social:hover { background: var(--blue); color: #fff; border-color: var(--blue); transform: translateY(-3px); }
.footer-col-h {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--txt-1);
  margin-bottom: 16px;
}
.footer-col-links { display: flex; flex-direction: column; gap: 9px; }
.footer-col-links a { font-size: 14px; color: var(--txt-3); transition: color var(--t-fast); }
.footer-col-links a:hover { color: var(--blue); }
.footer-bottom {
  display: flex; align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--txt-3);
}
.footer-bottom span { color: var(--blue); }

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 900px) {
  .container { padding: 0px 30px; }
  .nav-links, .nav-right .btn { display: none; }
  .nav-ham { display: flex; }
  .mob-overlay, .mob-sidebar { display: flex; }
  .mob-sidebar { display: flex; }
}
@media (max-width: 640px) {
  .section { padding: 68px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}