:root {
  --cream: #f7f3ea;
  --paper: #fffdf8;
  --white: #ffffff;
  --charcoal: #1f2420;
  --muted: #5a645c;
  --line: #ddd4c4;
  --forest: #2f4a3a;
  --forest-soft: #e4eee8;
  --red: #8b2e2e;
  --red-deep: #6e2323;
  --red-soft: #f3e4e2;
  --shadow: 0 10px 28px rgba(40, 35, 25, 0.07);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
  font-size: 1.125rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  background: var(--paper);
  color: var(--charcoal);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
}

.skip-link:focus {
  left: 0.75rem;
}

a {
  color: var(--forest);
}

.hero {
  position: relative;
  min-height: 56vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #2a322e;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 28, 24, 0.78) 0%,
    rgba(20, 28, 24, 0.28) 50%,
    rgba(20, 28, 24, 0.35) 100%
  );
}

.hero-text {
  position: relative;
  z-index: 1;
  padding: 2.75rem 1.35rem 2.25rem;
  color: var(--white);
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  opacity: 0.92;
  font-family: system-ui, -apple-system, sans-serif;
}

h1 {
  margin: 0 0 0.45rem;
  font-weight: 500;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.tagline {
  margin: 0;
  font-size: clamp(1.15rem, 2.8vw, 1.35rem);
  opacity: 0.96;
}

main {
  max-width: 40rem;
  margin: -1.75rem auto 0;
  padding: 0 1.25rem 3.5rem;
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1.1rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.45rem 1.55rem;
  box-shadow: var(--shadow);
}

h2 {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--forest);
}

.welcome .lede {
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 0;
}

.service-time {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0 0 0.85rem;
  padding: 0.95rem 1.05rem;
  background: var(--red-soft);
  border-left: 4px solid var(--red);
  border-radius: 8px;
}

.service-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red-deep);
}

.service-when {
  font-size: 1.3rem;
}

address {
  font-style: normal;
  margin: 0 0 0.85rem;
}

.button {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: var(--forest-soft);
  color: var(--forest);
  text-decoration: none;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.98rem;
  border: 1px solid #b7c9bc;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  background: #d5e5db;
}

.button.primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red-deep);
  font-weight: 600;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--red-deep);
}

.button.secondary {
  background: var(--paper);
  color: var(--charcoal);
  border-color: #c9bfb0;
  font-weight: 600;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: #f0ebe3;
  border-color: var(--muted);
}

.button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.map-links .button {
  margin-top: 0;
}

.map-wrap {
  margin-top: 1.1rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8e4dc;
  aspect-ratio: 16 / 10;
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
}

.field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 1.05rem;
  font-family: system-ui, -apple-system, sans-serif;
  border: 1px solid #c9bfb0;
  border-radius: 8px;
  background: var(--white);
  color: var(--charcoal);
}

.field input:focus {
  outline: 2px solid var(--forest);
  outline-offset: 1px;
  border-color: var(--forest);
}


.field .optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
}

.privacy-note {
  margin: 0 0 0.95rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.form-status {
  min-height: 1.4em;
  margin: 0.85rem 0 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.98rem;
}

.form-status.success {
  color: var(--forest);
}

.form-status.error {
  color: var(--red-deep);
}

footer {
  text-align: center;
  padding: 0.5rem 1.25rem 2.75rem;
  color: var(--muted);
  font-size: 1rem;
}

footer p {
  margin: 0.25rem 0;
}

footer .fine {
  font-size: 0.9rem;
  font-family: system-ui, -apple-system, sans-serif;
}

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

  .hero {
    min-height: 48vh;
  }

  .card {
    padding: 1.3rem 1.15rem 1.35rem;
  }

  .service-when {
    font-size: 1.2rem;
  }
}

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

.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 1.05rem;
  font-family: system-ui, -apple-system, sans-serif;
  border: 1px solid #c9bfb0;
  border-radius: 8px;
  background: var(--white);
  color: var(--charcoal);
  min-height: 8rem;
  resize: vertical;
  line-height: 1.45;
}

.field textarea:focus {
  outline: 2px solid var(--forest);
  outline-offset: 1px;
  border-color: var(--forest);
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.35rem 0 1rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.98rem;
}

.field-check input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.field-check label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}

.page-nav {
  margin: 0 0 0.5rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
}

.page-nav a {
  text-decoration: none;
  color: var(--forest);
}

.page-nav a:hover {
  text-decoration: underline;
}

.form-status.warn {
  color: #8a5a12;
}

.notify-unsub {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.notify-unsub .button {
  margin-top: 0;
}

footer .footer-nav {
  margin: 0.55rem 0 0.35rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.98rem;
}

footer .footer-nav a {
  color: var(--forest);
  text-decoration: none;
  font-weight: 600;
}

footer .footer-nav a:hover,
footer .footer-nav a:focus-visible {
  text-decoration: underline;
}

footer .fine a {
  color: var(--forest);
  text-decoration: none;
}

footer .fine a:hover,
footer .fine a:focus-visible {
  text-decoration: underline;
}

/* Order of Service */
.service-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.25rem 0 0.85rem;
}

.button.big {
  font-size: 1.08rem;
  padding: 0.8rem 1.35rem;
}

.service-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.service-tabs .button {
  margin-top: 0;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 0.7rem 1.2rem;
}

.service-page .liturgy {
  font-size: 1.22rem;
  line-height: 1.7;
}

.liturgy p {
  margin: 0 0 0.9rem;
}

.liturgy .resp {
  font-weight: 700;
  padding-left: 0.85rem;
  border-left: 3px solid var(--forest-soft);
}

.liturgy .rubric {
  margin: 1.4rem 0 0.55rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red-deep);
}

.liturgy .rubric + .rubric {
  margin-top: 0.55rem;
}

.cover-verse {
  margin: 0 0 1.1rem;
  padding: 0.95rem 1.05rem;
  background: var(--forest-soft);
  border-radius: 8px;
  font-style: italic;
}

.cover-verse p {
  margin: 0 0 0.35rem;
}

.cover-verse cite {
  font-style: normal;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  color: var(--forest);
}

@media (max-width: 600px) {
  .service-page .liturgy {
    font-size: 1.18rem;
  }
}

@media print {
  .hero, .skip-link, .page-nav, .service-tabs, footer .footer-nav, .visit .button {
    display: none !important;
  }
  body { background: #fff; font-size: 12pt; }
  main { margin: 0; max-width: none; padding: 0; display: block; }
  .card { box-shadow: none; border: 0; padding: 0; margin: 0 0 1.2rem; }
  .liturgy[hidden] { display: block !important; }
  #communion { break-before: page; }
  .service-page .liturgy { font-size: 12pt; line-height: 1.5; }
  .liturgy .rubric { break-after: avoid; }
  .cover-verse { background: none; border-left: 3px solid #999; }
}

/* Home navigation on subpages */
.hero-home-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-sub .hero-text {
  pointer-events: none;
  z-index: 2;
}

.hero-sub .hero-text a {
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
}

.hero-sub .hero-text a:hover,
.hero-sub .hero-text a:focus-visible {
  text-decoration: underline;
}

.button.home-pill {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.6rem 1.1rem 0.6rem 0.95rem;
  min-height: 44px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--forest);
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(20, 28, 24, 0.25);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.button.home-pill:hover,
.button.home-pill:focus-visible {
  background: var(--white);
}

@media print {
  .home-pill { display: none !important; }
}
