/*
Theme Name: Concord Minute Men 1775
Theme URI: https://concordminutemen.org/
Author: Concord Minute Men
Description: A full-site block theme inspired by the Concord Minute Men GoDaddy design.
Version: 2.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: cmm-1775
*/

:root {
  --cmm-cream: #ecdbcd;
  --cmm-cream-light: #f5eee9;
  --cmm-navy: #0d174a;
  --cmm-navy-light: #132061;
  --cmm-ink: #161616;
  --cmm-muted: #5e5e5e;
  --cmm-white: #ffffff;
  --cmm-border: rgba(22, 22, 22, 0.18);
  --cmm-content: 1120px;
  --cmm-wide: 1360px;
  --cmm-shadow: 0 16px 45px rgba(13, 23, 74, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cmm-white);
  color: var(--cmm-ink);
  font-family: "Lora", Georgia, serif;
  font-size: 17px;
  line-height: 1.72;
}

body.admin-bar .cmm-site-header { top: 32px; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }

h1, h2, h3, h4, h5, h6,
.wp-block-post-title {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.2;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cmm-container {
  width: min(calc(100% - 48px), var(--cmm-content));
  margin-inline: auto;
}

.cmm-site-header {
  position: relative;
  z-index: 50;
  width: 100%;
  background: var(--cmm-cream);
  border-bottom: 1px solid rgba(13, 23, 74, 0.08);
}

.cmm-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  width: min(calc(100% - 72px), var(--cmm-wide));
  min-height: 150px;
  margin-inline: auto;
}

.cmm-logo-link {
  display: block;
  width: 118px;
  line-height: 0;
}

.cmm-logo-link img {
  display: block;
  width: 118px;
  height: auto;
}

.cmm-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 38px);
}

.cmm-nav--right { justify-content: flex-end; }

.cmm-nav a,
.cmm-more summary {
  position: relative;
  color: var(--cmm-ink);
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}

.cmm-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -9px;
  height: 1px;
  background: var(--cmm-ink);
  transition: right 180ms ease;
}

.cmm-nav a:hover::after,
.cmm-nav a:focus-visible::after { right: 0; }
.cmm-more summary::-webkit-details-marker { display: none; }
.cmm-more { position: relative; }
.cmm-more summary::after { content: "⌄"; margin-left: 6px; }

.cmm-more-menu {
  position: absolute;
  top: calc(100% + 16px);
  right: -18px;
  min-width: 190px;
  padding: 12px;
  background: var(--cmm-white);
  border: 1px solid var(--cmm-border);
  box-shadow: var(--cmm-shadow);
}

.cmm-more-menu a {
  display: block;
  padding: 9px 10px;
}

.cmm-icon-link {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.cmm-icon-link svg { width: 21px; height: 21px; stroke: currentColor; }

.cmm-mobile-menu { display: none; }

.cmm-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(570px, 70vw, 760px);
  overflow: hidden;
  background: var(--cmm-navy);
}

.cmm-hero-slides,
.cmm-hero-slide,
.cmm-hero-scrim {
  position: absolute;
  inset: 0;
}

.cmm-hero-slide {
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  animation: cmmHero 30s infinite;
}

.cmm-hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cmm-hero-slide:nth-child(1) { animation-delay: 0s; }
.cmm-hero-slide:nth-child(2) { animation-delay: 6s; }
.cmm-hero-slide:nth-child(3) { animation-delay: 12s; }
.cmm-hero-slide:nth-child(4) { animation-delay: 18s; }
.cmm-hero-slide:nth-child(5) { animation-delay: 24s; }

@keyframes cmmHero {
  0%, 16% { opacity: 1; transform: scale(1); }
  20%, 96% { opacity: 0; transform: scale(1.025); }
  100% { opacity: 1; }
}

.cmm-hero-scrim {
  z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,.16), rgba(0,0,0,.25) 50%, rgba(0,0,0,.46));
}

.cmm-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  width: min(calc(100% - 80px), 1180px);
  min-height: clamp(570px, 70vw, 760px);
  margin-inline: auto;
  color: var(--cmm-white);
  text-align: right;
}

.cmm-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(52px, 7.5vw, 98px);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0,0,0,.32);
}

.cmm-hero-tagline {
  margin: 24px 0 36px;
  font-size: clamp(20px, 2.2vw, 31px);
  font-style: italic;
}

.cmm-button-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 22px; }

