/*
Theme Name: TPC Church
Theme URI: https://tpcwales.org/
Author: TPC Wales
Author URI: https://tpcwales.org/
Description: A clean, modern church theme inspired by Soul Church layout. Optimized for shared hosting, no build steps, supports block editor.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tpc-church
Tags: block-styles, custom-colors, custom-logo, custom-menu, one-column, two-columns, wide-blocks
*/

/* CSS Reset (small, safe subset) */
*,
*::before,
*::after {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0
}

body {
  margin: 0;
  padding: 0;
  padding-bottom: 0px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.6
}

/* Global typography overrides per request */
:root {
  --black: #000;
  --sticky-services-bar-offset: calc(5.75rem + env(safe-area-inset-bottom))
}

body {
  color: var(--black);
  letter-spacing: 0;
  font-family: "DM Sans", sans-serif;
  font-size: clamp(16px, 1vw, 18px);
  font-weight: 400;
  line-height: 1.52
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Darker Grotesque", sans-serif;
  font-weight: 700;
  line-height: .95
}

h1 {
  font-size: clamp(3rem, 9vw, 8.33rem)
}

/* Ensure Tailwind Typography (.prose) uses requested fonts */
.prose,
.prose p,
.prose li,
.prose a,
.prose span {
  color: var(--black);
  letter-spacing: 0;
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  line-height: 1.52
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-family: "Darker Grotesque", sans-serif;
  font-weight: 700;
  line-height: .95
}

.prose h1 {
  font-size: clamp(3rem, 9vw, 8.33rem)
}

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

a {
  color: inherit;
  text-decoration: none
}

ul {
  list-style: none;
  padding: 0;
  margin: 0
}

/* Container */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px
}

/* Header - Transparent with backdrop blur */
.site-header {
  background: transparent
}

.brand {
  display: none
}

/* Hide old brand */
.nav-toggle {
  display: none
}

/* Hide old nav toggle */

/* Desktop Navigation Links - White text for visibility */
header nav a {
  color: #fff !important;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

header nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile menu open state */
[data-primary-nav].is-open {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Offcanvas open state */
[data-offcanvas].is-open {
  transform: translateX(0) !important
}

[data-offcanvas-overlay].is-open {
  opacity: 1 !important;
  pointer-events: auto !important
}

/* Offcanvas Navigation Links */
[data-offcanvas] a,
[data-offcanvas] .nav-link {
  color: #111 !important;
  font-weight: 500;
  font-size: 1.125rem;
  padding: 12px 0;
  display: block;
  border-bottom: 1px solid #eee;
  transition: color 0.2s, padding-left 0.2s;
}

[data-offcanvas] a:hover,
[data-offcanvas] .nav-link:hover {
  color: #000 !important;
  padding-left: 8px;
}

[data-offcanvas] ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

[data-offcanvas] li {
  margin: 0;
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  background: #111
}

.hero__media {
  position: relative;
  height: 60vh;
  min-height: 420px;
  background: #000 center/cover no-repeat
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .35) 30%, rgba(0, 0, 0, .65))
}

.hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px
}

.hero__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px
}

.hero h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  margin: 0
}

.hero p {
  max-width: 720px;
  margin: 12px 0 0;
  font-size: 18px;
  color: #f1f5f9
}

.hero__cta {
  display: flex;
  gap: 12px;
  margin-top: 18px
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #fff;
  color: #111;
  background: #fff;
  font-weight: 600
}

.btn.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: #fff
}

.btn:hover {
  opacity: .9
}

/* Announcement banner (carousel-ready) */
.announcement {
  position: relative;
  background: #efe8df;
  color: #111
}

.announcement__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px
}

.announcement__text {
  font-weight: 600
}

/* Section: Welcome */
.section {
  padding: 64px 0
}

.section--alt {
  background: #e9e1d8
}

.split {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 32px
}

.split img {
  border-radius: 16px
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr
  }
}

/* Section: How we do church */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px
}

.card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 24px
}

.card h3 {
  margin: 0 0 6px
}

.card p {
  color: #444
}

@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr
  }
}

/* Marquee Animations for Tailwind */
/* Hero rounded animation */
.hero-rounded {
  border-bottom-left-radius: 48px;
  border-bottom-right-radius: 48px;
  animation: heroRadiusIn .7s ease-out both
}

@keyframes heroRadiusIn {
  0% {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0
  }

  100% {
    border-bottom-left-radius: 48px;
    border-bottom-right-radius: 48px
  }
}

/* Allow scrolling highlight sections */
body {
  overflow-x: hidden;
  overflow-y: auto !important
}

/* Mission images draggable look */
.mission-img {
  display: block;
  position: absolute;
  border-radius: 16px;
  box-shadow: none;
  opacity: 1;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  pointer-events: auto;
  z-index: 50
}

/* Mission CTA button with circular wave animation */
.mission-cta {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  overflow: hidden;
  animation: missionBob 4s ease-in-out infinite
}

.mission-cta__label {
  position: relative;
  z-index: 2
}

.mission-cta__waves {
  position: absolute;
  inset: 0;
  border-radius: 9999px
}

.mission-cta__waves::before,
.mission-cta__waves::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
  animation: missionPulse 2.4s ease-out infinite
}

.mission-cta__waves::after {
  animation-delay: 1.2s
}

