/* Blog index (blog.html) - built from the Figma frame "Blog — blog.html 2".
   Light page: centred hero (eyebrow + Poppins/Optima two-tone title + intro), featured-post carousel with progress bars,
   then "More stories": filter bar (category, ecosystem, search, sort) and a 3-column grid of post cards. */

.blog-page { background: var(--c-paper); color: var(--c-ink); }
.is-blog #site-header .wbs-navbar-center-2 { background-color: #211d1d; }   /* light page: the header sits on a solid dark bar, like the About page */

.blog-wrap { width: min(1200px, calc(100% - 80px)); margin: 0 auto; }

/* ---------- Hero ---------- */
.blog-hero { overflow-x: clip; padding: 200px 0 76px; text-align: center; border-bottom: 1px solid rgb(178 178 178 / .5); }
.blog-eyebrow { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--c-ink); }
.blog-title { margin: 6px auto 0; font-family: var(--f-body); font-weight: 400; font-size: 64px; line-height: 1.2; color: var(--c-ink); }
.blog-title em { font-style: normal; font-family: var(--f-display); font-weight: 600; font-size: 68px; line-height: 1; color: #aaaaa7; }
.blog-lead { width: min(792px, 100%); margin: 16px auto 0; font-size: 18px; line-height: 26px; color: #6f6b66; }

/* ---------- Featured carousel ---------- */
.blog-feat { margin-top: 64px; text-align: left; }
.blog-feat__track { position: relative; height: 620px; }
.blog-slide { position: absolute; inset: 0; display: grid; grid-template-columns: 544fr 654fr; overflow: hidden;
  background: var(--c-lime-tint); border: 1px solid rgb(178 178 178 / .5); border-radius: 20px;
  opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity .6s var(--ease-out, ease), transform .8s var(--ease-out, ease), visibility 0s .8s; }
.blog-slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .6s var(--ease-out, ease), transform .8s var(--ease-out, ease), visibility 0s; }
.blog-slide.is-leaving { transform: translateX(-24px); }
.blog-slide__text { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 56px; }
.blog-slide__title { max-width: 356px; font-family: var(--f-body); font-weight: 400; font-size: 32px; line-height: 40px; color: var(--c-ink); }
.blog-slide__title em { font-style: normal; font-family: var(--f-display); font-weight: 600; }
.blog-slide__meta { margin-top: 20px; font-size: 16px; line-height: 28px; color: var(--c-muted); }
.blog-slide__meta span { margin: 0 8px; }
.blog-slide__excerpt { max-width: 432px; font-size: 18px; line-height: 26px; color: #6f6b66; }
.blog-slide__cover { position: relative; overflow: hidden; }
.blog-slide__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out, ease); }
/* hover, same as the feature / portfolio cards on the home page: the picture zooms a little and the yellow Positiv mark slides in at the bottom right */
.blog-slide__cover::after { content: ""; position: absolute; right: 24px; bottom: 15px; width: 60px; height: 57px;   /* the mark sits 9px above the bottom of its 57px box, so 15px gives an even 24px gap to the right and bottom edges */
  pointer-events: none;
  background: url("../assets/logos/portfolio-hover-logo.svg") right center / 429px 57px no-repeat; opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .6s var(--ease-out, ease); }
.blog-slide:has(.blog-card__link):hover .blog-slide__cover img { transform: scale(1.06); }
.blog-slide:has(.blog-card__link):hover .blog-slide__cover::after { opacity: 1; transform: none; }

