import { Link } from 'react-router-dom'
import PublicLayout from '../../components/PublicLayout.jsx'
import PageHeader from '../../components/PageHeader.jsx'
import { useSite } from '../../contexts/SiteContext.jsx'

const CARDS = [
  { kicker: 'Gallery', title: 'Gameplay Pictures', body: 'Screenshots of the world, its events, and daily life on the server.', to: '/site/screenshots' },
  { kicker: 'Updates', title: 'Development News', body: 'Progress notes, project milestones, and public announcements.', to: '/site/news' },
  { kicker: 'Community', title: 'Five on Friday', body: 'Weekly questions, small previews, and notes from the team.', to: '/site/five-on-friday' },
  { kicker: 'Long-form', title: 'Monthly Newsletter', body: 'Fuller summaries for players who want the whole picture.', to: '/site/newsletter' },
  { kicker: 'Reference', title: 'Wiki', body: 'Guides and reference pages for the game world.', to: '/wiki' },
  { kicker: 'Live', title: 'Site Status', body: 'Launch state, test windows, and known issues.', to: '/site/status' },
]

export default function Website() {
  const { siteShortName } = useSite()
  return (
    <PublicLayout section="website">
      <div className="shell page-body">
        <PageHeader
          center
          eyebrow="Public portal"
          title={`${siteShortName} Website`}
          lead="A home for gameplay pictures, development updates, community posts, monthly newsletters, and weekly Five on Friday notes."
        />
        <section className="grid-3">
          {CARDS.map((c) => (
            <Link key={c.to + c.title} to={c.to} className="card">
              <span className="card-kicker">{c.kicker}</span>
              <h3 className="display" style={{ margin: '0 0 8px', fontSize: '1.25rem', color: 'var(--head)' }}>
                {c.title}
              </h3>
              <p className="muted" style={{ margin: 0, fontSize: '0.98rem' }}>
                {c.body}
              </p>
            </Link>
          ))}
        </section>
      </div>
    </PublicLayout>
  )
}