.cmm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 32px;
  border: 1px solid transparent;
  background: var(--cmm-cream);
  color: var(--cmm-ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.cmm-button:hover,
.cmm-button:focus-visible { transform: translateY(-2px); background: var(--cmm-white); }
.cmm-button--outline { border-color: var(--cmm-white); background: transparent; color: var(--cmm-white); }
.cmm-button--outline:hover { background: var(--cmm-white); color: var(--cmm-navy); }
.cmm-button--navy { background: var(--cmm-navy); color: var(--cmm-white); }
.cmm-button--navy:hover { background: var(--cmm-navy-light); color: var(--cmm-white); }

.cmm-native-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 32px;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--cmm-cream);
  color: var(--cmm-ink);
  font-family: "Lora", Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}

.cmm-native-button .wp-block-button__link:hover,
.cmm-native-button .wp-block-button__link:focus-visible { background: var(--cmm-white); }
.cmm-native-button--navy .wp-block-button__link { background: var(--cmm-navy); color: var(--cmm-white); }
.cmm-native-button--navy .wp-block-button__link:hover { background: var(--cmm-navy-light); color: var(--cmm-white); }

.cmm-promo {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 48px 24px;
  background:
    linear-gradient(rgba(13,23,74,.72), rgba(13,23,74,.72)),
    url("assets/images/ref-hero-firing.jpg") center 42% / cover;
  color: var(--cmm-white);
  text-align: center;
}

.cmm-promo h2 { max-width: 850px; margin: 0; font-size: clamp(28px, 4vw, 48px); }
.cmm-promo h2 a { color: inherit; text-decoration: none; }

.cmm-native-page { margin: 0; }
.cmm-native-page > * { margin-block-start: 0; }

.cmm-section { padding: clamp(72px, 9vw, 118px) 0; }
.cmm-section--cream { background: var(--cmm-cream-light); }
.cmm-section--navy { background: var(--cmm-navy); color: var(--cmm-white); }

.cmm-section-title {
  margin: 0 0 42px;
  font-size: clamp(36px, 4.2vw, 52px);
}

.cmm-section-title::after {
  content: "";
  display: block;
  width: 86px;
  height: 1px;
  margin-top: 24px;
  background: currentColor;
  opacity: .55;
}

.cmm-lead { font-size: clamp(19px, 2vw, 23px); line-height: 1.75; }
.cmm-welcome { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); gap: clamp(46px, 8vw, 110px); align-items: start; }
.cmm-welcome p { margin-top: 0; }

.cmm-about-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.cmm-card {
  padding: 34px 30px;
  border-top: 2px solid var(--cmm-navy);
  background: var(--cmm-white);
  box-shadow: 0 8px 28px rgba(13,23,74,.08);
}

.cmm-card h3 { margin: 0 0 18px; font-size: 21px; }
.cmm-card p { margin: 0 0 20px; color: #47423e; }
.cmm-text-link { font-weight: 700; text-underline-offset: 5px; }

.cmm-events-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cmm-event { padding: 28px; border: 1px solid var(--cmm-border); background: var(--cmm-white); }
.cmm-event-date { margin: 0 0 16px; color: var(--cmm-navy-light); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cmm-event h3 { margin: 0 0 14px; font-size: 24px; }
.cmm-event p { margin: 0; color: var(--cmm-muted); }
.cmm-events-action { margin-top: 34px; }

.cmm-join-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 60px; align-items: center; }
.cmm-join-grid .cmm-section-title { margin-bottom: 24px; }

.cmm-gallery {
  display: grid;
  grid-template-columns: 1.35fr .65fr .65fr;
  grid-template-rows: 250px 250px;
  gap: 12px;
}

.cmm-gallery > img,
.cmm-gallery > figure { width: 100%; height: 100%; margin: 0; }
.cmm-gallery > img,
.cmm-gallery > figure img { width: 100%; height: 100%; object-fit: cover; }
.cmm-gallery > img:first-child,
.cmm-gallery > figure:first-child { grid-row: 1 / span 2; }

.cmm-support-grid { display: grid; grid-template-columns: 1fr auto; gap: 70px; align-items: center; }
.cmm-support-grid .cmm-section-title { margin-bottom: 22px; }

.cmm-countdown { text-align: center; }
.cmm-countdown .cmm-section-title::after { margin-inline: auto; }
.cmm-countdown-numbers { display: flex; justify-content: center; gap: clamp(16px, 4vw, 50px); margin-top: 42px; }
.cmm-countdown-item { min-width: 110px; }
.cmm-countdown-number { display: block; font-family: "Cinzel", Georgia, serif; font-size: clamp(42px, 6vw, 76px); line-height: 1; }
.cmm-countdown-label { display: block; margin-top: 10px; color: var(--cmm-muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }

.cmm-contact-grid { display: grid; grid-template-columns: 1fr auto; gap: 70px; align-items: center; }
.cmm-contact-grid .cmm-section-title { margin-bottom: 20px; }

.cmm-site-footer {
  padding: 58px 24px 40px;
  background: var(--cmm-ink);
  color: var(--cmm-white);
  text-align: center;
}

.cmm-footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; margin-bottom: 26px; }
.cmm-footer-nav a { text-decoration: none; }
.cmm-footer-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.cmm-footer-social { margin-bottom: 24px; }
.cmm-footer-social a { display: inline-flex; gap: 8px; align-items: center; }
.cmm-footer-copy { margin: 6px 0; color: rgba(255,255,255,.75); font-size: 14px; }

.cmm-page-shell {
  width: min(calc(100% - 48px), var(--cmm-content));
  min-height: 55vh;
  padding: clamp(64px, 8vw, 110px) 0;
  margin-inline: auto;
}

.cmm-page-shell > .wp-block-post-title {
  margin: 0 0 28px;
  color: var(--cmm-navy);
  font-size: clamp(42px, 5vw, 68px);
  text-transform: uppercase;
}

.cmm-page-shell > .wp-block-separator { width: 100%; margin: 0 0 42px; border-color: var(--cmm-border); }
.cmm-page-shell .wp-block-post-content { font-size: 18px; }
.cmm-page-shell .wp-block-post-content > * { max-width: 860px; margin-inline: auto; }
.cmm-page-shell .wp-block-post-content > .alignwide { max-width: var(--cmm-content); }
.cmm-page-shell .wp-block-post-content > .alignfull { max-width: none; }

.cmm-post-list { width: min(calc(100% - 48px), var(--cmm-content)); padding: 80px 0; margin-inline: auto; }

.cmm-inner-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(340px, 42vw, 520px);
  padding: 76px 24px;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  color: var(--cmm-white);
  text-align: center;
}

