<template>
  <div class="app-wrapper">
    <nav class="global-nav">
      <div class="nav-logo">
        <img src="/src/assets/images/logo-top.png" class="logo-img" />
        <span class="logo-text">Key of Love</span>
      </div>
      <ul class="nav-links">
        <li><a href="#">Home</a></li>
        <li><a href="#">Privacy Agreement</a></li>
      </ul>
    </nav>
    <FullPage ref="fullpageRef">
      <PageHome @navigate="handleNavigate" />
      <PageProduct />
      <PageAdvantage />
      <PageContact />
    </FullPage>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import FullPage from './components/FullPage.vue'
import PageHome from './components/PageHome.vue'
import PageProduct from './components/PageProduct.vue'
import PageAdvantage from './components/PageAdvantage.vue'
import PageContact from './components/PageContact.vue'

const fullpageRef = ref(null)

function handleNavigate(index) {
  fullpageRef.value?.goTo(index)
}
</script>

<style lang="less">
@import '@/assets/variables.less';

.app-wrapper {
  width: 100%;
  height: 100vh;
  position: relative;
}

.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: @nav-h;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 @nav-px;
  z-index: 1000;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.5vw, 12px);
  .logo-img {
    height: clamp(28px, 2.5vh, 52px);
    width: auto;
  }
}

.logo-text {
  font-weight: 600;
  color: #333;
  font-size: clamp(12px, 1vw, 18px);
  font-style: italic;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 2vw, 48px);
  list-style: none;
  a {
    font-size: clamp(12px, 1vw, 18px);
    color: #000;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    &:hover { color: #00BFA5; }
  }
}
</style>
