/* ============================================================
   CharlieKoch — friendly blog design system
   Author: Charlie Koch, President of Bank Midwest
   ============================================================ */

:root {
  --navy: #16324f;
  --navy-soft: #1f4a73;
  --blue: #2563eb;
  --blue-soft: #eaf2ff;
  --teal: #0e8f8b;
  --amber: #f59e0b;
  --ink: #1f2937;
  --muted: #5b6b7c;
  --bg: #f7f9fc;
  --card: #ffffff;
  --line: #e5eaf1;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(22, 50, 79, 0.06), 0 4px 14px rgba(22, 50, 79, 0.07);
  --shadow-md: 0 6px 24px rgba(22, 50, 79, 0.12);
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  z-index: 200;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--navy);
}
.brand:hover { text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.brand em { font-style: normal; color: var(--blue); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-menu a {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--navy);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-menu a:hover { background: var(--blue-soft); text-decoration: none; }
.nav-menu a.active {
  background: var(--navy);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: var(--blue-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1.4rem;
  color: var(--navy);
  width: 46px;
  height: 46px;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(640px 340px at 88% -10%, rgba(245, 158, 11, 0.14), transparent 60%),
    radial-gradient(720px 420px at -10% 110%, rgba(37, 99, 235, 0.16), transparent 60%),
    linear-gradient(180deg, #eef5ff 0%, var(--bg) 100%);
  padding: 84px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--teal);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  line-height: 1.14;
  color: var(--navy);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.hero h1 .hl {
  background: linear-gradient(180deg, transparent 62%, rgba(245, 158, 11, 0.45) 62%);
  padding: 0 4px;
}

.hero p.lead {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-size: 1rem;
  font-family: var(--font);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover { background: var(--navy-soft); }
.btn-ghost {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

.hero-visual { display: flex; justify-content: center; }
.hero-visual img {
  width: 100%;
  max-width: 430px;
  filter: drop-shadow(0 18px 34px rgba(22, 50, 79, 0.18));
}

/* ---------- Stats strip ---------- */
.stats {
  background: var(--navy);
  color: #fff;
  padding: 40px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  text-align: center;
}
.stat b {
  display: block;
  font-size: 2rem;
  color: var(--amber);
  line-height: 1.2;
}
.stat span { font-size: 0.95rem; opacity: 0.85; }

/* ---------- Sections ---------- */
.section { padding: 74px 0; }
.section.alt { background: #fff; }

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .kicker {
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
  margin: 8px 0 12px;
  line-height: 1.25;
}
.section-head p { color: var(--muted); }

/* ---------- Cards & blog grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.post-card .cover {
  height: 148px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: #fff;
  font-weight: 800;
  position: relative;
}
.post-card .cover .chip {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cover.c1 { background: linear-gradient(135deg, #2563eb, #1e40af); }
.cover.c2 { background: linear-gradient(135deg, #0e8f8b, #0b6e6b); }
.cover.c3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.cover.c4 { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.cover.c5 { background: linear-gradient(135deg, #dc2626, #991b1b); }
.cover.c6 { background: linear-gradient(135deg, #0891b2, #155e75); }

.post-card .body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card h3 {
  font-size: 1.16rem;
  line-height: 1.35;
  margin-bottom: 9px;
}
.post-card h3 a { color: var(--navy); }
.post-card h3 a:hover { color: var(--blue); text-decoration: none; }
.post-card p {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 14px;
}
.post-meta img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--blue-soft);
}
.dot { opacity: 0.5; }

/* ---------- Feature list (home) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}
.feature .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--blue-soft);
  margin-bottom: 16px;
}
.feature h3 { color: var(--navy); margin-bottom: 8px; font-size: 1.1rem; }
.feature p { color: var(--muted); font-size: 0.96rem; }

/* ---------- About strip (home) ---------- */
.about-strip {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 52px;
  align-items: center;
}
.about-strip .portrait {
  background: linear-gradient(135deg, var(--blue-soft), #fff);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.about-strip .portrait img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  margin: 0 auto 18px;
  border: 5px solid #fff;
  box-shadow: var(--shadow-sm);
}
.about-strip h2 { color: var(--navy); font-size: 1.9rem; margin-bottom: 14px; }
.about-strip p { color: var(--muted); margin-bottom: 14px; }
.about-strip .sig {
  font-weight: 800;
  color: var(--navy);
  font-size: 1.05rem;
}
.about-strip .sig span { display: block; color: var(--teal); font-weight: 700; font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-soft) 60%, var(--teal) 130%);
  border-radius: 26px;
  padding: 52px 44px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.18);
  top: -120px;
  right: -80px;
}
.cta-band h2 { font-size: 1.9rem; margin-bottom: 12px; }
.cta-band p { opacity: 0.88; max-width: 560px; margin: 0 auto 26px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(180deg, #eef5ff, var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 62px 0 46px;
}
.page-hero .kicker {
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}
.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--navy);
  line-height: 1.2;
  margin: 8px 0 12px;
}
.page-hero p { color: var(--muted); max-width: 640px; }

/* ---------- Blog layout ---------- */
.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: start;
}

.sidebar .widget {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.sidebar .widget h3 {
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue-soft);
}
.sidebar .widget ul { list-style: none; }
.sidebar .widget li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink); font-weight: 600; }
.sidebar .widget a:hover { color: var(--blue); }
.sidebar .widget p { color: var(--muted); font-size: 0.95rem; }

.author-card { text-align: center; }
.author-card img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 12px;
  border: 3px solid var(--blue-soft);
}
.author-card b { color: var(--navy); display: block; }
.author-card span { color: var(--teal); font-size: 0.9rem; font-weight: 700; }

