/* ==========================================================================
   Orthodox Integrity — "Byzantine Broadsheet"
   A serious affairs-journal: warm newsprint, oxblood accent, a whisper of
   liturgical gold. Cormorant Garamond display + Spectral body. Column rules
   in place of cards. Restraint over decoration.
   ========================================================================== */

:root {
  /* Paper & ink */
  --paper:       #f5f1e8;
  --paper-panel: #ede6d6;
  --paper-deep:  #e7dfcc;
  --ink:         #1b1814;
  --ink-soft:    #4c463b;
  --ink-mute:    #685f4f;  /* WCAG AA: ≥4.5:1 on paper and paper-deep */
  --ink-faint:   #b4ab97;  /* decorative only (e.g. byline separators) */

  /* Accent: Byzantine oxblood + a restrained liturgical gold */
  --oxblood:      #7a1320;
  --oxblood-deep: #5a0d18;
  --oxblood-tint: #f0e2dd;
  --gold:         #9c7b3f;

  /* Rules */
  --rule:      #d4cab4;
  --rule-soft: #e4dcc9;
  --rule-ink:  #2a251d;

  /* Type */
  --display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --body:    "Spectral", Georgia, "Times New Roman", serif;

  /* Measure & rhythm */
  --wrap:   1120px;
  --narrow: 680px;
  --gut:    clamp(1.25rem, 4vw, 3rem);

  --shadow-soft: 0 1px 2px rgba(27,24,20,.05), 0 14px 40px -28px rgba(27,24,20,.45);
}

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  /* Faint newsprint grain — tasteful, low-cost, fixed so it reads as paper. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--oxblood); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; color: var(--ink); margin: 0; letter-spacing: .002em; }
p { margin: 0 0 1.1em; }

::selection { background: var(--oxblood); color: var(--paper); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Keep skip-link / in-page anchor targets clear of the sticky nav. */
main, :target { scroll-margin-top: 5.5rem; }

/* ---- Layout helpers ---------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap--narrow { max-width: var(--narrow); }

/* Shared editorial label: small-caps, letterspaced, oxblood */
.kicker {
  font-family: var(--body);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0 0 .7rem;
}
.kicker--sm { font-size: .64rem; margin-bottom: .5rem; }
.lang-flag {
  display: inline-block;
  margin-left: .5em;
  padding: .08em .5em;
  font-size: .82em;
  letter-spacing: .14em;
  color: var(--ink-mute);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

/* Byline / dateline */
.byline {
  font-family: var(--body);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 1rem 0 0;
}
.byline--sm { font-size: .68rem; margin-top: .6rem; }
.byline__sep { margin: 0 .55em; color: var(--ink-faint); }
.byline__org { color: var(--ink-soft); font-weight: 600; }

/* ==========================================================================
   Site header / masthead
   ========================================================================== */
.utility-bar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.utility-bar__inner {
  max-width: var(--wrap); margin-inline: auto; padding: .5rem var(--gut);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--body);
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-mute);
}
.utility-bar__edition { color: var(--oxblood); }

.masthead { text-align: center; padding: clamp(1.5rem, 4vw, 2.6rem) var(--gut) clamp(1.1rem, 3vw, 1.6rem); }
.masthead__brand {
  display: inline-flex; align-items: center; gap: clamp(.7rem, 2vw, 1.2rem);
  color: var(--ink);
}
.masthead__words { display: flex; flex-direction: column; align-items: center; text-align: center; }
.masthead__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: .94;
  letter-spacing: .01em;
  color: var(--ink);
}
.masthead__tagline {
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(.82rem, 2.2vw, 1.02rem);
  letter-spacing: .02em;
  color: var(--ink-soft);
  margin-top: .55rem;
  max-width: 40ch;
}

/* Classic broadsheet double rule under the masthead */
.site-nav {
  border-top: 3px solid var(--rule-ink);
  border-bottom: 1px solid var(--rule-ink);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 var(--paper), 0 10px 24px -22px rgba(27,24,20,.5);
}
.site-nav__inner {
  max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut);
  display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(1rem, 4vw, 2.6rem);
}
.site-nav__link {
  display: inline-block;
  padding: .85rem .2rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  transition: color .2s ease;
}
.site-nav__link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: .55rem; height: 2px;
  background: var(--oxblood); transition: right .25s ease;
}
.site-nav__link:hover { color: var(--oxblood); }
.site-nav__link:hover::after,
.site-nav__link.is-active::after { right: 0; }
.site-nav__link.is-active { color: var(--ink); }

/* ==========================================================================
   Front page — lead story
   ========================================================================== */
