<template>
  <section class="hero">
    <div class="hero-overlay" />
    <div class="hero-content">
      <img src="/images/full_logo.png" alt="Chorly Logo" class="hero-logo" />
      <p class="hero-tagline">
        Turn chores into achievements.<br />Raise kids who own their responsibilities.
      </p>
      <div class="hero-card">
        <div class="hero-actions">
          <button class="btn-hero btn-hero-signin" @click="goToLogin">Sign In</button>
          <button class="btn-hero btn-hero-signup" @click="goToSignup">Get Started Free</button>
        </div>
      </div>
    </div>
  </section>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

function goToLogin() {
  router.push({ name: 'Login' })
}

function goToSignup() {
  router.push({ name: 'Signup' })
}
</script>

<style scoped>
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('/images/hero.png');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--landing-overlay);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 600px;
  width: 100%;
}

.hero-logo {
  width: min(280px, 70vw);
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.4));
}

.hero-tagline {
  color: var(--landing-hero-text);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.55;
  margin: 0 0 2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  font-weight: 400;
}

.hero-card {
  background: var(--landing-glass-bg);
  border: 1px solid var(--landing-glass-border);
  box-shadow: var(--landing-glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 1.8rem 2.5rem;
  width: 100%;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  flex: 1;
  min-width: 130px;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background 0.18s;
}

.btn-hero:hover {
  transform: translateY(-2px);
}

.btn-hero-signin {
  background: rgba(255, 255, 255, 0.18);
  color: var(--landing-hero-text);
  border: 1.5px solid var(--landing-glass-border);
}

.btn-hero-signin:hover {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-hero-signup {
  background: var(--btn-primary);
  color: #fff;
  box-shadow: 0 4px 18px rgba(102, 126, 234, 0.45);
}

.btn-hero-signup:hover {
  background: var(--btn-primary-hover);
  box-shadow: 0 6px 22px rgba(102, 126, 234, 0.6);
}

/* Mobile */
@media (max-width: 480px) {
  .hero-card {
    padding: 1.4rem 1.2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-hero {
    width: 100%;
    flex: none;
  }
}
</style>