.blog-progress { display: flex; justify-content: center; gap: 16px; margin-top: 56px; }
.blog-progress button { position: relative; width: 120px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; }
.blog-progress button::before, .blog-progress button::after { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 2px; }
.blog-progress button::before { background: rgb(178 178 178 / .5); }
.blog-progress button::after { background: var(--c-ink); transform: scaleX(0); transform-origin: left; }
.blog-progress button.is-done::after { transform: scaleX(1); }
.blog-progress button.is-active::after { animation: blog-fill var(--slide-ms, 7000ms) linear forwards; }
.blog-feat.is-paused .blog-progress button.is-active::after { animation-play-state: paused; }
.blog-progress button:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; border-radius: 4px; }
@keyframes blog-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- More stories ---------- */
.blog-stories { padding: 80px 0 140px; }
.blog-stories__title { font-size: 24px; line-height: 48px; font-weight: 400; color: var(--c-ink); }

.blog-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 32px; }
.blog-bar__filters, .blog-bar__right { display: flex; align-items: center; }
.blog-bar__filters { gap: 48px; }
.blog-bar__right { gap: 24px; }

.blog-dd { position: relative; }
.blog-dd__btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; line-height: 26px; color: var(--c-ink); cursor: pointer; }
.blog-dd__btn svg { width: 16px; height: 16px; flex: none; transition: transform .2s ease; }   /* Phosphor caret-down, same as the header menu arrows */
.blog-dd.is-open .blog-dd__btn svg { transform: rotate(180deg); }
.blog-dd__btn .blog-dd__count { display: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--c-ink); color: var(--c-paper); font-size: 12px; line-height: 20px; text-align: center; }
.blog-dd.has-value .blog-dd__count { display: inline-block; }
/* Filter menus styled like the bar: light grey outline, rounded, 14px grey options; the selected one is the dark pill used by the Recent / Oldest toggle */
.blog-dd__menu { box-sizing: border-box; position: absolute; z-index: 20; top: calc(100% + 10px); left: 0; min-width: 230px; padding: 4px; margin: 0; list-style: none;
  display: flex; flex-direction: column; gap: 2px; background: var(--c-paper); border: 1px solid var(--c-muted-2); border-radius: 20px; box-shadow: 0 12px 32px rgb(33 29 29 / .08);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease, visibility 0s .2s; }
