/*
Theme Name: Friends of Dumfries
Theme URI: https://friendsofdumfries.ca
Author: Friends of Dumfries
Description: A forest-green and wood-brown theme for the Friends of Dumfries community group in Cambridge, Ontario. Includes a front page with an under-construction notice, Facebook group and phone settings in the Customizer, and light and dark colour schemes that follow the visitor's device.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: friends-of-dumfries
*/
/* Layout: a forest-green trailhead band with the logo and a wooden "under construction" sign,
   then a single readable column of content on lichen-pale paper. */
:root {
  --bg: #edf0e3;
  --surface: #f8f7ec;
  --fg: #1f2a22;
  --muted: #4d5a50;
  --line: #cfd6c0;
  --forest: #1d3f2c;
  --wood: #8c4a20;
  --gold: #d7a12a;
  --hero-bg: #1d3f2c;
  --hero-fg: #f7edcf;
  --hero-muted: #c3d1bd;
  --btn-bg: #f7edcf;
  --btn-fg: #1d3f2c;
  --link: #8c4a20;
  --sign-bg: #7a3f19;
  --sign-fg: #f7edcf;
  --display: "Bitter", Georgia, "Times New Roman", serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111a14;
    --surface: #1a251e;
    --fg: #ece6d0;
    --muted: #aebaa9;
    --line: #2f3f34;
    --forest: #8cc59a;
    --wood: #d49563;
    --gold: #e6b84a;
    --hero-bg: #0c1610;
    --hero-fg: #f7edcf;
    --hero-muted: #a9bba5;
    --btn-bg: #e6b84a;
    --btn-fg: #14210f;
    --link: #e0a877;
    --sign-bg: #6d3816;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111a14;
  --surface: #1a251e;
  --fg: #ece6d0;
  --muted: #aebaa9;
  --line: #2f3f34;
  --forest: #8cc59a;
  --wood: #d49563;
  --gold: #e6b84a;
  --hero-bg: #0c1610;
  --hero-fg: #f7edcf;
  --hero-muted: #a9bba5;
  --btn-bg: #e6b84a;
  --btn-fg: #14210f;
  --link: #e0a877;
  --sign-bg: #6d3816;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
}
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: 62rem; margin-inline: auto; padding-inline: 20px; }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-fg); padding-block: 48px 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 44px; align-items: center; }
.logo {
  width: 100%; max-width: 300px; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 4px var(--gold), 0 14px 34px rgba(0,0,0,.35);
  background: #1d3f2c;
}
.logo img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.025); }
.kicker { font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--hero-muted); margin: 0 0 8px; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; margin: 0 0 22px; text-wrap: balance; }
.sign {
  display: inline-block; max-width: 100%; background: var(--sign-bg); color: var(--sign-fg);
  border-radius: 4px; overflow: hidden; margin: 0 0 22px;
  box-shadow: 0 4px 0 rgba(0,0,0,.28);
}
.sign::before {
  content: ""; display: block; height: 10px;
  background: repeating-linear-gradient(-45deg, #e3b23c 0 14px, #2a1a0c 14px 28px);
}
.sign p { margin: 0; padding: 12px 22px 14px; font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.sign small { display: block; font-family: var(--body); font-weight: 600; font-size: .9rem; opacity: .9; margin-top: 2px; }
.lede { font-size: 1.15rem; max-width: 34rem; margin: 0 0 26px; color: var(--hero-fg); }
.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.btn {
  display: inline-block; background: var(--btn-bg); color: var(--btn-fg); text-decoration: none;
  font-weight: 700; font-size: 1.05rem; padding: 13px 24px; border-radius: 6px;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.phone { color: var(--hero-fg); font-size: 1rem; }
.phone strong { font-size: 1.15rem; letter-spacing: .02em; user-select: all; }
.phone span { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-muted); }

/* Memorial strip */
.memorial { background: var(--surface); border-block: 1px solid var(--line); padding-block: 22px; }
.memorial p { margin: 0; max-width: 46rem; }
.memorial strong { font-family: var(--display); color: var(--wood); font-size: 1.1rem; }

/* Sections */
section.block { padding-block: 52px 8px; }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3.6vw, 2rem); line-height: 1.2; margin: 0 0 16px; color: var(--forest); text-wrap: balance; }
.prose { max-width: 40rem; }
.prose p { margin: 0 0 1.05em; }
.prose .goal { font-family: var(--display); font-size: 1.25rem; line-height: 1.45; color: var(--fg); }

