/* =====================================================================
   Jon Ralston FSE theme — bespoke styles
   Only the pieces global styles (theme.json) can't express live here:
   the saguaro skyline divider, decorative card accents, hover
   micro-interactions, and the contact form. Everything color/type/spacing
   related is driven by theme.json presets so the Site Editor stays in control.
   ===================================================================== */

/* ---- Eyebrow label (uppercase kicker with a yellow tick) ---- */
.jr-eyebrow {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.82rem;
  color: var(--wp--preset--color--green);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
}
.jr-eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--wp--preset--color--sun-yellow);
}
.jr-eyebrow.is-centered { justify-content: center; }
.jr-eyebrow.on-green { color: var(--wp--preset--color--sun-yellow); }

/* ---- Hero banner ---- */
.jr-logo-card img { width: 100%; max-width: 620px; margin-inline: auto; display: block; }

.jr-banner-tag strong { color: var(--wp--preset--color--sun-yellow); }

/* Saguaro skyline divider that sits at the bottom of the hero */
.jr-skyline {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 28px;
  margin-bottom: -1px; /* kill any sub-pixel seam against the section below */
}

/* ---- Bio photo frame ---- */
.jr-photo-frame img {
  display: block;
  width: 100%;
  border-radius: 28px;
  border: 6px solid var(--wp--preset--color--paper);
  outline: 2px solid var(--wp--preset--color--sand-line);
  box-shadow: var(--wp--preset--shadow--soft);
}

/* ---- Campaign statement card with a green spine ---- */
.jr-statement-card { position: relative; overflow: hidden; }
.jr-statement-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  border-radius: 8px 0 0 8px;
  background: var(--wp--preset--gradient--leaf-stem);
}

/* ---- Issue cards ---- */
.jr-issue {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.jr-issue:hover {
  transform: translateY(-3px);
  border-color: var(--wp--preset--color--green-leaf);
  box-shadow: var(--wp--preset--shadow--soft);
}
.jr-issue .jr-issue-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wp--preset--color--green-soft);
  color: var(--wp--preset--color--green-deep);
}
.jr-issue .jr-issue-mark svg { width: 20px; height: 20px; }
.jr-issue p { margin: 0; font-weight: 600; color: var(--wp--preset--color--ink); }
.jr-issue .q { color: var(--wp--preset--color--cactus-red); }

/* CTA / banner button lift (works with core button block) */
.jr-cta .wp-block-button__link { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.jr-cta .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -10px rgba(0, 0, 0, 0.4);
}

/* ---- Contact form (Contact Form 7) ----
   Scoped to the .jr-cf7 wrapper that holds the [contact-form-7] shortcode, so
   it only restyles this form. CF7 wraps every field in a <p> and tucks the
   <input> inside its <label> after a <br>; the rules below normalize that
   markup back to the original card look. */
.jr-cf7 .wpcf7-form {
  background: var(--wp--preset--color--paper);
  border-radius: 28px;
  box-shadow: var(--wp--preset--shadow--deep);
  padding: clamp(24px, 4vw, 40px);
  display: grid;
  gap: 16px;
}

/* Kill CF7's paragraph margins and the stray break after the hidden fields */
.jr-cf7 .wpcf7-form p { margin: 0; }
.jr-cf7 .hidden-fields-container { display: none; }
.jr-cf7 .wpcf7-form > br { display: none; }
.jr-cf7 .jr-field > p:empty { display: none; }

/* Name + email sit two-up; everything else is full width */
.jr-cf7 .jr-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Labels (CF7 wraps the field inside the <label>) */
.jr-cf7 .jr-field label {
  display: block;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  color: var(--wp--preset--color--green-deep);
  font-size: 0.92rem;
}
.jr-cf7 .jr-field label br { display: none; }
.jr-cf7 .wpcf7-form-control-wrap { display: block; margin-top: 7px; }

/* Inputs + textarea */
.jr-cf7 input[type="text"],
.jr-cf7 input[type="email"],
.jr-cf7 textarea {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 400;
  font-size: 1rem;
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--cream);
  border: 1.5px solid var(--wp--preset--color--sand-line);
  border-radius: 12px;
  padding: 13px 15px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.jr-cf7 textarea { min-height: 130px; resize: vertical; }
.jr-cf7 input[type="text"]:focus,
.jr-cf7 input[type="email"]:focus,
.jr-cf7 textarea:focus {
  outline: none;
  border-color: var(--wp--preset--color--green-leaf);
  box-shadow: 0 0 0 4px rgba(92, 191, 78, 0.22);
}

/* Submit (CF7 renders it as an <input> inside a <p>) */
.jr-cf7 .wpcf7-submit {
  width: auto;
  margin-top: 4px;
  padding: 14px 32px;
  border: none;
  border-radius: 999px;
  background: var(--wp--preset--color--cactus-red);
  color: #fff;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.jr-cf7 .wpcf7-submit:hover { transform: translateY(-2px); background: #c92f22; }
.jr-cf7 .wpcf7-spinner { margin: 0 0 0 12px; }

.jr-cf7 .jr-form-note { font-size: 0.85rem; color: var(--wp--preset--color--ink-soft); margin: 0; }

/* CF7 validation + response messaging, themed to match */
.jr-cf7 .wpcf7-response-output {
  margin:0px !important;
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 1.25rem;
}
.jr-cf7 .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  color: var(--wp--preset--color--cactus-red);
  font-size: 0.85rem;
}
.jr-cf7 .wpcf7-form-control.wpcf7-not-valid {
  border-color: var(--wp--preset--color--cactus-red);
  box-shadow: 0 0 0 4px rgba(226, 59, 44, 0.18);
}

/* ---- Accessibility ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--wp--preset--color--sun-yellow);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Responsive ---- */
@media (max-width: 540px) {
  .jr-cf7 .jr-field-row { grid-template-columns: 1fr; }
}

/* ---- Footer credit ---- */
.jr-footer strong {
  color: var(--wp--preset--color--sun-yellow);
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
}
