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

:root {
  --blood:      #8b1a1a;
  --blood-dark: #5a0f0f;
  --dust:       #c9a96e;
  --dust-light: #e8d5b0;
  --ink:        #0d0a07;
  --ink-light:  #1c1712;
  --parchment:  #f2e8d5;
  --bone:       #d4c5a9;
  --ash:        #6b6052;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'IM Fell English', Georgia, serif;
  --font-mono:    'Courier Prime', 'Courier New', monospace;

  --max-w: 1100px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

html { scroll-behavior: smooth; }

body {
  color: var(--bone);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--dust); text-decoration: none; }
a:hover { color: var(--dust-light); }

/* ── Site-wide parallax background ─────────────────────────────────────── */
#site-bg {
  position: fixed;
  inset: 0;
  background-image: url('../images/Crooked_Church_Paints 1.webp');
  background-size: cover;
  background-position: center 100%; /* start at bottom of image */
  background-repeat: no-repeat;
  z-index: -1;
}

/* ── Utility ────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: var(--dust-light);
  line-height: 1.15;
  margin-bottom: 1rem;
}

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

.section-subtitle {
  text-align: center;
  color: var(--ash);
  font-style: italic;
  margin-bottom: 3rem;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.7em 1.6em;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.btn--primary {
  background: var(--blood);
  color: var(--dust-light);
  border: 2px solid var(--blood);
}

.btn--primary:hover {
  background: var(--blood-dark);
  border-color: var(--blood-dark);
  color: var(--dust-light);
}

.btn--ghost {
  background: transparent;
  color: var(--dust);
  border: 2px solid var(--dust);
}

.btn--ghost:hover {
  background: rgba(201, 169, 110, 0.12);
  color: var(--dust-light);
  border-color: var(--dust-light);
}

.btn--large { padding: 0.9em 2.2em; font-size: 1.05rem; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* fully transparent — church image shows through from #site-bg */
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(13,10,7,0.30) 0%,
      rgba(13,10,7,0.10) 40%,
      rgba(13,10,7,0.70) 100%
    );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--gutter);
  max-width: 760px;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dust);
  margin-bottom: 0.75rem;
}

.hero__title {
  margin-bottom: 1.25rem;
}

.hero__title-img {
  width: min(560px, 90vw);
  height: auto;
  display: block;
  margin-inline: auto;
  /* drop-shadow mirrors the old text glow */
  filter: drop-shadow(0 0 30px rgba(139, 26, 26, 0.8))
          drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95));
}

.hero__tagline {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-style: italic;
  color: var(--bone);
  margin-bottom: 2.5rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.hero__cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--dust);
  opacity: 0.5;
  z-index: 1;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── About ──────────────────────────────────────────────────────────────── */
.about {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: rgba(13, 10, 7, 0.84);
  border-top: 1px solid rgba(139, 26, 26, 0.4);
  border-bottom: 1px solid rgba(139, 26, 26, 0.4);
}

.about__intro {
  max-width: 680px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.about__campaign_diary {
  max-width: 680px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.about__intro p + p { margin-top: 1rem; }

/* ── Books ──────────────────────────────────────────────────────────────── */
.books {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 800px) {
  .books { grid-template-columns: 1fr; max-width: 360px; }
}

.book__cover {
  position: relative;
  margin-bottom: 1.25rem;
  /* subtle book-spine shadow on the left */
  box-shadow:
    -6px 6px 0 rgba(0,0,0,0.5),
    0 8px 30px rgba(0,0,0,0.6),
    0 0 20px rgba(139, 26, 26, 0.15);
  transform: perspective(600px) rotateY(2deg);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.book:hover .book__cover {
  transform: perspective(600px) rotateY(0deg) translateY(-4px);
  box-shadow:
    -3px 10px 0 rgba(0,0,0,0.4),
    0 16px 40px rgba(0,0,0,0.7),
    0 0 30px rgba(139, 26, 26, 0.25);
}

.book__cover img {
  width: 100%;
  display: block;
}

.book__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--dust-light);
  margin-bottom: 0.4rem;
}

.book__desc {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--bone);
  opacity: 0.8;
  line-height: 1.6;
}

/* ── Pillars ────────────────────────────────────────────────────────────── */
.pillars {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: rgba(60, 8, 8, 0.78);
}

.pillars__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  list-style: none;
}

.pillar {
  text-align: center;
  padding: 1.5rem;
}

