/* The Good Neighbor Handbook — one stylesheet for all pages. */

/* Fonts match the East Yellowstone Collaborative site: Muli (now called Mulish)
   for text, Playfair Display for titles. Self-hosted, because the site's
   security settings (netlify.toml) only allow files from this site. */
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/mulish-500.woff2") format("woff2");
}
@font-face {
  font-family: "Mulish";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/mulish-500-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/mulish-700.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/playfair-display-700.woff2") format("woff2");
}

/* Colors match the East Yellowstone Collaborative site palette. */
:root {
  --ink: #2f3240;          /* header text: links, focus outlines, dark text on light accents */
  --text: #595959;         /* site text */
  --heading: #162521;      /* content titles and headings */
  --accent: #363851;       /* primary accent: footer, header bar, photo tint */
  --accent-light: #a3bfd9; /* secondary accent: title highlight, button, heading underline.
                              Too light for text on white (1.9:1): only use it behind dark text
                              or as a decoration. */
  --accent-light-soft: rgba(163, 191, 217, 0.45);
  --page: #f3f7f6;         /* page background around the white content panel */
  --paper: #ffffff;
  --footer-text: #eaeaea;
  --font-text: "Mulish", "Muli", "Helvetica Neue", Arial, sans-serif;
  --font-title: "Playfair Display", Georgia, "Times New Roman", serif;
  --measure: 1176px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 2;
  color: var(--text);
  background: var(--page);
}

main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }

h1, h2 { color: var(--heading); font-family: var(--font-title); font-weight: 700; line-height: 1.2; text-wrap: balance; }

/* Underline in the text colour so links are recognisable without relying on colour. */
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--accent-light); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.25rem 1rem;
  background: var(--paper);
  color: var(--ink);
}
.skip-link:focus { top: 1rem; }

/* ---------- Banner: header + photo, shared by every page ---------- */

.banner {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--accent); /* shows while the photo loads */
}
.banner--home { min-height: 100vh; min-height: 100svh; }
.banner--page { min-height: clamp(20rem, 60vh, 40rem); }

.banner__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Slate tint over the photo so white text stays readable everywhere. */
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--accent) 0%, #1c110a 100%);
  opacity: 0.7; /* below this, white text over the bright clouds gets hard to read */
}

.banner a { color: #fff; text-decoration: none; }
.banner :focus-visible { outline-color: var(--accent-light); }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  width: 100%;
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.site-title { display: block; }
.site-title__name {
  display: inline;
  padding: 0 6px;
  font-family: var(--font-title);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  /* Dark text on the light accent: white on it is too faint to read. */
  color: var(--ink);
  background: var(--accent-light);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.site-tagline {
  display: block;
  margin-top: 0.6rem;
  padding-left: 6px;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 0.75rem 0;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: #fff; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent-light); }

.banner__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 85%;
  margin: 0 auto;
  padding: 1rem 0 5rem;
  text-align: center;
}
.banner h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1.3;
}
.banner__lede {
  margin: 2.5rem 0 0;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.banner .button {
  display: inline-block;
  padding: 15px 35px;
  border: 3px solid #fff;
  font-weight: 700;
  line-height: 2;
  text-align: center;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}
.banner .button:hover { background: rgba(0, 0, 0, 0.2); }
.banner .button--accent { background: var(--accent-light); border-color: var(--accent-light); color: var(--ink); }
.banner .button--accent:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Page content: white panel on the pale page background ---------- */

.content {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem);
  background: var(--paper);
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--heading);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.2;
  text-wrap: balance;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.5rem 3rem;
  margin-top: 3rem;
}
.columns h2 { margin: 2rem 0 1rem; font-size: 1.79rem; }
.columns h2:first-child { margin-top: 0; }
/* Light accent "highlighter" stroke under section headings. */
.columns h2 span {
  background: linear-gradient(var(--accent-light-soft), var(--accent-light-soft)) bottom / 100% 40% no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.plain-list { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.plain-list li { padding: 0.35rem 0; }

.place { margin: 0 0 1rem; font-style: normal; }
.place strong { display: block; font-weight: 700; }
.place a[href^="tel:"] { white-space: nowrap; }

.contact {
  margin: 2rem 0 0;
  color: var(--heading);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.4;
}
.contact a { overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.5rem var(--gutter);
  background: var(--accent);
  color: var(--footer-text);
  font-style: italic;
  text-align: center;
}
.site-footer a { color: var(--footer-text); text-decoration-thickness: 1px; }
.site-footer :focus-visible { outline-color: var(--accent-light); }
.site-footer p { margin: 0; }

@media (max-width: 48rem) {
  .site-header { flex-direction: column; align-items: flex-start; }
  .site-nav ul { gap: 0 1.5rem; }
  .site-nav a { padding: 0.5rem 0; font-size: 0.9rem; }
  .site-title__name { font-size: 1.25rem; }
  .banner__body { width: 100%; padding-inline: var(--gutter); }
  .actions { flex-direction: column; width: 100%; max-width: 20rem; }
}

/* Short screens (phones held sideways): tighten the banner so the buttons stay in view. */
@media (max-height: 30rem) {
  .site-header { padding-block: 0.75rem; }
  .banner__body { padding-bottom: 2rem; }
  .banner h1 { font-size: 2.25rem; }
  .banner__lede, .actions { margin-top: 1rem; }
}

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

@media print {
  body { background: none; }
  .banner { min-height: 0; color: #000; background: none; }
  .banner::after, .banner__photo, .site-nav, .actions, .skip-link { display: none; }
  .banner a, .banner h1 { color: #000; }
  .site-title__name { background: none; }
  .site-footer { background: none; color: #000; }
  .site-footer a { color: #000; }
}
