/**
 * Global editorial blocks and patterns for editor-owned pages.
 *
 * Theme responsibility:
 * - reusable page/header hero for Gutenberg pages
 * - shared CTA/button styling for editorial blocks
 * - no page-template dependency
 */

.wp-block-cover.goe-editorial-hero,
.goe-editorial-hero {
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--goe-section-space-lg, clamp(3rem, 8vw, 5rem)) * 1.15);
  color: var(--goe-editorial-on-accent, #ffffff);
  background:
    radial-gradient(circle at top right, var(--goe-editorial-accent-glow, rgba(45, 106, 79, 0.18)), transparent 32%),
    linear-gradient(135deg, var(--goe-editorial-accent-start, rgba(12, 37, 24, 0.96)) 0%, var(--goe-editorial-accent-end, rgba(23, 54, 37, 0.88)) 100%);
}

.goe-editorial-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: clamp(2rem, 7vw, 5rem);
  background: linear-gradient(180deg, rgba(12, 37, 24, 0) 0%, rgba(12, 37, 24, 0.16) 100%);
  pointer-events: none;
}

.wp-block-cover.goe-editorial-hero > .wp-block-cover__background {
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.wp-block-cover.goe-editorial-hero > .wp-block-cover__image-background {
  object-fit: cover;
  object-position: center center;
}

.wp-block-cover.goe-editorial-hero > .wp-block-cover__inner-container {
  width: 100%;
}

.goe-editorial-hero__inner {
  position: relative;
  z-index: 1;
}

.goe-editorial-hero__inner > .wp-block-group__inner-container,
.goe-editorial-hero__inner {
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
}

.goe-editorial-eyebrow {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.goe-editorial-hero__title {
  margin: 0;
  max-width: min(var(--goe-title-width, 14ch), 10ch);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: inherit;
}

.goe-editorial-hero__lead {
  margin: 0;
  max-width: 58ch;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.goe-editorial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.goe-editorial-actions .wp-block-button {
  margin: 0;
}

.goe-editorial-actions .wp-block-button__link {
  min-height: 3.15rem;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.goe-editorial-actions .wp-block-button__link:hover,
.goe-editorial-actions .wp-block-button__link:focus-visible {
  transform: translateY(-1px);
}

.goe-editorial-button--primary .wp-block-button__link {
  color: #ffffff;
  border: 1px solid transparent;
  background: var(--goe-primary, #2d6a4f);
}

.goe-editorial-button--primary .wp-block-button__link:hover,
.goe-editorial-button--primary .wp-block-button__link:focus-visible {
  background: var(--goe-primary-dark, #1f4e39);
}

.goe-editorial-button--secondary .wp-block-button__link {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
}

.goe-editorial-button--secondary .wp-block-button__link:hover,
.goe-editorial-button--secondary .wp-block-button__link:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 760px) {
  .goe-editorial-actions {
    display: grid;
  }

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

.goe-editorial-band {
  padding-block: var(--goe-section-space, clamp(2rem, 5vw, 3.5rem));
}

.goe-editorial-band--spacious {
  padding-block: var(--goe-section-space-lg, clamp(3rem, 8vw, 5rem));
}

.goe-editorial-band--contact {
  overflow: clip;
}

.goe-editorial-band--surface {
  background:
    linear-gradient(180deg, var(--goe-editorial-surface-start, rgba(244, 246, 241, 0.92)) 0%, var(--goe-editorial-surface-end, rgba(255, 255, 255, 0.98)) 100%);
}

.goe-editorial-band--accent {
  color: var(--goe-editorial-on-accent, #ffffff);
  background:
    radial-gradient(circle at top right, var(--goe-editorial-accent-glow, rgba(45, 106, 79, 0.15)), transparent 28%),
    linear-gradient(135deg, var(--goe-editorial-accent-start, rgba(12, 37, 24, 0.98)) 0%, var(--goe-editorial-accent-end, rgba(23, 54, 37, 0.94)) 100%);
}

.goe-editorial-split > .wp-block-group__inner-container,
.goe-editorial-contact > .wp-block-group__inner-container {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.goe-editorial-split__columns,
.goe-editorial-contact__columns {
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.goe-editorial-title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2rem, 4.8vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--goe-text, #1a2e1a);
}

.goe-editorial-title--light {
  color: var(--goe-editorial-on-accent, #ffffff);
}

.goe-editorial-copy {
  margin: 0;
  max-width: 62ch;
  line-height: 1.72;
  color: var(--goe-editorial-copy-color, rgba(26, 46, 26, 0.86));
}

.goe-editorial-copy--light {
  color: var(--goe-editorial-copy-light, rgba(255, 255, 255, 0.88));
}

.goe-editorial-eyebrow--dark {
  color: var(--goe-editorial-eyebrow-dark, rgba(26, 46, 26, 0.54));
}

.goe-editorial-frame {
  overflow: hidden;
  border-radius: clamp(1rem, 2vw, 1.5rem);
  box-shadow: 0 22px 56px rgba(14, 35, 23, 0.14);
}

.goe-editorial-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.goe-editorial-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.goe-editorial-checklist li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.6;
}

.goe-editorial-checklist li::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 0;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--goe-primary, #2d6a4f);
  box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--goe-primary, #2d6a4f) 14%, transparent);
}

.goe-editorial-actions--stack {
  align-items: stretch;
}

.goe-editorial-contact {
  position: relative;
}

.goe-editorial-contact::after {
  content: "";
  position: absolute;
  inset: auto 0 -1.2rem auto;
  width: clamp(9rem, 16vw, 14rem);
  height: clamp(9rem, 16vw, 14rem);
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--goe-primary, #2d6a4f) 22%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

.goe-editorial-meta {
  margin: 0;
  line-height: 1.7;
  color: color-mix(in srgb, var(--goe-editorial-on-accent, #ffffff) 90%, transparent);
}

.goe-editorial-meta a {
  color: inherit;
}

.goe-editorial-stack {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.goe-editorial-columns {
  gap: clamp(1.25rem, 3vw, 2rem);
}

.goe-editorial-card {
  height: 100%;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--goe-editorial-card-border, rgba(26, 46, 26, 0.08));
  border-radius: clamp(1rem, 2vw, 1.5rem);
  background: var(--goe-editorial-card-bg, rgba(255, 255, 255, 0.96));
  box-shadow: var(--goe-editorial-card-shadow, 0 18px 48px rgba(14, 35, 23, 0.08));
}

.goe-editorial-card > *:first-child {
  margin-top: 0;
}

.goe-editorial-card > *:last-child {
  margin-bottom: 0;
}

.goe-editorial-card--dark {
  border-color: color-mix(in srgb, var(--goe-editorial-on-accent, #ffffff) 8%, transparent);
  background: color-mix(in srgb, var(--goe-editorial-on-accent, #ffffff) 8%, transparent);
  color: var(--goe-editorial-on-accent, #ffffff);
  box-shadow: none;
}

.goe-editorial-card--dark :where(.goe-editorial-title, .goe-editorial-copy, .goe-editorial-meta, a) {
  color: inherit;
}

.goe-editorial-card--soft {
  background: linear-gradient(180deg, var(--goe-editorial-card-bg-soft-start, rgba(244, 246, 241, 0.94)) 0%, var(--goe-editorial-card-bg-soft-end, rgba(255, 255, 255, 0.98)) 100%);
}

.goe-editorial-card__media {
  margin-bottom: 1rem;
}

.goe-editorial-card__media:last-child {
  margin-bottom: 0;
}

.goe-editorial-card__media .wp-block-image,
.goe-editorial-card__media figure {
  margin: 0;
}

.goe-editorial-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: clamp(0.9rem, 2vw, 1.25rem);
}

.goe-editorial-shortcode {
  display: grid;
  gap: 1rem;
}

.goe-editorial-shortcode > * {
  margin-block: 0;
}

.goe-editorial-quote {
  position: relative;
  display: grid;
  gap: 1rem;
}

.goe-editorial-quote::before {
  content: '"';
  position: absolute;
  top: -0.4rem;
  left: -0.02em;
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
  color: rgba(229, 188, 91, 0.22);
  pointer-events: none;
}

.goe-editorial-quote > * {
  position: relative;
  z-index: 1;
}

.goe-editorial-quote p {
  margin: 0;
  max-width: 70ch;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.8;
}

.goe-editorial-logo {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.goe-editorial-logo figure,
.goe-editorial-logo .wp-block-image {
  margin: 0;
}

.goe-editorial-logo img {
  width: auto;
  max-width: min(11rem, 100%);
  max-height: 4rem;
  object-fit: contain;
}

.goe-editorial-pillars .wp-block-column,
.goe-editorial-team .wp-block-column {
  display: flex;
}

.goe-editorial-pillars .goe-editorial-card,
.goe-editorial-team .goe-editorial-card {
  width: 100%;
}

.goe-editorial-anchor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.goe-editorial-anchor-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(26, 46, 26, 0.12);
  border-radius: 999px;
  color: var(--goe-text, #1a2e1a);
  background: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.goe-editorial-anchor-links a:hover,
.goe-editorial-anchor-links a:focus-visible {
  border-color: rgba(45, 106, 79, 0.22);
  background: rgba(255, 255, 255, 1);
}

.goe-editorial-form-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid rgba(26, 46, 26, 0.08);
  border-radius: clamp(1rem, 2vw, 1.5rem);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(14, 35, 23, 0.08);
}

.goe-editorial-note {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(26, 46, 26, 0.72);
}

@media (max-width: 781px) {
  .goe-editorial-anchor-links {
    display: grid;
  }

  .goe-editorial-anchor-links a {
    width: 100%;
  }
}
