/* Unity Presbyterian Church
   Colors come from the old site: its slate blue, fawn and brown, deepened for easier reading. */

:root {
    --ink: #26303c;
    --ink-deep: #1c242e;
    --slate: #4b5c72;
    --slate-dark: #3a4859;
    --slate-soft: #e3e7ec;
    --paper: #f8f5ef;
    --sand: #efe8dc;
    --fawn: #c7b8a6;
    --fawn-light: #ddd2c3;
    --brown: #6a5442;
    --text: #2a2623;
    --muted: #625a53;
    --line: #e0d7ca;
    --white: #fff;
    --focus: #d9a441;

    --serif: "Libre Baskerville", Baskerville, Georgia, serif;
    --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
    --display: Cinzel, "Trajan Pro", Georgia, serif;

    --radius: 14px;
    --shadow: 0 1px 2px rgba(38, 48, 60, .06), 0 8px 24px rgba(38, 48, 60, .07);
    --gutter: clamp(16px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; }

/* The footer sits at the bottom of the window even on a short page. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font: 400 1.125rem/1.65 var(--sans);
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

/* Links aren't underlined until the pointer is over them. In running text they're semibold,
   so they still stand out from the words around them. */
a { color: var(--slate); text-decoration: none; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--slate-dark); text-decoration: underline; }
.btn:hover, .brand:hover, .nav__list a:hover, .skip-link:hover { text-decoration: none; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--brown); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 2.85rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

