<script setup lang="ts">
import { useTheme, useCopy } from '~/composables/useLanding'

definePageMeta({ layout: 'page' })

const t = useTheme()
const copy = useCopy()
const c = computed(() => copy.value.pages.brand)

useHead({ title: () => `${copy.value.pages.brand.label} · dezky` })
</script>

<template>
  <LandingPageHeader :label="c.label" :title="c.title" :intro="c.intro" />

  <LandingContainer pad="56px 64px 160px">
    <div :style="{ display: 'flex', flexDirection: 'column', gap: '0', border: `1px solid ${t.border}`, borderRadius: '4px', overflow: 'hidden', maxWidth: '820px' }">
      <div
        v-for="(rule, i) in c.rules" :key="i"
        :style="{ display: 'grid', gridTemplateColumns: '160px 1fr', gap: '24px', padding: '24px 28px', borderTop: i === 0 ? 'none' : `1px solid ${t.border}`, background: t.surface, alignItems: 'baseline' }"
      >
        <div :style="{ fontFamily: '\'JetBrains Mono\', monospace', fontSize: '11px', color: t.fgDim, letterSpacing: '0.08em', textTransform: 'uppercase' }">{{ rule[0] }}</div>
        <div :style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '15px', lineHeight: 1.6, color: t.fg }">{{ rule[1] }}</div>
      </div>
    </div>

    <div :style="{ marginTop: '48px' }">
      <div :style="{ fontFamily: '\'JetBrains Mono\', monospace', fontSize: '11px', color: t.fgDim, letterSpacing: '0.08em', textTransform: 'uppercase', marginBottom: '20px' }">{{ c.colorsLabel }}</div>
      <div :style="{ display: 'flex', gap: '20px', flexWrap: 'wrap' }">
        <div v-for="(col, i) in c.colors" :key="i" :style="{ width: '180px' }">
          <div :style="{ height: '120px', borderRadius: '4px', background: col[1], border: `1px solid ${t.border}` }" />
          <div :style="{ marginTop: '12px', fontFamily: '\'Inter Tight\', sans-serif', fontWeight: 600, fontSize: '15px', color: t.fg }">{{ col[0] }}</div>
          <div :style="{ marginTop: '2px', fontFamily: '\'JetBrains Mono\', monospace', fontSize: '12px', color: t.fgMuted }">{{ col[1] }}</div>
        </div>
      </div>
    </div>
  </LandingContainer>
</template>
