/* ============================================================
   Craig Tackett — Static Site
   Faithful to the live craigtackett.com design
   Font: Montserrat | Accent: #E10909 | Body: #4B4F58
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */


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

html { font-size: 112.5%; scroll-behavior: smooth; }

body {
  font-family: Montserrat, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: #4B4F58;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; border-radius: 3px; }

a { color: #E10909; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --red:        #E10909;
  --red-dark:   #b80707;
  --body-text:  #4B4F58;
  --heading:    #3a3a3a;
  --neutral-bg: #F5F5F5;
  --border:     #dddddd;
  --dark-hero:  #0b1c32;
  --container:  1200px;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--heading);
  line-height: 1.25;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout Helpers ────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section--gray { background: var(--neutral-bg); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--red);
  color: #fff !important;
  font-family: Montserrat, sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 12px 26px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--red-dark); text-decoration: none !important; }

.btn--outline {
  background: transparent;
  color: var(--red) !important;
  border: 2px solid var(--red);
}
.btn--outline:hover { background: var(--red); color: #fff !important; }

.btn--ghost {
  background: transparent;
  color: #fff !important;
  border: 2px solid rgba(255,255,255,0.8);
}
.btn--ghost:hover { background: rgba(255,255,255,0.15); }

/* ── Navigation ────────────────────────────────────────────── */
.site-header {
  position: relative;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 1em 0;
  display: flex;
  align-items: center;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-logo {
  font-size: 35px;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
}
.site-logo:hover { color: var(--heading); text-decoration: none; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a {
  color: var(--body-text);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--red); text-decoration: none; }
.site-nav a.active { color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--heading);
  margin: 3px 0;
  transition: all 0.3s;
}
/* Close button hidden on desktop, shown in mobile full-screen nav */
.nav-close { display: none; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 520px;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(16, 42, 67, 0.9);
}
.hero .container { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 120px; }
.hero--inner .container { padding-top: 80px; padding-bottom: 80px; }
.book-hero .hero-grid { grid-template-columns: 55fr 45fr; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* Homepage hero: bigger uppercase title */
.hero--home .hero-text h1 {
  color: #fff;
  font-size: 3.8rem;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: 14px;
}
.hero--home .hero-text .subtitle {
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 40px;
}
.hero--home .hero-text .free-chapter-callout {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 16px;
}
.hero--home .hero-text .free-chapter-callout em {
  font-style: italic;
}

/* Inner page hero (book, etc) */
.hero-text h1 {
  color: #fff;
  font-size: 3.4rem;
  line-height: 1.1;
  margin-bottom: 14px;
}
.hero-text .subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 24px;
}
.hero-cta-group { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta-group .btn { margin-bottom: 0; }

.hero-image img {
  border-radius: 3px;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  border: 4px solid rgba(255,255,255,0.88);
}

/* ── Feature Cards ─────────────────────────────────────────── */
.cards-section { background: #fff; padding: 90px 0; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.card {
  text-align: center;
}
.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 4px solid rgba(255,255,255,0.88);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  display: block;
  margin-bottom: 28px;
}
.card-body { padding: 0; }
.card-body h3 {
  font-size: 1.5rem;
  color: var(--heading);
  margin-bottom: 12px;
}
.card-body p {
  font-size: 1rem;
  color: var(--body-text);
  margin-bottom: 16px;
}
.card-link {
  color: var(--red);
  font-weight: 400;
  font-size: 1rem;
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* ── About Craig ───────────────────────────────────────────── */
.about-section {
  position: relative;
  padding: 90px 0;
  background-image: url('/images/abstract2-bg.jpg');
  background-size: cover;
  background-position: center;
}
.about-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(239, 239, 239, 0.9);
  z-index: 0;
}
.about-section .container {
  position: relative;
  z-index: 1;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 3px;
  border: 4px solid rgba(255,255,255,0.88);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.about-section h2 { color: var(--heading); margin-bottom: 16px; }
.about-section p { color: var(--body-text); }

/* ── Book Hero ─────────────────────────────────────────────── */
.book-hero {
  background-image: url('/images/bible-bg2.jpg');
}
.book-hero .hero-image img { max-width: 500px; }

/* ── Testimonials ──────────────────────────────────────────── */
.testimonials-section {
  position: relative;
  background-image: url('/images/wood2-bg.jpg');
  background-size: cover;
  background-position: center;
}
.testimonials-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(238, 238, 238, 0.85);
  z-index: 0;
}
.testimonials-section .container {
  position: relative;
  z-index: 1;
}

.testimonials-track-wrap { overflow: hidden; }
.testimonials-track {
  display: flex;
  transition: transform 0.4s ease;
}
/* Desktop: each slide is 50% wide so 2 are visible at once */
.testimonial-slide {
  flex: 0 0 50%;
  min-width: 50%;
  padding: 0 12px;
}
.testimonial-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 24px;
  text-align: left;
}
.testimonial-item blockquote {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--body-text);
  font-style: italic;
  margin-bottom: 14px;
}
.testimonial-item cite {
  font-weight: 700;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--heading);
}

