/* DIGICAP blog — coherent with the mockup */

:root {
  --navy: #061945;
  --navy-deep: #082462;
  --blue: #0b4fd7;
  --blue-deep: #0569ff;
  --cyan: #66e0ff;
  --yellow: #FFCC00;
  --line: #dbe7f7;
  --line-strong: #b9c4d7;
  --text: #1a2540;
  --muted: #5c6a7f;
  --surface: #ffffff;
  --bg: #f7fbff;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Aptos", "Segoe UI", "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: short pages (empty blog, 404) otherwise leave the footer
     floating halfway up the viewport. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.b-topbar, .b-hero, .b-footer { flex: 0 0 auto; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); text-decoration: underline; }

/* --- Top bar --- */
.b-topbar {
  background: var(--navy);
  color: #fff;
  padding: 18px clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* Stays visible while reading — long posts otherwise strand the reader
     with no navigation until they scroll back up. */
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(6, 25, 69, 0.25);
}
.b-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.b-topbar__brand:hover { text-decoration: none; }
.b-topbar__brand img {
  display: block;
  height: 32px;
  width: auto;
  max-width: 100%;
  /* The source SVG is already white; the filter keeps the mark white on the
     navy bar even if the asset's fill colour ever changes. */
  filter: brightness(0) invert(1);
}
@media (max-width: 380px) {
  .b-topbar__brand img { height: 28px; }
}
.b-topbar__nav {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 14px;
}
.b-topbar__nav a {
  color: rgba(255, 255, 255, 0.82);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
}
.b-topbar__nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.b-topbar__rss {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-left: 10px;
}

/* --- Hero strip --- */
.b-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  /* Horizontal padding matches .b-wrap so hero copy lines up with body copy. */
  padding: 48px clamp(20px, 4vw, 24px) 56px;
  position: relative;
  overflow: hidden;
}
.b-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.2px);
  background-size: 24px 24px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 40%, transparent 100%);
}
.b-hero__inner {
  /* 712px = .b-wrap's 760px max-width minus its 2 x 24px padding, so the two
     text columns share the same left edge on wide screens. */
  max-width: 712px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.b-hero__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.b-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}
.b-hero__sub {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  max-width: 600px;
}

/* --- Wrap --- */
.b-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 48px clamp(20px, 4vw, 24px);
  flex: 1 1 auto;
}

/* --- Post list --- */
.b-post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.b-post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.b-post-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(11, 31, 64, 0.08);
}
.b-post-card__date {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.b-post-card__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.b-post-card__title a { color: var(--text); }
.b-post-card__title a:hover { color: var(--blue); text-decoration: none; }
.b-post-card__excerpt {
  margin: 0;
  color: var(--muted);
}
.b-post-card__draft {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4d8;
  color: #8a5a00;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  vertical-align: middle;
}

.b-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
}

/* --- Post card: optional featured-image thumbnail --- */
.b-post-card__body { min-width: 0; }
.b-post-card--media {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.b-post-card__thumb {
  display: block;
  flex: 0 0 128px;
  width: 128px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef4ff;
}
.b-post-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 540px) {
  .b-post-card--media { flex-direction: column; }
  .b-post-card__thumb { width: 100%; flex-basis: auto; aspect-ratio: 16 / 9; }
}

/* --- Post detail --- */
.b-featured {
  margin: 0 0 32px;
}
.b-featured img {
  display: block;
  width: 100%;
  /* Landscape images keep their own ratio; a very tall portrait is cropped
     instead of turning into a full-screen column. */
  max-height: 460px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #eef4ff;
}
.b-post-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.b-back {
  /* Own line above the date eyebrow — as inline-block it ran on into it. */
  display: block;
  width: fit-content;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
}
.b-back:hover { color: #fff; }

.b-prose h1, .b-prose h2, .b-prose h3, .b-prose h4 {
  color: var(--navy);
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-top: 2em;
}
.b-prose > :first-child { margin-top: 0; }
.b-prose h2 { font-size: 1.6rem; }
.b-prose h3 { font-size: 1.3rem; }
.b-prose p, .b-prose ul, .b-prose ol { font-size: 1.05rem; line-height: 1.7; color: #2a334a; }
.b-prose ul, .b-prose ol { padding-left: 1.5em; }
.b-prose li { margin: 0.5em 0; }
.b-prose blockquote {
  border-left: 3px solid var(--blue);
  margin: 1.5em 0;
  padding: 0.4em 1em;
  background: #eef4ff;
  color: var(--navy);
  font-style: italic;
}
.b-prose code {
  background: #eef0f4;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.95em;
}
.b-prose pre {
  background: #0b1730;
  color: #e7eefc;
  padding: 16px 18px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}
.b-prose pre code { background: transparent; color: inherit; padding: 0; }
/* Content images are normalised like a WordPress "large" size: never wider
   than the column, never taller than the featured image cap, always centred.
   Editors can upload any size; the layout keeps it consistent. */
.b-prose img {
  display: block;
  margin: 1.6em auto;
  max-width: 100%;
  max-height: 460px;
  width: auto;
  height: auto;
  border-radius: 6px;
}
.b-prose a { color: var(--blue); }
.b-prose a:hover { color: var(--blue-deep); }
.b-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* --- Footer --- */
.b-footer {
  background: rgba(6, 25, 69, 0.04);
  border-top: 1px solid var(--line);
  padding: 22px clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}
.b-footer__eu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--navy);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.18;
}
.b-footer__eu img { width: 56px; height: auto; flex-shrink: 0; }
.b-footer p { margin: 0; max-width: 60ch; line-height: 1.5; }

@media (max-width: 600px) {
  .b-topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .b-topbar__nav { flex-wrap: wrap; }
  .b-footer { flex-direction: column; align-items: flex-start; }
}
