/* ==========================================================================
   Community of Christ — Brighton, MI
   A small, dependency-free stylesheet. No web fonts, no frameworks.
   ========================================================================== */

:root {
  --paper: #fbf8f2;
  --sand: #f3ecdf;
  --sand-deep: #e9dfcc;
  --ink: #23241f;
  --muted: #5f6157;
  --evergreen: #1e3d34;
  --evergreen-soft: #2c5446;
  --gold: #a97c37;
  --rule: #e3dac9;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30, 61, 52, 0.06), 0 14px 34px -20px rgba(30, 61, 52, 0.45);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--evergreen-soft);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--gold);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 200;
  background: var(--evergreen);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
}

/* ---------- Header ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 242, 0.93);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 2rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: none;
}

.brand-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.09rem;
  line-height: 1.15;
}

.brand-place {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.15rem;
  font-size: 0.93rem;
}

.nav a {
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--evergreen);
}

.nav a[aria-current="page"] {
  color: var(--evergreen);
  border-bottom-color: var(--gold);
}

/* ---------- Hero -------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: min(76vh, 620px);
  color: #fff;
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(16, 36, 30, 0.3) 0%,
    rgba(16, 36, 30, 0.55) 45%,
    rgba(16, 36, 30, 0.9) 100%
  );
}

.hero-body {
  padding: 5rem 0 3.5rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e9dcc2;
}

.hero h1 {
  margin: 0;
  max-width: 22ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lede {
  margin: 1rem 0 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: #f2ecdf;
}

.pill {
  display: inline-block;
  margin-top: 1.7rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

/* ---------- Page head (inner pages) ------------------------------------- */

.page-head {
  padding: 3.4rem 0 2.6rem;
  background: var(--sand);
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--evergreen);
}

.page-head .lede {
  margin-top: 0.8rem;
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.06rem;
}

/* ---------- Sections ---------------------------------------------------- */

.section {
  padding: 3.4rem 0;
}

.section--sand {
  background: var(--sand);
  border-block: 1px solid var(--rule);
}

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.2em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.25;
  color: var(--evergreen);
}

.prose h3 {
  margin-top: 1.9em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
  color: var(--evergreen);
}

.prose p {
  margin: 0;
}

.prose ul {
  margin: 0.4em 0 0;
  padding-left: 1.1em;
}

.prose li + li {
  margin-top: 0.45em;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.04em;
}

.prose blockquote p + p {
  margin-top: 0.6em;
}

.prose .scripture {
  font-style: italic;
}

/* ---------- Cards ------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
  margin-top: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.5rem 1.4rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--evergreen);
}

.card p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.card .more {
  margin-top: auto;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--evergreen-soft);
}

.card .more::after {
  content: " →";
  color: var(--gold);
}

/* ---------- Visit panel ------------------------------------------------- */

.visit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  align-items: start;
  padding: 2.2rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.visit h2 {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--evergreen);
}

.visit p {
  margin: 0;
  color: var(--muted);
}

.visit dl {
  margin: 0;
}

.visit dt {
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.visit dd {
  margin: 0.2rem 0 1.2rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--ink);
}

.visit dd:last-child {
  margin-bottom: 0;
}

/* ---------- Principles -------------------------------------------------- */

.principle {
  padding: 1.8rem 0;
  border-top: 1px solid var(--rule);
}

.principle:first-of-type {
  border-top: 0;
  padding-top: 0.6rem;
}

.principle h2 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  color: var(--evergreen);
}

.principle ul {
  margin: 0;
  padding-left: 1.15em;
  color: var(--muted);
}

.principle li + li {
  margin-top: 0.5em;
}

/* ---------- Post list --------------------------------------------------- */

.post-list {
  display: grid;
  gap: 1.15rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.post-list li {
  padding: 1.6rem 1.5rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.post-list time {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.post-list h2 {
  margin: 0.35rem 0 0.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.3;
}

.post-list h2 a {
  color: var(--evergreen);
  text-decoration: none;
}

.post-list h2 a:hover {
  color: var(--gold);
}

.post-list p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.97rem;
}

.post-meta {
  margin: 0.9rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.back {
  margin-top: 2.6rem;
  font-size: 0.94rem;
}

/* ---------- Buttons ----------------------------------------------------- */

.button {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--evergreen);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--evergreen-soft);
  color: #fff;
}

.button--ghost {
  background: transparent;
  color: var(--evergreen);
  border: 1px solid var(--evergreen);
}

.button--ghost:hover {
  background: var(--evergreen);
  color: #fff;
}

/* ---------- Forms ------------------------------------------------------- */

.form {
  display: grid;
  gap: 1.1rem;
  max-width: 34rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--evergreen);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--sand-deep);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--evergreen-soft);
}

.hp {
  position: absolute;
  left: -9999px;
}

.notice {
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--sand-deep);
  background: var(--sand);
  font-size: 0.95rem;
}

.notice--error {
  border-color: #d8b7a6;
  background: #fdf1ea;
}

.notice--ok {
  border-color: #bdd3c4;
  background: #eef6f0;
}

.notice ul {
  margin: 0.45rem 0 0;
  padding-left: 1.15em;
}

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

.site-footer {
  margin-top: 0;
  padding: 3rem 0 2.4rem;
  background: var(--evergreen);
  color: #e6e0d2;
  font-size: 0.94rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.8rem 2.5rem;
  align-items: start;
}

.site-footer h2 {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
}

.site-footer p {
  margin: 0 0 0.35rem;
}

.site-footer a {
  color: #dfd6c2;
}

.site-footer a:hover {
  color: #fff;
}

.footer-nav {
  display: grid;
  gap: 0.4rem;
}

.copyright {
  grid-column: 1 / -1;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.84rem;
  color: #c9c1af;
}

/* ---------- Responsive -------------------------------------------------- */

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .header-inner {
    gap: 0.4rem 1rem;
  }

  .nav {
    width: 100%;
    gap: 0.1rem 0.9rem;
    font-size: 0.88rem;
  }

  .hero {
    min-height: 74vh;
  }

  .hero-body {
    padding: 3.5rem 0 2.6rem;
  }

  .page-head {
    padding: 2.4rem 0 2rem;
  }

  .section {
    padding: 2.4rem 0;
  }

  .visit {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip,
  .hero::after {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