.prose .origin { border-left: 4px solid var(--gold); padding: 4px 0 4px 16px; }
.involve { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.involve li { padding: 14px 0 14px 30px; border-top: 1px solid var(--line); position: relative; min-width: 0; }
.involve li::before {
  content: ""; position: absolute; left: 4px; top: 22px; width: 12px; height: 12px;
  background: var(--gold); transform: rotate(45deg); border-radius: 2px;
}

/* Photo dissolves into the page ground: the edges fade out through a mask, so it blends in both themes */
.photo { margin: 28px auto 0; max-width: 46rem; }
.photo img {
  display: block; width: 100%; height: auto; max-width: 100%;
  filter: saturate(.85) contrast(.97);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 16%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 16%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.photo figcaption { text-align: center; margin-top: 6px; font-size: .85rem; color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .photo img { filter: saturate(.8) brightness(.78) contrast(1.02); } }
:root[data-theme="dark"] .photo img { filter: saturate(.8) brightness(.78) contrast(1.02); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 22px 0 0; }
.facts div { border-top: 2px solid var(--forest); padding: 12px 0 18px; min-width: 0; }
.facts dt { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-family: var(--display); font-weight: 500; font-size: 1.2rem; line-height: 1.4; }

.closing { margin-top: 56px; background: var(--hero-bg); color: var(--hero-fg); padding-block: 48px 52px; }
.closing .wrap { display: grid; gap: 14px; justify-items: start; }
.closing h2 { color: var(--hero-fg); margin: 0; }
.closing p { margin: 0; max-width: 38rem; }
.closing .tag { font-family: var(--display); font-size: 1.15rem; color: var(--gold); font-weight: 700; }
.closing .actions { margin-top: 10px; }
.fine { color: var(--muted); font-size: .9rem; padding-block: 22px 40px; }
.fine p { margin: 0; max-width: 46rem; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .hero { padding-block: 36px 44px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; justify-items: center; text-align: center; }
  .logo { max-width: 240px; }
  .hero .copy { display: flex; flex-direction: column; align-items: center; }
  .actions { justify-content: center; }
  .involve, .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ---- WordPress additions ---- */
.screen-reader-text { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link:focus { position:fixed; left:12px; top:12px; z-index:100; width:auto; height:auto; clip:auto; margin:0; padding:10px 16px; background:var(--btn-bg); color:var(--btn-fg); border-radius:6px; }

.site-header { background: var(--hero-bg); color: var(--hero-fg); padding-block: 14px; border-bottom: 4px solid var(--gold); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--hero-fg); text-decoration: none; min-width: 0; }
.brand img { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); flex: none; }
.brand .custom-logo { width: 56px; height: 56px; object-fit: cover; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1.1; }
.brand-sub { display: block; font-family: var(--body); font-weight: 700; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--hero-muted); }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; }
.main-nav a { color: var(--hero-fg); text-decoration: none; font-weight: 700; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { border-bottom-color: var(--gold); }

.page-main { padding-block: 48px 24px; }
.entry { max-width: 44rem; }
.entry-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.1; color: var(--forest); margin: 0 0 8px; text-wrap: balance; }
.entry-title a { color: inherit; text-decoration: none; }
.entry-meta { color: var(--muted); font-size: .9rem; margin: 0 0 24px; }
.entry-content > * { margin-block: 0 1.1em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--display); color: var(--forest); line-height: 1.2; margin-top: 1.6em; }
.entry-content img, .entry-content video { max-width: 100%; height: auto; }
.entry-content blockquote { border-left: 4px solid var(--gold); margin-inline: 0; padding: 2px 0 2px 18px; color: var(--muted); }
.entry-content .alignwide { max-width: 62rem; }
.entry-content .alignleft { float: left; margin: 0 1.2em 1em 0; }
.entry-content .alignright { float: right; margin: 0 0 1em 1.2em; }
.entry-content .aligncenter { display: block; margin-inline: auto; }
.wp-caption, figure.wp-block-image { max-width: 100%; }
.wp-caption-text, figcaption { color: var(--muted); font-size: .88rem; }
.post-list { display: grid; gap: 40px; }
.post-list article { border-top: 1px solid var(--line); padding-top: 24px; }
.pagination, .nav-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 32px; font-weight: 700; }
.site-footer { background: var(--hero-bg); color: var(--hero-muted); padding-block: 32px; margin-top: 56px; font-size: .92rem; }
.site-footer a { color: var(--hero-fg); }
.site-footer .wrap { display: grid; gap: 8px; }
.site-footer p { margin: 0; max-width: 46rem; }
.home .site-footer { margin-top: 0; }
.fine { padding-bottom: 8px; }
.admin-bar .skip-link:focus { top: 44px; }
.page-main .btn { background: var(--hero-bg); color: var(--hero-fg); border: 2px solid var(--gold); }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; margin-block: 16px; }
.search-form label { flex: 1 1 14rem; min-width: 0; }
.search-field { width: 100%; padding: 10px 12px; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.search-submit { padding: 10px 18px; font: inherit; font-weight: 700; color: var(--hero-fg); background: var(--hero-bg); border: 2px solid var(--gold); border-radius: 6px; cursor: pointer; }

/* ---- Events block ---- */
.events .events-intro { max-width: 40rem; margin: 0 0 8px; color: var(--muted); }
.event-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.event { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; min-width: 0; }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--sign-bg); color: var(--sign-fg); border-radius: 6px; padding: 8px 4px 10px; align-self: start; text-align: center; border-top: 8px solid var(--gold); }
.event-month { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.2; }
.event-day { font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1.1; }
.event-weekday { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.event-body { min-width: 0; }
.event-title { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.25; color: var(--forest); margin: 0 0 4px; overflow-wrap: anywhere; }
.event-when { margin: 0 0 8px; font-weight: 700; font-size: .92rem; color: var(--muted); }
.event-text { margin: 0 0 10px; font-size: .98rem; line-height: 1.55; overflow-wrap: anywhere; }
.event-link { margin: 0; font-weight: 700; }
@media (max-width: 760px) { .event-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 400px) { .event { grid-template-columns: minmax(0, 1fr); } .event-date { flex-direction: row; gap: 10px; justify-self: start; padding: 6px 14px; border-top-width: 6px; } .event-day { font-size: 1.4rem; } }

/* ---- In the news block ---- */
.news .news-intro { max-width: 40rem; margin: 0 0 8px; color: var(--muted); }
.news-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.news-item { border-top: 2px solid var(--forest); padding: 14px 0 22px; min-width: 0; }
.news-source { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.news-title { font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.3; margin: 0 0 8px; color: var(--forest); overflow-wrap: anywhere; }
.news-title a { color: inherit; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.news-title a:hover { color: var(--link); }
.news-summary { margin: 0 0 10px; font-size: .98rem; line-height: 1.55; overflow-wrap: anywhere; }
.news-link { margin: 0; font-weight: 700; }
@media (max-width: 760px) { .news-list { grid-template-columns: minmax(0, 1fr); } }
