.jsp-skip-link {
  position: absolute;
  inset: 8px auto auto 8px;
  z-index: 100000;
  padding: 10px 14px;
  color: #002f49;
  background: #f3ead2;
  transform: translateY(calc(-100% - 12px));
}

.jsp-skip-link:focus {
  outline: 3px solid #002f49;
  transform: none;
}

.jsp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.jsp-page-main {
  margin: 0;
}

.wp-block-site-title,
.jsp-display-quote,
.jsp-display-name,
.jsp-display-stat,
.jsp-display-kicker {
  font-family: var(--wp--preset--font-family--fontsecondary);
  line-height: 1.4;
}

.jsp-accent-link,
footer .has-mono-4-color {
  color: #ac4235 !important;
}

.jsp-contact-alternative a {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.jsp-carousel-controls:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 8px auto 0;
  padding-inline: 8px;
}

.jsp-carousel-controls button {
  min-height: 36px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  color: var(--wp--preset--color--primary);
  font: 600 14px/1.4 var(--wp--preset--font-family--fontprimary);
  cursor: pointer;
}

.jsp-carousel-controls button:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

/* Contact form (native copy of the Zoho Bigin "Contact Us" web form) */
.jsp-contact-form {
  --jsp-form-ink: #002f49;
  --jsp-form-accent: #b54739;
  --jsp-form-line: #b9ab88;
  --jsp-form-field: #fbf7ec;
  box-sizing: border-box;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 44px) clamp(18px, 5vw, 48px);
  border-top: 1px solid var(--jsp-form-line);
  color: var(--jsp-form-ink);
  font-family: var(--wp--preset--font-family--fontprimary);
}

.jsp-contact-form *,
.jsp-contact-form *::before,
.jsp-contact-form *::after {
  box-sizing: border-box;
}

.jsp-contact-form-title {
  margin: 0 0 6px;
  font-family: var(--wp--preset--font-family--fontsecondary);
  font-size: var(--wp--preset--font-size--superbfont-large);
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
}

.jsp-contact-form-note {
  margin: 0 0 28px;
  font-size: 15px;
  text-align: center;
  opacity: 0.85;
}

.jsp-contact-form .wf-form-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px 24px;
}

@media (min-width: 640px) {
  .jsp-contact-form .wf-form-wrapper {
    grid-template-columns: 1fr 1fr;
  }
  .jsp-contact-form .jsp-form-row-wide {
    grid-column: 1 / -1;
  }
}

.jsp-contact-form .wf-row {
  min-width: 0;
}

.jsp-contact-form .wf-label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.jsp-contact-form .jsp-form-required {
  color: var(--jsp-form-accent);
}

