<script setup lang="ts">
// Final CTA — carbon panel with a faint Node-mark watermark.
// Ported from landing-sections.jsx FinalCTA.
import { C } from '~/utils/landingTokens'
import { useCopy } from '~/composables/useLanding'
const copy = useCopy()
const localePath = useLocalePath()
</script>

<template>
  <section id="final-cta" :style="{ background: C.carbon, color: C.bone, position: 'relative', overflow: 'hidden', scrollMarginTop: '72px' }">
    <div :style="{ position: 'absolute', right: '-180px', bottom: '-180px', opacity: 0.05 }">
      <BrandNodeMark :size="640" :fg="C.carbon" :accent="C.signal" />
    </div>
    <LandingContainer pad="clamp(56px, 8vw, 140px) clamp(20px, 5vw, 64px)">
      <h2 :style="{ fontFamily: '\'Inter Tight\', sans-serif', fontWeight: 600, fontSize: 'clamp(32px, 6vw, 96px)', letterSpacing: '-0.04em', lineHeight: 0.98, margin: 0, color: C.bone, textWrap: 'balance', maxWidth: '900px' }">
        <template v-for="(part, i) in copy.finalCta.heading" :key="i">
          <template v-if="typeof part === 'string'">{{ part }}  </template>
          <span v-else :style="{ color: C.signal }">{{ part.hl }}</span>
        </template>
      </h2>
      <div :style="{ marginTop: '28px', maxWidth: 'min(100%, 520px)', fontFamily: '\'Inter\', sans-serif', fontSize: '19px', color: 'rgba(244,243,238,0.7)' }">{{ copy.finalCta.sub }}</div>
      <div :style="{ marginTop: '40px' }">
        <button data-umami-event="book-demo" @click="navigateTo(localePath('/demo'))" :style="{
          background: C.signal, color: C.carbon, border: 'none',
          padding: '20px 32px', fontFamily: '\'Inter\', sans-serif',
          fontSize: '16px', fontWeight: 600, borderRadius: '4px', cursor: 'pointer',
          letterSpacing: '-0.005em',
        }">{{ copy.finalCta.cta }} →</button>
      </div>
    </LandingContainer>
  </section>
</template>
