/*
Theme Name: Moraga Community Foundation
Theme URI: https://moragacommunityfoundation.org/
Author: Moraga Community Foundation
Description: A lightweight, accessible block theme for project-led community fundraising.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: mcf
*/

:root { --mcf-shadow: 0 18px 55px rgba(20, 58, 64, .12); }
html { scroll-behavior: smooth; }
#project { scroll-margin-top: clamp(9rem, 12vw, 10rem); }
body { text-wrap: pretty; }
a { text-underline-offset: .16em; }
a:focus-visible,
button:focus-visible,
.wp-element-button:focus-visible {
  outline: 3px solid #087b86;
  outline-offset: 3px;
}
.wp-site-blocks { overflow: hidden; }
.mcf-eyebrow { letter-spacing: .11em; text-transform: uppercase; font-size: .78rem; font-weight: 750; }
.mcf-card { box-shadow: var(--mcf-shadow); }
.mcf-rounded, .mcf-rounded img { border-radius: 1.25rem; }
.wp-site-blocks main > .wp-block-post-title { font-size: var(--wp--preset--font-size--x-large); }
.mcf-hero { position: relative; }
.mcf-hero::after { content: ""; position: absolute; width: 25rem; height: 25rem; border-radius: 50%; right: -12rem; bottom: -18rem; background: rgba(100, 203, 208, .16); pointer-events: none; }
.mcf-stat { border-left: 4px solid var(--wp--preset--color--orange); padding-left: 1.25rem; }
.mcf-benefit { height: 100%; border-radius: 1rem; }
.mcf-page-intro { max-width: 48rem; font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.55; }
.mcf-project-card { height: 100%; border: 1px solid rgba(20, 58, 64, .1); border-radius: 1rem; box-shadow: 0 10px 30px rgba(20, 58, 64, .08); }
.mcf-project-card .wp-block-post-featured-image img { width: 100%; object-fit: cover; }
.mcf-project-card .wp-block-post-title { font-size: clamp(1.55rem, 2.25vw, 2.2rem); line-height: 1.08; }
.mcf-project-card .wp-block-post-excerpt__more-link { display: none; }
.wp-block-post:not(:has(.wp-block-post-featured-image img)) .mcf-project-card::before {
  content: "Community project";
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  border-radius: 1.25rem;
  color: var(--wp--preset--color--deep-teal);
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .52) 0 12%, transparent 12.5%),
    linear-gradient(135deg, rgba(100, 203, 208, .52), rgba(243, 235, 218, .9));
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.mcf-step-number { font-size: 2.35rem; line-height: 1; font-weight: 800; margin-bottom: .75rem; }
.wp-block-image figcaption { color: #496267; font-size: .84rem; }
.mcf-button .wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease; }
.mcf-button .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(229, 111, 43, .25); }
.wp-block-navigation a,
.wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; }
.mcf-site-header { border-bottom: 1px solid rgba(18, 63, 70, .1); }
header .mcf-header-inner { align-items: center; gap: clamp(1rem, 2.5vw, 2.25rem); }
.mcf-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  gap: clamp(.8rem, 1.5vw, 1.15rem);
  color: var(--wp--preset--color--deep-teal);
  text-decoration: none;
}
.mcf-brand-mark { display: block; width: clamp(7.25rem, 10vw, 8.625rem); height: auto; flex: none; }
.mcf-brand-copy { display: grid; gap: .18rem; min-width: 0; line-height: 1.15; }
.mcf-brand-name { max-width: 13rem; font-family: var(--wp--preset--font-family--serif); font-size: clamp(1rem, 1.3vw, 1.2rem); font-weight: 600; }
.mcf-brand-tagline { color: #496267; font-size: .75rem; letter-spacing: .02em; white-space: nowrap; }
header .mcf-desktop-nav { margin-left: auto; flex: none; }
header .wp-block-navigation__container { align-items: center; gap: clamp(1rem, 1.8vw, 1.75rem); }
header .wp-block-navigation-item__content { position: relative; font-weight: 650; text-decoration: none; }
header .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: .35rem;
  left: 0;
  height: 3px;
  background: #fbae17;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .15s ease;
}
header .wp-block-navigation-item__content:hover::after,
header .wp-block-navigation-item__content:focus-visible::after,
header .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }
header .mcf-header-cta { flex: none; }
header .mcf-campaign-button .wp-block-button__link { padding: .72rem 1.15rem; font-size: .93rem; white-space: nowrap; }
footer a { color: inherit; }
footer .wp-block-heading { margin-top: 0; }
footer .wp-block-column { min-width: 0; }
@media (max-width: 980px) {
  .mcf-brand-copy { display: none; }
  header .mcf-header-inner { gap: 1rem; }
  header .wp-block-navigation__container { gap: 1rem; }
}
@media (max-width: 700px) {
  .wp-block-columns { gap: 2rem; }
  .mcf-hero { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  .mcf-site-header { padding-top: .6rem !important; padding-bottom: .6rem !important; }
  header .mcf-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem 1rem; }
  .mcf-brand-mark { width: 6.75rem; }
  header .mcf-desktop-nav { margin-left: 0; justify-self: end; }
  header .mcf-header-cta { grid-column: 1 / -1; width: 100%; }
  header .mcf-header-cta .wp-block-button,
  header .mcf-campaign-button .wp-block-button__link { width: 100%; justify-content: center; }
  footer .wp-block-columns { gap: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mcf-button .wp-block-button__link,
  header .wp-block-navigation-item__content::after { transition: none; }
}
