/*
Theme Name: Grateful Bread Child
Template: twentytwentyfour
Description: Custom child theme for Grateful Bread SCV — warm artisanal aesthetic
Version: 2.3
*/

/* ===== Global ===== */

body {
  background-color: #FAF7F2;
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6,
.wp-block-site-title {
  font-family: 'Josefin Sans', 'Helvetica Neue', sans-serif;
  letter-spacing: 0.08em;
  font-weight: 400;
  text-transform: uppercase;
}

h1 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 300; }
h2 { font-size: clamp(1rem, 2vw, 1.4rem); font-weight: 400; letter-spacing: 0.12em; }
h3 { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.06em; }

/* ===== Compact Header / Nav Bar ===== */

header .wp-block-group.alignwide.has-base-background-color {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

/* ===== All pages: kill template whitespace above content ===== */

/* Hide the entire template wrapper that holds spacer + post-title + featured-image */
main.wp-block-group > .wp-block-group:not(.wp-block-post-content) {
  display: none !important;
}

/* Remove gap/spacing from main layout */
main.wp-block-group {
  margin-top: 0 !important;
  padding-top: 0 !important;
  gap: 0 !important;
}

main.wp-block-group.is-layout-flow > * + * {
  margin-block-start: 0 !important;
}

/* Post content flush to top */
.wp-block-post-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Reduce top padding on each page's first content group — but NOT on homepage */
body:not(.page-home):not(.page-id-1322) .wp-block-post-content > .wp-block-group:first-child,
body:not(.page-home):not(.page-id-1322) .wp-block-post-content > div:first-child {
  padding-top: 0.8rem !important;
}

/* Contact page: override Spectra's 120px padding */
.page-contact .wp-block-post-content > [class*="wp-block-uagb"],
.page-contact .wp-block-post-content > [class*="spectra"],
.page-id-1328 .wp-block-post-content > .wp-block-group:first-child,
.page-id-1328 .wp-block-post-content > div:first-child {
  padding-top: 1rem !important;
}

/* ===== Homepage: hero flush against nav ===== */

.page-home .wp-block-post-content,
.page-id-1322 .wp-block-post-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.page-home .wp-block-post-content > .wp-block-group:first-child,
.page-id-1322 .wp-block-post-content > .wp-block-group:first-child {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.page-home .hero-image-section,
.page-id-1322 .hero-image-section {
  margin-top: 0 !important;
}

/* ===== Page title styling: handwriting font + watercolor borders ===== */

.page-menu .wp-block-post-content > .wp-block-group:first-child,
.page-recipes .wp-block-post-content > .wp-block-group:first-child,
.page-shop .wp-block-post-content > .wp-block-group:first-child,
.page-id-2864 .wp-block-post-content > .wp-block-group:first-child,
.page-id-2865 .wp-block-post-content > .wp-block-group:first-child,
.page-id-2858 .wp-block-post-content > .wp-block-group:first-child {
  padding-top: 1.5rem !important;
  padding-bottom: 1rem !important;
  position: relative;
  overflow: hidden;
}

/* Watercolor top-left corner */
.page-id-2864 .wp-block-post-content > .wp-block-group:first-child::before,
.page-id-2865 .wp-block-post-content > .wp-block-group:first-child::before,
.page-id-2858 .wp-block-post-content > .wp-block-group:first-child::before {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  width: 180px;
  height: 180px;
  background: radial-gradient(ellipse at 30% 30%,
    rgba(194, 169, 144, 0.15) 0%,
    rgba(194, 169, 144, 0.08) 30%,
    rgba(210, 180, 160, 0.05) 50%,
    transparent 70%
  );
  border-radius: 50% 60% 40% 50%;
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

/* Watercolor top-right corner */
.page-id-2864 .wp-block-post-content > .wp-block-group:first-child::after,
.page-id-2865 .wp-block-post-content > .wp-block-group:first-child::after,
.page-id-2858 .wp-block-post-content > .wp-block-group:first-child::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 150px;
  height: 150px;
  background: radial-gradient(ellipse at 60% 40%,
    rgba(115, 85, 56, 0.1) 0%,
    rgba(180, 150, 130, 0.06) 35%,
    rgba(200, 170, 150, 0.03) 55%,
    transparent 75%
  );
  border-radius: 40% 50% 60% 45%;
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

/* Page titles in handwriting font */
.page-id-2864 .wp-block-post-content h1.wp-block-heading,
.page-id-2865 .wp-block-post-content h1.wp-block-heading,
.page-id-2858 .wp-block-post-content h1.wp-block-heading {
  font-family: 'Betania Patmos', 'Dancing Script', cursive !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  font-size: clamp(1.6rem, 3vw, 2.2rem) !important;
  font-weight: 700 !important;
  color: #3D2B1F !important;
  position: relative;
  z-index: 1;
}

/* H2 subheadings also in handwriting */
.page-id-2864 .wp-block-post-content h2.wp-block-heading,
.page-id-2865 .wp-block-post-content h2.wp-block-heading,
.page-id-2858 .wp-block-post-content h2.wp-block-heading {
  font-family: 'Betania Patmos', 'Dancing Script', cursive !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem) !important;
  font-weight: 400 !important;
}

/* Watercolor bottom border on page header sections */
.page-id-2864 .wp-block-post-content > .wp-block-group:first-child > .wp-block-separator,
.page-id-2865 .wp-block-post-content > .wp-block-group:first-child > .wp-block-separator,
.page-id-2858 .wp-block-post-content > .wp-block-group:first-child > .wp-block-separator {
  width: 120px !important;
  border: none !important;
  height: 3px !important;
  background: linear-gradient(90deg,
    transparent,
    rgba(194, 169, 144, 0.5) 20%,
    rgba(115, 85, 56, 0.4) 50%,
    rgba(194, 169, 144, 0.5) 80%,
    transparent
  ) !important;
  opacity: 1 !important;
  filter: blur(0.5px);
}

/* Watercolor edge accents on main content area */
.page-id-2864 .wp-block-post-content > .wp-block-group:nth-child(2),
.page-id-2865 .wp-block-post-content > .wp-block-group:nth-child(2),
.page-id-2858 .wp-block-post-content > .wp-block-group:nth-child(2) {
  position: relative;
}

.page-id-2864 .wp-block-post-content > .wp-block-group:nth-child(2)::before,
.page-id-2865 .wp-block-post-content > .wp-block-group:nth-child(2)::before,
.page-id-2858 .wp-block-post-content > .wp-block-group:nth-child(2)::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 100px;
  background: radial-gradient(ellipse at center,
    rgba(194, 169, 144, 0.1) 0%,
    rgba(180, 150, 130, 0.05) 40%,
    transparent 70%
  );
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

/* Left and right edge watercolor washes */
.page-id-2864 .wp-block-post-content,
.page-id-2865 .wp-block-post-content,
.page-id-2858 .wp-block-post-content {
  position: relative;
}

.page-id-2864 .wp-block-post-content::before,
.page-id-2865 .wp-block-post-content::before,
.page-id-2858 .wp-block-post-content::before {
  content: '';
  position: fixed;
  top: 20%;
  left: -40px;
  width: 120px;
  height: 60vh;
  background: linear-gradient(180deg,
    transparent,
    rgba(194, 169, 144, 0.06) 20%,
    rgba(210, 185, 165, 0.08) 40%,
    rgba(194, 169, 144, 0.05) 60%,
    rgba(180, 160, 140, 0.03) 80%,
    transparent
  );
  filter: blur(15px);
  pointer-events: none;
  z-index: 0;
}

.page-id-2864 .wp-block-post-content::after,
.page-id-2865 .wp-block-post-content::after,
.page-id-2858 .wp-block-post-content::after {
  content: '';
  position: fixed;
  top: 30%;
  right: -40px;
  width: 100px;
  height: 50vh;
  background: linear-gradient(180deg,
    transparent,
    rgba(115, 85, 56, 0.04) 25%,
    rgba(194, 169, 144, 0.06) 50%,
    rgba(115, 85, 56, 0.03) 75%,
    transparent
  );
  filter: blur(15px);
  pointer-events: none;
  z-index: 0;
}

/* ===== Buttons ===== */

.wp-block-button__link,
.wp-element-button {
  background-color: #735538 !important;
  color: #FAF7F2 !important;
  border-radius: 0 !important;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-family: 'Josefin Sans', sans-serif;
  padding: 0.7rem 2rem;
  transition: all 0.3s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  background-color: #5a412a !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(115, 85, 56, 0.25);
}

/* Outline button */
.is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  color: #FAF7F2 !important;
  border: 1px solid rgba(255,255,255,0.6) !important;
}

.is-style-outline .wp-block-button__link:hover {
  background-color: rgba(255,255,255,0.1) !important;
  border-color: #fff !important;
}

/* ===== Full-bleed Hero with image background ===== */

.hero-image-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 10, 0.55);
  z-index: 1;
}

