/* ============================================================
   POTTER'S WHEEL SCHOOL OF MINISTRY  —  Site Stylesheet
   v1.0  •  Phase A static build
   Mobile-first. Tokens. Components. No frameworks.
   ============================================================ */

/* ----- Design tokens ----- */
:root {
  --navy: #0B1B45;
  --gold: #C9A227;
  --purple: #3B1F5E;
  --cream: #F5EFD9;
  --off-white: #FAFAF7;
  --text: #1C1C1C;
  --muted: #6E6E6E;
  --line: #E6E6E6;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-sm: 0 2px 6px rgba(11, 27, 69, .06);
  --shadow-md: 0 8px 24px rgba(11, 27, 69, .10);
  --radius: 8px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ----- Base ----- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Layout ----- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }
.bg-cream { background: var(--cream); }
.bg-off-white { background: var(--off-white); }
.bg-navy { background: var(--navy); color: white; }
.bg-purple-gradient { background: linear-gradient(135deg, var(--purple) 0%, var(--navy) 100%); color: white; }

/* ----- Typography ----- */
h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.18;
  color: var(--navy);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.5rem); margin-bottom: 16px; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 16px; }
h3 { font-family: var(--body); font-weight: 600; font-size: 1.2rem; color: var(--navy); margin-bottom: 8px; }
h4 { font-family: var(--body); font-weight: 600; font-size: 0.95rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text); }
.eyebrow { display: inline-block; color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.8rem; margin-bottom: 12px; }

/* Heading colour overrides on dark backgrounds */
.bg-purple-gradient h1, .bg-purple-gradient h2, .bg-purple-gradient h3,
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: white; }

/* Tagline strip */
.tagline-strip { padding: 36px 24px; text-align: center; background: var(--cream); border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); }
.tagline-strip p { font-family: var(--display); font-style: italic; font-size: clamp(1.2rem, 3vw, 1.9rem); color: var(--navy); margin: 0; }

/* ----- Header / nav ----- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
/* Blur applied via pseudo-element so position:fixed children inside the header
   are NOT re-contained by the header (a Safari/iOS backdrop-filter quirk). */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: 1180px; margin: 0 auto; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand img { height: 62px; width: auto; }
.brand__text { line-height: 1; }
.brand__name { font-family: var(--display); font-weight: 900; color: var(--navy); font-size: 2rem; letter-spacing: -0.02em; line-height: 1; -webkit-font-smoothing: antialiased; text-shadow: 0 1px 2px rgba(11,27,69,0.12); }
.brand__sub { display: block; font-size: 0.8rem; color: var(--gold); letter-spacing: 0.22em; text-transform: uppercase; margin-top: 6px; font-weight: 800; -webkit-font-smoothing: antialiased; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; gap: 28px; align-items: center; }
.nav__link { color: var(--navy); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav__link:hover, .nav__link.active { color: var(--gold); border-bottom-color: var(--gold); }

.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy); line-height: 0; }
.menu-toggle svg { width: 30px; height: 30px; display: block; }
.menu-toggle .icon-close { display: none; }
.nav__mobile-cta { display: none; }

@media (max-width: 920px) {
  /* Hide desktop-only elements */
  .nav__list { display: none; }
  .nav > .btn { display: none; }
  .menu-toggle { display: block; }

  /* Hamburger → X swap */
  .nav.is-open ~ .menu-toggle .icon-open  { display: none; }
  .nav.is-open ~ .menu-toggle .icon-close { display: block; }

  /* ── Full-screen overlay ── */
  .nav.is-open .nav__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    top: 91px; left: 0; right: 0; bottom: 0;
    background: var(--navy);
    padding: 8px 28px 180px;
    overflow-y: auto;
    z-index: 200;
    animation: menuIn 0.22s ease;
  }

  /* ── Nav links ── */
  .nav.is-open .nav__list li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav.is-open .nav__list .nav__link {
    display: block;
    color: rgba(255,255,255,0.88);
    padding: 20px 4px;
    font-size: 1.55rem;
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.01em;
    border-bottom: none;
    transition: color 0.15s, padding-left 0.15s;
  }
  .nav.is-open .nav__list .nav__link:hover,
  .nav.is-open .nav__list .nav__link.active {
    color: var(--gold);
    padding-left: 10px;
  }

  /* ── CTA buttons pinned to bottom ── */
  .nav.is-open .nav__mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 20px 28px 32px;
    background: linear-gradient(to top, var(--navy) 72%, transparent);
    z-index: 201;
  }
  .nav.is-open .nav__mobile-cta .btn {
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 24px;
    font-size: 1rem;
  }

  @keyframes menuIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ----- Buttons ----- */
.btn { display: inline-block; padding: 14px 28px; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; transition: all 0.2s ease; cursor: pointer; border: 2px solid transparent; }
.btn--primary { background: var(--gold); color: white; border-color: var(--gold); }
.btn--primary:hover { background: white; color: var(--navy); border-color: white; }
.btn--ghost { background: transparent; color: white; border-color: white; }
.btn--ghost:hover { background: white; color: var(--purple); }
.btn--navy { background: var(--navy); color: white; border-color: var(--navy); }
.btn--navy:hover { background: var(--gold); color: white; border-color: var(--gold); }
.btn--small { padding: 10px 18px; font-size: 0.85rem; }
.btn--block { display: block; width: 100%; text-align: center; }

