/* =========================================================================
   DecisionMap (decisionmap.ie) - clean clone template
   Faithful rebuild of the Grav/Quark site on a fresh, light, readable stack.
   Neutral data/geography feel: navy ink, a blue accent and the logo's amber,
   on a soft paper ground. Mobile-first (375px up). This is the clone-phase
   template; a full redesign is a separate later phase.
   ========================================================================= */

:root {
  --ink:        #1d2740;   /* headings / dark text */
  --text:       #333b4f;   /* body text */
  --text-soft:  #5b6478;   /* muted text */
  --accent:     #2f6fed;   /* primary blue (links, active) */
  --accent-deep:#1f52c2;
  --amber:      #e8a200;   /* from the DecisionMap logo */
  --paper:      #f5f8fc;   /* soft background band */
  --paper-2:    #eef2f8;
  --white:      #ffffff;
  --line:       #e2e8f2;
  --ink-2:      #172038;   /* footer */

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;

  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 8px;
  --shadow-sm: 0 2px 10px -4px rgba(20, 30, 60, 0.18);
  --shadow: 0 18px 44px -18px rgba(20, 30, 60, 0.28);
  --speed: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.06rem);
  line-height: 1.66;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, picture, svg, iframe { max-width: 100%; }
img, svg { height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--ink); line-height: 1.15; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 0.7rem 1.2rem;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: auto; height: 26px; }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 0.1rem; flex-wrap: wrap; }
.site-nav a {
  display: block; position: relative;
  padding: 0.5rem 0.8rem;
  color: var(--text); font-weight: 500; font-size: 0.94rem;
  border-radius: 6px;
  transition: color var(--speed), background var(--speed);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent-deep); background: var(--paper-2); }
.site-nav a[aria-current="page"] { color: var(--accent-deep); font-weight: 600; }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.15rem;
  height: 2px; background: var(--accent);
}
.nav-toggle, .nav-toggle-btn { display: none; }

/* ---------------------------------------------------------------- hero */
.page-hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.4rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3.2rem);
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--accent);
  margin-bottom: 0.9rem;
}
.hero-kicker::before { content: ""; width: 26px; height: 2px; background: var(--amber); }
.page-hero h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem);
  letter-spacing: -0.01em;
  max-width: 20ch;
}
.hero-lede {
  margin-top: 1.1rem; max-width: 62ch;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  color: var(--text-soft); line-height: 1.6;
}

/* home hero: the scraped landscape photo with a dark overlay */
.page-hero--home {
  position: relative; isolation: isolate;
  background: var(--ink);
  border-bottom: 0;
  padding-block: clamp(3.2rem, 9vw, 6rem);
}
.page-hero--home::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("/img/hero.jpg") center 40% / cover no-repeat;
}
.page-hero--home::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, rgba(15,22,42,0.86) 0 42%, rgba(15,22,42,0.62) 72%, rgba(15,22,42,0.45));
}
.page-hero--home .hero-kicker { color: #fff; }
.page-hero--home .hero-kicker::before { background: var(--amber); }
.page-hero--home h1 { color: #fff; }
.page-hero--home .hero-lede { color: rgba(255,255,255,0.88); }

/* ---------------------------------------------------------------- content */
.page-body { padding-block: clamp(2.2rem, 5vw, 3.6rem); }

/* interior article prose (single reading column) */
.page--article .page-body { max-width: 72ch; }
.page--article .page-body :is(h2, h3, h4) { margin-top: 1.9rem; margin-bottom: 0.6rem; }
.page--article .page-body h2 {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  padding-top: 1.3rem; border-top: 1px solid var(--line); position: relative;
}
.page--article .page-body h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.page--article .page-body h2::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 3px; background: var(--amber);
}
.page--article .page-body :is(ul, ol) { margin: 0 0 1.1em; padding-left: 1.4em; }
.page--article .page-body li { margin-bottom: 0.35em; }
.page--article .page-body pre {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; overflow-x: auto; font-size: 0.9rem; line-height: 1.5;
}
.page--article .page-body code { font-family: "SF Mono", "Segoe UI Mono", monospace; }
.page-body a { font-weight: 500; }

/* Grav .content-item / .e-content wrappers collapse to plain flow */
.content-item, .e-content { display: block; }

/* ---------------------------------------------------------------- card grid */
.bricklayer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.1rem, 2.5vw, 1.6rem);
}
.card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--speed), box-shadow var(--speed), border-color var(--speed);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9d6ea; }
.card-header { padding: 1.1rem 1.2rem 0; }
.card-body { padding: 0.4rem 1.2rem 1.2rem; }
.card-footer { margin-top: auto; }
.blog-date {
  display: inline-block; font-size: 0.75rem; letter-spacing: 0.04em;
  color: var(--text-soft); margin-bottom: 0.5rem;
}
.card-title h5 { margin: 0; font-size: 1rem; }
.card-title a {
  font-family: var(--font-head); font-weight: 600; font-size: 1.15rem;
  color: var(--ink); text-transform: capitalize; text-decoration: none;
}
.card-title a:hover { color: var(--accent-deep); }
.card-body h2 {
  font-family: var(--font-head); font-weight: 600;
  font-size: 1.15rem; margin: 0.2rem 0 0.5rem;
}
.card-body p { font-size: 0.95rem; color: var(--text-soft); margin-bottom: 0.6em; }
.card-body p:last-child { margin-bottom: 0; }

/* empty listing (my-test-page) */
.page--listing .page-body .bricklayer:empty::after {
  content: "No items to show yet.";
  color: var(--text-soft); font-style: italic;
}

/* ---------------------------------------------------------------- 404 */
.page--article .page-body .lead { font-size: 1.15rem; color: var(--text-soft); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--ink-2); color: #aeb8cc; margin-top: clamp(2.5rem, 7vw, 5rem); }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: clamp(1.6rem, 4vw, 3rem);
  padding-block: clamp(2.2rem, 5vw, 3.4rem);
}
.footer-logo { height: 24px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-brand p { color: #9aa5bd; max-width: 46ch; font-size: 0.95rem; }
.site-footer h2 {
  color: #fff; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em;
  margin-bottom: 1rem;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a, .footer-note a { color: #aeb8cc; text-decoration: none; }
.footer-links a:hover, .footer-note a:hover { color: #fff; text-decoration: underline; }
.footer-note p { color: #9aa5bd; font-size: 0.92rem; }
.footer-base {
  border-top: 1px solid rgba(255,255,255,0.08); padding-block: 1.1rem;
  font-size: 0.82rem; color: #7f8aa3;
}
.footer-base p { margin: 0; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 780px) {
  .nav-toggle-btn {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; cursor: pointer; border-radius: 6px; background: var(--paper-2);
  }
  .nav-toggle-btn span { display: block; height: 2px; width: 22px; margin-inline: auto; background: var(--ink); transition: transform var(--speed), opacity var(--speed); }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    position: fixed; inset: 68px 0 auto 0; background: var(--white);
    border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease; box-shadow: var(--shadow);
  }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.1rem; }
  .site-nav a { padding: 0.9rem 0.5rem; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"]::after { display: none; }
  .nav-toggle:checked ~ .site-nav { max-height: 80vh; overflow-y: auto; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
