/* ============================================
   LAYOUT.CSS — Navbar, Hero, Footer
   ============================================ */

/* ══════════════════════════════════════
   PRELOADER
   ══════════════════════════════════════ */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity .6s ease, visibility .6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  font-family: var(--font-alt);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse-logo 1.4s ease-in-out infinite;
}

.preloader-logo i {
  -webkit-text-fill-color: initial;
  color: var(--primary);
  margin-right: 8px;
}

.preloader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 99px;
  overflow: hidden;
}

.preloader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  animation: loader-fill 2s ease forwards;
}

.preloader-text {
  font-size: .8rem;
  color: var(--text-muted);
  letter-spacing: .1em;
}

@keyframes loader-fill {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes pulse-logo {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .75; transform: scale(.97); }
}


/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background .4s ease, box-shadow .4s ease, backdrop-filter .4s ease;
}

#navbar.scrolled {
  background: rgba(10,11,15,.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 4px 30px rgba(0,0,0,.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-alt);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 2px 12px rgba(108,99,255,.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 99px;
  transition: right .3s ease;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { right: 0; }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-menu-btn:hover { background: rgba(255,255,255,.08); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(10,11,15,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 999;
  padding: 20px 0 28px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
}

.mobile-nav.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.mobile-nav a {
  display: block;
  padding: 12px 24px;
  font-size: .98rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-nav a:hover {
  color: var(--text-primary);
  background: rgba(108,99,255,.1);
  padding-left: 32px;
}

.mobile-nav-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 24px 0;
  border-top: 1px solid var(--border-light);
  margin-top: 12px;
}


/* ══════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(108,99,255,.18) 0%, transparent 70%),
              linear-gradient(180deg, rgba(10,11,15,.3) 0%, rgba(10,11,15,.85) 60%, var(--bg-dark) 100%);
}

.hero-blob-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(108,99,255,.35) 0%, transparent 70%);
  top: 5%; left: -10%;
}

.hero-blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,.28) 0%, transparent 70%);
  top: 20%; right: -8%;
}

.hero-blob-3 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(244,114,182,.2) 0%, transparent 70%);
  bottom: 10%; left: 30%;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 0 100px;
  width: 100%;
}

.hero-badge {
  animation: fadeInDown .7s ease both;
}

.hero-title {
  font-family: var(--font-alt);
  font-size: clamp(2rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.12;
  max-width: 860px;
  margin: 0 auto 22px;
  animation: fadeInUp .8s ease .15s both;
}

.hero-title .grad {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(.9rem, 2.2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.8;
  animation: fadeInUp .8s ease .3s both;
}

.hero-btns {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp .8s ease .45s both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp .8s ease .6s both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-stat-num {
  font-family: var(--font-alt);
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  letter-spacing: .06em;
}

.hero-divider {
  width: 1px;
  height: 50px;
  background: var(--border-light);
  align-self: center;
}

.hero-img-wrap {
  position: relative;
  z-index: 1;
  margin-top: 60px;
  width: min(820px, 90vw);
  animation: fadeInUp .9s ease .75s both;
}

.hero-img-wrap img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(108,99,255,.15);
}

.hero-img-badge {
  position: absolute;
  padding: 10px 16px;
  background: rgba(17,19,24,.9);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}

.hero-img-badge i { color: var(--primary); font-size: 1rem; }
.hero-img-badge.top-left { top: -16px; left: -16px; }
.hero-img-badge.bottom-right { bottom: -16px; right: -16px; }
.hero-img-badge .dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: ping 1.8s ease infinite;
}

@keyframes ping {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: .6; }
}

/* ── Scroll indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: .72rem;
  letter-spacing: .1em;
  animation: bounce 2s ease infinite;
  z-index: 1;
}

.scroll-indicator i { font-size: 1rem; }

@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}


/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 60px 0 28px;
  position: relative;
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: .88rem;
  line-height: 1.75;
  margin-top: 14px;
  max-width: 260px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.social-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: .9rem;
  transition: var(--transition);
}

.social-btn:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(108,99,255,.12);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  font-size: .87rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  transition: color .25s;
}

.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.footer-bottom p {
  font-size: .8rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: .8rem;
  color: var(--text-muted);
  transition: color .25s;
}

.footer-bottom-links a:hover { color: var(--text-secondary); }

/* ── Back to top ── */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(108,99,255,.45);
  transition: var(--transition);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(108,99,255,.6);
}


/* ══════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}


/* ══════════════════════════════════════
   RESPONSIVE — LAYOUT
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .btn-outline { display: none; }
  .nav-menu-btn { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .hero-stats { gap: 20px; }
  .hero-divider { height: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 1.75rem; }
  .hero-img-badge { display: none; }
  #back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}

@media (max-width: 280px) {
  .hero-btns { flex-direction: column; width: 100%; }
  .btn { justify-content: center; width: 100%; }
}
