/* ── Painless Arts — wagtail.org-inspired design ── */

/* === Reset & base === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a2e;
  --color-text-secondary: #4a4a68;
  --color-teal: #007d7e;
  --color-teal-dark: #005f60;
  --color-purple: #2e1f5e;
  --color-purple-light: #3d2b7a;
  --color-surface: #f7f7fa;
  --color-border: #e4e4ec;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, sans-serif;
  --container-max: 1180px;
  --container-narrow: 780px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-xxl: 8rem;
  --radius: 8px;
  --radius-lg: 16px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

/* === Layout === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* === Typography === */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-purple);
}

.rich-text p {
  margin-bottom: 1.25em;
  color: var(--color-text-secondary);
}

.rich-text p:last-child {
  margin-bottom: 0;
}

/* === Buttons (wagtail.org style) === */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--color-teal);
  color: #fff;
  border-color: var(--color-teal);
}

.btn--primary:hover {
  background: var(--color-teal-dark);
  border-color: var(--color-teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 125, 126, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--color-purple);
  border-color: var(--color-purple);
}

.btn--outline:hover {
  background: var(--color-purple);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 31, 94, 0.25);
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

/* === Hero === */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-xxl) 0 var(--space-xl);
  background: linear-gradient(170deg, #f7f5ff 0%, #f0fafa 40%, #fff 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__headline {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
  color: var(--color-purple);
  letter-spacing: -0.02em;
  margin-bottom: 0.3em;
}

.hero__sub {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 400;
  color: var(--color-text-secondary);
  max-width: 620px;
  margin-bottom: 1.25em;
  line-height: 1.55;
}

.hero__blurb {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  max-width: 580px;
  margin-bottom: 2.5em;
  line-height: 1.7;
  opacity: 0.85;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__bg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === Section title === */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-purple);
  margin-bottom: 1.5rem;
}

.section-title--center {
  text-align: center;
}

/* === About === */
.about {
  padding: var(--space-xl) 0;
}

.about__body {
  font-size: 1.125rem;
  line-height: 1.8;
}

/* === Focus cards === */
.focus {
  padding: var(--space-xl) 0;
  background: var(--color-surface);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-md) calc(var(--space-md) + 0.5rem);
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(46, 31, 94, 0.08);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-teal);
  background: rgba(0, 125, 126, 0.08);
  border-radius: 12px;
  margin-bottom: var(--space-sm);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-purple);
  margin-bottom: 0.75rem;
}

.card__body {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* === Final CTA === */
.final-cta {
  padding: var(--space-xl) 0;
  text-align: center;
  background: linear-gradient(170deg, #2e1f5e 0%, #1a1140 100%);
  color: #fff;
}

.final-cta__headline {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.35;
}

.final-cta__body {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.final-cta .btn--primary {
  background: var(--color-teal);
  border-color: var(--color-teal);
}

.final-cta .btn--primary:hover {
  background: #00afb0;
  border-color: #00afb0;
}

/* === Footer === */
.site-footer {
  padding: var(--space-md) 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border);
}

/* === Responsive === */
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .hero {
    padding: var(--space-xl) 0 var(--space-lg);
  }
}

@media (max-width: 600px) {
  .hero__headline {
    font-size: 2.5rem;
  }

  .hero__ctas {
    flex-direction: column;
  }

  .hero__ctas .btn {
    text-align: center;
  }

  .btn--lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
  }
}