/* ----- Hero ----- */
.hero { padding: 80px 24px; text-align: center; }
@media (min-width: 768px) { .hero { padding: 120px 24px; } }
.hero__inner { max-width: 880px; margin: 0 auto; }
.hero h1 { color: white; margin-bottom: 16px; }
.hero .lead { color: rgba(255,255,255,0.92); margin: 0 auto 32px; max-width: 720px; }
.hero .ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ----- Cards ----- */
.cards { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__num { display: inline-block; color: var(--gold); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.2em; margin-bottom: 8px; }
.card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ----- Split (founder feature) ----- */
.split { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1.4fr; gap: 56px; } }
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split__media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }

/* ----- Cohort facts table ----- */
.facts { background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts__row { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.facts__row:last-child { border-bottom: 0; }
.facts__label { font-weight: 600; color: var(--navy); }
.facts__value { color: var(--text); }
@media (max-width: 600px) { .facts__row { grid-template-columns: 1fr; gap: 4px; } .facts__label { font-size: 0.85rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; } }

/* ----- Week timeline ----- */
.week { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .week { grid-template-columns: repeat(5, 1fr); } }
.week__day { background: white; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--purple); }
.week__day strong { display: block; color: var(--purple); margin-bottom: 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.week__day p { font-size: 0.95rem; margin: 0; color: var(--text); }

/* ----- Steps ----- */
.steps { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding: 24px; }
.step__num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: white; font-weight: 700; font-family: var(--display); font-size: 1.2rem; margin-bottom: 16px; }
.step h3 { color: var(--navy); margin-bottom: 8px; }
.step p { color: var(--muted); }

/* ----- Quote / scripture ----- */
.quote { max-width: 820px; margin: 0 auto; text-align: center; padding: 40px 24px; }
.quote__text { font-family: var(--display); font-style: italic; font-size: clamp(1.3rem, 3vw, 1.9rem); color: var(--navy); line-height: 1.4; margin-bottom: 16px; }
.quote__cite { color: var(--gold); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.85rem; }

/* ----- CTA strip ----- */
.cta-strip { padding: 64px 24px; text-align: center; background: linear-gradient(135deg, var(--purple) 0%, var(--navy) 100%); color: white; }
.cta-strip h2 { color: white; margin-bottom: 24px; }

/* ----- Lanes (contact) ----- */
.lanes { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .lanes { grid-template-columns: repeat(3, 1fr); } }
.lane { background: white; border-radius: var(--radius); padding: 28px; border-top: 4px solid var(--gold); box-shadow: var(--shadow-sm); }
.lane h3 { color: var(--purple); margin-bottom: 8px; }
.lane a { color: var(--navy); font-weight: 600; word-break: break-word; }
.lane a:hover { color: var(--gold); }

/* ----- Forms ----- */
.form { display: grid; gap: 16px; max-width: 640px; margin: 0 auto; }
.form label { font-weight: 600; color: var(--navy); font-size: 0.9rem; }
.form input, .form textarea, .form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--body); font-size: 1rem; background: white; transition: border-color 0.2s;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--gold); }
.form textarea { min-height: 140px; resize: vertical; }

/* ----- FAQ accordion ----- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq { background: white; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq summary { padding: 20px 24px; font-weight: 600; color: var(--navy); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.6rem; color: var(--gold); line-height: 1; flex-shrink: 0; transition: transform 0.2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq[open] summary { border-bottom: 1px solid var(--line); }
.faq__body { padding: 20px 24px; color: var(--text); }
.faq__body p:last-child { margin-bottom: 0; }

/* ----- Apply route cards ----- */
.routes { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .routes { grid-template-columns: 1fr 1fr; } }
.route { background: white; border-radius: var(--radius); padding: 36px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.route h3 { color: var(--purple); font-size: 1.4rem; margin-bottom: 12px; font-family: var(--display); font-weight: 700; }
.route p { color: var(--muted); margin-bottom: 24px; flex-grow: 1; }
.route .btn { align-self: flex-start; }

/* ----- Pull quote ----- */
.pullquote { padding: 32px; background: var(--cream); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; margin: 32px 0; }
.pullquote p { font-family: var(--display); font-style: italic; color: var(--navy); font-size: 1.15rem; margin: 0; }
.pullquote cite { display: block; margin-top: 12px; font-style: normal; color: var(--gold); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* ----- Footer ----- */
.site-footer { background: var(--navy); color: white; padding: 56px 24px 24px; }
.footer-grid { max-width: 1180px; margin: 0 auto; display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { color: var(--gold); }
.footer__col p { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.footer__col p em { color: var(--gold); font-style: italic; }
.footer__col ul li { margin-bottom: 8px; }
.footer__col a { color: rgba(255,255,255,0.85); transition: color 0.2s; word-break: break-word; }
.footer__col a:hover { color: var(--gold); }
.footer-base { max-width: 1180px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.footer-base .gold-line { border-top: 2px solid var(--gold); width: 60px; margin: 0 auto 24px; }

/* ----- Sticky mobile apply ----- */
.sticky-apply { display: none; }
@media (max-width: 767px) {
  .sticky-apply.active { display: block; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; box-shadow: var(--shadow-md); }
}

/* ----- Skip link / a11y ----- */
.skip { position: absolute; left: -9999px; top: -9999px; }
.skip:focus { position: fixed; top: 8px; left: 8px; background: var(--gold); color: white; padding: 12px 18px; border-radius: var(--radius); z-index: 100; }

/* ----- Utility ----- */
.text-center { text-align: center; }
.gold-rule { width: 60px; height: 3px; background: var(--gold); margin: 0 auto 24px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-3 { margin-bottom: 24px; }
.flex-center { display: flex; justify-content: center; }