.hero-image-section > .wp-block-cover__inner-container,
.hero-image-section > div {
  position: relative;
  z-index: 2;
}

/* Chalk logo overlay */
.hero-logo-chalk img {
  max-width: 700px;
  width: 65vw;
  height: auto;
  opacity: 0.92;
  drop-shadow: 0 0 30px rgba(180, 160, 220, 0.3);
}

/* ===== Compact Sections ===== */

.alignfull {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* ===== Images ===== */

.wp-block-image img {
  border-radius: 2px;
  transition: transform 0.4s ease;
}

.wp-block-image:hover img {
  transform: scale(1.02);
}

.wp-block-gallery {
  gap: 4px !important;
}

.wp-block-gallery .wp-block-image img {
  border-radius: 0;
  box-shadow: none;
}

/* ===== Separator ===== */

.wp-block-separator {
  border-color: #C2A990 !important;
  opacity: 0.4;
  width: 60px !important;
  margin: 1.2rem auto !important;
}

/* ===== Navigation ===== */

.wp-block-navigation a {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 400;
  font-family: 'Josefin Sans', sans-serif;
  transition: color 0.3s ease;
}

/* ===== Footer ===== */

.site-footer,
footer.wp-block-template-part {
  background-color: #2C2C2C;
  color: #E8E0D6;
  padding: 3rem 2rem;
}

footer.wp-block-template-part a {
  color: #C2A990;
  transition: color 0.3s ease;
}

footer.wp-block-template-part a:hover {
  color: #FAF7F2;
}

footer.wp-block-template-part h2,
footer.wp-block-template-part h3,
footer.wp-block-template-part h4 {
  color: #FAF7F2;
}

/* ===== Product cards ===== */

.wp-block-column {
  transition: transform 0.3s ease;
}

.wp-block-columns .wp-block-column:hover {
  transform: translateY(-3px);
}

.wp-block-columns .wp-block-image img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

/* ===== Menu page item cards ===== */

.page-id-2864 .wp-block-columns .wp-block-column:has(h3) {
  border: 1px solid #E8E0D6;
  border-radius: 6px;
  padding: 1.2rem;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.page-id-2864 .wp-block-columns .wp-block-column:has(h3):hover {
  border-color: #C2A990;
  box-shadow: 0 4px 16px rgba(115, 85, 56, 0.12);
  transform: translateY(-4px);
}

.page-id-2864 .wp-block-columns .wp-block-column:has(h3)::after {
  content: '+';
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 26px;
  height: 26px;
  border: 1.5px solid #C2A990;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #C2A990;
  font-weight: 300;
  line-height: 1;
  transition: all 0.25s ease;
}

.page-id-2864 .wp-block-columns .wp-block-column:has(h3):hover::after {
  background-color: #735538;
  border-color: #735538;
  color: #FAF7F2;
}

/* ===== Quote ===== */

.wp-block-quote {
  border-left: 2px solid #C2A990;
  padding-left: 1.2rem;
  font-style: italic;
  color: #5a5a5a;
  font-size: 0.95rem;
}

.wp-block-quote cite {
  color: #735538;
  font-style: normal;
  font-weight: 600;
  font-size: 0.8rem;
}

/* ===== Dark band stats ===== */

.stats-band {
  background-color: #2C2C2C;
}

.stats-band p {
  margin: 0;
}

/* ===== Subtle entrance animation ===== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wp-block-group.alignfull {
  animation: fadeIn 0.5s ease-out;
}

/* ===== SureCart ===== */

.sc-product-card {
  border: none !important;
  border-radius: 2px !important;
  overflow: hidden;
}

/* ===== SureForms order form — selectable items ===== */

.srfm-multi-choice-single {
  border: 1.5px solid #E8E0D6 !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  margin-bottom: 0.5rem !important;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  background: #fff !important;
}

.srfm-multi-choice-single:hover {
  border-color: #C2A990 !important;
  background: #FAF7F2 !important;
  box-shadow: 0 2px 8px rgba(115, 85, 56, 0.08);
}

.srfm-multi-choice-single input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border: 2px solid #C2A990 !important;
  border-radius: 50% !important;
  background: #fff !important;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.srfm-multi-choice-single input[type="checkbox"]:checked {
  background: #735538 !important;
  border-color: #735538 !important;
}

.srfm-multi-choice-single input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.srfm-multi-choice-single input[type="checkbox"]:hover {
  border-color: #735538 !important;
}

.srfm-multi-choice-single label {
  cursor: pointer !important;
  font-size: 0.95rem !important;
  color: #3D2B1F !important;
  font-weight: 500 !important;
}

.srfm-multi-choice-single .srfm-icon-container {
  display: none !important;
}

.srfm-multi-choice-single:has(input:checked) {
  border-color: #735538 !important;
  background: #f5f0ea !important;
}

/* Blog page headshot circle */
.wp-image-2935 {
  display: block !important;
  width: 150px !important;
  height: 150px !important;
  max-width: 150px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 auto !important;
}
.wp-block-image:has(.wp-image-2935) {
  max-width: 150px !important;
  margin: 0 auto !important;
}
.wp-block-image:has(.wp-image-2935) img {
  width: 150px !important;
  height: 150px !important;
  object-fit: cover !important;
}