.jsp-contact-form .wf-field-input {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--jsp-form-line);
  border-radius: 6px;
  background: var(--jsp-form-field);
  color: var(--jsp-form-ink);
  font: 16px/1.5 var(--wp--preset--font-family--fontprimary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.jsp-contact-form .wf-text-area-input {
  min-height: 150px;
  resize: vertical;
}

.jsp-contact-form .wf-field-input:hover {
  border-color: var(--jsp-form-ink);
}

.jsp-contact-form .wf-field-input:focus {
  outline: none;
  border-color: var(--jsp-form-ink);
  box-shadow: 0 0 0 3px rgba(0, 47, 73, 0.2);
}

/* Error messages added by Bigin's validation script */
.jsp-contact-form .wf-field-error-active .wf-field-input {
  border-color: var(--jsp-form-accent);
  box-shadow: 0 0 0 1px var(--jsp-form-accent);
}

.jsp-contact-form .wf-error-parent-ele {
  margin-top: 6px;
}

.jsp-contact-form .wf-field-error {
  color: var(--jsp-form-accent);
  font-size: 14px;
  font-weight: 600;
}

.jsp-contact-form .wf-error-view-more {
  display: none;
}

.jsp-contact-form .g-recaptcha {
  max-width: 100%;
}

@media (max-width: 359px) {
  .jsp-contact-form .g-recaptcha {
    transform: scale(0.88);
    transform-origin: 0 0;
  }
}

.jsp-contact-form .wform-btn-wrap {
  margin-top: 4px;
}

.jsp-contact-form .wf-btn {
  display: inline-block;
  min-height: 48px;
  padding: 12px 32px;
  border: 2px solid var(--jsp-form-ink);
  border-radius: 6px;
  background: var(--jsp-form-ink);
  color: #f3ead2;
  font: 600 15px/1.4 var(--wp--preset--font-family--fontprimary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.jsp-contact-form .wf-btn:hover {
  border-color: var(--jsp-form-accent);
  background: var(--jsp-form-accent);
}

.jsp-contact-form .wf-btn:focus-visible {
  outline: 3px solid var(--jsp-form-ink);
  outline-offset: 3px;
}

.jsp-contact-form .wf-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 639px) {
  .jsp-contact-form .wf-btn {
    width: 100%;
  }
}

/* Header: show which page you are on */
header .wp-block-navigation-item__content[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: #b54739;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

header .wp-block-navigation-item__content:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.45em;
}

header .wp-block-button__link[aria-current="page"] {
  background-color: #b54739 !important;
  color: #f3ead2 !important;
}

/* Shared page intro: About, Programs, Donate, Contact */
.jsp-page-intro {
  box-sizing: border-box;
  max-width: 820px;
  margin: 0 auto !important;
  padding: clamp(40px, 6vw, 72px) 20px clamp(28px, 4vw, 44px);
  text-align: center;
  color: #002f49;
}

.jsp-page-intro-title {
  margin: 0 0 16px;
  color: #002f49;
  font-family: var(--wp--preset--font-family--fontsecondary);
  font-size: var(--wp--preset--font-size--superbfont-xlarge);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
}

.jsp-page-intro-text {
  max-width: 640px;
  margin: 0 auto;
  color: #002f49;
  font-family: var(--wp--preset--font-family--fontprimary);
  font-size: var(--wp--preset--font-size--superbfont-small);
  line-height: 1.6;
  text-wrap: pretty;
}

.jsp-page-intro .jsp-donate-action {
  margin-top: 28px;
}

/* Intro variations: About sits on a dark photo, Programs on a rust band */
.jsp-intro-band--photo {
  position: relative;
  overflow: hidden;
  background: #002f49;
}

.jsp-intro-band-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: grayscale(1);
  mix-blend-mode: luminosity;
}

.jsp-intro-band--photo .jsp-page-intro {
  position: relative;
  padding-bottom: clamp(40px, 6vw, 72px);
}

.jsp-programs-body {
  padding-top: 0 !important;
}

.jsp-intro-band--rust {
  background-color: #b54739;
}

.jsp-page-intro--on-dark,
.jsp-page-intro--on-dark .jsp-page-intro-title,
.jsp-page-intro--on-dark .jsp-page-intro-text {
  color: #f3ead2;
}

/* Line the intros up: remove the old layouts' extra top spacing */
main:has(.jsp-page-intro) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

main .wp-block-group:has(> .jsp-page-intro),
main .wp-block-group:has(> .wp-block-group > .jsp-page-intro) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* The thank-you heading receives focus from script; no outline needed */
.jsp-page-intro-title[tabindex="-1"]:focus {
  outline: none;
}

/* Header logo (replaces the text site title) */
.jsp-site-logo {
  margin: 0;
  line-height: 0;
}

.jsp-site-logo a {
  display: inline-block;
  border-radius: 4px;
}

.jsp-site-logo img {
  display: block;
  width: auto;
  height: 88px;
}

.jsp-site-logo a:focus-visible {
  outline: 3px solid #002f49;
  outline-offset: 4px;
}

/* Keep the header about as tall as before now that the logo is larger */
header .superbthemes-navigation-004 {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

@media (max-width: 781px) {
  .jsp-site-logo img {
    height: 60px;
  }
  header .superbthemes-navigation-004 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
}

/* Homepage hero: rotating archival photos behind the welcome */
.jsp-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(520px, 78vh, 720px);
  margin: 0 !important;
  overflow: hidden;
  background: #002f49;
  color: #f3ead2;
  isolation: isolate;
}

.jsp-hero-slides {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.jsp-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s ease, transform 9s ease-out;
}

.jsp-hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.jsp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 47, 73, 0.55) 0%, rgba(0, 47, 73, 0.72) 55%, rgba(0, 47, 73, 0.92) 100%);
}

.jsp-hero-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) 24px clamp(72px, 10vw, 112px);
  text-align: center;
}

.jsp-hero-title {
  margin: 0 0 20px;
  color: #f3ead2;
  font-family: var(--wp--preset--font-family--fontsecondary);
  font-size: clamp(27px, 1rem + 3.4vw, 56px);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 20, 32, 0.45);
}

.jsp-hero-text {
  max-width: 640px;
  margin: 0 auto;
  color: #f3ead2;
  font-family: var(--wp--preset--font-family--fontprimary);
  font-size: clamp(17px, 1rem + 0.35vw, 20px);
  line-height: 1.6;
  text-wrap: pretty;
}

.jsp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.jsp-hero-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 2px solid #f3ead2;
  border-radius: 6px;
  color: #f3ead2;
  font: 600 16px/1.3 var(--wp--preset--font-family--fontprimary);
  text-decoration: none !important;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.jsp-hero-button:hover {
  background: rgba(243, 234, 210, 0.14);
}

.jsp-hero-button--primary {
  background: #f3ead2;
  color: #002f49;
}

.jsp-hero-button--primary:hover {
  border-color: #b54739;
  background: #b54739;
  color: #f3ead2;
}

.jsp-hero-button:focus-visible,
.jsp-hero-toggle:focus-visible {
  outline: 3px solid #f3ead2;
  outline-offset: 3px;
}

.jsp-hero-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(16px, 3vw, 32px);
  font-family: var(--wp--preset--font-family--fontprimary);
  font-size: 13px;
}

.jsp-hero-caption {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  color: rgba(243, 234, 210, 0.85);
  font-style: italic;
}

