/* Cllr Noel Connolly: site styles. Plain CSS, no build step.
   Layout follows the original noelconnolly.ie: name and menu across the top,
   a title band with the photo and slogan, a large picture, the biography,
   a Contact Me link and a footer with the office address.
   Colours live in the tokens below; change them here to retheme the site. */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/source-sans-3.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("../fonts/source-sans-3-italic.woff2") format("woff2"); }

:root {
  --brand: #1e5a3c;        /* main colour: header band, buttons, links */
  --brand-dark: #133b28;   /* footer, hover */
  --brand-tint: #e6efe9;   /* selected states, quiet panels */
  --accent: #f0b429;       /* used sparingly: the rule under headings, focus ring */
  --ink: #1b221e;
  --muted: #545f58;
  --line: #d3dbd6;
  --paper: #ffffff;
  --panel: #f2f5f3;
  --danger: #a4161a;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1080px;
  --measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: .01em; text-wrap: balance; margin: 0; }
h1, h2 { text-transform: uppercase; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top strip and header ---------- */
.strip { background: var(--brand-dark); color: #fff; font-size: .9rem; }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: flex-end; padding-block: 6px; }
.strip a { color: #fff; text-decoration: none; }
.strip a:hover { text-decoration: underline; color: #fff; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; position: relative; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.7rem; text-transform: uppercase; letter-spacing: .02em; color: var(--brand-dark); text-decoration: none; line-height: 1; }
.brand small { display: block; font-family: var(--body); font-weight: 600; font-size: .78rem; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 2px; align-items: stretch; }
.nav a {
  font-family: var(--display); font-weight: 600; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .03em;
  color: var(--ink); text-decoration: none; padding: 22px 12px 19px; border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--brand); border-bottom-color: var(--line); }
.nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.menu-toggle { display: none; font: 600 1rem var(--display); text-transform: uppercase; letter-spacing: .05em; background: none; border: 1px solid var(--line); color: var(--ink); padding: 8px 12px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 12px 26px; border: 2px solid var(--brand); background: var(--brand); color: #fff; text-decoration: none; cursor: pointer; line-height: 1.1;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-light { background: #fff; color: var(--brand-dark); border-color: #fff; }
.btn-light:hover { background: var(--accent); border-color: var(--accent); color: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { background: var(--brand-tint); color: var(--brand-dark); }
.btn-small { font-size: 1rem; padding: 8px 16px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Home: title band ---------- */
.title-band { background: var(--brand); color: #fff; }
.title-band .wrap { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 48px; }
.title-band .photo { background: #fff; padding: 8px; }
.title-band h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); color: #fff; }
.title-band h1 + p { margin: 18px 0 28px; font-size: 1.2rem; max-width: 30rem; color: rgba(255, 255, 255, .9); }
.rule { display: block; width: 72px; height: 5px; background: var(--accent); margin-bottom: 20px; }

.banner { background: var(--panel); }
.banner img { width: 100%; max-height: 420px; object-fit: cover; }

/* ---------- Sections ---------- */
.section { padding-block: 56px; }
.section-panel { background: var(--panel); }
.section h2 { font-size: clamp(2rem, 4vw, 2.6rem); color: var(--brand-dark); margin-bottom: 20px; }
.prose { max-width: var(--measure); }
.prose p { font-size: 1.125rem; }
.prose h2 { margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.45rem; margin: 28px 0 8px; color: var(--brand-dark); }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.lede { font-size: 1.35rem !important; color: var(--brand-dark); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 56px; align-items: start; }
.aside-box { border-top: 5px solid var(--brand); background: var(--panel); padding: 22px 24px; }
.aside-box h3 { font-size: 1.5rem; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 10px; }
.aside-box p { margin-bottom: .6em; }
.aside-box p:last-child { margin-bottom: 0; }

.contact-me { text-align: left; }
.contact-me .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-block: 40px; }
.contact-me h2 { font-size: 2rem; margin: 0 0 4px; }
.contact-me p { margin: 0; color: var(--muted); }

.note { border-left: 5px solid var(--accent); background: #fffaeb; padding: 12px 16px; margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255, 255, 255, .85); font-size: .95rem; }
.site-footer .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0; }

/* ---------- Inner page heading ---------- */
.page-head { background: var(--brand); color: #fff; }
.page-head .wrap { padding-block: 40px 44px; }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.page-head p { margin: 10px 0 0; font-size: 1.2rem; color: rgba(255, 255, 255, .9); }

/* ---------- Contact page ---------- */
.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); margin-bottom: 48px; }
.contact-list > div { padding: 18px 22px; border-right: 1px solid var(--line); }
.contact-list > div:last-child { border-right: 0; }
.contact-list dt { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-size: 1rem; }
.contact-list dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 600; }
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { text-decoration: underline; }
.contact-list dd small { display: block; font-weight: 400; font-size: .92rem; }

.form-box { border: 1px solid var(--line); border-top: 5px solid var(--brand); padding: clamp(18px, 4vw, 36px); }
.step-label { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-size: 1rem; margin: 0 0 6px; }
.form-step h2 { font-size: 2rem; margin-bottom: 6px; }
.form-step > p { color: var(--muted); }

.search { position: relative; margin: 18px 0 14px; }
.search label { display: block; font-weight: 600; margin-bottom: 6px; }
.search-input { width: 100%; font: inherit; font-size: 1.1rem; padding: 13px 14px; border: 2px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink); }
.search-input:focus { outline: 3px solid var(--accent); outline-offset: 0; }
.suggestions { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 2px solid var(--ink); border-top: 0; margin: 0; padding: 0; list-style: none; max-height: 320px; overflow-y: auto; }
.suggestions li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; cursor: pointer; border-top: 1px solid var(--line); }
.suggestions li:first-child { border-top: 0; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--brand-tint); }
.suggestions .tag { font-size: .88rem; color: var(--muted); white-space: nowrap; }
.suggestions .hint { font-size: .88rem; color: var(--muted); cursor: default; }
.suggestions .hint:hover { background: none; }

.match-note { border-left: 5px solid var(--accent); background: #fffaeb; padding: 10px 14px; margin-bottom: 16px; }
.match-note button { font: inherit; background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; }

.popular { margin: 0 0 22px; font-size: .98rem; color: var(--muted); }
.popular button { font: inherit; background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; margin-right: 12px; }

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 8px; }
.cat {
  font: inherit; font-size: 1.02rem; text-align: left; padding: 12px 14px 12px 40px; position: relative; cursor: pointer;
  background: #fff; color: var(--ink); border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cat::before { content: ""; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid var(--muted); border-radius: 50%; }
.cat:hover { background: var(--panel); }
.cat[aria-pressed="true"] { background: var(--brand-tint); font-weight: 600; }
.cat[aria-pressed="true"]::before { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 4px, transparent 5px); }
.cat.highlight { box-shadow: inset 0 0 0 3px var(--accent); }

.selected-line { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; padding: 12px 0; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.selected-line button { font: inherit; background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 18px; min-width: 0; }
.field label, .field legend { font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; padding: 11px 12px; border: 1px solid #8a948e; border-radius: 0; background: #fff; color: var(--ink); width: 100%;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--ink); }
.field .help { font-size: .92rem; color: var(--muted); }
.field .err { font-size: .95rem; color: var(--danger); font-weight: 600; }
.field .err:empty { display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border: 2px solid var(--danger); }
fieldset.field { border: 0; padding: 0; margin: 0 0 18px; }
.radios { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 4px; }
.radios label { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; cursor: pointer; }
.radios input, .check input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.check input { margin-top: 4px; }
.counter { align-self: flex-end; font-size: .88rem; color: var(--muted); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 12px; }
.form-error { border-left: 5px solid var(--danger); background: #fdf0f0; padding: 12px 14px; margin-bottom: 16px; }
.err-topic { color: var(--danger); font-weight: 600; margin: 8px 0 0; }
.err-topic:empty { display: none; }

.review { margin: 0 0 20px; display: grid; grid-template-columns: 170px minmax(0, 1fr); border-top: 1px solid var(--line); }
.review dt, .review dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.review dt { font-weight: 600; color: var(--muted); padding-right: 12px; }
.review dd { white-space: pre-wrap; overflow-wrap: anywhere; }

.success h2 { font-size: 2.2rem; margin-bottom: 12px; }
.success .ref { font-family: ui-monospace, Consolas, Menlo, monospace; font-size: 1.15rem; background: var(--panel); border: 1px solid var(--line); padding: 4px 10px; display: inline-block; }
.preview-mail { margin-top: 28px; border: 1px dashed #b88a12; background: #fffaeb; padding: 16px; }
.preview-mail h3 { font-size: 1.3rem; text-transform: uppercase; margin-bottom: 8px; }
.preview-mail pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; margin: 0; background: #fff; border: 1px solid var(--line); padding: 12px; }

.pc { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: start; }
.pc img { border: 1px solid var(--line); }

/* ---------- Activities and social ---------- */
.entries { border-top: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.entry time { font-family: var(--display); font-weight: 700; text-transform: uppercase; color: var(--muted); font-size: 1.15rem; }
.entry h3 { font-size: 1.6rem; margin-bottom: 6px; }
.entry .kind { font-size: .9rem; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.entry p { margin: 6px 0 0; }

.links-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); max-width: var(--measure); }
.links-list li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.links-list strong { font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; }
.links-list span { color: var(--muted); }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .title-band .wrap { grid-template-columns: 1fr; gap: 28px; padding-block: 32px 40px; }
  .title-band .photo { width: min(240px, 70%); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .contact-list { grid-template-columns: 1fr; }
  .contact-list > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .contact-list > div:last-child { border-bottom: 0; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line); padding: 0 16px 10px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 4px 0 0 var(--brand); padding-left: 12px; }
  .strip .wrap { justify-content: flex-start; }
  .grid-2 { grid-template-columns: 1fr; }
  .review { grid-template-columns: 1fr; }
  .review dt { border-bottom: 0; padding-bottom: 0; }
  .brand { font-size: 1.45rem; }
}
@media (max-width: 460px) {
  .cat-grid { grid-template-columns: 1fr; }
  .pc { grid-template-columns: 88px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
#form, #success { scroll-margin-top: 16px; }
