/*
Theme Name: SWES
Theme URI: https://sweshelps.org
Author: Southwest Emergency Services
Description: Block theme for Southwest Emergency Services, a Christian-based nonprofit serving Southwest Baltimore County. Palette, type, and layout are locked to the SWES brand system so every editor choice stays on brand.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swes
Tags: block-theme, one-column, custom-colors, custom-menu, editor-style, full-site-editing, accessibility-ready
*/

/* Block themes get almost everything from theme.json. Only what theme.json
   cannot express belongs here. */

/* Serif display face carries the SWES voice - italic by default. */
.swes-display {
  font-family: var(--wp--preset--font-family--display);
  font-style: italic;
  line-height: 1.03;
  letter-spacing: -0.02em;
}

/* Small uppercase label above a heading. */
.swes-eyebrow {
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Cards and panels use a hairline in teal rather than a shadow. */
.swes-panel {
  border: 2px solid rgba(79, 116, 118, 0.25);
  border-radius: 4px;
}

/* Grid children must be allowed to shrink or long words push the row wide. */
.wp-block-columns > .wp-block-column {
  min-width: 0;
}

/* Links inside body copy stay readable against cream and teal alike. */
.wp-block-post-content a:not(.wp-element-button),
.wp-block-paragraph a:not(.wp-element-button) {
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* Skip link visible on focus. */
.skip-link:focus {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 2px;
}

/* Button variants.
   These live in CSS rather than in block style attributes on purpose: inline
   button styling in pattern markup trips WordPress block validation, while a
   class on the block always validates. */
.swes-btn-sm .wp-block-button__link {
  font-size: 16px;
  padding: 13px 26px;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
  border: 2px solid var(--wp--preset--color--teal);
  background: transparent;
  color: var(--wp--preset--color--teal-dark);
  padding: 15px 32px;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
  background: rgba(79, 116, 118, 0.1);
  color: var(--wp--preset--color--teal-dark);
}

.swes-btn-quiet.is-style-outline > .wp-block-button__link {
  border-color: rgba(79, 116, 118, 0.35);
}

.swes-btn-quiet.is-style-outline > .wp-block-button__link:hover {
  border-color: var(--wp--preset--color--teal);
}

.swes-btn-gold .wp-block-button__link {
  background-color: var(--wp--preset--color--gold);
  color: var(--wp--preset--color--teal-dark);
  padding: 16px 30px;
}

.swes-btn-gold .wp-block-button__link:hover {
  background-color: var(--wp--preset--color--gold-light);
  color: var(--wp--preset--color--teal-dark);
}

/* Footer link columns read as lists of links, not bulleted copy. */
ul.wp-block-list.swes-list-plain,
ul.wp-block-list.swes-list-plain li {
  list-style: none;
  list-style-type: none;
  padding-left: 0;
}

/* Links on any dark teal band must be cream, not the body link color. */
.swes-topbar a {
  color: var(--wp--preset--color--cream);
}

.swes-topbar a:hover {
  color: var(--wp--preset--color--gold);
}

.wp-block-template-part footer a,
footer.wp-block-template-part a,
.swes-footer a {
  color: var(--wp--preset--color--cream);
}

.wp-block-template-part footer a:hover,
footer.wp-block-template-part a:hover,
.swes-footer a:hover {
  color: var(--wp--preset--color--gold);
}

/* Social icons are the SWES PNG marks, not core's built-in SVGs. */
.swes-social-row .wp-block-image,
.swes-social-row figure {
  margin: 0;
  line-height: 0;
}

.swes-social-row .wp-block-image img {
  display: block;
  border-radius: 6px;
}

.swes-social-row a:hover img {
  opacity: 0.8;
}

/* Legacy: core social-links, kept in case an editor inserts one. */
.swes-social .wp-social-link,
.swes-social .wp-social-link a {
  background-color: transparent !important;
  color: var(--wp--preset--color--cream) !important;
}

.swes-social .wp-social-link svg {
  fill: currentColor;
}

.swes-social .wp-social-link:hover a {
  color: var(--wp--preset--color--gold) !important;
}

/* Photos fill their frame without distorting. */
.swes-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