.jsp-hero-toggle {
  flex: none;
  white-space: nowrap;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid rgba(243, 234, 210, 0.6);
  border-radius: 4px;
  background: transparent;
  color: #f3ead2;
  font: 600 13px/1.3 var(--wp--preset--font-family--fontprimary);
  cursor: pointer;
}

.jsp-hero-toggle:hover {
  background: rgba(243, 234, 210, 0.14);
}

@media (max-width: 600px) {
  .jsp-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .jsp-hero-button {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jsp-hero-slide {
    transition: opacity 0.4s ease;
    transform: none !important;
  }
}

/* Rounded corners for buttons and boxes, matching the homepage hero buttons.
   The podcast and Shireinu artwork tiles keep their own shapes. */
.wp-block-button__link,
.wp-element-button {
  border-radius: 6px;
}

.jsp-programs-body .wp-block-group.has-mono-3-background-color {
  border-radius: 12px;
}

/* Program banners inside the rounded cards: slightly smaller corners than the card */
.jsp-program-banner {
  overflow: hidden;
  border-radius: 8px;
}

/* Homepage quote band: the mixtape photo beside the Spokoiny quote.
   The band uses the photo's own background blue so the image sits on it seamlessly. */
.jsp-quote-band {
  /* The photo sits on this exact flat blue, so the band and photo are one surface */
  --jsp-quote-blue: #0e2a40;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 !important;
  overflow: hidden;
  background: var(--jsp-quote-blue);
  color: #f3ead2;
}

.jsp-quote-band-media {
  min-width: 0;
}

.jsp-quote-band-media img {
  display: block;
  width: 100%;
  max-width: 820px;
  height: auto;
  margin: 0 auto;
  /* The photo has generous flat-blue margins; scale it up so the cassette itself is larger.
     Only blue margin is cropped by the band's overflow: hidden. */
  transform: scale(1.17);
}

.jsp-quote-band-text {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 8px 24px 56px;
}

.jsp-quote-band-text blockquote {
  margin: 0;
  padding: 0;
  border: 0;
}

.jsp-quote-band-text blockquote p {
  margin: 0;
  color: #f3ead2;
  font-family: var(--wp--preset--font-family--fontsecondary);
  font-size: clamp(26px, 1rem + 1.6vw, 42px);
  font-weight: 400;
  line-height: 1.25;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.jsp-quote-band-text figcaption {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px solid #b54739;
  color: rgba(243, 234, 210, 0.85);
  font-family: var(--wp--preset--font-family--fontprimary);
  font-size: 16px;
  line-height: 1.5;
}

.jsp-quote-band-text cite {
  font-style: italic;
}

@media (min-width: 900px) {
  .jsp-quote-band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    padding: 24px 0;
  }
  .jsp-quote-band-text {
    max-width: 560px;
    padding: 48px clamp(32px, 5vw, 80px) 48px 16px;
  }
}

/* The statistics section below the quote band uses the band's blue so the two meet without a seam */
.jsp-stats-band {
  background-color: #0e2a40 !important;
  /* 30px less than the theme's spacing above the statistics */
  padding-top: calc(var(--wp--preset--spacing--superbspacing-xxlarge) - 30px) !important;
}

/* Homepage "Featured programs": programs sit directly on the rust band (no beige cards).
   Scoped to the homepage section; the Donate page cards keep their boxes. */
.jsp-featured-programs > .jsp-featured-programs-grid {
  gap: clamp(40px, 6vw, 88px);
  max-width: 1040px;
}

.jsp-featured-programs > .jsp-featured-programs-grid > .jsp-featured-program {
  align-items: center;
  gap: 16px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f3ead2;
  text-align: center;
}

.jsp-featured-programs .jsp-program-logo-tile {
  box-shadow: 0 10px 28px rgba(60, 14, 8, 0.35);
}

.jsp-featured-programs .jsp-featured-program h3 {
  margin-top: 8px;
  color: #f3ead2;
}

.jsp-featured-programs .jsp-featured-program p {
  max-width: 30em;
  /* A lighter cream than the headings so body text clears 4.5:1 on rust (4.96:1) */
  color: #fbf6ea;
}

.jsp-featured-programs .jsp-featured-program .wp-block-buttons {
  justify-content: center;
  padding-top: 8px;
}

.jsp-featured-programs .jsp-featured-program .wp-block-button__link {
  border: 2px solid #f3ead2;
  background: #f3ead2;
  color: #002f49;
}

.jsp-featured-programs .jsp-featured-program .wp-block-button__link:hover,
.jsp-featured-programs .jsp-featured-program .wp-block-button__link:focus-visible {
  border-color: #002f49;
  background: #002f49;
  color: #f3ead2;
}

.jsp-featured-programs .jsp-featured-program .wp-block-button__link:focus-visible {
  outline: 3px solid #f3ead2;
  outline-offset: 3px;
}

.jsp-featured-programs .jsp-program-brand {
  display: flex;
  justify-content: center;
  width: 100%;
}
