:root {
  --navy: #073363;
  --navy-deep: #052747;
  --green: #08654b;
  --green-deep: #064c39;
  --gold: #c99029;
  --gold-light: #f2c668;
  --ink: #172b3a;
  --muted: #5f6e78;
  --paper: #fffefa;
  --cream: #f7f4ec;
  --sky: #edf5f7;
  --line: #dce4e3;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(4, 42, 68, .11);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--serif); font-size: 1rem; line-height: 1.65; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--white); color: var(--navy); border-radius: 0 0 .35rem .35rem; font: 700 .9rem/1 var(--sans); }
.skip-link:focus { top: 0; }

.site-header { position: relative; z-index: 5; background: var(--navy-deep); color: var(--white); border-bottom: 3px solid var(--gold); }
.nav { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--white); text-decoration: none; font-size: 1.35rem; letter-spacing: -.02em; white-space: nowrap; }
.brand strong { color: var(--gold-light); font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; color: var(--gold-light); font: 700 1.1rem/1 var(--serif); }
.nav-links { align-self: stretch; display: flex; align-items: stretch; gap: 1.9rem; font: 700 .92rem/1 var(--sans); }
.nav-links a { position: relative; display: flex; align-items: center; color: rgba(255,255,255,.84); text-decoration: none; }
.nav-links a::after { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold-light); content: ""; transform: scaleX(0); transition: transform .18s ease; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a:focus-visible::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links .social-link { color: var(--gold-light); }