.cmm-inner-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(13,23,74,.78), rgba(13,23,74,.56));
}

.cmm-inner-hero--events { background-image: url("assets/images/ref-hero-xmas.jpg"); }
.cmm-inner-hero--join { background-image: url("assets/images/ref-hero-group.jpg"); }
.cmm-inner-hero--hire { background-image: url("assets/images/ref-hero-firing.jpg"); }
.cmm-inner-hero--contact { background-image: url("assets/images/bridge.jpg"); }

.cmm-inner-hero h1 {
  max-width: 1050px;
  margin: 0;
  font-size: clamp(42px, 6.3vw, 78px);
  text-shadow: 0 3px 20px rgba(0,0,0,.35);
  text-wrap: balance;
}

.cmm-inner-hero h1::after {
  content: "";
  display: block;
  width: 100px;
  height: 1px;
  margin: 28px auto 0;
  background: currentColor;
  opacity: .7;
}

.cmm-content-section { padding: clamp(68px, 8vw, 108px) 0; }
.cmm-content-section--cream { background: var(--cmm-cream-light); }
.cmm-content-section--navy { background: var(--cmm-navy); color: var(--cmm-white); }
.cmm-content-narrow { width: min(calc(100% - 48px), 880px); margin-inline: auto; }
.cmm-content-wide { width: min(calc(100% - 48px), var(--cmm-content)); margin-inline: auto; }
.cmm-content-narrow > :first-child,
.cmm-content-wide > :first-child { margin-top: 0; }
.cmm-content-narrow > :last-child,
.cmm-content-wide > :last-child { margin-bottom: 0; }
.cmm-content-narrow h2,
.cmm-content-wide h2 { margin: 1.8em 0 .7em; color: var(--cmm-navy); font-size: clamp(30px, 4vw, 44px); }
.cmm-content-section--navy h2 { color: var(--cmm-white); }
.cmm-content-narrow h3,
.cmm-content-wide h3 { margin: 1.7em 0 .55em; font-size: clamp(23px, 2.8vw, 30px); }
.cmm-content-narrow p,
.cmm-content-wide p { margin: 0 0 1.45em; }
.cmm-content-narrow ul,
.cmm-content-wide ul { padding-left: 1.2em; }
.cmm-content-narrow li,
.cmm-content-wide li { margin-bottom: .72em; }

.cmm-intro {
  font-size: clamp(20px, 2.2vw, 25px);
  font-style: italic;
  line-height: 1.75;
  text-align: center;
}

