/* ========================================
   COMPONENTS.CSS – Reusable Components
   ======================================== */

/* ----- Modern, clean navbar ----- */
.header-nav {
  background: var(--glass-bg-strong);
  border-bottom: 1px solid var(--border-soft);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.3s, border-color 0.3s;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: var(--font-xl);
  color: var(--text);
  text-decoration: none;
}
.logo-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-link {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  font-size: var(--font-sm);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(124,58,237,0.06);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(124,58,237,0.08);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: none;
  border: none;
  padding: 0.4rem;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text-secondary);
}
.theme-toggle:hover {
  background: var(--surface);
}
.theme-icon {
  font-size: var(--font-lg);
  line-height: 1;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
}
.hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: 0.2s;
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: 0.2s;
}
.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

.mobile-menu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: block; }
.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mobile-menu .nav-link {
  display: block;
  padding: 0.75rem 1rem;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
}

/* ----- HERO ----- */
.hero {
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-badge {
    display: inline-block;
    background: rgba(109,40,217,0.1);
    color: var(--primary);
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--font-sm);
    margin-bottom: 1rem;
}
.hero-title {
    font-size: var(--font-6xl);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.hero-description {
    font-size: var(--font-lg);
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 2rem;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: var(--font-3xl);
    font-weight: 800;
    color: var(--text);
}
.stat-label {
    font-size: var(--font-sm);
    color: var(--text-muted);
}

/* Hero illustration */
.hero-visual {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-illustration {
    position: relative;
    width: 100%;
    height: 100%;
}
.floating-card {
    position: absolute;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 0.75rem 1.4rem;
    box-shadow: var(--shadow-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--font-base);
    animation: float 6s ease-in-out infinite;
    color: var(--text);
}
.floating-card i { color: var(--primary); font-size: var(--font-xl); }
.card-1 { top: 5%; left: 0; animation-delay: 0s; }
.card-2 { top: 40%; right: 0; animation-delay: 1.5s; }
.card-3 { bottom: 10%; left: 15%; animation-delay: 3s; }
.card-4 { bottom: 30%; right: 20%; animation-delay: 4.5s; }

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    pointer-events: none;
}
.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -10%;
    left: -20%;
}
.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -20%;
    right: -20%;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

@media (max-width: 1024px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-description { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { height: 250px; }
    .floating-card { padding: 0.5rem 1rem; font-size: var(--font-sm); }
    .floating-card i { font-size: var(--font-lg); }
}
@media (max-width: 768px) {
    .hero { padding: 3rem 0; }
    .hero-title { font-size: var(--font-4xl); }
    .hero-stats { gap: 1.5rem; }
    .floating-card { display: none; }
    .hero-visual { height: 0; }
}

/* ----- FEATURES ----- */
.features {
    padding: 4rem 0;
}
.feature-card { text-align: center; }
.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(109,40,217,0.08);
    font-size: 1.6rem;
    color: var(--primary);
}
.feature-card h3 { font-size: var(--font-xl); margin-bottom: 0.25rem; }
.feature-card p { font-size: var(--font-sm); margin-bottom: 0; }

/* ----- MODULES ----- */
.modules { padding: 4rem 0; }
.module-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.module-number {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(109,40,217,0.08);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 1;
    line-height: 1;
    margin-bottom: 0.85rem;
}
.module-card h3 { font-size: var(--font-xl); margin-bottom: 0.25rem; }
.module-card p { flex: 1; font-size: var(--font-sm); }
.module-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
}
.project-tag {
    background: var(--surface);
    padding: 0.25rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: var(--font-xs);
    color: var(--text-secondary);
    border: 1px solid var(--border-soft);
}

/* ----- PORTFOLIO PREVIEW ----- */
.portfolio-preview {
    padding: 4rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.portfolio-item {
    text-align: center;
    padding: 1.5rem 1rem;
}
.portfolio-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(109,40,217,0.08);
    font-size: 1.4rem;
    color: var(--primary);
}
.portfolio-item h4 { margin-bottom: 0.25rem; }
.portfolio-item p { font-size: var(--font-sm); color: var(--text-muted); }

/* ----- CTA ----- */
.cta { padding: 4rem 0; }
.cta-box {
    background: var(--primary-gradient) !important;
    border: none !important;
    text-align: center;
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(109,40,217,0.25);
}
.cta-box h2 { color: white; font-size: var(--font-4xl); }
.cta-box p { color: rgba(255,255,255,0.9); max-width: 500px; margin: 0 auto 1.5rem; }
.cta-box .btn-light { background: white; color: var(--primary); }
.cta-box .btn-light:hover { background: rgba(255,255,255,0.9); }

/* ----- FOOTER ----- */
.footer {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-soft);
    padding: 3rem 0 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.company-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.nekoverse-logo-img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.nekoverse-text {
    font-weight: 800;
    font-size: var(--font-xl);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.company-tagline {
    font-size: var(--font-sm);
    color: var(--text-muted);
    max-width: 280px;
    margin-bottom: 0;
}
.cross-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: var(--font-sm);
    color: var(--primary);
}
.cross-link:hover { color: var(--primary-dark); }
.footer-links h4 { font-size: var(--font-base); margin-bottom: 1rem; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 0.5rem; }
.footer-links ul li a {
    color: var(--text-secondary);
    transition: var(--transition);
}
.footer-links ul li a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--border-soft);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-sm);
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .cta-box { padding: 2rem; }
}
/* ========================================
   PAGE HEADER (roadmap, quiz, challenges, etc.)
   ======================================== */
