<script setup lang="ts">
// Section 05 — comparison table (Dezky vs US hyperscaler).
// Ported from landing-sections.jsx Compare.
import { useTheme, useCopy } from '~/composables/useLanding'
const t = useTheme()
const copy = useCopy()
</script>

<template>
  <section :style="{ background: t.bg, color: t.fg }">
    <LandingContainer pad="140px 64px">
      <LandingSectionLabel :label="copy.compare.label" />
      <div :style="{ display: 'grid', gridTemplateColumns: '1.1fr 1fr', gap: '80px', alignItems: 'end', marginBottom: '56px' }">
        <h2 :style="{ fontFamily: '\'Inter Tight\', sans-serif', fontWeight: 600, fontSize: 'clamp(36px, 4.4vw, 64px)', letterSpacing: '-0.032em', lineHeight: 1.0, margin: 0, textWrap: 'balance', color: t.fg }">{{ copy.compare.heading }}</h2>
        <p :style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '17px', lineHeight: 1.6, maxWidth: '460px', color: t.fgMuted, margin: 0, textWrap: 'pretty' }">{{ copy.compare.lede }}</p>
      </div>

      <div :style="{ border: `1px solid ${t.borderStrong}` }">
        <div :style="{ display: 'grid', gridTemplateColumns: '1.2fr 1fr 1fr', background: t.fg, color: t.bg }">
          <div :style="{ padding: '20px 28px', fontFamily: '\'JetBrains Mono\', monospace', fontSize: '11px', letterSpacing: '0.12em', textTransform: 'uppercase', opacity: 0.6 }">kategori</div>
          <div :style="{ padding: '20px 28px', display: 'flex', alignItems: 'center', gap: '10px', borderLeft: `1px solid ${t.fgDim}` }">
            <BrandNodeMark :size="18" :fg="t.bg" :accent="t.signal" />
            <span :style="{ fontFamily: '\'JetBrains Mono\', monospace', fontSize: '14px', fontWeight: 600 }">{{ copy.compare.cols[0] }}</span>
          </div>
          <div :style="{ padding: '20px 28px', fontFamily: '\'JetBrains Mono\', monospace', fontSize: '14px', fontWeight: 500, opacity: 0.7, borderLeft: `1px solid ${t.fgDim}` }">{{ copy.compare.cols[1] }}</div>
        </div>
        <div
          v-for="(row, i) in copy.compare.rows" :key="i"
          :style="{
            display: 'grid', gridTemplateColumns: '1.2fr 1fr 1fr',
            borderTop: `1px solid ${t.border}`,
            background: i % 2 === 0 ? t.bg : t.bgAlt,
            fontFamily: '\'Inter\', sans-serif', fontSize: '15px',
          }"
        >
          <div :style="{ padding: '22px 28px', color: t.fgMuted }">{{ row[0] }}</div>
          <div :style="{ padding: '22px 28px', color: t.fg, fontWeight: 600, borderLeft: `1px solid ${t.border}`, display: 'flex', alignItems: 'center', gap: '10px' }">
            <span :style="{ width: '4px', height: '4px', background: t.signal, borderRadius: '999px', flexShrink: 0 }" />
            {{ row[1] }}
          </div>
          <div :style="{ padding: '22px 28px', color: t.fgMuted, borderLeft: `1px solid ${t.border}` }">{{ row[2] }}</div>
        </div>
      </div>
    </LandingContainer>
  </section>
</template>
