/*
Theme Name: Spiritual America
Theme URI: https://spiritualamericanyc.com/
Author: Spiritual America
Description: Own block theme for spiritualamericanyc.com — "Signal Grid" design system: concrete-grey fields, cobalt-blue ink, a single safety-yellow accent used only as a fill, zero corner radius, 3px black rules instead of shadows, Archivo Black / Archivo type pairing. The boldest, most graphic identity in the network — municipal signage, not a candlelit parlor.
Requires at least: 6.5
Requires PHP: 7.4
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Text Domain: sa-theme
*/

/* Fallback rules for browsers/contexts that don't read theme.json-generated CSS
   (defensive only — WordPress generates the real presets from theme.json). */
body {
  background-color: #ECECE8;
  color: #141414;
}
a { text-decoration: underline; }
.legal-links-row a { text-decoration: underline; }
.wp-block-button__link { border-radius: 0 !important; border: 3px solid #141414 !important; }
.wp-block-group.sa-footer a { color: inherit; }
.wp-block-image img { border-radius: 0 !important; }
.sa-tag { display:inline-block; background:#FFD400; color:#141414; font-family:"Archivo Black",Arial,sans-serif; text-transform:uppercase; font-size:0.8rem; padding:0.25rem 0.6rem; }

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.wp-site-blocks {
  background:
    linear-gradient(90deg, rgba(20, 20, 20, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 20, 20, 0.04) 1px, transparent 1px),
    #ECECE8;
  background-size: 48px 48px;
}

.wp-site-blocks > header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.wp-site-blocks > header > .wp-block-group {
  box-shadow: 0 10px 0 rgba(20, 20, 20, 0.06);
}

.wp-site-blocks > header .wp-block-site-title,
.wp-site-blocks > footer .wp-block-site-title {
  white-space: nowrap;
}

.wp-site-blocks > header .wp-block-navigation a {
  text-decoration: none;
}

.wp-site-blocks > header .wp-block-navigation a:hover {
  background: #FFD400;
  color: #141414;
}

.wp-block-button__link {
  box-shadow: 7px 7px 0 #141414;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.wp-block-button__link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 #141414;
}

.wp-block-button__link:active {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #141414;
}

.wp-site-blocks > .wp-block-group:nth-of-type(1) {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 3px solid #141414;
  background:
    linear-gradient(90deg, rgba(255, 212, 0, 0.16) 0 12px, transparent 12px 100%),
    #ECECE8 !important;
}

.wp-site-blocks > .wp-block-group:nth-of-type(1)::before {
  content: "";
  position: absolute;
  inset: 28px auto auto max(22px, calc((100vw - 1120px) / 2));
  width: min(34vw, 360px);
  height: 3px;
  background: #141414;
  box-shadow: 0 94px 0 #141414, 0 188px 0 #141414, 0 282px 0 #141414;
  opacity: 0.28;
}

.wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-group:first-child,
.wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-buttons {
  position: relative;
  z-index: 2;
  max-width: 610px;
  margin-left: max(0px, calc((100vw - 1120px) / 2)) !important;
  margin-right: auto !important;
}

.wp-site-blocks > .wp-block-group:nth-of-type(1) h1,
.wp-site-blocks > .wp-block-group:nth-of-type(1) p {
  text-align: left;
}

.wp-site-blocks > .wp-block-group:nth-of-type(1) h1 {
  max-width: 11ch;
  font-size: clamp(3.1rem, 7vw, 6.9rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.wp-site-blocks > .wp-block-group:nth-of-type(1) .has-superbfont-small-font-size {
  max-width: 58ch;
}

.wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-group:last-child {
  position: absolute;
  z-index: 1;
  top: 96px;
  right: max(22px, calc((100vw - 1180px) / 2));
  bottom: 58px;
  width: min(52vw, 690px);
  margin: 0 !important;
}

.wp-site-blocks > .wp-block-group:nth-of-type(1) figure {
  position: static;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  border: 3px solid #141414;
  background: #141414;
  box-shadow: 16px 16px 0 #FFD400;
}

.wp-site-blocks > .wp-block-group:nth-of-type(1) figure img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

.wp-site-blocks > .wp-block-group:nth-of-type(2),
.wp-site-blocks > .wp-block-group:nth-of-type(3) {
  border-bottom: 3px solid #141414;
}

.wp-site-blocks > .wp-block-group:nth-of-type(2) > .wp-block-group,
.wp-site-blocks > .wp-block-group:nth-of-type(3) > .wp-block-group {
  max-width: 920px !important;
  padding-left: clamp(18px, 4vw, 48px);
  border-left: 12px solid #FFD400;
}

.wp-site-blocks > .wp-block-group:nth-of-type(2) p,
.wp-site-blocks > .wp-block-group:nth-of-type(3) p,
.wp-site-blocks > .wp-block-group:nth-of-type(3) h3 {
  text-align: left;
}

.wp-site-blocks > .wp-block-group:nth-of-type(n+4) {
  border-bottom: 3px solid #141414;
}

.wp-site-blocks > .wp-block-group:nth-of-type(n+4) > h2,
.wp-site-blocks > .wp-block-group:nth-of-type(n+4) > p {
  text-align: left;
  margin-left: max(0px, calc((100vw - 1120px) / 2));
  margin-right: auto;
}

.wp-site-blocks > .wp-block-group:nth-of-type(n+4) > h2 {
  max-width: 720px;
  font-size: clamp(2rem, 4.5vw, 4.1rem);
  line-height: 0.95;
}

.wp-site-blocks > .wp-block-group:nth-of-type(n+4) > p {
  max-width: 760px;
}

.wp-block-columns.alignwide {
  gap: clamp(18px, 3vw, 32px);
}

.wp-block-column[style*="border-width:3px"],
.wp-site-blocks > .wp-block-group:nth-of-type(12) .wp-block-group[style*="border-top"] {
  transition: transform 160ms ease, background-color 160ms ease;
}

.wp-block-column[style*="border-width:3px"]:hover {
  transform: translate(-4px, -4px);
}

.wp-block-column .wp-block-image img {
  image-rendering: auto;
}

.wp-site-blocks > .wp-block-group:nth-of-type(5) .wp-block-column {
  border: 3px solid #141414;
  background: #FFFFFF;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 8px 8px 0 #0047AB;
}

.wp-site-blocks > .wp-block-group:nth-of-type(7) {
  background:
    linear-gradient(135deg, #0A0A0A 0 52%, #0047AB 52% 100%) !important;
}

.wp-site-blocks > .wp-block-group:nth-of-type(7) h3,
.wp-site-blocks > .wp-block-group:nth-of-type(7) p {
  color: #ECECE8 !important;
}

.wp-site-blocks > .wp-block-group:nth-of-type(10) .wp-block-group[style*="border-width:3px 0"] {
  background: #FFD400;
  padding-left: clamp(20px, 4vw, 44px) !important;
  padding-right: clamp(20px, 4vw, 44px) !important;
}

.wp-site-blocks > .wp-block-group:nth-of-type(12) .wp-block-group[style*="border-top"] {
  background: #ECECE8;
  padding-left: clamp(18px, 3vw, 32px);
  padding-right: clamp(18px, 3vw, 32px);
}

.wp-site-blocks > .wp-block-group:nth-of-type(12) .wp-block-group[style*="border-top"]:hover {
  background: #FFFFFF;
}

.wp-site-blocks > .wp-block-group:nth-of-type(13) {
  position: relative;
  overflow: hidden;
}

.wp-site-blocks > .wp-block-group:nth-of-type(13)::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -48px;
  width: min(38vw, 420px);
  aspect-ratio: 1;
  border: 3px solid #ECECE8;
  background:
    linear-gradient(90deg, transparent 48%, #FFD400 48% 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, #FFD400 48% 52%, transparent 52%);
  opacity: 0.45;
}

.wp-site-blocks > .wp-block-group:nth-of-type(13) > .wp-block-group {
  position: relative;
  z-index: 2;
}

@media (max-width: 1120px) and (min-width: 981px) {
  .wp-site-blocks > .wp-block-group:nth-of-type(1) h1 {
    max-width: 10.5ch;
    font-size: clamp(3.3rem, 5.4vw, 4rem);
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-group:first-child,
  .wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-buttons {
    max-width: 500px !important;
    width: min(500px, 49vw);
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-group:last-child {
    top: 118px;
    bottom: 72px;
    width: 45vw;
  }
}

@media (max-width: 980px) {
  .wp-site-blocks > header .wp-block-columns {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 14px;
  }

  .wp-site-blocks > header .wp-block-column:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .wp-site-blocks > header .wp-block-column:nth-child(1),
  .wp-site-blocks > header .wp-block-column:nth-child(2),
  .wp-site-blocks > header .wp-block-column:nth-child(3) {
    flex-basis: auto !important;
  }

  .wp-site-blocks > header .wp-block-navigation {
    justify-content: flex-start !important;
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) {
    min-height: 0;
    padding-top: clamp(42px, 9vw, 72px) !important;
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-group:first-child,
  .wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-buttons {
    max-width: 100%;
    margin-left: 0;
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) h1 {
    max-width: 100%;
    font-size: clamp(2.8rem, 14vw, 5rem);
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-group:last-child {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 360px;
    margin-top: 36px !important;
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) figure {
    box-shadow: 10px 10px 0 #FFD400;
  }
}

@media (max-width: 640px) {
  .wp-site-blocks {
    background-size: 32px 32px;
  }

  .wp-site-blocks > header {
    position: relative;
  }

  .wp-site-blocks > header .wp-block-columns {
    grid-template-columns: 1fr;
  }

  .wp-site-blocks > header .wp-block-column:nth-child(3) .wp-block-buttons {
    justify-content: flex-start !important;
  }

  .wp-block-button,
  .wp-block-button__link {
    width: 100%;
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) > .wp-block-group:last-child {
    height: 260px;
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) h1 {
    font-size: clamp(2.35rem, 10.5vw, 3rem);
    line-height: 0.96;
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(1) .has-superbfont-small-font-size {
    font-size: 17px !important;
    line-height: 1.55;
  }

  .wp-site-blocks > .wp-block-group:nth-of-type(n+4) > h2,
  .wp-site-blocks > .wp-block-group:nth-of-type(n+4) > p {
    margin-left: 0;
  }
}
