/* Blog pages styled after MCLSS AI (app.mclssinc.com) */
:root {
  --background: #faf9fb;
  --foreground: #2a222b;
  --ink: #2a222b;
  --ink-foreground: #faf9fb;
  --muted: #f5f3f6;
  --muted-foreground: #837a85;
  --border: #e5e1e5;
  --accent: #b66dd5;
  --accent-strong: #9a4fbb;
  --body-text: #4a414c;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  overflow-x: hidden;
  background: var(--background);
  color: var(--body-text);
}

a {
  color: var(--accent-strong);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover,
a:active {
  color: var(--ink);
  outline: none;
  text-decoration: none;
}

a:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

p {
  padding: 0;
  margin: 0 0 30px 0;
  line-height: 1.7;
  font-size: 16px;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0;
  padding: 0;
}

h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 300;
  margin: 0;
  padding: 0;
}

/* Header */
#header {
  padding: 16px 0;
  min-height: 72px;
  position: relative;
  background: rgba(250, 249, 251, 0.92);
  border-bottom: 1px solid var(--border);
  z-index: 997;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

#logo {
  margin-left: 3.5rem;
  line-height: normal;
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
}

.brand:hover,
.brand:focus {
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--ink-foreground);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

#main-nav-menu {
  line-height: normal;
  margin-left: 3rem;
  flex: 1;
}

.nav-menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.nav-menu > li {
  position: relative;
  white-space: nowrap;
}

.nav-menu a {
  padding: 6px 10px;
  display: inline-block;
  color: var(--muted-foreground);
  font-weight: 500;
  text-transform: none;
  font-size: 14px;
  outline: none;
  position: relative;
}

.nav-menu a:hover {
  color: var(--ink);
}

.nav-menu > li > a:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent);
  visibility: hidden;
  transform: scaleX(0);
  transition: all 0.3s ease-in-out 0s;
}

.nav-menu a:hover:before,
.nav-menu li:hover > a:before {
  visibility: visible;
  transform: scaleX(1);
}

#phone-number {
  line-height: normal;
  margin-right: 3.5rem;
}

.phone-pill {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--ink-foreground);
  font-size: 14px;
  font-weight: 500;
}

.phone-pill:hover,
.phone-pill:focus {
  background: #3b313c;
  color: var(--ink-foreground);
}

/* Article */
#loan-servicing {
  background: var(--background);
  padding: 64px 0 88px;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header .section-title {
  font-size: clamp(1.75rem, 4vw, 3.6em);
  color: var(--ink);
  text-align: center;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  font-family: var(--font-serif);
}

.article-deck {
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 300;
  color: #5a505c;
  margin: 1.5rem auto 2rem;
  max-width: 48rem;
  line-height: 1.5;
  font-family: var(--font-sans);
}

.article-meta {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 14px;
  margin-bottom: 2.5rem;
}

.article-body {
  max-width: 42rem;
  margin: 0 auto;
  text-align: left;
  color: var(--body-text);
}

.article-body p {
  margin: 0 0 1.25rem;
  line-height: 1.7;
}

.article-body img {
  display: block;
  width: 100%;
  max-width: 450px;
  height: auto;
  margin: 1.5rem auto 2rem;
  border-radius: 12px;
}

.article-cta {
  max-width: 42rem;
  margin: 2.5rem auto 0;
  padding: 1.25rem 1.5rem;
  color: var(--body-text);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  text-decoration: underline;
  color: var(--ink);
}

.back-link:hover {
  color: var(--accent-strong);
}

/* Blog index */
.blog-index .blog-intro {
  width: 100%;
  max-width: none;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.blog-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  line-height: 1.4;
}

.blog-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 1rem;
}

.blog-lede {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.post {
  position: relative;
  display: flex;
  flex-direction: column;
}

.post-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 12px;
  background: var(--muted);
}

.post-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-body {
  padding-top: 1rem;
}

.post-date {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 13px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.post-title {
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.post-link {
  color: inherit;
}

.post-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
}

.post-deck {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post:hover .post-media img {
  transform: scale(1.03);
}

.post:hover .post-title,
.post:focus-within .post-title {
  color: var(--accent-strong);
}

.post-link:focus-visible {
  outline: none;
}

.post-link:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.post--featured {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.post--featured .post-body {
  padding-top: 0;
}

.post--featured .post-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.post--featured .post-deck {
  font-size: 1.0625rem;
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
  margin-bottom: 1.5rem;
}

.post-cta {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.post-cta-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.post--featured:hover .post-cta-arrow {
  transform: translateX(4px);
}

.post-list-heading {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0 0 1.5rem;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem 2rem;
}

@media (min-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .post--featured {
    grid-template-columns: 7fr 5fr;
    gap: 3rem;
    align-items: center;
  }

  .post-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-media img,
  .post-cta-arrow {
    transition: none;
  }
}

/* Footer */
#footer {
  background: var(--ink);
  padding: 56px 0 40px;
  color: var(--ink-foreground);
  font-size: 14px;
}

#footer a {
  color: var(--ink-foreground);
}

#footer a:hover {
  color: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.footer-grid h5 {
  font-weight: 300;
  margin: 0.35rem 0;
  font-size: 0.95rem;
  color: #cfc8d0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#footer .brand-mark {
  background: var(--ink-foreground);
  color: var(--ink);
  width: 24px;
  height: 24px;
  font-size: 13px;
  border-radius: 6px;
}

.copyright {
  text-align: left;
  padding: 1rem 2rem;
  color: #a9a2ab;
  font-size: 13px;
  background: #211a22;
}

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }

  .footer-grid {
    padding: 0 32px;
  }
}

@media (max-width: 1224px) {
  #main-nav-menu {
    display: none;
  }

  #logo {
    margin-left: 2rem;
  }

  #phone-number {
    margin-left: auto;
    margin-right: 2rem;
  }
}

@media (max-width: 640px) {
  #header {
    padding: 12px 0;
    min-height: 64px;
  }

  #logo {
    margin-left: 1.25rem;
  }

  #phone-number {
    margin-right: 1.25rem;
  }

  #loan-servicing {
    padding: 40px 0 64px;
  }

  .container,
  .footer-grid {
    padding: 0 20px;
  }
}