.blog-dd--right .blog-dd__menu { left: auto; right: 0; min-width: 180px; }
.blog-dd.is-open .blog-dd__menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
.blog-dd__menu button { display: flex; align-items: center; width: 100%; height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: none;
  font: inherit; font-size: 14px; line-height: 20px; color: var(--c-muted); text-align: left; white-space: nowrap; cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.blog-dd__menu button:hover, .blog-dd__menu button:focus-visible { color: var(--c-ink); outline: none; }
.blog-dd__menu button[aria-checked="true"] { background: var(--c-ink); color: #fff; }
.blog-dd__menu { max-height: min(70vh, 640px); overflow-y: auto; }
.blog-dd__menu .blog-dd__group { color: var(--c-ink); }
.blog-dd__menu .blog-dd__sub { height: 30px; padding-left: 32px; }
.blog-dd__menu li + li .blog-dd__group { margin-top: 6px; }
.blog-dd__menu .blog-dd__group[aria-checked="true"], .blog-dd__menu .blog-dd__sub[aria-checked="true"] { color: #fff; }

.blog-search { box-sizing: border-box; min-width: 0; display: flex; align-items: center; gap: 10px; width: 257px; height: 40px; padding: 0 20px; border: 1px solid var(--c-muted-2); border-radius: 999px; }
.blog-search svg { width: 18px; height: 18px; flex: none; color: var(--c-muted); }
.blog-search input { flex: 1; width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; font: inherit; font-size: 14px; color: var(--c-ink); }
.blog-search input::placeholder { color: var(--c-muted); opacity: 1; }
.blog-search input:focus, .blog-search input:focus-visible { outline: none; box-shadow: none; }   /* no glow or outline when the search field is clicked */

/* Recent / Oldest toggle: same height, outline and text size as the search field; dark pill slides to the active option */
.blog-seg { position: relative; box-sizing: border-box; display: grid; grid-template-columns: 1fr 1fr; height: 40px; padding: 3px; border: 1px solid var(--c-muted-2); border-radius: 999px; }
.blog-seg::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--c-ink); transition: transform .35s var(--ease-out, ease); }
.blog-seg[data-active="oldest"]::before { transform: translateX(100%); }
.blog-seg button { position: relative; z-index: 1; min-width: 84px; padding: 0 18px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 14px; line-height: 20px; color: var(--c-muted); cursor: pointer; transition: color .3s ease; }
.blog-seg button:hover { color: var(--c-ink); }
.blog-seg button[aria-checked="true"] { color: #fff; }
.blog-seg button:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.blog-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid rgb(33 29 29 / .08); border-radius: 16px; }
.blog-card[hidden] { display: none; }
.blog-card { position: relative; }
.blog-card__link { color: inherit; }
.blog-card__link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }   /* the whole card / slide opens the post */
.blog-card__cover { position: relative; aspect-ratio: 384 / 216; overflow: hidden; background: #e6e6e1; }
/* hover, same as the featured post and the home page cards: zoom + the yellow Positiv mark slides in at the bottom right (80% size, even 20px gap) */
.blog-card__cover::after { content: ""; position: absolute; right: 20px; bottom: 13px; width: 48px; height: 46px; pointer-events: none;
  background: url("../assets/logos/portfolio-hover-logo.svg") right center / 343px 46px no-repeat; opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .6s var(--ease-out, ease); }
.blog-card:has(.blog-card__link):hover .blog-card__cover::after { opacity: 1; transform: none; }
.blog-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out, ease); }
.blog-card:hover .blog-card__cover img { transform: scale(1.06); }   /* same zoom as the cards on the home page */
.blog-chips { position: absolute; z-index: 1; top: 16px; left: 16px; right: 16px; display: flex; flex-wrap: wrap; gap: 6px; }   /* topic + industry tags */
.blog-chip { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px;
  background: rgb(255 255 255 / .85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 12px; line-height: 16px; font-weight: 400; color: var(--c-ink); }
.blog-card__body { display: flex; flex-direction: column; gap: 8px; padding: 24px 24px 28px; }
.blog-card__date { font-size: 14px; line-height: 20px; color: #6f6b66; }
.blog-card__title { font-size: 18px; line-height: 26px; font-weight: 500; color: var(--c-ink); }
.blog-card__excerpt { font-size: 14px; line-height: 22px; color: #6f6b66; }

/* Pagination styled like the filter bar's Recent / Oldest toggle: 40px pill with a light grey outline, 14px grey numbers, the current page as the dark pill */
.blog-pages { box-sizing: border-box; display: flex; align-items: center; gap: 2px; width: fit-content; height: 40px; margin: 56px auto 0; padding: 3px;
  border: 1px solid var(--c-muted-2); border-radius: 999px; }
.blog-pages[hidden] { display: none; }
.blog-pages__num, .blog-pages__arrow { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 32px; padding: 0 12px; border: 0; border-radius: 999px;
  background: none; font: inherit; font-size: 14px; line-height: 20px; color: var(--c-muted); cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.blog-pages__num:hover, .blog-pages__arrow:hover { color: var(--c-ink); }
.blog-pages__num.is-active { background: var(--c-ink); color: #fff; cursor: default; }
.blog-pages__num:focus-visible, .blog-pages__arrow:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.blog-pages__arrow { padding: 0 10px; }
.blog-pages__arrow svg { width: 16px; height: 16px; }
.blog-pages__dot { width: 4px; height: 4px; margin: 0 4px; border-radius: 50%; background: var(--c-muted-2); }
.blog-empty { margin-top: 24px; padding: 64px 24px; text-align: center; border: 1px dashed rgb(178 178 178 / .7); border-radius: 16px; font-size: 18px; line-height: 28px; color: #6f6b66; }
.blog-empty button { margin-top: 8px; padding: 0; border: 0; background: none; font: inherit; color: var(--c-ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .blog-slide__text { padding: 44px; }
  .blog-bar { flex-wrap: wrap; }
}
/* phones: the filter menus open under the whole filter row, so a dropdown that sits near the right edge never pushes its menu past the screen */
@media (max-width: 575px) {
  .blog-bar__filters { position: relative; flex-wrap: wrap; width: 100%; }
  .blog-bar__filters .blog-dd { position: static; }
  .blog-bar__filters .blog-dd__menu { left: 0; right: auto; width: min(260px, 100%); min-width: 0; }
}
@media (max-width: 991px) {
  .blog-hero { padding: 150px 0 64px; }
  .blog-title { font-size: 48px; }
  .blog-title em { font-size: 52px; }
  .blog-feat__track { height: auto; display: grid; }
  .blog-slide { position: relative; grid-area: 1 / 1; grid-template-columns: 1fr; grid-template-rows: 320px auto; }
  .blog-slide__cover { grid-row: 1; }
  .blog-slide__text { grid-row: 2; padding: 32px; gap: 24px; }
  .blog-slide__title { max-width: none; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-bar__right { width: 100%; }
  .blog-search { flex: 1; width: auto; }
}
@media (max-width: 767px) {
  .blog-wrap { width: calc(100% - 40px); }
  .blog-hero { padding: 120px 0 48px; }
  .blog-eyebrow { font-size: 12px; }
  .blog-title { margin-top: 6px; font-size: 34px; line-height: 1.25; }
  .blog-title em { font-size: 37px; line-height: 1.1; }
  .blog-lead { font-size: 16px; line-height: 24px; }
  .blog-feat { margin-top: 40px; }
  .blog-slide { grid-template-rows: 220px auto; }
  .blog-slide__text { padding: 24px; }
  .blog-slide__title { font-size: 24px; line-height: 32px; }
  .blog-slide__excerpt { font-size: 16px; line-height: 24px; }
  .blog-progress { margin-top: 32px; gap: 10px; }
  .blog-progress button { width: 72px; }
  .blog-stories { padding: 56px 0 96px; }
  .blog-bar { margin-top: 24px; gap: 20px; }
  .blog-bar__filters { gap: 32px; }
  .blog-bar__right { flex-wrap: wrap; gap: 16px; }
  .blog-search { flex: 1 1 100%; }
  .blog-grid { grid-template-columns: 1fr; margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-slide, .blog-slide.is-active { transition: none; transform: none; }
  .blog-progress button.is-active::after { animation: none; transform: scaleX(1); }
  .blog-card__cover img, .blog-card__cover::after, .blog-slide__cover img, .blog-slide__cover::after { transition: none; }
}

/* Post card title (Nov 2026, after superside.com/blog): hovering anywhere on the card draws a 1px underline under the title, left to right,
   running on across every line of a wrapped title (the background is sliced across the lines). Keyboard focus shows it too. */
.blog-card__title .blog-card__link, .blog-card__t { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s cubic-bezier(.4, 0, .2, 1); }
.blog-card:hover .blog-card__title .blog-card__link, .blog-card:hover .blog-card__t, .blog-card__title .blog-card__link:focus-visible { background-size: 100% 1px; }
.blog-card__title .blog-card__link:focus-visible { outline: none; }
.blog-card:has(.blog-card__link:focus-visible) { outline: 2px solid var(--c-ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .blog-card__title .blog-card__link, .blog-card__t { transition: none; } }
/* the featured posts get the same title underline when the slide is hovered */
.blog-slide__title .blog-card__link { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s cubic-bezier(.4, 0, .2, 1); }
.blog-slide:hover .blog-slide__title .blog-card__link, .blog-slide:hover .blog-card__t, .blog-slide__title .blog-card__link:focus-visible { background-size: 100% 1px; }
@media (prefers-reduced-motion: reduce) { .blog-slide__title .blog-card__link { transition: none; } }
