@font-face {
  font-family: "Monte Carlo";
  src: url("/assets/MonteCarlo-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #102f3b;
  --blue: #0e5f78;
  --blue-soft: #e8f1f3;
  --gold: #b9842e;
  --gold-soft: #f6ead5;
  --cream: #fbf8f3;
  --paper: #fffefd;
  --rose: #ead3cc;
  --sage: #cad7c8;
  --line: #dbe5e8;
  --muted: #5d727a;
  --shadow: 0 18px 48px rgba(30, 52, 58, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
  letter-spacing: 0;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 254, 253, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.site-header__inner,
.site-footer__inner,
.stories,
.about-band,
.article-page {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header__inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { display: grid; line-height: 1.15; }
.brand strong { font-size: 1.14rem; }
.brand small { margin-top: 4px; color: var(--muted); font-family: Arial, sans-serif; }

.site-header nav,
.site-footer nav { display: flex; align-items: center; gap: 8px; }
.site-header nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}
.site-header nav a:hover,
.site-header nav a:focus-visible { border-color: var(--blue); color: var(--blue); }

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #f7ecdc;
}
.hero > img {
  width: 100%;
  aspect-ratio: 2678 / 587;
  object-fit: cover;
  min-height: 290px;
}
.hero__copy {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: 38px 0 42px;
}
.hero__copy h1,
.article-hero h1 {
  margin: 4px 0 12px;
  max-width: 900px;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: 0;
}
.hero__copy p:last-child { max-width: 820px; margin: 0; color: var(--muted); font-size: 1.08rem; }

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-family: Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stories { padding: 72px 0; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-heading h2,
.about-band h2 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 1.1;
}
.section-heading > p { margin: 0 0 6px; color: var(--muted); font-family: Arial, sans-serif; }

.story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.story-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(31, 54, 60, 0.07);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.story-card:hover { transform: translateY(-5px); border-color: #c3d5d9; box-shadow: var(--shadow); }
.story-card > a { display: grid; height: 100%; text-decoration: none; }
.story-card__visual {
  position: relative;
  min-height: 138px;
  overflow: hidden;
  background: var(--gold-soft) url("/assets/page-decor.png") center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.story-card__visual::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(185, 132, 46, 0.34);
}
.story-card__visual span {
  position: absolute;
  right: 24px;
  bottom: 9px;
  color: rgba(16, 47, 59, 0.22);
  font-family: "Monte Carlo", cursive;
  font-size: 4.8rem;
  line-height: 1;
}
.story-card--2 .story-card__visual,
.story-card--6 .story-card__visual { background-color: var(--blue-soft); }
.story-card--3 .story-card__visual,
.story-card--7 .story-card__visual { background-color: #f3e5e0; }
.story-card--4 .story-card__visual,
.story-card--8 .story-card__visual { background-color: #e4ebe2; }

.story-card__body { display: flex; flex-direction: column; padding: 22px; }
.story-card h2 { margin: 2px 0 12px; font-size: 1.55rem; line-height: 1.16; }
.story-card__body > p:not(.eyebrow) { margin: 0 0 22px; color: var(--muted); font-family: Arial, sans-serif; font-size: 0.94rem; }
.story-card__action { margin-top: auto; color: var(--blue); font-family: Arial, sans-serif; font-size: 0.88rem; font-weight: 800; }

.about-band {
  margin-bottom: 72px;
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-band > p { margin: 0; color: var(--muted); font-size: 1.08rem; }

.article-page { padding: 54px 0 76px; }
.article-hero { max-width: 900px; margin: 0 auto 36px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; color: var(--muted); font-family: Arial, sans-serif; font-size: 0.84rem; }
.breadcrumbs a { color: var(--blue); }
.article-lead { max-width: 760px; margin: 0; color: var(--muted); font-size: 1.12rem; }
.article-content {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 6px 0 42px;
  color: #213d46;
  font-size: 1.12rem;
  line-height: 1.83;
}
.article-content p { margin: 0 0 1.45em; }
.article-emphasis { color: var(--blue); font-size: 1.3rem; font-style: italic; }
.prayer {
  margin: 34px 0;
  padding: 30px 34px;
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  color: #5b4728;
  font-style: italic;
}
.poem {
  width: min(620px, 100%);
  margin: 0 auto;
  white-space: pre-line;
  color: #203c45;
  font-size: 1.16rem;
  line-height: 1.92;
}

.article-nav {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.article-nav__item { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-decoration: none; }
.article-nav__item span { display: block; margin-bottom: 5px; color: var(--muted); font-family: Arial, sans-serif; font-size: 0.78rem; }
.article-nav__item strong { line-height: 1.25; }
.article-nav__item--next { text-align: right; grid-column: 2; }
.back-link { max-width: 900px; margin: 24px auto 0; font-family: Arial, sans-serif; font-weight: 700; }
.back-link a { color: var(--blue); }

.not-found { width: min(760px, calc(100% - 40px)); min-height: 58vh; margin: auto; padding: 110px 0; text-align: center; }
.not-found h1 { margin: 0 0 12px; font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: 1; }
.button { display: inline-flex; margin-top: 18px; padding: 12px 18px; border-radius: 6px; background: var(--blue); color: white; font-family: Arial, sans-serif; font-weight: 700; text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); background: #f1f5f5; }
.site-footer__inner { min-height: 150px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.site-footer p { margin: 0; line-height: 1.45; }
.site-footer p span { color: var(--muted); font-family: Arial, sans-serif; font-size: 0.9rem; }
.site-footer nav { flex-wrap: wrap; justify-content: end; }
.site-footer nav a { color: var(--blue); font-family: Arial, sans-serif; font-size: 0.86rem; font-weight: 700; }

:focus-visible { outline: 3px solid #e2b25c; outline-offset: 3px; }

@media (max-width: 980px) {
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header__inner { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .site-header nav { width: 100%; overflow-x: auto; padding-bottom: 2px; }
}

@media (max-width: 620px) {
  .site-header__inner,
  .site-footer__inner,
  .stories,
  .about-band,
  .article-page,
  .hero__copy { width: min(100% - 28px, 1180px); }
  .brand img { width: 44px; height: 44px; }
  .brand small { font-size: 0.75rem; }
  .site-header nav a { white-space: nowrap; font-size: 0.82rem; padding: 7px 10px; }
  .hero > img { min-height: 180px; object-fit: cover; }
  .hero__copy { padding: 28px 0 32px; }
  .hero__copy h1, .article-hero h1 { font-size: 2.45rem; }
  .stories { padding: 46px 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 10px; }
  .story-grid { grid-template-columns: 1fr; }
  .story-card__visual { min-height: 112px; }
  .about-band { grid-template-columns: 1fr; gap: 18px; margin-bottom: 46px; }
  .article-page { padding: 34px 0 54px; }
  .breadcrumbs { margin-bottom: 24px; }
  .article-content { font-size: 1.03rem; line-height: 1.78; }
  .prayer { padding: 24px 22px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav__item--next { grid-column: 1; text-align: left; }
  .site-footer__inner { grid-template-columns: auto 1fr; padding: 26px 0; }
  .site-footer nav { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
