/* ==========================================================================
   Peace CommUNITY: enhancements on top of the original design
   Loaded AFTER site.css. Fonts, layout and behaviour tweaks only:
   the site's ORIGINAL colour palette is untouched (no colour variables
   are overridden here).
   This file is unlayered, so it wins over Tailwind's layered utilities.
   ========================================================================== */

/* ---------- 1. Fonts ---------- */
:root {
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Small uppercase eyebrows ("Our mission", "Get Involved", ...) */
section p[class*='uppercase'] {
  font-weight: 700;
}

blockquote {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.6;
}

/* Header wordmark */
#site-header a > span > span:first-child {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
#site-header a > span > span:nth-child(2) {
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
}
#site-footer a.inline-block {
  font-family: 'Fraunces', Georgia, serif;
}

/* ---------- 2. Header ---------- */
/* 20px taller at the bottom (the wordmark's tagline gets room to breathe) */
#site-header {
  padding-bottom: 20px;
}
/* small logo to the left of the wordmark. White JPG background is multiplied away;
   the header's fade-in wrapper would isolate that blend, so it is switched off. */
#site-header > div:first-child {
  animation: none;
}
.header-logo {
  height: 2.75rem;
  width: auto;
  margin-right: 0.75rem;
  flex: none;
  mix-blend-mode: multiply;
}
@media (min-width: 1024px) {
  .header-logo {
    height: 4rem;
    margin-right: 1rem;
  }
}

/* ---------- 3. Mobile menu: narrower panel, no Join link, centred two-line CTA ---------- */
#mobile-menu-site-header el-dialog-panel {
  max-width: 15rem;
}
#mobile-menu-site-header .mobile-menu-cta {
  justify-content: center;
  text-align: center;
  line-height: 1.3;
}
#mobile-menu-site-header .mobile-menu-cta > span {
  display: block;
  max-width: 9.5em; /* forces "Join our / organization." onto two lines */
  text-align: center;
}
/* close button on its own row, upper right, with the logo beneath it */
#mobile-menu-site-header el-dialog-panel > div:first-child {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}
#mobile-menu-site-header button[commandfor='mobile-menu-site-header'][command='close'] {
  order: -1;
  align-self: flex-end;
}

/* ---------- 4. Buttons ---------- */
a[class*='bg-primary'] {
  font-weight: 700;
}
a[class*='bg-primary']:hover {
  transform: translateY(-1px);
}

/* ---------- 5. Hero logo ---------- */
/* original 7rem / 8.5rem / 10rem, now +21% (two 10% steps) = 8.47rem / 10.285rem / 12.1rem.
   Width follows the image's own proportions. */
.site-logo {
  height: 8.47rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  /* the logo is a JPG with a white background: multiply lets the page colour show through */
  mix-blend-mode: multiply;
  animation: logo-in 0.5s ease-out both;
}
/* the wrapper's own fade would isolate the blend, so the fade lives on the image instead */
div:has(> .site-logo) {
  animation: none;
}
/* the hero's z-10 content wrapper is a stacking context too; flatten it so the blend reaches the page */
#home-hero > div.relative {
  z-index: auto;
}
@keyframes logo-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-logo {
    animation: none;
  }
}
@media (min-width: 640px) {
  .site-logo {
    height: 10.285rem;
  }
}
@media (min-width: 1024px) {
  .site-logo {
    height: 12.1rem;
  }
}

#home-hero figure img {
  box-shadow: 0 30px 60px -28px #01051566;
}

/* ---------- 6. Cards / images ---------- */
article,
a.group {
  box-shadow: 0 1px 2px #0105150f;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
article:hover,
a.group:hover {
  box-shadow: 0 18px 34px -18px #0105154d;
}

/* ---------- 7. Ambassador bio modals: portrait beside the text ---------- */
.bio-portrait {
  float: left;
  width: 12rem;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: center top;
  margin: 0.25rem 1.5rem 0.75rem 0 !important; /* beats the .space-y-4 spacing */
  border-radius: 0.9rem;
  border: 1px solid var(--color-base-border);
  box-shadow: 0 14px 30px -16px #01051566;
}
@media (max-width: 639px) {
  .bio-portrait {
    float: none;
    display: block;
    width: 100%;
    max-width: 14rem;
    margin: 0 auto 1.25rem !important;
  }
}

/* ---------- 8. Misc polish ---------- */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