/* ---------- Single post article ---------- */
.article-wrap { padding: 56px 0 74px; }

.article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  padding: 46px 52px;
}

.article-header { margin-bottom: 34px; }
.article-header .chip {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.article-header h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  color: var(--navy);
  line-height: 1.22;
  margin-bottom: 18px;
}
.article-header .byline {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.article-header .byline img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--blue-soft);
}
.article-header .byline b { color: var(--navy); display: block; font-size: 0.98rem; }
.article-header .byline span { color: var(--muted); font-size: 0.88rem; }

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 22px;
}
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--blue); }

/* ---------- Prose ---------- */
.prose { font-size: 1.06rem; color: #33414f; }
.prose h2 {
  color: var(--navy);
  font-size: 1.55rem;
  line-height: 1.3;
  margin: 40px 0 14px;
  padding-left: 15px;
  border-left: 5px solid var(--amber);
}
.prose h3 {
  color: var(--navy-soft);
  font-size: 1.22rem;
  margin: 28px 0 10px;
}
.prose p { margin-bottom: 18px; }
.prose ul, .prose ol { margin: 0 0 20px 22px; }
.prose li { margin-bottom: 9px; }
.prose strong { color: var(--navy); }
.prose blockquote {
  background: var(--blue-soft);
  border-left: 5px solid var(--blue);
  border-radius: 0 14px 14px 0;
  padding: 18px 24px;
  margin: 26px 0;
  color: var(--navy);
  font-weight: 600;
  font-size: 1.08rem;
}
.prose .pull-quote {
  background: #fff8ec;
  border-left-color: var(--amber);
}
.prose a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(37, 99, 235, 0.35); text-underline-offset: 3px; }
.prose figure { margin: 26px 0; }
.prose figcaption { font-size: 0.88rem; color: var(--muted); text-align: center; margin-top: 8px; }
.prose hr { border: 0; border-top: 2px dashed var(--line); margin: 34px 0; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.tags a {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}
.tags a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* ---------- Author bio ---------- */
.author-bio {
  display: flex;
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, var(--blue-soft), #fff);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  margin-top: 40px;
}
.author-bio img { width: 92px; height: 92px; border-radius: 50%; flex-shrink: 0; }
.author-bio h3 { color: var(--navy); margin-bottom: 4px; }
.author-bio .role { color: var(--teal); font-weight: 800; font-size: 0.92rem; margin-bottom: 8px; }
.author-bio p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Post nav ---------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 34px;
}
.post-nav a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.post-nav a:hover { border-color: var(--blue); text-decoration: none; transform: translateY(-2px); }
.post-nav span { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.post-nav b { color: var(--navy); line-height: 1.35; }
.post-nav .next { text-align: right; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}
.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px;
  box-shadow: var(--shadow-sm);
}
.contact-form label { font-weight: 800; color: var(--navy); display: block; margin: 16px 0 7px; font-size: 0.95rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 15px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: #fbfcfe;
  transition: border-color 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--blue); outline: none; }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .btn { margin-top: 22px; width: 100%; justify-content: center; }

.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.info-card h3 { color: var(--navy); margin-bottom: 14px; }
.info-card ul { list-style: none; }
.info-card li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.info-card li:last-child { border-bottom: 0; }
.info-card li b { color: var(--navy); min-width: 86px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 58px 0 40px;
}
.site-footer h4 { color: #fff; font-size: 1.02rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; }
.site-footer li { padding: 5px 0; }
.site-footer a { color: rgba(255, 255, 255, 0.82); font-weight: 600; }
.site-footer a:hover { color: var(--amber); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { width: 42px; height: 42px; }
.footer-brand b { color: #fff; font-size: 1.25rem; }
.footer-brand em { font-style: normal; color: var(--amber); }
.site-footer p { font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; }
  .hero-visual img { max-width: 320px; }
  .card-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .about-strip { grid-template-columns: 1fr; gap: 30px; }
  .layout-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 22px 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 16px; }
  .card-grid, .feature-grid { grid-template-columns: 1fr; }
  .article { padding: 30px 24px; }
  .cta-band { padding: 40px 24px; }
  .author-bio { flex-direction: column; text-align: center; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 54px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Feature images ---------- */
.post-card .cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22,50,79,0.15) 0%, rgba(22,50,79,0.55) 100%);
}
.post-card .cover .chip { position: relative; z-index: 1; }

.article-hero { margin: 0 0 34px; }
.article-hero img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.article-hero figcaption { text-align: center; }

/* ---------- Blog 2-column grid ---------- */
.card-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) {
  .card-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .card-grid.two-col { grid-template-columns: 1fr; }
}
