/* ==========================================================================
   Nairaloop — Landing Page Styles
   Bootstrap 5 + Custom CSS
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  --nl-brand-purple: #5A19C1;
  --nl-brand-blue: #4B45E4;
  --nl-accent-blue: #3B38FF;
  --nl-primary: #2417d6;
  --nl-accent-sky: #1d8cff;
  --nl-navy: #0A0A30;
  --nl-text-body: #666C8F;
  --nl-text-muted: #9CA3AF;
  --nl-surface: #FFFFFF;
  --nl-surface-hover: #FAFAFE;
  --nl-page-bg: #F8F9FD;
  --nl-body-bg: #E8EAF4;
  --nl-page-border: #ffffff;
  --nl-gradient-lavender: #E0E0FF;
  --nl-gradient-opacity: 0.55;
  --nl-border-subtle: rgba(10, 10, 48, 0.12);
  --nl-hover-overlay: rgba(0, 0, 0, 0.05);
  --nl-focus-ring: rgba(75, 69, 228, 0.3);
  --nl-shade-opacity: 1;

  --nl-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --nl-radius-page: 32px;
  --nl-radius-search: 32px;
  --nl-radius-filter: 22px;
  --nl-radius-qr: 10px;

  --nl-shadow-page: 0 8px 40px rgba(0, 0, 0, 0.06);
  --nl-shadow-search: 0 4px 20px rgba(0, 0, 0, 0.05);
  --nl-shadow-filter: 0 2px 8px rgba(0, 0, 0, 0.05);
  --nl-shadow-filter-active: 0 4px 12px rgba(75, 69, 228, 0.25);
  --nl-shadow-chat: 0 2px 10px rgba(0, 0, 0, 0.10);
  --nl-shadow-qr: 0 2px 8px rgba(0, 0, 0, 0.04);

  --nl-space-page: 60px;
  --nl-header-mb: 100px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--nl-font);
  color: var(--nl-navy);
  background: var(--nl-body-bg);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --------------------------------------------------------------------------
   Page Wrapper & Background
   -------------------------------------------------------------------------- */
.nl-page-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.nl-bg-gradient {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 35%;
  pointer-events: none;
  z-index: 0;
  filter: blur(100px);
  opacity: var(--nl-gradient-opacity);
}

.nl-bg-gradient--left {
  left: -5%;
  background: radial-gradient(ellipse at center, var(--nl-gradient-lavender) 0%, transparent 70%);
}

.nl-bg-gradient--right {
  right: -5%;
  background: radial-gradient(ellipse at center, var(--nl-gradient-lavender) 0%, transparent 70%);
}

/* --------------------------------------------------------------------------
   Page Container
   -------------------------------------------------------------------------- */
.nl-page-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  min-height: calc(100vh - 48px);
  background: var(--nl-page-bg);
  border-radius: var(--nl-radius-page);
  box-shadow: var(--nl-shadow-page);
  padding: var(--nl-space-page);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image: url(../assets/images/shade.png);
  background-position-x: center;
  background-size: cover;
  border: 10px solid var(--nl-page-border);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.nl-header {
  margin-bottom: var(--nl-header-mb);
}

.nl-navbar {
  position: relative;
}

.nl-logo {
  padding: 0;
  margin: 0;
  line-height: 0;
}

.nl-logo__img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.nl-navbar-toggler {
  border: 1px solid var(--nl-border-subtle);
  padding: 6px 10px;
  border-radius: 8px;
}

.nl-navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(75, 69, 228, 0.25);
}

.nl-nav {
  gap: 36px;
}

.nl-nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--nl-text-body) !important;
  padding: 4px 0 !important;
  position: relative;
  transition: color 0.2s ease;
}

.nl-nav__link:hover {
  color: var(--nl-navy) !important;
}

.nl-nav__link--active {
  color: var(--nl-primary) !important;
  font-weight: 600;
}

.nl-nav__link--active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--nl-brand-blue);
  border-radius: 1px;
}

