/* ============================================================
   St. John's Lutheran Church — stylesheet
   Tokens: Ink / Paper / Card / Gilt / Wine / Slate
   Display: Fraunces · Body: Inter · Rubric: IBM Plex Mono
   ============================================================ */

:root {
  --ink:    #1B2230;
  --paper:  #EEEAE0;
  --card:   #FAF8F2;
  --gilt:   #A6802E;
  --wine:   #6E2030;
  --slate:  #4A4E5C;
  --line:   #D9D3C4;

  --display: "Fraunces", Georgia, serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --rubric:  "IBM Plex Mono", "Courier New", monospace;

  --max: 760px;
  --gap: clamp(1.5rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0 0 0.5em; line-height: 1.15; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1.1em; }

a { color: var(--wine); text-decoration: underline; text-decoration-color: var(--gilt); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gilt); }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6em 1em;
  z-index: 200;
  font-family: var(--rubric);
  font-size: 0.85rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Rubric / utility labels ---------- */
.rubric {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gilt);
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--ink);
  color: #fff;
}
.header-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gap);
}
.brand {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--gilt); }
.brand small {
  display: block;
  font-family: var(--rubric);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: #c8b98a;
  font-weight: 500;
  margin-top: 0.25em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-family: var(--rubric);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5em 0.9em;
  cursor: pointer;
  border-radius: 2px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-family: var(--rubric);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e6e1d3;
  text-decoration: none;
  padding-bottom: 0.3em;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a.is-current {
  color: #fff;
  border-bottom-color: var(--gilt);
}

@media (max-width: 700px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
    padding: 0 var(--gap) 1.1rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.9rem; }
  .header-inner { flex-wrap: wrap; }
}

/* ---------- Layout shells ---------- */
main { display: block; }
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--gap);
}
.prose { max-width: var(--max); }

section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
section + section { border-top: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem);
}
.hero-rule {
  width: 48px;
  height: 2px;
  background: var(--wine);
  margin-bottom: 1.4rem;
}
.hero h1 { max-width: 14ch; }
.hero .lede {
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--ink);
}

/* ---------- Full-width photo break ---------- */
.photo-break {
  width: 100%;
  height: clamp(220px, 35vw, 420px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- Full-bleed hero (image + overlay) ---------- */
.hero-full {
  position: relative;
  padding: 0;
  min-height: clamp(420px, 55vw, 680px);
  display: flex;
  align-items: center;
  border-bottom: none;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(18, 22, 32, 0.55) 0%,
    rgba(18, 22, 32, 0.62) 60%,
    rgba(18, 22, 32, 0.75) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-top: clamp(3rem, 8vw, 5.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.hero-rule-light {
  background: var(--gilt) !important;
}
.rubric-light {
  color: #c8b98a !important;
}
.hero-title-light {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.lede-light {
  color: #e8e4d8 !important;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1.4rem, 3vw, 2rem);
}
.card + .card { margin-top: 1.2rem; }
.card-grid .card + .card { margin-top: 0; }

.card-grid {
  display: grid;
  gap: 1.2rem;
}
@media (min-width: 640px) {
  .card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

.fact {
  display: flex;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.fact:last-child { border-bottom: none; }
.fact dt { flex: 0 0 110px; }
.fact dd { margin: 0; }

/* ---------- Confession list (anaphora device) ---------- */
.confession-item {
  border-left: 2px solid var(--wine);
  padding-left: 1.3rem;
  margin-bottom: 1.8rem;
}
.confession-item strong { color: var(--ink); }

.confessional-texts {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.confessional-texts li {
  font-family: var(--rubric);
  font-size: 0.88rem;
  padding: 0.55em 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.confessional-texts li:last-child { border-bottom: none; }

/* ---------- Notice / vacancy callout ---------- */
.notice {
  background: var(--card);
  border-left: 3px solid var(--gilt);
  padding: 1.1rem 1.4rem;
  border-radius: 0 4px 4px 0;
}

/* ---------- Calendar embed ---------- */
.calendar-frame {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  overflow: hidden;
}
.calendar-frame iframe { width: 100%; height: 600px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #cfcabb;
  padding: clamp(2rem, 5vw, 3rem) 0;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer a { color: #e6e1d3; text-decoration-color: var(--gilt); }
.site-footer .copyright {
  font-family: var(--rubric);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #93907f;
  margin-top: 1.6rem;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.2rem;
}

/* ---------- Signature: ribbon bookmark ---------- */
.ribbon {
  position: fixed;
  top: 0;
  right: clamp(1rem, 4vw, 3rem);
  background: var(--wine);
  color: #f3e9d8;
  font-family: var(--rubric);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.9em 0.55em 1.3em;
  writing-mode: vertical-rl;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
  z-index: 50;
  pointer-events: none;
}
@media (max-width: 900px) {
  .ribbon { display: none; }
}