.lead { padding-top: clamp(2rem, 6vw, 3.4rem); padding-bottom: clamp(1.5rem, 4vw, 2.4rem); }
.lead__article { max-width: 860px; margin-inline: auto; text-align: center; }
.lead__title {
  font-size: clamp(2.1rem, 6.4vw, 4rem);
  font-weight: 700;
  line-height: 1.02;
  margin: 0 0 .8rem;
}
.lead__title a { color: var(--ink); background-image: linear-gradient(var(--oxblood), var(--oxblood)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 92%; transition: background-size .3s ease, color .25s ease; }
.lead__title a:hover { color: var(--oxblood); }
.lead__standfirst {
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 56ch;
  margin: 0 auto .4rem;
}
.lead .byline { display: flex; justify-content: center; }
.lead__more { margin-top: 1.4rem; }

.readmore {
  font-family: var(--body);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--oxblood);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color .2s ease, letter-spacing .2s ease;
}
.readmore:hover { color: var(--oxblood-deep); letter-spacing: .19em; }

/* ==========================================================================
   Front page — story columns (newspaper rules, not cards)
   ========================================================================== */
.stories { padding-bottom: clamp(3rem, 8vw, 5rem); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
  border-top: 3px double var(--rule-ink);
  padding-top: 1rem; margin-top: 1.5rem; margin-bottom: 2rem;
}
.section-head__title {
  font-size: 1.05rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  font-family: var(--body); color: var(--ink);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.story {
  padding: 1.6rem clamp(1.1rem, 2.2vw, 1.9rem);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
/* Reset the left rule on the first column of each row of 3 */
.story:nth-child(3n+1) { border-left: 0; padding-left: 0; }
.story:nth-child(3n)   { padding-right: 0; }
.story__title { font-size: 1.5rem; font-weight: 600; line-height: 1.1; margin: 0 0 .55rem; }
.story__title a { color: var(--ink); transition: color .2s ease; }
.story__title a:hover { color: var(--oxblood); }
.story__dek { font-size: .98rem; color: var(--ink-soft); line-height: 1.55; margin: 0; }

/* Staggered load-in */
.page-front .lead__article,
.page-front .story {
  opacity: 0; transform: translateY(14px);
  animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards;
}
.page-front .lead__article { animation-delay: .05s; }
.page-front .story:nth-child(1) { animation-delay: .12s; }
.page-front .story:nth-child(2) { animation-delay: .19s; }
.page-front .story:nth-child(3) { animation-delay: .26s; }
.page-front .story:nth-child(4) { animation-delay: .33s; }
.page-front .story:nth-child(5) { animation-delay: .40s; }
.page-front .story:nth-child(6) { animation-delay: .47s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ==========================================================================
   Language filter
   ========================================================================== */
.lang-filter { display: inline-flex; gap: .35rem; }
.lang-filter__btn {
  font-family: var(--body);
  font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-mute);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: .4em .8em;
  cursor: pointer;
  transition: all .18s ease;
}
.lang-filter__btn:hover { color: var(--oxblood); border-color: var(--oxblood); }
.lang-filter__btn.is-active { color: var(--paper); background: var(--oxblood); border-color: var(--oxblood); }

/* ==========================================================================
   Archive (all articles)
   ========================================================================== */
.archive { padding-top: clamp(2.2rem, 6vw, 3.4rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.archive__head { text-align: center; margin-bottom: 2.4rem; }
.archive__title { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 700; margin: 0 0 .6rem; }
.archive__intro { font-style: italic; color: var(--ink-soft); max-width: 52ch; margin: 0 auto 1.4rem; }
.archive__head .lang-filter { justify-content: center; }

.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-item { border-top: 1px solid var(--rule); }
.archive-item:last-child { border-bottom: 1px solid var(--rule); }
.archive-item__link {
  display: block;
  padding: 1.8rem 0;
  color: inherit;
}
.archive-item__title { font-size: 1.7rem; font-weight: 600; line-height: 1.08; margin: 0 0 .4rem; color: var(--ink); transition: color .2s ease; }
.archive-item__link:hover .archive-item__title { color: var(--oxblood); }
.archive-item__dek { color: var(--ink-soft); font-size: 1rem; line-height: 1.55; margin: 0; max-width: 70ch; }

/* ==========================================================================
   Article
   ========================================================================== */
.article { padding-top: clamp(1.6rem, 4vw, 2.6rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.article__crumb { font-family: var(--body); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 2rem; }
.article__crumb a { color: var(--ink-mute); }
.article__crumb a:hover { color: var(--oxblood); }

.article__head { text-align: center; margin-bottom: 1.6rem; }
.article__title {
  font-size: clamp(2.05rem, 5.6vw, 3.3rem);
  font-weight: 700;
  line-height: 1.04;
  margin: 0 auto .9rem;
  max-width: 22ch;
}
.byline--article { display: flex; justify-content: center; flex-wrap: wrap; margin-top: 0; }

.article__lead-image {
  margin: 2rem 0;
  border: 1px solid var(--rule);
  background: var(--paper-panel);
}
.article__lead-image img { width: 100%; }

/* The reading column */
.prose { font-size: 1.18rem; line-height: 1.78; color: var(--ink); }
.prose .article-body,
.prose p { margin: 0 0 1.3em; }

/* Dateline / photo-credit line lifted above the body copy */
.article-dateline {
  text-align: center;
  font-style: italic;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 1.8em;
  padding-bottom: 1.4em;
  border-bottom: 1px solid var(--rule-soft);
}

/* Drop cap on the first true paragraph of an article */
.article__body .article-lede::first-letter {
  font-family: var(--display);
  font-weight: 700;
  float: left;
  font-size: 3.9em;
  line-height: .76;
  padding: .04em .12em 0 0;
  margin-top: .04em;
  color: var(--oxblood);
}

.prose h2 {
  font-size: 1.7rem; font-weight: 600; line-height: 1.12;
  margin: 2.2em 0 .55em;
  padding-top: .9em;
  border-top: 1px solid var(--rule-soft);
}
.prose h3 { font-size: 1.35rem; font-weight: 600; margin: 1.8em 0 .5em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose a { background-image: linear-gradient(var(--oxblood), var(--oxblood)); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 1.05em; transition: background-position .2s ease, color .2s ease; }
.prose a:hover { color: var(--oxblood-deep); background-position: 0 1.15em; }

.prose blockquote {
  margin: 1.6em 0; padding: .2em 0 .2em 1.4em;
  border-left: 3px solid var(--oxblood);
  font-style: italic; color: var(--ink-soft);
  font-size: 1.18em; line-height: 1.5;
}
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }

/* Italic caption paragraphs (image credits) sit quieter */
.prose > .article-body:last-of-type em:only-child,
.prose .article-body em:only-child { color: var(--ink-mute); }

/* Primary-source footer line */
.article-source {
  margin-top: 2.2em;
  padding: 1.1em 1.3em;
  background: var(--paper-panel);
  border-left: 3px solid var(--gold);
  font-size: .98rem;
  line-height: 1.5;
  color: var(--ink-soft);
  word-break: break-word;
}
.article-source a { color: var(--oxblood); }

.article__foot {
  margin-top: 3rem; padding-top: 1.4rem;
  border-top: 3px double var(--rule-ink);
}
.article__back { margin: 0 0 .6rem; }
.article__back a { font-family: var(--body); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--oxblood); }
.article__share { font-style: italic; color: var(--ink-mute); font-size: .98rem; margin: 0; }

/* ==========================================================================
   About / generic prose pages
   ========================================================================== */
.about { padding-top: clamp(2.2rem, 6vw, 3.4rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.about h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 700; margin-bottom: .8rem; }
.about__lead { font-size: 1.32rem; font-style: italic; color: var(--ink-soft); line-height: 1.5; }
.about h2 { margin-top: 1.8em; }

/* ==========================================================================
   Empty / error states
   ========================================================================== */
.empty-state { text-align: center; padding-top: clamp(3rem, 9vw, 6rem); padding-bottom: clamp(3rem, 9vw, 6rem); }
.empty-state h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: .6rem; }
.empty-state p { color: var(--ink-soft); }
.empty-state .readmore { display: inline-block; margin: .4rem .6rem 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-foot {
  margin-top: clamp(3rem, 8vw, 5rem);
  border-top: 3px solid var(--rule-ink);
  background: var(--paper-deep);
}
.site-foot__inner {
  max-width: var(--wrap); margin-inline: auto; padding: clamp(2.2rem, 5vw, 3.4rem) var(--gut);
  display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: clamp(1.5rem, 4vw, 3rem);
}
.site-foot__name { font-family: var(--display); font-size: 1.9rem; font-weight: 600; color: var(--ink); display: block; }
.site-foot__tagline { font-style: italic; color: var(--ink-soft); font-size: .96rem; margin: .4rem 0 0; }
.site-foot__nav { display: flex; flex-direction: column; gap: .55rem; }
.site-foot__nav a {
  font-family: var(--body); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.site-foot__nav a:hover { color: var(--oxblood); }
.site-foot__legal { font-size: .9rem; color: var(--ink-mute); line-height: 1.6; }
.site-foot__legal a { color: var(--oxblood); }
.site-foot__copy { margin-top: 1rem; font-size: .8rem; letter-spacing: .04em; color: var(--ink-mute); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr 1fr; }
  .story:nth-child(3n+1) { border-left: 1px solid var(--rule); padding-left: clamp(1.1rem, 2.2vw, 1.9rem); }
  .story:nth-child(3n)   { padding-right: clamp(1.1rem, 2.2vw, 1.9rem); }
  .story:nth-child(2n+1) { border-left: 0; padding-left: 0; }
  .story:nth-child(2n)   { padding-right: 0; }
  .site-foot__inner { grid-template-columns: 1fr 1fr; }
  .site-foot__legal { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .story-grid { grid-template-columns: 1fr; }
  .story { border-left: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
  .utility-bar__edition { display: none; }
  .site-foot__inner { grid-template-columns: 1fr; }
  .prose { font-size: 1.08rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .page-front .lead__article, .page-front .story { opacity: 1; transform: none; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}