/* Center nav on desktop */
@media (min-width: 992px) {
  .nl-navbar .navbar-collapse {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.nl-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nl-hero {
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.nl-hero__title {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--nl-primary);
  margin: 0 0 24px;
}

.nl-hero__accent {
  color: var(--nl-accent-sky);
}

.nl-hero__subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--nl-text-body);
  max-width: 680px;
  margin: 0 auto 40px;
}

/* --------------------------------------------------------------------------
   Search Bar
   -------------------------------------------------------------------------- */
.nl-search {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 32px;
}

.nl-search__bar {
  display: flex;
  align-items: center;
  height: 64px;
  background: var(--nl-surface);
  border-radius: var(--nl-radius-search);
  box-shadow: var(--nl-shadow-search);
  padding: 0 24px;
  transition: box-shadow 0.2s ease;
}

.nl-search__bar:focus-within {
  box-shadow: var(--nl-shadow-search), 0 0 0 2px var(--nl-focus-ring);
}

.nl-search__icon {
  font-size: 20px;
  color: var(--nl-primary);
  margin-right: 14px;
  flex-shrink: 0;
}

.nl-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: var(--nl-font);
  color: var(--nl-navy);
  background: transparent;
  min-width: 0;
}

.nl-search__input::placeholder {
  color: var(--nl-text-muted);
}

.nl-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

/* --------------------------------------------------------------------------
   Filter Chips
   -------------------------------------------------------------------------- */
.nl-filters {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
  max-width: 100%;
}

.nl-filters::-webkit-scrollbar {
  display: none;
}

.nl-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--nl-radius-filter);
  background: var(--nl-surface);
  color: var(--nl-navy);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--nl-shadow-filter);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.nl-filter i {
  font-size: 15px;
}

.nl-filter:hover {
  background: var(--nl-surface-hover);
  transform: translateY(-1px);
}

.nl-filter--active {
  background: var(--nl-brand-blue);
  color: var(--nl-surface);
  box-shadow: var(--nl-shadow-filter-active);
}

.nl-filter--active:hover {
  background: #3D38C8;
  color: var(--nl-surface);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.nl-footer {
  margin-top: auto;
  padding-top: 60px;
  padding-right: 160px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nl-footer__main {
  position: relative;
  width: 100%;
  min-height: 80px;
}

.nl-download {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Social links */
.nl-footer__social {
  position: absolute;
  left: calc(50% + 80px);
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.nl-social__title {
  font-size: 15px;
  font-weight: 400;
  color: var(--nl-text-body);
  margin: 0 0 18px;
  line-height: 1.4;
}

.nl-social__icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.nl-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--nl-surface);
  color: #111111;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.nl-social__link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  color: var(--nl-primary);
}

.nl-social__link:focus-visible {
  outline: 2px solid var(--nl-primary);
  outline-offset: 3px;
}

[data-theme="dark"] .nl-social__link {
  background: var(--nl-surface);
  color: var(--nl-navy);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nl-social__link:hover {
  color: var(--nl-primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.nl-download__qr {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: var(--nl-surface);
  border-radius: var(--nl-radius-qr);
  box-shadow: var(--nl-shadow-qr);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nl-download__qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nl-download__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--nl-navy);
  margin: 0 0 4px;
  line-height: 1.4;
}

.nl-download__subtitle {
  font-size: 14px;
  color: var(--nl-text-body);
  margin: 0 0 12px;
  line-height: 1.4;
}

.nl-download__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.nl-badge {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.2s ease;
}

.nl-badge:hover {
  opacity: 0.85;
}

.nl-badge img {
  height: 36px;
  width: auto;
}

.nl-legal {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--nl-text-muted);
  margin: 0;
  line-height: 1.4;
}

.nl-legal__icon {
  font-size: 14px;
  color: var(--nl-brand-blue);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Floating Assistant
   -------------------------------------------------------------------------- */
.nl-assistant {
  position: absolute;
  bottom: var(--nl-space-page);
  right: var(--nl-space-page);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.nl-assistant__bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--nl-surface);
  border-radius: 9999px;
  padding: 9px 14px 9px 12px;
  box-shadow: var(--nl-shadow-chat);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nl-assistant__bubble.nl-assistant__bubble--hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.nl-assistant__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nl-brand-blue);
  flex-shrink: 0;
}

.nl-assistant__text {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--nl-navy);
  white-space: nowrap;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease, letter-spacing 0.35s ease, font-weight 0.35s ease;
}

.nl-assistant__text.nl-assistant__text--changing {
  opacity: 0;
  transform: translateY(4px);
}

.nl-assistant__text--email {
  letter-spacing: 0;
  font-weight: 500;
  white-space: nowrap;
}

.nl-assistant__text a {
  color: var(--nl-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nl-assistant__text a:hover {
  color: var(--nl-brand-purple);
  text-decoration: underline;
}

.nl-assistant__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  color: var(--nl-text-muted);
  font-size: 16px;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
  margin-left: 4px;
}

.nl-assistant__close:hover {
  color: var(--nl-navy);
  background: var(--nl-hover-overlay);
}

.nl-assistant__contact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--nl-surface);
  color: var(--nl-brand-blue);
  box-shadow: var(--nl-shadow-chat);
  transition: color 0.2s ease, transform 0.15s ease;
}

