/* Blog-only article layout. Colors, typography and shared controls inherit
   SaveAI's site-wide system from style.css. */
.blog-index .app-header-inner,
.blog-index .shell { max-width: 1280px; }

body.blog-index.lp section.page-hero {
  padding-top: 68px;
  padding-bottom: 54px;
  text-align: start;
  background: transparent;
}
.blog-index .page-hero .eyebrow {
  color: var(--brand); font-size: 12px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
}
.blog-index .page-hero h1 {
  margin: 18px 0 20px;
  font-family: inherit;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
  max-width: 900px;
}
.blog-index .page-hero .lead {
  margin: 0;
  max-width: 660px;
  color: var(--text-2);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
}
.blog-index .page-hero > p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px !important;
}
body.blog-index.lp section.blog-list {
  padding-top: 0;
  padding-bottom: 100px;
  background: var(--surface) !important;
  box-shadow: none !important;
  clip-path: none !important;
}
.blog-index-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 28px;
}
.blog-index-grid > article { min-width: 0; }
.blog-index-grid > article h2 { letter-spacing: -.025em; }
.blog-index-grid > article h2 a:hover { color: var(--brand) !important; }
.blog-index-grid > article > p:first-child {
  color: var(--text-muted);
  font-size: 12px !important;
  font-weight: 650;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.blog-index-grid time { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.blog-index-grid > article > p:not(:first-child) {
  color: var(--text-2);
  line-height: 1.65;
}
.blog-index-grid .blog-thumb {
  border-radius: var(--r-md);
  border-color: var(--border);
  background: var(--surface);
}
.blog-index-grid .blog-thumb img { transition-duration: .22s; }

.blog-index-grid > article:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(30px, 4.5vw, 76px);
  align-items: start;
  padding: 42px 0 70px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.blog-index-grid > article:first-child > .blog-thumb {
  grid-column: 1;
  grid-row: 1 / 4;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.blog-index-grid > article:first-child > .blog-thumb img {
  object-fit: contain;
  padding: clamp(12px, 2vw, 26px);
  background: #fff;
}
.blog-index-grid > article:first-child > p:first-child { grid-column: 2; grid-row: 1; margin: 4px 0 16px !important; }
.blog-index-grid > article:first-child > h2 {
  grid-column: 2;
  grid-row: 2;
  margin: 0 0 20px !important;
  font-family: inherit !important;
  font-size: clamp(30px, 3vw, 40px) !important;
  font-weight: 800 !important;
  line-height: 1.14 !important;
}
.blog-index-grid > article:first-child > p:not(:first-child) {
  grid-column: 2;
  grid-row: 3;
  font-size: 16px;
}
.blog-index-section-title {
  grid-column: 1 / -1;
  margin: 66px 0 30px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.blog-index-grid > article:nth-of-type(n+2):nth-of-type(-n+4) {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 0 54px;
  border-bottom: 1px solid var(--border);
}
.blog-index-grid > article:nth-of-type(n+2):nth-of-type(-n+4) > .blog-thumb {
  order: -2;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 18px;
}
.blog-index-grid > article:nth-of-type(n+2):nth-of-type(-n+4) > p:first-child { order: -1; margin-bottom: 10px !important; }
.blog-index-grid > article:nth-of-type(n+2):nth-of-type(-n+4) > h2 {
  margin: 0 0 10px !important;
  font-family: inherit !important;
  font-size: clamp(23px, 2.2vw, 27px) !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
}
.blog-index-grid > article:nth-of-type(n+2):nth-of-type(-n+4) > p:not(:first-child) { font-size: 14px; }

.blog-index-grid > article:nth-of-type(n+5) {
  grid-column: 1 / 9;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 4px 23px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}
.blog-index-grid > article:nth-of-type(5) { margin-top: 34px; border-top: 1px solid var(--border); }
.blog-index-grid > article:nth-of-type(n+5) > .blog-thumb {
  grid-column: 1;
  grid-row: 1 / 4;
  width: 100%;
  aspect-ratio: 16 / 10;
}
.blog-index-grid > article:nth-of-type(n+5) > p,
.blog-index-grid > article:nth-of-type(n+5) > h2 { grid-column: 2; }
.blog-index-grid > article:nth-of-type(n+5) > h2 {
  margin: 0 0 7px !important;
  font-family: inherit !important;
  font-size: clamp(21px, 2vw, 25px) !important;
  font-weight: 750 !important;
  line-height: 1.22 !important;
}
.blog-index-grid > article:nth-of-type(n+5) > p:not(:first-child) { font-size: 14px; }

.blog-index-aside {
  grid-column: 9 / -1;
  grid-row: 4 / span 5;
  align-self: start;
  min-width: 0;
  margin: 34px 0 0 12px;
  padding: 28px 0 0 28px;
  border-top: 1px solid var(--border);
  border-inline-start: 1px solid var(--border);
}
.blog-index-aside h3 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.blog-index-aside-inner > p { margin: 0 0 20px; color: var(--text-2); font-size: 14px; line-height: 1.65; }
.blog-index-aside-button {
  display: block;
  width: 100%;
  margin-bottom: 9px;
  padding: 11px 13px;
  border: 1px solid var(--brand);
  border-radius: var(--r-md);
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 1px 2px rgba(13,124,110,.18);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
.blog-index-aside-button:hover { border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-brand); }
.blog-index-aside-button.secondary { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-card); }
.blog-index-aside-button.secondary:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand-dark); }
.blog-index-topics { margin-top: 54px; }
.blog-index-topics > a {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.blog-index-topics > a::after { content: "↗"; float: inline-end; color: var(--text-muted); }
.blog-index-topics > a:hover,
.blog-index-topics > a:hover::after { color: var(--brand); }

.blog-index .footer { margin-top: 0; }

@media (max-width: 1000px) {
  .blog-index-grid > article:nth-of-type(n+5) { grid-column: 1 / 9; }
  .blog-index-aside { margin-inline-start: 0; padding-inline-start: 18px; }
}
@media (max-width: 860px) {
  .blog-index-grid > article:first-child { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .blog-index-grid > article:nth-of-type(n+2):nth-of-type(-n+4) { grid-column: span 6; }
  .blog-index-grid > article:nth-of-type(n+5) { grid-column: 1 / -1; }
  .blog-index-aside {
    grid-column: 1 / -1;
    grid-row: auto;
    margin: 36px 0 0;
    padding: 30px 0 0;
    border-inline-start: 0;
  }
  .blog-index-aside-inner { max-width: 560px; }
}
@media (max-width: 620px) {
  body.blog-index.lp section.page-hero { padding-top: 44px; padding-bottom: 38px; }
  .blog-index .page-hero h1 { font-size: clamp(39px, 10vw, 52px); }
  .blog-index-grid { column-gap: 0; }
  .blog-index-grid > article:first-child {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    padding: 28px 0 45px;
  }
  .blog-index-grid > article:first-child > .blog-thumb { grid-column: 1; grid-row: 1; aspect-ratio: 16 / 10; }
  .blog-index-grid > article:first-child > p:first-child { grid-column: 1; grid-row: 2; margin: 20px 0 12px !important; }
  .blog-index-grid > article:first-child > h2 { grid-column: 1; grid-row: 3; }
  .blog-index-grid > article:first-child > p:not(:first-child) { grid-column: 1; grid-row: 4; }
  .blog-index-section-title { margin-top: 48px; }
  .blog-index-grid > article:nth-of-type(n+2):nth-of-type(-n+4) { grid-column: 1 / -1; padding-bottom: 36px; margin-bottom: 32px; }
  .blog-index-grid > article:nth-of-type(n+2):nth-of-type(-n+4) > .blog-thumb { aspect-ratio: 16 / 9; }
  .blog-index-grid > article:nth-of-type(5) { margin-top: 0; }
  .blog-index-grid > article:nth-of-type(n+5) {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 3px 14px;
    padding: 22px 0;
  }
  .blog-index-grid > article:nth-of-type(n+5) > p:not(:first-child) { display: none; }
  .blog-index-grid > article:nth-of-type(n+5) > h2 { font-size: 20px !important; }
  .blog-index-aside { margin-top: 32px; }
  body.blog-index.lp section.blog-list { padding-bottom: 70px; }
}
@media (max-width: 390px) {
  .blog-index-grid > article:nth-of-type(n+5) { grid-template-columns: 96px minmax(0, 1fr); }
  .blog-index-grid > article:nth-of-type(n+5) > h2 { font-size: 18px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-index .blog-thumb img { transition: none; transform: none !important; }
}