.cmm-feature-grid,
.cmm-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cmm-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cmm-feature-card,
.cmm-price-card,
.cmm-price-grid > .wp-block-column {
  height: 100%;
  padding: 34px 30px;
  border-top: 2px solid var(--cmm-navy);
  background: var(--cmm-white);
  box-shadow: 0 8px 28px rgba(13,23,74,.08);
}

.cmm-feature-card h3,
.cmm-price-card h3,
.cmm-price-grid > .wp-block-column h3 { margin: 0 0 14px; color: var(--cmm-navy); font-size: 22px; }
.cmm-price { margin: 0 0 18px; color: var(--cmm-navy); font-family: "Cinzel", Georgia, serif; font-size: 24px; }
.cmm-feature-card p,
.cmm-price-card p,
.cmm-price-card ul { margin-bottom: 0; }

.cmm-callout {
  padding: clamp(36px, 6vw, 66px);
  background: var(--cmm-navy);
  color: var(--cmm-white);
  text-align: center;
}

.cmm-callout h2 { margin: 0 0 20px; color: inherit; }
.cmm-callout p { margin-inline: auto; max-width: 760px; }
.cmm-callout .cmm-button { margin-top: 12px; }

.cmm-embed-wrap {
  width: min(calc(100% - 32px), 1180px);
  margin-inline: auto;
  padding: 14px;
  background: var(--cmm-white);
  border: 1px solid var(--cmm-border);
  box-shadow: var(--cmm-shadow);
}

.cmm-calendar-frame,
.cmm-form-frame {
  display: block;
  width: 100%;
  border: 0;
  background: var(--cmm-white);
}

.cmm-calendar-frame { height: min(78vh, 820px); min-height: 620px; }
.cmm-form-frame { height: 1240px; }

.cmm-contact-note {
  width: min(calc(100% - 48px), 760px);
  margin: 0 auto 42px;
  text-align: center;
}

.cmm-contact-note h2 { margin: 0 0 18px; color: var(--cmm-navy); }
.cmm-contact-note p { margin: 0; }

@media (max-width: 1050px) {
  .cmm-header-inner { grid-template-columns: 1fr auto; min-height: 112px; }
  .cmm-nav--left, .cmm-nav--right { display: none; }
  .cmm-logo-link { width: 94px; }
  .cmm-logo-link img { width: 94px; }
  .cmm-mobile-menu { display: block; justify-self: end; }
  .cmm-mobile-menu summary { padding: 12px 16px; border: 1px solid rgba(22,22,22,.35); cursor: pointer; list-style: none; }
  .cmm-mobile-menu summary::-webkit-details-marker { display: none; }
  .cmm-mobile-panel { position: absolute; top: 100%; left: 0; right: 0; display: grid; gap: 4px; padding: 22px 30px 28px; background: var(--cmm-cream); border-top: 1px solid var(--cmm-border); box-shadow: var(--cmm-shadow); }
  .cmm-mobile-panel a { padding: 9px 0; color: var(--cmm-ink); text-decoration: none; }
  .cmm-about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cmm-events-grid { grid-template-columns: 1fr; }
  .cmm-price-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body.admin-bar .cmm-site-header { top: 46px; }
  .cmm-container { width: min(calc(100% - 32px), var(--cmm-content)); }
  .cmm-header-inner { width: calc(100% - 32px); }
  .cmm-hero, .cmm-hero-content { min-height: 610px; }
  .cmm-hero-content { width: calc(100% - 36px); align-items: flex-start; justify-content: flex-end; padding-bottom: 70px; text-align: left; }
  .cmm-hero h1 { font-size: clamp(42px, 13vw, 62px); }
  .cmm-button-row { justify-content: flex-start; }
  .cmm-welcome, .cmm-join-grid, .cmm-support-grid, .cmm-contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .cmm-about-grid { grid-template-columns: 1fr; }
  .cmm-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 280px 180px 180px; }
  .cmm-gallery > img:first-child,
  .cmm-gallery > figure:first-child { grid-column: 1 / span 2; grid-row: auto; }
  .cmm-countdown-numbers { display: grid; grid-template-columns: 1fr 1fr; }
  .cmm-countdown-item { min-width: 0; }
  .cmm-content-narrow, .cmm-content-wide { width: min(calc(100% - 32px), var(--cmm-content)); }
  .cmm-feature-grid, .cmm-price-grid { grid-template-columns: 1fr; }
  .cmm-calendar-frame { min-height: 560px; }
  .cmm-form-frame { height: 1380px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cmm-hero-slide { animation: none; opacity: 0; transform: none; }
  .cmm-hero-slide:first-child { opacity: 1; }
  .cmm-button { transition: none; }
}