main { flex: 1 0 auto; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Announcement */

.notice { background: var(--fawn-light); color: var(--ink); }
.notice__inner { padding-top: 12px; padding-bottom: 12px; text-align: center; }
.notice p { margin: 0; font-weight: 600; }
.notice a { color: var(--ink); margin-left: .4em; font-weight: 700; }

/* Masthead */

.masthead { background: var(--ink); color: #e8e3db; }

.masthead__top {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding-top: 20px; padding-bottom: 18px;
}

.brand { display: flex; align-items: center; gap: 16px; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand__seal { width: 40px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font: 600 2.35rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; margin-right: -.16em; }
.brand__sub { font: 500 .8rem/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--fawn); margin-top: 8px; }

.times { display: flex; gap: 28px; margin: 0; }
.times div { border-left: 1px solid rgba(199, 184, 166, .4); padding-left: 18px; }
.times dt { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fawn); }
.times dd { margin: 2px 0 0; font: 400 1.2rem/1.2 var(--serif); color: var(--white); }

.nav { border-top: 1px solid rgba(255, 255, 255, .1); }
.nav__list { display: flex; justify-content: space-between; list-style: none; margin: 0 auto; }
.nav__list a {
    display: block; padding: 14px 2px 12px; color: #e8e3db; text-decoration: none;
    font-weight: 600; font-size: 1.02rem; letter-spacing: .02em;
    border-bottom: 3px solid transparent;
}
.nav__list a:hover { color: var(--white); border-bottom-color: rgba(199, 184, 166, .5); }
.nav__list a[aria-current="page"] { color: var(--white); border-bottom-color: var(--fawn); }

.nav-toggle {
    display: none; align-items: center; gap: 10px; padding: 10px 14px;
    background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px;
    font: 600 1rem var(--sans); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

@media (max-width: 960px) {
    .masthead__top { flex-wrap: wrap; row-gap: 14px; }
    .times { order: 3; width: 100%; gap: 0; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 12px; }
    .times div { flex: 1; border-left: 0; padding-left: 0; }
    .times div + div { border-left: 1px solid rgba(199, 184, 166, .4); padding-left: 18px; }
    .nav-toggle { display: inline-flex; }
    .nav { display: none; }
    .nav.is-open { display: block; }
    .nav__list { flex-direction: column; padding-top: 6px; padding-bottom: 12px; }
    .nav__list a { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 1.1rem; }
    .nav__list li:last-child a { border-bottom: 0; }
    .nav__list a[aria-current="page"] { border-bottom-color: rgba(255, 255, 255, .08); box-shadow: inset 4px 0 0 var(--fawn); padding-left: 14px; }
}

@media (max-width: 420px) {
    .brand { gap: 12px; }
    .brand__seal { width: 32px; }
    .brand__name { font-size: 1.85rem; }
    .brand__sub { font-size: .66rem; letter-spacing: .2em; }
}

/* Inner page heading */

.page-head { background: var(--sand); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: clamp(32px, 6vw, 56px); padding-bottom: clamp(28px, 5vw, 44px); }
.page-head h1 { margin: 0; }
.page-head h1::after { content: ""; display: block; width: 64px; height: 3px; background: var(--fawn); margin-top: 18px; border-radius: 2px; }

/* Buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .72em 1.35em; border-radius: 999px; border: 2px solid transparent;
    font: 600 1.02rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--slate); color: var(--white); }
.btn--primary:hover { background: var(--slate-dark); color: var(--white); }
.btn--quiet { border-color: var(--slate); color: var(--slate); background: transparent; }
.btn--quiet:hover { background: var(--slate); color: var(--white); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--sand); color: var(--ink); }
.btn--ghost { border-color: rgba(255, 255, 255, .55); color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); color: var(--white); border-color: var(--white); }
.btn--big { font-size: 1.1rem; padding: .85em 1.6em; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5em 0 0; }

/* Shared pieces */

.section { padding: clamp(40px, 7vw, 72px) 0; }
.section__title { margin-top: 2.2em; }

.kicker { font-size: .85rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--slate); margin-bottom: .9em; }

.lead { font-size: 1.2rem; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card__label { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .6em; }
.card__title { font-size: 1.35rem; margin-bottom: .6em; }
.card__more { margin-top: 1em; font-weight: 600; }
.card .actions { margin-top: 1em; }

.arch { border-radius: 999px 999px var(--radius) var(--radius); }

.empty { color: var(--muted); }

/* Page Text from the dashboard */

.rich-text > :last-child { margin-bottom: 0; }
.rich-text h2 { margin-top: 1.4em; }
.rich-text h3 { margin-top: 1.3em; }
.rich-text ul, .rich-text ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.rich-text li { margin-bottom: .35em; padding-left: .2em; }
.rich-text ul li::marker { color: var(--fawn); font-size: 1.15em; }
.rich-text ol li::marker { color: var(--brown); font-weight: 600; }
.rich-text strong { font-weight: 700; color: var(--ink); }
.rich-text a { font-weight: 600; }

.prose { max-width: 68ch; }
.page-intro { margin-bottom: 2em; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 6vw, 72px); align-items: start; }
.split__aside { display: grid; gap: 24px; }
.side-photo { margin: 0; }
.side-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.side-photo img.arch { border-radius: 999px 999px var(--radius) var(--radius); }

@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; }
    .split__aside { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .side-photo img.arch { max-width: 340px; }
}

/* Home */

.welcome { padding: clamp(40px, 7vw, 80px) 0 clamp(48px, 7vw, 88px); }
.welcome__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.welcome h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); }
.welcome__photo { margin: 0; justify-self: center; width: 100%; max-width: 420px; position: relative; }
.welcome__photo::before {
    content: ""; position: absolute; inset: 18px -18px -18px 18px;
    border: 2px solid var(--fawn); border-radius: 999px 999px var(--radius) var(--radius); z-index: 0;
}
.welcome__photo img { position: relative; z-index: 1; width: 100%; box-shadow: var(--shadow); }

@media (max-width: 860px) {
    .welcome__grid { grid-template-columns: 1fr; }
    .welcome__photo { max-width: 300px; }
}

