<script setup lang="ts">
// Section 02 — the suite. Five module cards in a bordered row.
// Ported from landing-sections.jsx Suite.
import { useTheme, useCopy } from '~/composables/useLanding'
const t = useTheme()
const copy = useCopy()
</script>

<template>
  <section id="suite" :style="{ background: t.bgAlt, color: t.fg, borderTop: `1px solid ${t.border}`, borderBottom: `1px solid ${t.border}`, scrollMarginTop: '72px' }">
    <LandingContainer pad="clamp(56px, 8vw, 120px) clamp(20px, 5vw, 64px)">
      <LandingSectionLabel :label="copy.suite.label" />
      <div class="suite-intro-grid" :style="{ display: 'grid', gap: '80px', alignItems: 'end', marginBottom: '64px' }">
        <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.suite.heading }}</h2>
        <p :style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '20px', lineHeight: 1.5, maxWidth: '520px', color: t.fgMuted, margin: 0, textWrap: 'pretty' }">{{ copy.suite.lede }}</p>
      </div>
      <div :style="{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 220px), 1fr))', gap: '0', border: `1px solid ${t.border}` }">
        <div
          v-for="(card, i) in copy.suite.cards" :key="i"
          :style="{
            padding: '32px 28px',
            borderRight: i < 4 ? `1px solid ${t.border}` : 'none',
            background: t.surface,
            display: 'flex', flexDirection: 'column', gap: '20px',
            minHeight: '280px',
          }"
        >
          <div :style="{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: '12px' }">
            <span :style="{ opacity: card.soon ? 0.5 : 1 }"><LandingModuleGlyph :name="card.name" /></span>
            <span
              v-if="card.soon"
              :style="{
                display: 'inline-flex', alignItems: 'center', gap: '6px', flexShrink: 0,
                fontFamily: '\'JetBrains Mono\', monospace', fontSize: '9px', letterSpacing: '0.1em', textTransform: 'uppercase',
                color: t.fgMuted, border: `1px solid ${t.border}`, borderRadius: '999px', padding: '4px 9px', whiteSpace: 'nowrap',
              }"
            >
              <span :style="{ width: '5px', height: '5px', borderRadius: '999px', background: t.signal }" />
              {{ copy.suite.soonLabel }}
            </span>
          </div>
          <div>
            <div :style="{ fontFamily: '\'Inter Tight\', sans-serif', fontWeight: 600, fontSize: '22px', color: t.fg, letterSpacing: '-0.02em' }">{{ card.name }}</div>
            <div :style="{ fontFamily: '\'JetBrains Mono\', monospace', fontSize: '10.5px', color: t.fgDim, marginTop: '6px', letterSpacing: '0.08em', textTransform: 'lowercase' }">{{ card.tag }}</div>
          </div>
          <p :style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '13.5px', lineHeight: 1.6, maxWidth: '260px', color: t.fgMuted, margin: 0, textWrap: 'pretty' }">{{ card.desc }}</p>
        </div>
      </div>
    </LandingContainer>
  </section>
</template>

<style scoped>
.suite-intro-grid {
  grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 768px) {
  .suite-intro-grid {
    grid-template-columns: 1fr;
  }
}
</style>
