/* ChurchHost Sanctuary: section styles the block settings can't express. Colors are theme.json presets. */
:root {
  --ch-radius: 20px;
  --ch-radius-sm: 14px;
  --ch-shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 12px 32px -12px rgba(17, 24, 39, .14);
  --ch-shadow-lift: 0 2px 4px rgba(17, 24, 39, .06), 0 24px 48px -16px rgba(17, 24, 39, .22);
  --ch-ease: cubic-bezier(.2, .7, .2, 1);
}
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* Header, page and footer meet edge to edge; full-width sections stack without gaps */
.wp-site-blocks > * + * { margin-block-start: 0; }
.ch-sections .wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--wp--preset--color--accent-soft); }
:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 3px; border-radius: 6px; }

/* Header: a floating bar that blurs what scrolls under it */
.ch-header { position: sticky; top: 0; z-index: 30; padding-top: .7rem; padding-bottom: .7rem;
  background: color-mix(in srgb, var(--wp--preset--color--surface) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--line) 70%, transparent); }
.admin-bar .ch-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ch-header { top: 0; position: relative; } }
.ch-header-row { gap: 1rem; }
.ch-brand { gap: .7rem; align-items: center; }
.ch-brand .wp-block-site-title { margin: 0; letter-spacing: -.01em; }
.ch-nav { gap: .9rem; align-items: center; }
.ch-nav .ch-give { margin: 0; }
.ch-nav .ch-button { padding: .6em 1.25em; font-size: .95rem; }
.ch-header .wp-block-navigation__container { gap: .15rem; }
.ch-header .wp-block-navigation-item__content { padding: .5em .8em; border-radius: 999px; transition: background .2s var(--ch-ease); }
.ch-header .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--tint); text-decoration: none; }

/* Main and page titles */
.ch-main { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--60); }
.ch-sections.ch-main { padding-top: 0; }
.ch-page-title { margin-bottom: .35em; font-size: clamp(2.4rem, 5vw, 3.8rem); letter-spacing: -.012em; font-variation-settings: "opsz" 60; }
.ch-lede { font-size: var(--wp--preset--font-size--large); color: color-mix(in srgb, var(--wp--preset--color--contrast) 72%, transparent); max-width: 40em; }
.ch-crumb { font-size: .92rem; margin-bottom: .8rem; }
.ch-crumb a { text-decoration: none; color: var(--wp--preset--color--muted); }
.ch-crumb a:hover { color: var(--wp--preset--color--primary); }
.ch-crumb a::before { content: "\2190  "; }
.ch-feature-image img { border-radius: var(--ch-radius); box-shadow: var(--ch-shadow); }

/* Welcome: soft light glow by default, the church's photo when it has one */
.ch-hero { position: relative; overflow: hidden; isolation: isolate;
  padding-top: clamp(4rem, 11vw, 8.5rem); padding-bottom: clamp(4rem, 11vw, 8.5rem);
  background:
    radial-gradient(60% 80% at 85% 10%, color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent), transparent 70%),
    radial-gradient(50% 70% at 0% 100%, color-mix(in srgb, var(--wp--preset--color--primary) 14%, transparent), transparent 70%),
    linear-gradient(180deg, var(--wp--preset--color--accent-soft) 0%, var(--wp--preset--color--surface) 100%); }
.ch-hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: 1.04; letter-spacing: -.015em; font-variation-settings: "opsz" 60; max-width: 12em; margin-top: .2em; }
.ch-hero .ch-lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); max-width: 32em; }
.ch-hero .wp-block-buttons { margin-top: 2rem; gap: .8rem; }
.ch-hero .wp-block-button__link { padding: .95em 1.7em; font-size: 1.05rem; }
.ch-has-hero-image .ch-hero {
  background-image: linear-gradient(90deg, rgba(12, 14, 20, .86) 0%, rgba(12, 14, 20, .62) 42%, rgba(12, 14, 20, .12) 100%), var(--ch-hero-image);
  background-size: cover; background-position: center; color: #fff; }
.ch-has-hero-image .ch-hero h1, .ch-has-hero-image .ch-hero p { color: #fff; }
.ch-has-hero-image .ch-hero .ch-eyebrow { color: color-mix(in srgb, var(--wp--preset--color--accent) 70%, #fff); }
.ch-has-hero-image .ch-hero .ch-lede { color: rgba(255, 255, 255, .86); }
.ch-has-hero-image .ch-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--contrast); }
.ch-has-hero-image .ch-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #fff; }
.ch-has-hero-image .ch-hero .is-style-outline .wp-block-button__link { color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ch-has-hero-image .ch-hero .is-style-outline .wp-block-button__link:hover { background: rgba(255, 255, 255, .16); border-color: #fff; color: #fff; }

/* Sections */
.ch-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--50); }
.ch-band { background: var(--wp--preset--color--base); padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60);
  border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); }