.page-section {
    padding: 4.5rem 0 5rem;
}
.page-title {
    font-size: var(--font-5xl);
    font-weight: 800;
    margin-bottom: 0.75rem;
}
.page-description {
    color: var(--text-secondary);
    font-size: var(--font-lg);
}

/* ----- Progress overview ----- */
.roadmap-progress h3 {
    margin-bottom: 0.85rem;
}
.progress-bar {
    height: 10px;
    background: var(--surface);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-pill);
    transition: width 0.6s ease;
}
.progress-text {
    display: inline-block;
    margin-top: 0.85rem;
    font-weight: 600;
    font-size: var(--font-sm);
    color: var(--text-secondary);
}

/* ----- Roadmap timeline ----- */
.roadmap-steps {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding-left: 2.75rem;
}
.roadmap-steps::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border);
    border-radius: 2px;
}
.roadmap-step {
    position: relative;
    display: flex;
    gap: 1.5rem;
    padding-bottom: 2rem;
}
.roadmap-step:last-child { padding-bottom: 0; }

.step-marker {
    position: absolute;
    left: -2.75rem;
    top: 0.1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--background);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: var(--font-sm);
    z-index: 1;
    transition: var(--transition);
}
.roadmap-step.completed .step-marker {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #fff;
}
.roadmap-step.current .step-marker {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 5px rgba(109,40,217,0.14);
}
.roadmap-step.current .step-marker i { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.step-content {
    flex: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    transition: var(--transition);
}
.roadmap-step.current .step-content {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}
.step-content h3 { font-size: var(--font-lg); margin-bottom: 0.35rem; }
.step-content p { font-size: var(--font-sm); margin-bottom: 0.85rem; }
.step-status {
    display: inline-block;
    font-size: var(--font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.roadmap-step.completed .step-status { background: rgba(16,185,129,0.12); color: #10B981; }
.roadmap-step.current .step-status { background: rgba(109,40,217,0.12); color: var(--primary); }
.step-content .btn { margin-top: 0.25rem; }

@media (max-width: 640px) {
    .roadmap-steps { padding-left: 2.25rem; }
    .step-marker { left: -2.25rem; width: 28px; height: 28px; }
    .page-title { font-size: var(--font-3xl); }
}

/* ========================================
   SWIPE-SCROLL — horizontal "app switcher"
   style carousel (Features / Modules)

   Cards never reposition themselves — each one sits in its fixed slot
   in the row. What changes as you scroll is each card's own depth
   (scale / opacity / stacking), driven directly by its position inside
   the scroller via a CSS view-timeline. No JavaScript involved.
   Supported in Chrome/Edge 115+; everywhere else it degrades to a
   plain, evenly-sized snapping carousel (see @supports block below).
   ======================================== */
.swipe-scroll {
    --card-w: min(78vw, 340px);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 2.5rem calc(50% - (var(--card-w) / 2)) 3rem;
    cursor: grab;
    /* Hide scrollbar, but keep native scroll/snap behavior */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.swipe-scroll::-webkit-scrollbar { display: none; height: 0; }

.swipe-scroll.dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}

.swipe-card {
    flex: 0 0 auto;
    width: var(--card-w);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    height: auto;
    position: relative;
}

/* Modules cards carry more content, so they get a touch more room */
.modules-scroll {
    --card-w: min(82vw, 380px);
}

@media (min-width: 1024px) {
    .swipe-scroll { --card-w: 320px; }
    .modules-scroll { --card-w: 360px; }
}

/* ----- The actual "app switcher" depth effect ----- */
@supports (animation-timeline: view()) {
    .swipe-card {
        view-timeline-name: --card-visibility;
        view-timeline-axis: inline;
        animation-name: card-depth-shift;
        animation-timeline: --card-visibility;
        animation-fill-mode: both;
        animation-timing-function: linear;
        will-change: transform, opacity;
    }

    @keyframes card-depth-shift {
        0%   { transform: scale(0.8) translateY(14px); opacity: 0.45; z-index: 1; }
        45%  { transform: scale(1)   translateY(0);    opacity: 1;    z-index: 5; }
        55%  { transform: scale(1)   translateY(0);    opacity: 1;    z-index: 5; }
        100% { transform: scale(0.8) translateY(14px); opacity: 0.45; z-index: 1; }
    }
}
/* ========================================
   TECH STACK STRIP
   ======================================== */
.tech-stack {
    padding: 1.5rem 0 3rem;
}
.tech-stack-label {
    color: var(--text-muted);
    font-size: var(--font-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.5rem;
}
.tech-stack-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem 2.5rem;
}
.tech-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-sm);
}
.tech-item i {
    color: var(--primary);
    font-size: 1.05rem;
}

/* ========================================
   FAQ — native <details>/<summary> accordion
   ======================================== */
.faq {
    padding: 4rem 0;
}
.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 0 1.5rem;
    transition: var(--transition);
}
.faq-item[open] {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}
.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1.15rem 0;
    font-weight: 700;
    font-size: var(--font-base);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    color: var(--primary);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
    padding-bottom: 1.25rem;
    margin-bottom: 0;
    color: var(--text-secondary);
    font-size: var(--font-sm);
    line-height: 1.7;
}