/* St. Joseph's Home — stjh.org
   ---------------------------------------------------------------
   Colours, type and proportions carried over from the previous
   Joomla/Nicepage site; layout is plain CSS grid and flexbox. */

:root {
  --blue:        #478ac9;
  --blue-dark:   #3a71a6;
  --butter:      #f9e79b;
  --butter-dark: #f2d96c;
  --butter-ink:  #72683f;
  --ink:         #111111;
  --muted:       #4a4a4a;
  --grey-bg:     #f2f2f2;
  --rule:        #dcdcdc;
  --wrap:        1140px;
  --gutter:      30px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.6 "Open Sans", Arial, Helvetica, sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: Roboto, Arial, Helvetica, sans-serif;
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 52px 0; }
.stack { display: grid; gap: 18px; }
.center { text-align: center; }
.measure { max-width: 72ch; }

/* ---------- masthead + navigation --------------------------------- */

.masthead { padding: 30px var(--gutter) 0; }

.site-name {
  font-size: 60px;
  text-align: center;
  line-height: 1.2;
  text-wrap: balance;
}

.site-nav ul {
  list-style: none;
  margin: 18px auto 0;
  padding: 0;
  max-width: var(--wrap);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.site-nav a {
  display: block;
  padding: 10px 18px;
  font-size: 16px;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--blue-dark); border-bottom-color: var(--blue-dark); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }

/* ---------- hero --------------------------------------------------- */

.hero {
  height: 673px;
  background: url("../images/home-hero.jpg") 50% 50% / cover no-repeat;
}

.tagline {
  font-family: "Alex Brush", cursive;
  font-size: 48px;
  line-height: 1.6;
  text-align: center;
  padding: 34px var(--gutter);
}

/* ---------- page headings ------------------------------------------ */

.page-title { font-size: 48px; margin-bottom: 26px; }
.section-title { font-size: 48px; margin-bottom: 24px; }
.sub-title { font-size: 32px; margin-bottom: 12px; }

/* ---------- rating badge -------------------------------------------- */

.rating {
  background: var(--blue);
  color: #fff;
  border-radius: 10px;
  padding: 22px 30px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 26px;
}

.rating h2 { font-size: 24px; color: #fff; }

/* ---------- buttons -------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--butter);
  color: var(--butter-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 12px 22px;
  transition: background-color .2s;
}

.btn:hover, .btn:focus-visible { background: var(--butter-dark); color: var(--butter-ink); }
.btn--wide { font-size: 15px; padding: 15px 26px; }

/* ---------- services: alternating photo / text ------------------------ */

.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
}

.service-photo { min-height: 376px; background-size: cover; background-position: 50% 50%; }
.service--flip .service-photo { order: 2; }
.service-body { display: grid; gap: 16px; justify-items: start; }

/* ---------- lists ------------------------------------------------------ */

.tick-list { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }

/* ---------- compliance rows -------------------------------------------- */

.policy { border-top: 1px solid var(--rule); padding: 26px 0; display: grid; gap: 14px; justify-items: start; }
.policy:last-of-type { border-bottom: 1px solid var(--rule); }
.policy h2 { font-size: 26px; }

/* ---------- about ------------------------------------------------------- */

.figure { display: grid; gap: 14px; max-width: 640px; margin: 0 auto; }
.figure figcaption { font-size: 15px; color: var(--muted); text-align: center; }

/* ---------- footer ------------------------------------------------------- */

.site-footer { background: var(--grey-bg); padding: 42px var(--gutter); }

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 30px;
  align-items: center;
}

.footer-address { font-size: 20px; font-weight: 700; line-height: 1.6; text-align: center; grid-column: 2; }
.footer-seal img { width: 180px; }
.footer-donate { justify-self: end; }
.footer-donate input[type="image"] { border: 0; cursor: pointer; }

/* ---------- narrow screens ------------------------------------------------ */

@media (max-width: 900px) {
  .service,
  .footer-inner { grid-template-columns: 1fr; }

  .service--flip .service-photo { order: 0; }
  .service-photo { min-height: 240px; }

  .footer-address { grid-column: auto; }
  .footer-seal, .footer-donate { justify-self: center; }

  .hero { height: 300px; }
  .site-name { font-size: 36px; }
  .tagline { font-size: 34px; }
  .page-title, .section-title { font-size: 30px; }
  .sub-title { font-size: 24px; }
}

@media (max-width: 575px) {
  :root { --gutter: 20px; }
  .site-name { font-size: 28px; }
  .tagline { font-size: 28px; }
  .page-title, .section-title { font-size: 25px; }
  .site-nav a { padding: 8px 12px; }
}