.home-hero { overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--sky) 100%); border-bottom: 1px solid var(--line); }
.hero-art { max-width: 880px; margin: 0 auto; padding: 1.25rem 1.5rem 0; }
.hero-art img { width: 100%; height: auto; border-radius: 4px; }
.hero-copy { max-width: 950px; margin: 0 auto; padding: 2.25rem 1.5rem 4.5rem; text-align: center; }
.eyebrow { margin: 0 0 .8rem; color: var(--green); font: 800 .76rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.light { color: var(--gold-light); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 1.3rem; color: var(--navy); font-size: clamp(2.7rem, 6vw, 5.3rem); font-weight: 700; line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
h2 { color: var(--navy); font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
h3 { color: var(--navy); font-size: 1.3rem; line-height: 1.25; }
.lede { max-width: 760px; margin-right: auto; margin-bottom: 0; margin-left: auto; color: #455e6c; font-size: 1.2rem; line-height: 1.7; }
.buttons { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-copy .buttons { justify-content: center; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: .55rem; padding: .78rem 1.2rem; border: 1px solid transparent; border-radius: 5px; text-decoration: none; font: 800 .92rem/1 var(--sans); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(201,144,41,.35); outline-offset: 2px; }
.button.primary { background: var(--green); color: var(--white); box-shadow: 0 8px 20px rgba(8,101,75,.18); }
.button.primary:hover { background: var(--green-deep); }
.button.quiet { border-color: #9aadb4; background: rgba(255,255,255,.6); color: var(--navy); }
.button.quiet:hover { background: var(--white); }
.button.gold { background: var(--gold-light); color: var(--navy-deep); }

.section { max-width: 1180px; margin: 0 auto; padding: 5.5rem 1.5rem; }
.section-heading { max-width: 680px; margin: 0 auto 2.5rem; text-align: center; }
.section-heading h2 { margin-bottom: 1rem; }
.section-heading > p:last-child { color: var(--muted); font-size: 1.08rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature-card { position: relative; overflow: hidden; min-height: 250px; padding: 2rem; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--green); box-shadow: 0 12px 28px rgba(4,42,68,.06); }
.feature-card:nth-child(2) { border-top-color: var(--gold); }
.feature-card:nth-child(3) { border-top-color: var(--navy); }
.feature-card h3 { margin: 2.3rem 0 .7rem; }
.feature-card p { margin: 0; color: var(--muted); }
.feature-number { position: absolute; top: 1rem; right: 1.3rem; color: rgba(7,51,99,.1); font: 700 3.3rem/1 var(--serif); }
.featured-section { background: var(--navy); color: var(--white); border-top: 5px solid var(--gold); }
.featured-inner { max-width: 1180px; margin: 0 auto; padding: 4.2rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.featured-inner > div { max-width: 730px; }
.featured-inner h2 { margin-bottom: .8rem; color: var(--white); }
.featured-inner p:last-child { margin: 0; color: rgba(255,255,255,.74); }

.page-intro { background: linear-gradient(135deg, var(--sky), var(--cream)); border-bottom: 1px solid var(--line); }
.page-intro-inner { max-width: 1180px; margin: 0 auto; padding: 4.8rem 1.5rem 4rem; }
.page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.page-title-row h1 { margin-bottom: .8rem; font-size: clamp(2.8rem, 5vw, 4.7rem); }
.page-title-row p { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 1.1rem; }
.collection-count { flex: 0 0 auto; margin-bottom: .45rem; padding: .5rem .8rem; border: 1px solid #c8d5d4; background: rgba(255,255,255,.62); color: var(--green); font: 800 .8rem/1 var(--sans); letter-spacing: .04em; }
.library-section { display: grid; gap: 1.5rem; }
.hymn-list { display: grid; gap: 1.5rem; }
.hymn-card { display: grid; grid-template-columns: 165px 1fr; min-height: 300px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sheet-icon { display: grid; place-items: center; color: var(--gold-light); background: linear-gradient(145deg, var(--navy), #0b4c79); font-size: 5rem; }
.sheet-icon span { display: grid; place-items: center; width: 92px; height: 120px; border: 2px solid rgba(255,255,255,.42); border-radius: 4px; background: rgba(255,255,255,.07); }
.hymn-details { padding: 2.7rem 3rem; }
.card-label { margin-bottom: .55rem; color: var(--green); font: 800 .76rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.hymn-details h2 { margin-bottom: .8rem; font-size: clamp(1.7rem, 3vw, 2.55rem); }
.hymn-details > p:last-of-type { max-width: 650px; margin-bottom: 0; color: var(--muted); }
.hymn-error { margin: 0; padding: 1.2rem 1.4rem; border-left: 4px solid var(--gold); background: var(--cream); color: var(--muted); }
.request-card { padding: 2rem 2.3rem; display: grid; grid-template-columns: 1.1fr 1fr auto; align-items: center; gap: 2rem; background: var(--cream); border-left: 4px solid var(--gold); }
.request-card .eyebrow { margin-bottom: .45rem; }
.request-card h2 { margin: 0; font-size: 1.6rem; }
.request-card > p { margin: 0; color: var(--muted); }
.text-link { color: var(--green); font: 800 .92rem/1 var(--sans); text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.contact-main { min-height: calc(100vh - 76px); background: linear-gradient(135deg, #f1f7f8 0%, var(--cream) 100%); }
.contact-shell { max-width: 1180px; margin: 0 auto; padding: 5.2rem 1.5rem 5.8rem; display: grid; grid-template-columns: minmax(0, .82fr) minmax(540px, 1.18fr); align-items: center; gap: clamp(3rem, 7vw, 6.5rem); }
.contact-copy h1 { margin-bottom: 1.25rem; font-size: clamp(3rem, 5vw, 4.8rem); }
.contact-copy .lede { margin-left: 0; font-size: 1.1rem; }
.contact-emblem { width: 235px; height: auto; aspect-ratio: 1 / 1; object-fit: contain; margin-top: 2.2rem; mix-blend-mode: multiply; }
.form-card { padding: clamp(2rem, 4vw, 3.2rem); background: var(--white); border-top: 5px solid var(--gold); box-shadow: var(--shadow); }
.form-heading { margin-bottom: 1.8rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.form-heading h2 { margin-bottom: .3rem; font-size: 2rem; }
.form-heading p { margin: 0; color: var(--muted); font: .88rem/1.4 var(--sans); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; margin-bottom: .5rem; color: var(--ink); font: 800 .88rem/1.3 var(--sans); }
.form-field input, .form-field textarea { display: block; width: 100%; border: 1px solid #bdcbce; border-radius: 4px; background: #fbfcfc; color: var(--ink); font: 1rem/1.5 var(--sans); transition: border-color .15s, box-shadow .15s, background .15s; }
.form-field input { height: 52px; padding: 0 .9rem; }
.form-field textarea { min-height: 185px; padding: .8rem .9rem; resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #89969d; }
.form-field input:hover, .form-field textarea:hover { border-color: #8fa4a8; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--green); background: var(--white); box-shadow: 0 0 0 3px rgba(8,101,75,.1); outline: none; }
.submit-button { min-width: 170px; border: 0; }

.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.74); border-top: 1px solid rgba(255,255,255,.08); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 2.7rem 1.5rem; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1.6rem 3rem; }
.footer-brand { color: var(--white); font-size: 1.22rem; }
.footer-brand strong { color: var(--gold-light); }
.footer-brand span { display: block; margin-top: .22rem; color: rgba(255,255,255,.58); font: .82rem/1.4 var(--sans); }
.footer-links { display: flex; gap: 1.5rem; font: 700 .86rem/1.3 var(--sans); }
.footer-links a { color: rgba(255,255,255,.78); text-decoration: none; }
.footer-links a:hover { color: var(--gold-light); }
.copyright { grid-column: 1 / -1; margin: 0; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.5); font: .78rem/1.4 var(--sans); }

@media (max-width: 900px) {
  .features { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; }
  .featured-inner { align-items: flex-start; flex-direction: column; }
  .contact-shell { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-copy { display: grid; grid-template-columns: 1fr 150px; gap: 0 2rem; align-items: end; }
  .contact-copy .eyebrow, .contact-copy h1, .contact-copy .lede { grid-column: 1; }
  .contact-emblem { grid-column: 2; grid-row: 1 / span 3; width: 150px; margin: 0; }
  .request-card { grid-template-columns: 1fr; gap: .8rem; }
}

@media (max-width: 680px) {
  .nav { min-height: auto; padding: .85rem 1rem 0; flex-direction: column; align-items: stretch; gap: .65rem; }
  .brand { align-self: center; }
  .nav-links { width: 100%; min-height: 45px; justify-content: space-between; gap: .6rem; overflow-x: auto; font-size: .82rem; }
  .nav-links a { padding-bottom: .75rem; white-space: nowrap; }
  .hero-art { padding: 1rem .75rem 0; }
  .hero-art img { height: auto; }
  .hero-copy { padding: 2rem 1.15rem 3.7rem; }
  h1 { font-size: 2.65rem; }
  .lede { font-size: 1.06rem; }
  .buttons, .hero-copy .buttons { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .section { padding: 4rem 1rem; }
  .page-intro-inner { padding: 3.5rem 1rem 3rem; }
  .page-title-row { align-items: flex-start; flex-direction: column; gap: 1.3rem; }
  .collection-count { margin: 0; }
  .hymn-card { grid-template-columns: 1fr; }
  .sheet-icon { min-height: 160px; }
  .hymn-details { padding: 2rem 1.35rem; }
  .request-card { padding: 1.7rem 1.4rem; }
  .contact-shell { padding: 3.6rem 1rem 4.3rem; }
  .contact-copy { display: block; }
  .contact-emblem { width: 130px; margin: 1.8rem auto 0; }
  .form-card { padding: 1.6rem 1.15rem 1.8rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { grid-template-columns: 1fr; align-items: start; padding: 2.3rem 1rem; }
  .copyright { grid-column: 1; }
}

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