/*
Theme Name: BlockCraft Church
Theme URI: https://blockcraft.church/
Author: BlockCraft Church
Author URI: https://blockcraft.church/
Description: Voxel-flavoured block theme for BlockCraft Church (Direction 10). DM Serif Display and Montserrat, the Trinity palette (Yellow / Blue / Orange), hard 2px corners, a custom Cube Icon block and the outlined BlockCraft Church logo. FSE-only, no classic theme fallback.
Version: 4.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blockcraft-church
Tags: full-site-editing, block-patterns, blog, editorial, three-columns, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/*
 * This file is intentionally light.
 * Brand spec: see BRAND.md in this folder (Direction 10).
 * All design tokens — colors, fonts, spacing, radius — live in theme.json
 * so the editor and the front-end stay in sync. CSS here is only the few
 * rules that theme.json cannot express (icon block helpers, mono ribbon
 * marquee, image-block hover, focus rings).
 */

/* Honey image block — Honey tint + 1px Ink-10 border + center the icon */
.wp-block-bcc-image-block,
.bcc-image-block {
  box-sizing: border-box;
  background-color: #FFEEC3;
  border: 1px solid rgba(15, 14, 18, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: background-color 120ms ease;
}
.wp-block-bcc-image-block:hover,
.bcc-image-block:hover { background-color: #FFE7B5; }

/* Cube icon block — keep SVGs from inheriting weird sizing */
.wp-block-bcc-icon,
.bcc-icon { display: inline-flex; line-height: 0; }
.wp-block-bcc-icon svg,
.bcc-icon svg { display: block; width: 100%; height: 100%; }

/* Eyebrow / label ribbon: Montserrat 600 caps, tight tracking, Ink */
.bcc-mono-ribbon {
  font-family: var(--wp--preset--font-family--body);
  font-size:12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Lead-in dash: a short Deep Blue rule before an eyebrow (add class "bcc-dash") */
.bcc-dash::before{content:"";display:inline-block;width:1.6em;height:2px;margin-right:10px;vertical-align:0.3em;background:#1B96C6;border-radius:1px;}

/* Trinity-stair headline: Yellow, Deep Blue, Orange (brand colours).
   Use .is-yellow / .is-blue / .is-orange on inner spans.
   (.is-amber / .is-forest / .is-plum still work: Direction 09 aliases.) */
.bcc-stair > span { display: block; }
.bcc-stair .is-yellow, .bcc-stair .is-amber  { color: #FFC13B; }
.bcc-stair .is-blue,   .bcc-stair .is-forest { color: #1B96C6; }
.bcc-stair .is-orange, .bcc-stair .is-plum   { color: #F47A60; }
.bcc-stair em,
.bcc-stair i { font-style: italic; color: inherit; }

/* Chips — Ink text (readable at 12px) with a brand-colour outline and tint */
.bcc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 2px;
  font-family: var(--wp--preset--font-family--body);
  font-size:12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.bcc-chip.is-yellow, .bcc-chip.is-amber  { color: #0F0E12; border-color: #FFC13B; background: rgba(255, 193, 59, 0.22); }
.bcc-chip.is-orange, .bcc-chip.is-plum   { color: #0F0E12; border-color: #F47A60; background: rgba(244, 122, 96, 0.18); }
.bcc-chip.is-blue,   .bcc-chip.is-forest { color: #0F0E12; border-color: #76B9EF; background: rgba(118, 185, 239, 0.20); }
.bcc-chip.is-green  { color: #0F0E12; background: rgba(121, 202, 183, 0.18); border-color: #79CAB7; }

/* Live indicator dot */
.bcc-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #1B96C6;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
  box-shadow: 0 0 0 0 rgba(27, 150, 198, 0.6);
  animation: bcc-pulse 2.4s ease-in-out infinite;
}
@keyframes bcc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(27, 150, 198, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(27, 150, 198, 0); }
}

/* Stat block — three-column footer of community cards */
.bcc-stat-eyebrow {
  font-family: var(--wp--preset--font-family--body);
  font-size:12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(15, 14, 18, 0.6);
}
.bcc-stat-value {
  font-family: var(--wp--preset--font-family--display);
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Individual community card */
.bcc-community-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:32px;}
.bcc-community-card{display:flex;flex-direction:column;gap:12px;padding:22px;border:1px solid rgba(15,14,18,0.12);border-radius:2px;background:#FFFFFF;transition:border-color 120ms ease;}
.bcc-community-card:hover{border-color:rgba(15,14,18,0.26);}
.bcc-community-card__image{aspect-ratio:4/3;padding:28px;margin-bottom:10px;}
.bcc-community-card__title{font-family:var(--wp--preset--font-family--display);font-weight:400;font-size:32px;letter-spacing:-0.03em;line-height:1.02;margin:0;}
.bcc-community-card__title em{color:#1B96C6;font-style:italic;}
.bcc-community-card__host{font-size:13px;color:rgba(15,14,18,0.7);margin:0;}
.bcc-community-card__body{font-size:14px;line-height:1.5;color:rgba(15,14,18,0.7);margin:0;}
.bcc-community-card__chips{display:flex;flex-wrap:wrap;gap:8px;}
.bcc-community-card__stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;padding-top:14px;margin-top:4px;border-top:1px solid rgba(15,14,18,0.12);}
.bcc-community-card__stats p{margin:0;}
.bcc-community-card__stats .bcc-stat-value{font-size:24px;margin-top:4px;}
.bcc-community-card .wp-block-button{margin-top:auto;padding-top:8px;}
.bcc-community-card .wp-block-button__link{display:block;text-align:center;}

.bcc-community-card__eyebrow{color:#0F0E12;margin:0;}
.bcc-community-card__title a{color:inherit;text-decoration:none;}
.bcc-community-card__title a:hover{color:#1469AE;}
.bcc-community-card__title a:hover em{color:inherit;}

/* Church wide card (directory) */
.bcc-church-wide-list{display:flex;flex-direction:column;gap:14px;}
.bcc-church-wide-card{display:grid;grid-template-columns:120px minmax(0,1fr) auto;gap:28px;padding:22px;border:1px solid rgba(15,14,18,0.12);border-radius:2px;background:#FFFFFF;color:inherit;text-decoration:none;transition:border-color 120ms ease;}
.bcc-church-wide-card:hover{border-color:rgba(15,14,18,0.26);}
.bcc-church-wide-card:hover .bcc-church-wide-card__title{color:#1469AE;}
.bcc-church-wide-card__thumb{width:120px;height:120px;padding:16px;align-self:start;flex:none;}
.bcc-church-wide-card__main{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;}
.bcc-church-wide-card__eyebrow{color:#0F0E12;}
.bcc-church-wide-card__title{font-family:var(--wp--preset--font-family--display);font-size:32px;letter-spacing:-0.03em;line-height:1.05;margin-top:2px;transition:color 120ms ease;}
.bcc-church-wide-card__title em{color:#1B96C6;font-style:italic;}
.bcc-church-wide-card__meta{font-size:13px;color:rgba(15,14,18,0.7);}
.bcc-church-wide-card__body{font-size:14px;line-height:1.5;color:rgba(15,14,18,0.7);max-width:62ch;margin-top:4px;}
.bcc-church-wide-card__chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.bcc-church-wide-card__side{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;gap:14px;white-space:nowrap;}
.bcc-church-wide-card__side .wp-block-button__link{padding:10px 16px;font-size:13px;}
@media (max-width:781px){.bcc-church-wide-card{grid-template-columns:72px minmax(0,1fr);gap:18px;}.bcc-church-wide-card__thumb{width:72px;height:72px;padding:8px;}.bcc-church-wide-card__side{grid-column:1 / -1;flex-direction:row;align-items:center;}}

/* Church details (single church) */
.bcc-church-details__list{display:grid;grid-template-columns:auto 1fr;gap:8px 18px;margin:0;font-size:13px;line-height:1.45;}
.bcc-church-details__list dt{color:rgba(15,14,18,0.6);padding-top:2px;}
.bcc-church-details__list dd{margin:0;}
.bcc-church-details__list a{color:inherit;text-decoration:underline dotted currentColor;text-underline-offset:3px;transition:color 240ms ease;}
.bcc-church-details__list a:hover{color:#1469AE;}
.bcc-church-visual{aspect-ratio:1;padding:48px;}
.bcc-image-block.has-photo{padding:5px;overflow:hidden;}
.bcc-community-card__image.has-photo{padding:10px;}
.bcc-church-photo{display:block;width:100%;height:100%;object-fit:cover;border-radius:1px;}

.bcc-sample-notice{color:#1469AE;padding:10px 0;margin:0 0 22px;border-bottom:1px solid rgba(15,14,18,0.12);}
.bcc-church-empty{color:rgba(15,14,18,0.7);}
.bcc-church-pagination{display:flex;gap:18px;justify-content:center;margin-top:48px;}
.bcc-church-pagination a{color:#0F0E12;text-decoration:none;}
.bcc-church-pagination .current{color:#1469AE;}

/* Church browser heading — icon block matches Register / Start one */
.bcc-browser-head__image{width:220px;flex:none;aspect-ratio:1;padding:24px;}
.bcc-browser-head h2 em{color:#1B96C6;}
@media (max-width:781px){.bcc-browser-head{flex-wrap:wrap!important;gap:24px!important;}.bcc-browser-head__image{width:180px;}}

/* Register card */
.bcc-register-card,.bcc-split-card{display:grid;grid-template-columns:220px minmax(0,1fr);gap:48px;align-items:center;padding:32px;border:1px solid rgba(15,14,18,0.12);border-radius:2px;background:#FFFFFF;}
.bcc-register-card__image,.bcc-split-card__image{aspect-ratio:1;padding:24px;}
.bcc-register-card > *,.bcc-split-card > *{margin-block:0;}
@media (max-width:781px){.bcc-register-card,.bcc-split-card{grid-template-columns:1fr;gap:24px;padding:22px;}.bcc-register-card__image,.bcc-split-card__image{max-width:180px;}}

/* Honey media card — 5px honey frame, square media, caption area below.
   Apply "Honey media card" style to Image / Video / Embed / Cover blocks. */
.is-style-bcc-media,.bcc-media-card{background:#FFEEC3;border:1px solid rgba(15,14,18,0.10);border-radius:2px;padding:5px;margin:0;box-sizing:border-box;transition:background-color 120ms ease;}
.is-style-bcc-media:hover,.bcc-media-card:hover{background:#FFE7B5;}
.is-style-bcc-media img,.is-style-bcc-media video,.is-style-bcc-media iframe,.is-style-bcc-media .wp-block-embed__wrapper{display:block;width:100%;aspect-ratio:1;height:auto;object-fit:cover;border-radius:1px;background:#FFE7B5;}
.is-style-bcc-media .wp-block-embed__wrapper::before{display:none;}
.is-style-bcc-media .wp-block-embed__wrapper iframe{height:100%;}
.is-style-bcc-media figcaption,.is-style-bcc-media .wp-element-caption{margin:0;padding:12px 8px 8px;min-height:48px;font-family:var(--wp--preset--font-family--body);font-size:13px;line-height:1.45;color:rgba(15,14,18,0.7);text-align:left;}
.bcc-media-grid > *{margin:0;}

/* Hard-cornered buttons — overrides WP core button radius defaults */
.wp-block-button__link {
  border-radius: 2px;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 12px 18px;
  font-size: 13.5px;
}
/* Primary: Yellow with Ink text (11.8:1). Never white on yellow. */
.wp-block-button.is-style-bcc-primary .wp-block-button__link {
  background: #FFC13B;
  color: #0F0E12;
  border: 1px solid #FFC13B;
}
.wp-block-button.is-style-bcc-primary .wp-block-button__link:hover {
  background: #DE9800;
  border-color: #DE9800;
  color: #0F0E12;
}
.wp-block-button.is-style-bcc-ghost .wp-block-button__link {
  background: transparent;
  color: #0F0E12;
  border: 1.5px solid rgba(15, 14, 18, 0.26);
}
.wp-block-button.is-style-bcc-ghost .wp-block-button__link:hover {
  border-color: rgba(15, 14, 18, 0.55);
}

/* Site logo (bcc/logo): the outlined BlockCraft Church SVG */
.wp-block-bcc-logo { line-height: 0; }
.bcc-logo__link { display: inline-block; line-height: 0; text-decoration: none; }
.bcc-logo__img { display: block; max-width: 100%; height: auto; }
@media (max-width: 600px) { .bcc-site-header .bcc-logo__img { width: 168px; } }

/* Legacy text wordmark (kept for saved content): BlockCraft in Ink, Church italic in Orange */
.bcc-wordmark {
  font-family: var(--wp--preset--font-family--display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #0F0E12;
}
.bcc-wordmark em,
.bcc-wordmark i { color: #F47A60; font-style: italic; }

/* Footer: Ink background, white text, dark-background logo */
.bcc-site-footer{background-color:#0F0E12;color:#FFFFFF;}
.bcc-site-footer .bcc-footer-heading{color:#FFFFFF;}
.bcc-site-footer .is-style-bcc-ghost .wp-block-button__link{color:#FFFFFF;border-color:rgba(255,255,255,0.40);}
.bcc-site-footer .is-style-bcc-ghost .wp-block-button__link:hover{border-color:#FFFFFF;}
.bcc-footer-partner .wp-block-image{margin:0;}
.bcc-footer-partner__logo a{display:inline-block;line-height:0;text-decoration:none!important;}
.bcc-footer-partner__logo img{display:block;width:200px;max-width:100%;height:auto;}
.bcc-site-footer .wp-block-image.bcc-footer-partner__logo--small{margin:0;}
.bcc-footer-partner__logo--small img{width:180px;}
.bcc-site-footer :where(a, button, .wp-block-button__link):focus-visible{outline-color:#76B9EF;}

/* Footer links — dotted underline in the text colour, fade to brand Blue on hover */
.bcc-site-footer a:not(.wp-block-button__link):not(.bcc-wordmark):not(.bcc-logo__link){color:inherit;text-decoration:underline dotted currentColor;text-decoration-thickness:1px;text-underline-offset:3px;transition:color 240ms ease;}
.bcc-site-footer .bcc-footer-list a:hover,.bcc-site-footer .bcc-footer-list a:focus-visible,.bcc-site-footer p a:hover,.bcc-site-footer p a:focus-visible{color:#76B9EF;text-decoration-style:solid;}

.bcc-site-header .wp-block-button__link{white-space:nowrap;}

/* Italic emphasis in H1s is always Deep Blue (large text only) */
h1 em,h1 i{color:#1B96C6;}

/* Focus rings — honour the hard-cornered brand */
:where(a, button, .wp-block-button__link, input, select, textarea):focus-visible {
  outline: 2px solid #1B96C6;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Print niceties */
@media print {
  .bcc-live-dot { animation: none; }
}

/* "Hide title" option — visually hidden, still in the accessibility tree */
.bcc-title-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;}

/* Sessions — filter bar, cards, details */
.bcc-session-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:14px;align-items:end;padding:22px;border:1px solid rgba(15,14,18,0.12);border-radius:2px;background:#FFFFFF;}
.bcc-session-filters label{display:flex;flex-direction:column;gap:8px;}
.bcc-session-filters select,.bcc-session-filters input{font:inherit;font-size:15px;padding:10px 12px;border:1px solid rgba(15,14,18,0.26);border-radius:2px;background:#FFFFFF;color:#0F0E12;min-width:0;}
.bcc-session-filters select:focus-visible,.bcc-session-filters input:focus-visible{outline:2px solid #1B96C6;outline-offset:1px;}
.bcc-session-filters__actions{display:flex;align-items:center;gap:14px;}
.bcc-session-filters button{cursor:pointer;border:0;}
.bcc-session-filters__clear{font-family:var(--wp--preset--font-family--body);font-size:12px;font-weight:600;letter-spacing:0.04em;text-transform:uppercase;color:#0F0E12;}
.bcc-session-card{height:100%;padding:22px;border:1px solid rgba(15,14,18,0.12);border-radius:2px;background:#FFFFFF;transition:border-color 120ms ease;}
.bcc-session-card:hover{border-color:rgba(15,14,18,0.26);}
.bcc-session-card .wp-block-post-title a{color:inherit;text-decoration:none;}
.bcc-session-card .wp-block-post-title a:hover{color:#1469AE;}
.bcc-session-eyebrow{color:#0F0E12;margin:0;}
.bcc-session-ref{font-family:var(--wp--preset--font-family--display);font-size:18px;font-style:italic;color:#1469AE;margin:0;}
@media (max-width:781px){.bcc-session-filters{grid-template-columns:1fr;}}

/* Direction 09 palette aliases: content saved before the rebrand keeps working */
.has-amber-color{color:#FFC13B!important;}.has-amber-background-color{background-color:#FFC13B!important;}
.has-amber-deep-color{color:#FFC13B!important;}.has-amber-deep-background-color{background-color:#DE9800!important;}
.has-amber-text-color,.has-amber-text-deep-color{color:#FFC13B!important;}
.has-amber-text-background-color,.has-amber-text-deep-background-color{background-color:#FFC13B!important;}
.has-plum-color{color:#1B96C6!important;}.has-plum-background-color{background-color:#F47A60!important;}
.has-forest-color{color:#1469AE!important;}.has-forest-background-color{background-color:#76B9EF!important;}

/* Accessibility */
.bcc-footer-heading{font-family:var(--wp--preset--font-family--body);font-size:12px;letter-spacing:0.04em;text-transform:uppercase;font-weight:600;line-height:1.4;margin:0 0 14px;color:#0F0E12;}
@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;}}
