/*
Theme Name: Blackmore Nestor
Description: A plain, fast theme for blackmorenestor.com. It sets up the pages and menu when first activated, and adds a "CV" screen for replacing the CV.
Version: 1.2.1
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: blackmore-nestor
*/

:root {
  --teal: #00617f;
  --ink: #1a1a1a;
  --grey: #5f6b70;
  --rule: #d9e2e6;
}
* { box-sizing: border-box; }
html { font-size: 106.25%; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  /* The footer sits at the bottom of the window on short pages. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--teal); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -999em; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: 0.5rem 1rem; z-index: 10; }

.wrap { max-width: 48rem; margin: 0 auto; padding: 0 1.25rem; }

/* Header and menu */
header.site { border-bottom: 1px solid var(--rule); }
header.site .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.5rem 2rem;
  padding-top: 1.25rem; padding-bottom: 1.25rem;
}
header.site img { display: block; width: 140px; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; }
nav li { margin: 0; }
nav a { text-decoration: none; font-size: 0.9rem; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
nav a:hover,
nav .current-menu-item > a,
nav .current_page_item > a,
nav .current_page_parent > a { border-bottom-color: var(--teal); }

/* Text */
main { padding: 2rem 0 2rem; }
h1 { color: var(--teal); font-size: 2.2rem; font-weight: 600; line-height: 1.2; margin: 0 0 1.25rem; }
h2 { color: var(--teal); font-size: 1.2rem; font-weight: 600; margin: 3rem 0 0.75rem; clear: both; }
h3 { color: var(--teal); font-size: 1.05rem; font-weight: 600; margin: 2rem 0 0.5rem; }
h1 + h2, .entry > h2:first-child { margin-top: 0; }
p { margin: 0 0 1.1rem; }
ul, ol { margin: 0 0 1.1rem; padding-left: 1.2rem; }
li { margin-bottom: 0.35rem; }
blockquote { margin: 0 0 1.1rem; padding-left: 1rem; border-left: 2px solid var(--rule); }
figure { margin: 0; }

/* Buttons */
.wp-block-buttons, .buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; clear: both; }
.wp-block-button__link, .button {
  display: inline-block; padding: 0.6rem 1.2rem;
  border: 1px solid var(--teal); color: var(--teal); background: none;
  text-decoration: none; font-size: 0.95rem;
}
.wp-block-button__link:hover, .button:hover { background: var(--teal); color: #fff; }

/* Home */
main.home { padding: 0; }
.hero { background: var(--teal); color: #fff; padding: 6rem 0 6.5rem; }
.hero h1 { color: #fff; font-size: 3rem; margin-bottom: 1.25rem; }
.hero .tagline { font-size: 1.25rem; max-width: 30rem; }
.hero .button { border-color: #fff; color: #fff; }
.hero .button:hover { background: #fff; color: var(--teal); }

/* Columns under a teal rule: Services, About us, Links */
.wp-block-columns { margin-top: 2rem; }
.wp-block-column h2 { margin-top: 2rem; }
@media (min-width: 760px) {
  .wp-block-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .wp-block-column { border-top: 2px solid var(--teal); padding-top: 1rem; }
  .wp-block-column h2 { margin: 0 0 0.8rem; font-size: 1.05rem; }
  .wp-block-column ul { font-size: 0.92rem; margin: 0; }
  .wp-block-column li { margin-bottom: 0.4rem; line-height: 1.4; }
}

/* About us: text beside the photograph, then three lists */
.bn-about-us .wp-block-image img { display: block; width: 100%; }
.bn-about-us .wp-block-column .wp-block-image { max-width: 185px; }
.bn-about-us .wp-block-column .wp-block-buttons { flex-direction: column; gap: 0.45rem; margin: 0.6rem 0; max-width: 185px; }
.bn-about-us .wp-block-column .wp-block-button__link { display: block; text-align: center; font-size: 0.78rem; padding: 0.4rem 0.3rem; }
@media (min-width: 760px) {
  .bn-about-us .entry > .wp-block-columns:first-child { grid-template-columns: 1fr 185px; margin-top: 0; }
  .bn-about-us .entry > .wp-block-columns:first-child > .wp-block-column { border-top: 0; padding-top: 0; }
  .bn-about-us .entry > .wp-block-columns:last-child { grid-template-columns: 1.65fr 1.05fr 1.4fr; gap: 2rem; margin-top: 0.75rem; }
}

/* Links: two lists side by side, no bullets */
.bn-links .entry ul { list-style: none; padding-left: 0; }
@media (min-width: 760px) {
  .bn-links .wp-block-columns { grid-template-columns: 1fr 1fr; margin-top: 0; }
}

/* Articles */
.article { padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.article:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 760px) {
  .articles { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 2.5rem; }
  .articles .article, .articles .article:first-of-type { border-top: 2px solid var(--teal); padding: 1rem 0 0; }
  .articles .article h2 { font-size: 1.05rem; }
  .articles .article p { font-size: 0.92rem; line-height: 1.45; }
}
.article h2 { margin: 0 0 0.25rem; font-size: 1.25rem; line-height: 1.35; }
.article h2 a { text-decoration: none; }
.article h2 a:hover { text-decoration: underline; }
.article p { margin: 0; }
.meta { display: block; color: var(--grey); font-size: 0.85rem; margin-bottom: 0.5rem; }
.single h1 { margin-bottom: 0.75rem; }
.single .meta { margin-bottom: 2.5rem; }
.single .entry h2 { margin-top: 2.25rem; }
.single h1, .single .meta, .single .entry > *:not(table) { max-width: 42rem; }
.back { margin-top: 3rem; font-size: 0.95rem; }
.pagination { margin-top: 2rem; display: flex; gap: 1.5rem; }

footer.site { border-top: 1px solid var(--rule); color: var(--grey); font-size: 0.8rem; }
footer.site .wrap { padding-top: 1rem; padding-bottom: 1rem; }

@media (max-width: 600px) {
  html { font-size: 100%; }
  main { padding: 2.5rem 0 3.5rem; }
  .hero { padding: 3.5rem 0 4rem; }
  .hero h1 { font-size: 2.3rem; }
}
@media print {
  header.site nav, footer.site, .wp-block-buttons, .buttons, .back { display: none; }
}