@keyframes missionPulse {
  0% {
    transform: scale(1);
    opacity: .7
  }

  70% {
    transform: scale(1.8);
    opacity: 0
  }

  100% {
    transform: scale(2);
    opacity: 0
  }
}

/* rotating conic wave ring */
.mission-cta::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 9999px;
  background: conic-gradient(from 0deg, rgba(255, 255, 255, .25), transparent 40%, rgba(255, 255, 255, .25) 60%, transparent 100%);
  filter: blur(3px);
  animation: missionSpin 6s linear infinite
}

@keyframes missionSpin {
  to {
    transform: rotate(360deg)
  }
}

@keyframes missionBob {

  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0)
  }

  50% {
    transform: translate(-50%, -50%) translateY(-6px)
  }
}

.mission-img:active {
  cursor: grabbing
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Consistent section title styling across pages */
.section-title {
  font-family: "Darker Grotesque", sans-serif;
  font-weight: 800;
  line-height: .85;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem
}

.page-bg-word {
  font-size: clamp(4.5rem, 22vw, 18rem);
  line-height: .8;
  white-space: nowrap
}

.page-hero-title {
  font-size: clamp(2.5rem, 9vw, 5rem);
  line-height: .85
}

.tpc-home-hero-title {
  line-height: .92;
  white-space: normal;
  display: grid;
  gap: clamp(.08em, 1.2vw, .16em);
}

.tpc-home-hero-title span {
  display: block;
}

.ministry-card {
  transform: translateZ(0);
}

@media (max-width: 1023px) {
  .ministry-card {
    position: relative !important;
    top: auto !important;
  }
}

@media (min-width: 1024px) {
  .ministry-card {
    top: 7rem !important;
    margin-bottom: 5rem !important;
  }
}

.section-heading-xl {
  font-size: clamp(2.25rem, 8vw, 5rem);
  line-height: .88
}

.section-heading-lg {
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: .9
}

.section-heading-md {
  font-size: clamp(1.875rem, 5vw, 3.75rem);
  line-height: .92
}

.cta-heading {
  font-size: clamp(2.25rem, 8vw, 5rem);
  line-height: .9
}

.hero-section-spacing {
  padding-top: 8rem;
  padding-bottom: 3rem
}

@media (min-width: 640px) {
  .hero-section-spacing {
    padding-top: 10rem;
    padding-bottom: 4rem
  }
}

@media (min-width: 1024px) {
  .hero-section-spacing {
    padding-top: 12rem;
    padding-bottom: 5rem
  }
}

@media (min-width: 1024px) {
  .section-title {
    margin-bottom: 1.75rem
  }
}

/* Footer */
.site-footer {
  background: #e9e1d8
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
  padding: 48px 0
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px
}

.footer__muted {
  color: #444
}

.footer__bottom {
  border-top: 1px solid #d8d1c8;
  padding: 18px 0;
  color: #444;
  font-size: 14px
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px
  }
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0
}

.mt-0 {
  margin-top: 0
}

.mb-0 {
  margin-bottom: 0
}

.mt-2 {
  margin-top: 8px
}

.mt-3 {
  margin-top: 12px
}

.mt-4 {
  margin-top: 16px
}

.mt-6 {
  margin-top: 24px
}

.mt-8 {
  margin-top: 32px
}

.text-center {
  text-align: center
}

.muted {
  color: #555
}




/* Modern Footer Override */
.site-footer {
  background-color: #050505 !important;
  color: white !important;
  margin-top: 0 !important;
}

/* Safety Override for Footer Gap */
body {
  padding-bottom: 0 !important;
}

html {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  background-color: #050505 !important;
}

.site-footer {
  margin-bottom: 0 !important;
  padding-bottom: var(--sticky-services-bar-offset) !important;
}

@media (min-width: 1024px) {
  :root {
    --sticky-services-bar-offset: calc(6.75rem + env(safe-area-inset-bottom));
  }
}
/* Hide scrollbar utility */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* =============================================================
   WORLD-CLASS POLISH: Accessibility · Motion · Interaction
   ============================================================= */

/* 1. Crisp font rendering on all platforms */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 2. Skip to content — keyboard users only */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  background: #111;
  color: #fff;
  padding: 0.875rem 1.75rem;
  border-radius: 0 0 1rem 1rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 9999;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  transition: top 0.15s ease;
  white-space: nowrap;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}

/* 3. Global focus-visible ring — keyboard navigation only */
:focus-visible {
  outline: 2.5px solid rgba(0,0,0,0.75);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Dark-background context: flip ring to white */
.bg-black :focus-visible,
.site-footer :focus-visible,
section.bg-black :focus-visible,
[class*="bg-\[#111"] :focus-visible {
  outline-color: rgba(255,255,255,0.85);
}
/* Remove outline on pointer/touch focus (only show for keyboard) */
:focus:not(:focus-visible) {
  outline: none;
}

/* 4. Remove 300ms tap delay on all interactive elements */
a, button, [role="button"], input, select, textarea, label {
  touch-action: manipulation;
}

/* 5. Correct cursor on buttons (browsers default to cursor:default) */
button, [role="button"] {
  cursor: pointer;
}

/* 6. Anchor offset for fixed header */
html {
  scroll-padding-top: 7rem;
}

/* 7. Expand touch target for slider indicators without visual change */
.event-indicator {
  position: relative;
}
.event-indicator::before {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 9999px;
}

/* 8. Prefers-reduced-motion — disable all animations & transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
