web-difarft/app/components/sections/home/hero.vue

226 lines
6.8 KiB
Vue

<script setup lang="ts">
const { t } = useI18n();
const expertise = [
{
title: "hero.expertise.web.title",
desc: "hero.expertise.web.desc",
number: "01",
icon: `
<svg
xmlns="http://www.w3.org/2000/svg"
width="26"
height="26"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.8"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="3" y="3" width="18" height="18" rx="2"/>
<path d="M3 9h18"/>
<path d="M9 21V9"/>
</svg>
`,
},
{
title: "hero.expertise.backend.title",
desc: "hero.expertise.backend.desc",
number: "02",
icon: `
<svg
xmlns="http://www.w3.org/2000/svg"
width="26"
height="26"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.8"
stroke-linecap="round"
stroke-linejoin="round"
>
<ellipse cx="12" cy="5" rx="8" ry="3"/>
<path d="M4 5v7c0 1.7 3.6 3 8 3s8-1.3 8-3V5"/>
<path d="M4 12v7c0 1.7 3.6 3 8 3s8-1.3 8-3v-7"/>
</svg>
`,
},
{
title: "hero.expertise.infrastructure.title",
desc: "hero.expertise.infrastructure.desc",
number: "03",
icon: `
<svg
xmlns="http://www.w3.org/2000/svg"
width="26"
height="26"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="1.8"
stroke-linecap="round"
stroke-linejoin="round"
>
<rect x="3" y="3" width="18" height="6" rx="2"/>
<rect x="3" y="15" width="18" height="6" rx="2"/>
<path d="M7 6h.01"/>
<path d="M7 18h.01"/>
</svg>
`,
},
];
</script>
<template>
<section
id="home"
class="relative flex min-h-svh items-center overflow-hidden pt-24 pb-10 sm:pt-20 sm:pb-16 lg:py-0"
>
<div
class="relative mx-auto w-full max-w-7xl px-5 sm:px-8 lg:px-10"
>
<div
class="grid items-center gap-10 lg:grid-cols-[1.05fr_0.95fr] lg:gap-14 xl:gap-16"
>
<div class="min-w-0">
<div
class="inline-flex items-center gap-2 rounded-full border border-(--border) bg-(--surface) px-3 py-1.5 text-[10px] text-(--text-muted) sm:text-xs"
>
<span
class="h-1.5 w-1.5 rounded-full bg-emerald-500 sm:h-2 sm:w-2"
></span>
<span>
{{ t("hero.availability") }}
</span>
</div>
<div
class="mt-5 text-[9px] font-medium uppercase tracking-[0.25em] text-(--text-muted) sm:mt-6 sm:text-sm sm:tracking-[0.28em]"
>
{{ t("hero.label") }}
</div>
<h1
class="hero-title mt-3 text-[clamp(3.7rem,19vw,5.5rem)] font-black leading-[0.84] tracking-[-0.07em] text-(--text) sm:mt-4 sm:text-[clamp(4rem,7vw,6rem)]"
>
DIFARFT
</h1>
<p
class="mt-5 max-w-3xl text-[clamp(1.35rem,6.5vw,2.35rem)] font-medium leading-[1.08] tracking-[-0.045em] text-(--text) sm:mt-6"
>
<span class="block">
{{ t("hero.tagline.code") }}
<span class="text-(--text-muted)">•</span>
{{ t("hero.tagline.network") }}
<span class="text-(--text-muted)">•</span>
{{ t("hero.tagline.system") }}
</span>
<span class="mt-1.5 block sm:mt-2">
{{ t("hero.tagline.title") }}
</span>
</p>
<p
class="mt-4 max-w-xl text-[12px] leading-5 text-(--text-muted) sm:mt-6 sm:text-base sm:leading-7"
>
{{ t("hero.description") }}
</p>
</div>
<div class="min-w-0">
<div
class="rounded-2xl border border-(--border) bg-(--surface)/70 p-4 backdrop-blur-[2px] sm:p-6"
>
<div
class="text-[9px] uppercase tracking-[0.3em] text-(--text-muted) sm:text-[10px]"
>
{{ t("hero.focus.label") }}
</div>
<div
class="mt-1.5 text-lg font-semibold tracking-tight text-(--text) sm:mt-3 sm:text-[1.65rem]"
>
{{ t("hero.focus.title") }}
</div>
</div>
<div
class="group relative mt-2.5 min-h-32 overflow-hidden rounded-2xl border border-(--border) bg-(--surface)/70 p-4 backdrop-blur-[2px] transition-colors duration-300 hover:bg-(--surface-hover) sm:mt-3 sm:min-h-40 sm:p-6"
>
<div
class="absolute right-4 top-4 font-mono text-[9px] text-(--text-muted) sm:right-5 sm:top-5 sm:text-[10px]"
>
{{ expertise[0].number }}
</div>
<div
class="flex h-10 w-10 items-center justify-center rounded-xl border border-(--border) text-(--text) sm:h-11 sm:w-11"
v-html="expertise[0].icon"
></div>
<div class="mt-4 sm:mt-7">
<h2
class="text-sm font-semibold text-(--text) sm:text-lg"
>
{{ t(expertise[0].title) }}
</h2>
<p
class="mt-1 text-xs text-(--text-muted) sm:text-sm"
>
{{ t(expertise[0].desc) }}
</p>
</div>
</div>
<div
class="mt-2.5 grid grid-cols-2 gap-2.5 sm:mt-3 sm:gap-3"
>
<div
v-for="item in expertise.slice(1)"
:key="item.number"
class="group relative min-h-32 overflow-hidden rounded-2xl border border-(--border) bg-(--surface)/70 p-4 backdrop-blur-[2px] transition-colors duration-300 hover:bg-(--surface-hover) sm:min-h-40 sm:p-6"
>
<div
class="absolute right-4 top-4 font-mono text-[9px] text-(--text-muted) sm:right-5 sm:top-5 sm:text-[10px]"
>
{{ item.number }}
</div>
<div
class="flex h-10 w-10 items-center justify-center rounded-xl border border-(--border) text-(--text) sm:h-11 sm:w-11"
v-html="item.icon"
></div>
<div class="mt-4 sm:mt-7">
<h2
class="text-sm font-semibold leading-tight text-(--text) sm:text-lg"
>
{{ t(item.title) }}
</h2>
<p
class="mt-1 text-xs text-(--text-muted) sm:text-sm"
>
{{ t(item.desc) }}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<style scoped>
@media (max-width: 639px) {
.hero-title {
font-size: clamp(3.7rem, 19vw, 5rem);
}
}
</style>