.glance { background: var(--sand); padding: clamp(40px, 6vw, 64px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.glance__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.glance .card { display: flex; flex-direction: column; }
.glance .card .card__more { margin-top: auto; padding-top: 1em; }
@media (max-width: 900px) { .glance__grid { grid-template-columns: 1fr; } }

.card--bulletin { border-top: 4px solid var(--slate); }

.mini-events { list-style: none; margin: 0; padding: 0; }
.mini-events li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mini-events li:first-child { padding-top: 0; }
.mini-events__date { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
.mini-events__title { font-weight: 600; }

.visit { background: var(--ink); color: #e8e3db; padding: clamp(44px, 7vw, 72px) 0; }
.visit h2 { color: var(--white); }
.visit__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.visit__times { display: flex; flex-wrap: wrap; gap: 20px 48px; margin: 1em 0 0; }
.visit__times dt { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fawn); }
.visit__times dd { margin: 4px 0 0; font: 400 2rem/1.1 var(--serif); color: var(--white); }
.visit__address { font: 400 1.25rem/1.5 var(--serif); color: var(--white); margin: 0; }
.visit .actions { margin-top: 1.2em; }
@media (max-width: 760px) { .visit__grid { grid-template-columns: 1fr; } }

/* Bulletins */

.latest {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
    background: var(--ink); color: var(--white); border-radius: var(--radius); padding: clamp(24px, 4vw, 36px) clamp(24px, 4vw, 40px);
}
.latest .card__label { color: var(--fawn); }
.latest h2 { color: var(--white); margin: 0; }

.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.month { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.month h3 { font-size: 1.05rem; margin-bottom: .6em; padding-bottom: .5em; border-bottom: 1px solid var(--line); }
.month ul { list-style: none; margin: 0; padding: 0; }
.month li { margin: 0; }
.month a { display: block; padding: 6px 0; font-weight: 600; }

/* Worship video */

.watch { background: var(--ink); color: #e8e3db; padding: clamp(44px, 7vw, 72px) 0; scroll-margin-top: 0; }
.watch h2 { color: var(--white); }
.watch__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
.watch .rich-text a { color: var(--white); }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink-deep); box-shadow: 0 12px 32px rgba(0, 0, 0, .3); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 860px) { .watch__grid { grid-template-columns: 1fr; } }

/* Calendar */

.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.event { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.event__date { margin: 0; text-align: center; background: var(--sand); border-radius: 10px; padding: 10px 0; align-self: start; }
.event__month { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }
.event__day { display: block; font: 400 1.9rem/1.1 var(--serif); color: var(--brown); }
.event h2 { font-size: 1.3rem; margin-bottom: .25em; }
.event__when { font-weight: 600; color: var(--slate); margin-bottom: .3em; }
.event__where { color: var(--muted); margin-bottom: .3em; }
.event__body > :last-child { margin-bottom: 0; }
@media (max-width: 480px) { .event { grid-template-columns: 60px minmax(0, 1fr); gap: 16px; padding: 18px; } }

.empty-card { text-align: center; padding: 40px 28px; }

/* Contact */

.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: start; margin-bottom: 32px; }
.contact__info { display: grid; gap: 24px; }
.contact__address { font: 400 1.15rem/1.6 var(--serif); }
.contact__address a { color: var(--text); }
.contact__address a:hover { color: var(--slate); }
.contact__people { border-top: 1px solid var(--line); padding-top: 1em; margin-top: 1em; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.message h2 { font-size: 1.45rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
    width: 100%; font: inherit; color: var(--text); background: var(--paper);
    border: 1px solid #cbbfae; border-radius: 10px; padding: 12px 14px;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--slate); background: var(--white); }
.message__trap { position: absolute; left: -9999px; }
.message__status { padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.message__status--ok { background: #e4efe4; color: #24502a; }
.message__status--error { background: #f6e3df; color: #7a2b1c; }

.map { display: block; width: 100%; height: 380px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--sand); }

/* Footer */

.footer { background: var(--ink-deep); color: #cfc8bd; font-size: 1rem; }
.footer a { color: #e8e3db; }
.footer a:hover { color: var(--white); }
.footer h2 { font: 700 .8rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--fawn); margin-bottom: 1em; }
.footer p { margin-bottom: .5em; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr .8fr; gap: 32px; padding-top: 52px; padding-bottom: 40px; }
.footer__name { font: 400 1.25rem/1.3 var(--serif); color: var(--white); margin-bottom: .6em; }
.footer__links { list-style: none; margin: 0; padding: 0; }
.footer__links li { margin-bottom: .5em; }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .92rem; }
.footer__base p { margin: 0; }
@media (max-width: 960px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

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

@media print {
    .masthead .nav, .nav-toggle, .glance, .visit, .watch, .footer, .notice { display: none; }
    body { background: #fff; }
}