.ch-eyebrow { display: inline-flex; align-items: center; gap: .5em; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 700; color: var(--wp--preset--color--accent-ink); margin-bottom: .2rem; }
.ch-eyebrow::before { content: ""; width: 1.6em; height: 2px; border-radius: 2px; background: currentColor; opacity: .7; }
.ch-section h2, .ch-band h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.01em; font-variation-settings: "opsz" 48; }
.ch-card { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-radius: var(--ch-radius); padding: 1.8rem;
  box-shadow: var(--ch-shadow); transition: transform .35s var(--ch-ease), box-shadow .35s var(--ch-ease); }
.ch-band .ch-card { background: var(--wp--preset--color--surface); box-shadow: none; }
.ch-card:hover { transform: translateY(-3px); box-shadow: var(--ch-shadow-lift); }
.ch-card > :first-child { margin-top: 0; }
.ch-card > :last-child { margin-bottom: 0; }
.ch-card h3 { font-size: 1.35rem; }
.ch-card a { font-weight: 600; text-decoration: none; }
.ch-card a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ch-sermon-card { padding: 0 0 1.3rem; overflow: hidden; }
.ch-sermon-card > *:not(.wp-block-post-featured-image) { margin-left: 1.3rem; margin-right: 1.3rem; }
.ch-sermon-card .wp-block-post-featured-image { margin-bottom: 1rem; overflow: hidden; }
.ch-sermon-card .wp-block-post-featured-image img { transition: transform .6s var(--ch-ease); }
.ch-sermon-card:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.ch-sermon-card .wp-block-post-title { font-size: 1.2rem; margin-top: 1rem; }
.ch-sermon-card .wp-block-post-title a { text-decoration: none; }
.ch-sermon-card .wp-block-post-terms, .ch-sermon-card .wp-block-post-date { margin-top: .3rem; color: var(--wp--preset--color--muted); }
.ch-sermon-card .wp-block-post-terms a { color: inherit; font-weight: 500; }
.ch-sermon-grid { margin-top: 2.4rem; }

/* The one strong color block on a page (give) */
.ch-give-card { position: relative; overflow: hidden; color: var(--wp--preset--color--base); border-radius: 28px; padding: clamp(2rem, 5vw, 3.6rem);
  background: radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent), transparent 60%),
    linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--contrast) 100%); box-shadow: var(--ch-shadow-lift); }
.ch-give-card h2 { color: #fff; font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.ch-give-card p { color: rgba(255, 255, 255, .86); max-width: 36em; font-size: 1.1rem; }
.ch-give-card .ch-button { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--contrast) !important; padding: .9em 1.6em; }
.ch-give-card .ch-button:hover { background: #fff; }

/* Buttons */
.wp-element-button, .wp-block-button__link { transition: background .2s var(--ch-ease), color .2s var(--ch-ease), transform .2s var(--ch-ease), box-shadow .2s var(--ch-ease); }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--wp--preset--color--primary) 70%, transparent); }
.is-style-outline .wp-block-button__link, .wp-block-button.is-style-outline > .wp-element-button { background: transparent; border: 1.5px solid color-mix(in srgb, var(--wp--preset--color--primary) 45%, transparent); color: var(--wp--preset--color--primary); }
.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--tint); border-color: var(--wp--preset--color--primary); color: var(--wp--preset--color--contrast); }

/* Footer */
.ch-footer { background: var(--wp--preset--color--tint); padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--40); font-size: .95rem; }
.ch-footer h3 { font-family: var(--wp--preset--font-family--body); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.ch-footer .wp-block-site-title { font-size: 1.4rem; }
.ch-footer a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.ch-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ch-footer-bottom { border-top: 1px solid var(--wp--preset--color--line); padding-top: 1.3rem; margin-top: 2.4rem; color: var(--wp--preset--color--muted); font-size: .88rem; }
.ch-footer-bottom p { margin: 0; }
.ch-credit a { color: var(--wp--preset--color--muted); }

/* Gentle entrance as sections scroll into view (assets/motion.js adds .ch-in). Off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .ch-reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ch-ease), transform .8s var(--ch-ease); }
  .ch-reveal.ch-in { opacity: 1; transform: none; }
}

/* Phone */
@media (max-width: 600px) {
  .ch-header { position: relative; }
  .ch-nav { gap: .5rem; }
  .ch-hero h1 { font-size: 2.7rem; }
  .ch-card { padding: 1.4rem; }
}
