<template>
  <div>
    <div class="bg-[linear-gradient(rgba(0,0,0,0.40)),url('/img/landing_background.png')] bg-[center_24%] bg-no-repeat bg-cover rounded-br-[100px] md:rounded-br-[150px] lg:rounded-br-[300px] w-full h-[calc(100vh-126px)] lg:min-h-[530px] text-white-2 flex justify-center items-center px-4">
      <div class="flex flex-col justify-between items-center h-[80%]">
        <div class="flex flex-col justify-center items-center gap-10">
          <NuxtImg src="/img/white_logo.svg" class="w-20 md:w-31"/>
          <h4 class="font-bold text-[28px] md:text-4xl lg:text-5xl max-w-[60rem] text-center lg:leading-16">Transforme sua Paixão pelo Café em <span class="text-[#E38B37]">Sucesso</span></h4>
        </div>
        <div>
          <p class="text-lg lg:mt-6 md:text-xl lg:text-2xl text-center lg:max-w-[94%] xl:max-w-max">Aprenda com os melhores especialistas e eleve a qualidade do seu café ao próximo nível</p>
          <div class="flex flex-col justify-center items-center gap-4 mt-18">
            <button class="underline text-primary-4 text-sm font-bold bg-primary w-[246px] h-[50px] rounded-lg cursor-pointer hover:bg-primary/85 transition duration-300" @click="goToLoginPage">Acessar conta</button>
            <span class="text-sm text-white font-bold">ou</span>
            <button class="underline text-primary text-sm font-bold cursor-pointer hover:text-primary/85 transition duration-300" @click="goToRegisterPage">Registrar-se</button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
useHead({
  title: `Landing Page - Viver de Café`
})
definePageMeta({
  layout: 'default',
});

const config = useRuntimeConfig();
const quasarAppUrlRegister = config.public.studentPlatform + '/register';
const quasarAppUrlLogin = config.public.studentPlatform + '/login';

const goToRegisterPage = () => {
  window.open(quasarAppUrlRegister, '_blank');
};

const goToLoginPage = () => {
  window.open(quasarAppUrlLogin, '_blank');
};
</script>