.testimonial-controls { display: none; }
.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.testimonial-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.testimonial-dot.active { background: var(--red); }

/* ── Book Description ──────────────────────────────────────── */
.book-desc-section { background: #fff; }
.book-desc-content { max-width: 650px; margin: 0 auto; }
.book-desc-content h2 { margin-bottom: 20px; }
.book-desc-content p { margin-bottom: 1rem; }
.book-checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
}
.book-checklist li {
  padding: 6px 0 6px 28px;
  position: relative;
  font-size: 0.95rem;
  color: var(--body-text);
}
.book-checklist li::before {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  top: 7px;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0362B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* ── Free Chapter Form ─────────────────────────────────────── */
.free-chapter-section {
  background-image: url('/images/bible-bg.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}
.free-chapter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(16, 42, 67, 0.9);
}
.free-chapter-section .container { position: relative; z-index: 1; }

.free-chapter-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 60px;
  align-items: center;
}
.free-chapter-grid h2 { color: #fff; margin-bottom: 20px; }
.free-chapter-grid .fc-lead { color: #fff; font-weight: 700; margin-bottom: 12px; }
.free-chapter-grid .fc-body { color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-bottom: 24px; }
.free-chapter-grid .inline-form { max-width: 450px; }

/* ── Where to Buy ──────────────────────────────────────────── */
.buy-section { background: #fff; }
.buy-section .section-header h2 { margin-bottom: 4px; }
.buy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.buy-card {
  background: rgb(16, 42, 67);
  border-radius: 4px;
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.buy-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--red);
}
.buy-card h3 { color: #fff; margin-bottom: 20px; }
.buy-card .preferred {
  color: rgba(255,255,255,0.55);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.buy-card p { font-size: 0.88rem; color: rgba(255,255,255,0.78); margin-bottom: 20px; }
.buy-card .btn { margin-top: 4px; }

/* ── Speaking Section ──────────────────────────────────────── */
.speaking-section {
  background-image: url('/images/ct-stage-bg4.jpg');
  background-size: cover;
  background-position: left center;
  position: relative;
  padding: 80px 0;
}
.speaking-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(16, 42, 67, 0.9);
}
.speaking-section .container { position: relative; z-index: 1; }

.speaking-grid {
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: 60px;
  align-items: start;
}
.speaking-copy h1 {
  color: #fff;
  font-size: 2.6rem;
  margin-bottom: 20px;
}
.speaking-copy p { color: rgba(255,255,255,0.88); margin-bottom: 1rem; }
.speaking-copy .headshot-wrap { margin-top: 32px; }
.speaking-copy .headshot-wrap img {
  width: 100%;
  max-width: 450px;
  border: 4px solid rgba(255,255,255,0.88);
  border-radius: 3px;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-card {
  background: #fff;
  border-radius: 4px;
  padding: 36px 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.form-card h3 { margin-bottom: 24px; color: var(--heading); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  font-family: Montserrat, sans-serif;
  font-size: 0.9rem;
  color: var(--body-text);
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #fff;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-status {
  display: none;
  padding: 12px 16px;
  border-radius: 3px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.form-status.success { background: #d4edda; color: #155724; display: block; }
.form-status.error   { background: #f8d7da; color: #721c24; display: block; }

/* Inline free-chapter form (on dark bg) */
.inline-form .form-group input {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}
.inline-form .form-group input::placeholder { color: rgba(255,255,255,0.55); }
.inline-form .form-group input:focus { border-color: rgba(255,255,255,0.7); }
.inline-form .form-group label { color: rgba(255,255,255,0.8); }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: #3A3A3A;
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 28px 24px;
  font-size: 0.82rem;
}

/* ── Section headings ──────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { margin-bottom: 8px; color: var(--heading); }
.section-header p { max-width: 600px; margin: 0 auto; color: #666; }

/* ── Thank-you page ────────────────────────────────────────── */
.thankyou-wrap {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  background-image: url('/images/bible-bg2.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}
.thankyou-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(16, 42, 67, 0.9);
}
.thankyou-box {
  position: relative;
  z-index: 1;
  max-width: 560px;
  background: #fff;
  border-radius: 6px;
  padding: 48px 40px;
}
.thankyou-box h1 { margin-bottom: 16px; }
.thankyou-box p { color: #666; margin-bottom: 28px; }

/* ── 404 page ──────────────────────────────────────────────── */
.notfound-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}
.notfound-wrap h1 { font-size: 6rem; color: var(--red); margin-bottom: 0; }
.notfound-wrap h2 { margin-bottom: 16px; }
.notfound-wrap p  { color: #666; margin-bottom: 28px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid,
  .book-hero .hero-grid,
  .about-grid,
  .free-chapter-grid,
  .speaking-grid,
  .buy-grid { grid-template-columns: 1fr; gap: 40px; }

  .cards-grid { grid-template-columns: 1fr; }
  /* testimonial-slide is now single-item, no grid needed */

  .hero--home .hero-text h1 { font-size: 2.8rem; white-space: normal; }
  .hero-text h1 { font-size: 2rem; }
  .hero-image img { max-width: 260px; }

  .form-row { grid-template-columns: 1fr; }
  .about-grid img { max-width: 380px; margin: 0 auto; }
  .section { padding: 50px 0; }
}

@media (max-width: 640px) {

  /* ── Header ──────────────────────────────────────── */
  .site-logo { font-size: 25px; }
  .nav-toggle { display: flex; flex-direction: column; }

  /* Full-screen overlay nav */
  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 28, 50, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 44px;
    z-index: 200;
    padding: 0;
    border: none;
    box-shadow: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }
  .site-nav a:hover,
  .site-nav a.active { color: #fff; }

  /* Close (×) button inside the overlay */
  .nav-close {
    display: block;
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2rem;
    color: rgba(255,255,255,0.7);
    line-height: 1;
    padding: 8px;
  }
  .nav-close:hover { color: #fff; }

  /* ── Typography ─────────────────────────────────── */
  .hero--home .hero-text h1 { font-size: 2.2rem; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  /* ── Hero: compact padding, image above text ─────── */
  .hero .container { padding-top: 40px; padding-bottom: 48px; }
  .hero-grid { gap: 24px; }

  /* Show Craig's headshot, reorder it above the hero text, cap at 220px */
  .hero-image {
    display: block;
    order: -1;
    max-width: 220px;
    margin: 0 auto;
  }
  .hero-image img { max-width: 100%; }

  /* Center homepage hero text + CTA */
  .hero--home .hero-text { text-align: center; }

  /* Center book hero text + CTAs */
  .book-hero .hero-text { text-align: center; }
  .book-hero .hero-text .hero-cta-group { justify-content: center; }

  /* ── Cards section ──────────────────────────────── */
  .card img { max-width: 220px; width: 100%; margin: 0 auto 28px; aspect-ratio: 1; }

  /* ── Testimonials: 1 at a time on mobile ─────────── */
  .testimonial-slide { flex: 0 0 100%; min-width: 100%; padding: 0; }

  /* ── Free chapter: image above content, max 220px ── */
  .free-chapter-grid { display: flex; flex-direction: column; }
  .fc-image { order: -1; margin-bottom: 24px; }
  .fc-image img { max-width: 220px; width: 100%; border: none; box-shadow: none; }

  /* ── Speaking: headshot above text, max 220px left ── */
  .speaking-copy { display: flex; flex-direction: column; }
  .speaking-copy .headshot-wrap {
    order: -1;
    margin-top: 0;
    margin-bottom: 28px;
  }
  .speaking-copy .headshot-wrap img { max-width: 220px; }

  /* ── Homepage hero bg-position ──────────────────── */
  .hero--home { background-position: -80px center; }

  /* ── Misc ───────────────────────────────────────── */
  .form-card { padding: 24px 20px; }
  .buy-card  { padding: 28px 20px; }
}


/* ================================================================
   ANIMATIONS — Craig Tackett
   On-load hero entrances + scroll reveals (no CDN dependency)
   ================================================================ */

/* ── Reduced-motion override ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-anim  { opacity: 1 !important; transform: none !important; animation: none !important; }
  .ct-reveal  { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Keyframes ───────────────────────────────────────────────── */

/* H1 / big headline: arrives from bottom-left — energetic, directional */
@keyframes ctSlideLeft {
  from { opacity: 0; transform: translate(-22px, 18px); }
  to   { opacity: 1; transform: translate(0, 0); }
}

/* General text elements: clean fade-up */
@keyframes ctFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero image / book cover: scale-in from slightly larger — creates arrival moment */
@keyframes ctRevealIn {
  from { opacity: 0; transform: scale(1.05); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Hero entrance classes ───────────────────────────────────── */
/* Start invisible; each numbered variant fires in sequence      */
.hero-anim {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Homepage + Book hero text stack — relaxed, unhurried pacing */
.hero-anim--1 { animation: ctSlideLeft 0.90s 0.10s forwards; } /* h1 */
.hero-anim--2 { animation: ctFadeUp    0.80s 0.34s forwards; } /* subtitle */
.hero-anim--3 { animation: ctFadeUp    0.78s 0.56s forwards; } /* callout / extra copy */
.hero-anim--4 { animation: ctFadeUp    0.76s 0.76s forwards; } /* CTA button(s) */
/* Right-column image — enters with scale, offset from the text so they arrive together */
.hero-anim--5 { animation: ctRevealIn  1.00s 0.18s forwards; } /* hero image / book cover */

/* Once all hero entrances finish, release animation-fill lock so
   hover/focus transitions on .btn can work normally.            */
.hero-anim.anim-done {
  opacity: 1;
  animation: none;
}

/* ── Scroll-reveal: Intersection Observer ────────────────────── */
.ct-reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.80s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.80s cubic-bezier(0.22, 1, 0.36, 1);
}

.ct-reveal.ct-reveal--in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings — JS sets --delay via inline style, but CSS
   can also handle fixed stagger for known groups                 */
.ct-reveal[data-delay="1"] { transition-delay: 0.14s; }
.ct-reveal[data-delay="2"] { transition-delay: 0.28s; }
.ct-reveal[data-delay="3"] { transition-delay: 0.42s; }

/* ── Directional reveal variants (horizontal slides) ─────────── */
/* Override the default translateY so cards come from the sides   */
.ct-reveal--from-left  { transform: translateX(-48px); }
.ct-reveal--from-right { transform: translateX(48px);  }
/* When IO fires, clear to neutral (ct-reveal--in sets translateY(0), which also
   collapses any translateX because the class pair overrides transform together) */
.ct-reveal--from-left.ct-reveal--in,
.ct-reveal--from-right.ct-reveal--in { transform: translateX(0); }