.nl-assistant__contact i {
  font-size: 22px;
  line-height: 1;
}

.nl-assistant__contact:hover {
  color: var(--nl-brand-purple);
  transform: scale(1.05);
}

/* --------------------------------------------------------------------------
   Responsive — Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --nl-space-page: 40px;
    --nl-header-mb: 72px;
  }

  .nl-nav {
    gap: 24px;
    padding-top: 16px;
  }

  .nl-hero__subtitle {
    font-size: 17px;
  }

  .nl-search {
    max-width: 90%;
  }
}

/* --------------------------------------------------------------------------
   Responsive — Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  :root {
    --nl-space-page: 24px;
    --nl-header-mb: 48px;
    --nl-radius-page: 20px;
  }

  .nl-page-wrapper {
    padding: 12px;
  }

  .nl-page-container {
    min-height: calc(100vh - 24px);
    padding: 10px;
  }

  .nl-logo__img {
    height: 60px;
  }

  .nl-nav {
    gap: 8px;
    align-items: flex-start;
  }

  .nl-nav__link {
    font-size: 16px;
    padding: 8px 0 !important;
  }

  .nl-hero__title {
    font-size: 1.7rem;
    margin-bottom: 16px;
  }

  .nl-hero__subtitle {
    font-size: 16px;
    margin-bottom: 32px;
  }

  .nl-search {
    max-width: 100%;
  }

  .nl-search__bar {
    height: 56px;
    padding: 0 18px;
  }

  .nl-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    justify-content: center;
    overflow: visible;
    margin: 0;
    padding: 0;
  }

  .nl-filter {
    width: 100%;
    height: 38px;
    padding: 0 8px;
    font-size: 12px;
    gap: 5px;
    justify-content: center;
    flex-shrink: 1;
    white-space: nowrap;
  }

  .nl-filter i {
    font-size: 13px;
  }

  .nl-footer {
    padding-top: 40px;
    padding-right: 0;
  }

  .nl-footer__main {
    position: static;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }

  .nl-footer__social {
    position: static;
    transform: none;
  }

  .nl-download {
    align-self: flex-start;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nl-social__icons {
    gap: 16px;
  }

  .nl-social__link {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .nl-assistant {
    /* bottom: var(--nl-space-page); */
    bottom: 250px;
    right: var(--nl-space-page);
  }

  .nl-assistant__contact {
    width: 40px;
    height: 40px;
  }

  .nl-assistant__contact i {
    font-size: 18px;
  }
}

@media (max-width: 380px) {
  .nl-filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .nl-filter {
    font-size: 11px;
    padding: 0 6px;
  }
}