.pillar__icon {
  display: block;
  font-size: 1.5rem;
  color: var(--dust);
  margin-bottom: 0.75rem;
}

.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--dust-light);
  margin-bottom: 0.4rem;
}

.pillar p {
  font-size: 0.95rem;
  color: var(--bone);
  opacity: 0.85;
}

/* ── Classes ────────────────────────────────────────────────────────────── */
.classes {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: rgba(13, 10, 7, 0.82);
}

.classes__grid {
  display: grid;
  /* mobile: two-up columns */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ── Hex layout at desktop ──────────────────────────────────────────────── */
@media (min-width: 860px) {
  .classes__grid {
    /* 6 equal columns; each card spans 2 → cards are ~(container/3) wide   */
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, auto);
    column-gap: 1.25rem;
    row-gap: 1.5rem;
  }

  /* Row 1 — offset pair */
  .classes__grid .class-card:nth-child(1) { grid-column: 2 / span 2; grid-row: 1; }
  .classes__grid .class-card:nth-child(2) { grid-column: 4 / span 2; grid-row: 1; }

  /* Row 2 — full trio; Unemployed Angel (5th in DOM) placed at centre */
  .classes__grid .class-card:nth-child(3) { grid-column: 1 / span 2; grid-row: 2; }
  .classes__grid .class-card:nth-child(4) { grid-column: 5 / span 2; grid-row: 2; }
  .classes__grid .class-card:nth-child(5) { grid-column: 3 / span 2; grid-row: 2; }

  /* Row 3 — offset pair */
  .classes__grid .class-card:nth-child(6) { grid-column: 2 / span 2; grid-row: 3; }
  .classes__grid .class-card:nth-child(7) { grid-column: 4 / span 2; grid-row: 3; }

  /* Centre card — Unemployed Angel — gets the gold treatment */
  .classes__grid .class-card:nth-child(5) {
    border-top-color: var(--dust);
    box-shadow:
      0 0 0 1px rgba(201, 169, 110, 0.2),
      0 0 40px rgba(201, 169, 110, 0.08);
  }

  .classes__grid .class-card:nth-child(5):hover {
    border-color: var(--dust-light);
    border-top-color: var(--dust);
    box-shadow:
      0 0 0 1px rgba(201, 169, 110, 0.35),
      0 0 50px rgba(201, 169, 110, 0.15);
  }
}

.class-card {
  background: rgba(28, 23, 18, 0.88);
  border: 1px solid rgba(201, 169, 110, 0.15);
  border-top: 3px solid var(--blood);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.class-card:hover {
  border-color: var(--dust);
  border-top-color: var(--blood);
  transform: translateY(-3px);
}

.class-card__art {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 1rem;
  background: rgba(13, 10, 7, 0.6);
}

.class-card__art--placeholder {
  border: 1px dashed var(--ash);
}

.class-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.class-card__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--dust-light);
  margin-bottom: 0.4rem;
}

.class-card__desc {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--bone);
  opacity: 0.8;
}

/* ── Gallery ────────────────────────────────────────────────────────────── */
.gallery {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: rgba(20, 16, 12, 0.80);
  border-top: 1px solid rgba(139, 26, 26, 0.3);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .gallery__grid { grid-template-columns: 1fr; }
}

.gallery__item {
  overflow: hidden;
  border: 1px solid rgba(201, 169, 110, 0.1);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery__item:hover img { transform: scale(1.04); }

.gallery__credit {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ash);
  font-style: italic;
}

/* ── Get It ─────────────────────────────────────────────────────────────── */
.get-it {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: rgba(60, 8, 8, 0.86);
  border-top: 3px solid var(--blood);
}

.get-it__inner {
  max-width: 600px;
}

.get-it p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.get-it__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.get-it__includes h3 {
  font-family: var(--font-display);
  color: var(--dust-light);
  margin-bottom: 0.75rem;
}

.get-it__includes ul { list-style: none; }

.get-it__includes li {
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.95rem;
}

.get-it__includes li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--dust);
}

/* ── Scroll reveal ──────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 3rem 0;
  background: rgba(13, 10, 7, 0.92);
  border-top: 1px solid rgba(139, 26, 26, 0.4);
  text-align: center;
}

.site-footer__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--dust);
  margin-bottom: 0.5rem;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--ash);
  line-height: 2;
}

.site-footer__copy { margin-top: 1rem; opacity: 0.6; }
