/* AP Portfolio Studio: frontend
   Písmo sa dedí z témy (Nunito na ardanpreston.com). Všetko je v mennom priestore .apf */

.apf {
  --apf-ink: #0d0d0f;
  --apf-text: #5d6168;
  --apf-muted: #8b9097;
  --apf-line: rgba(13, 13, 15, 0.09);
  --apf-soft: #f4f4f5;
  --apf-paper: #ffffff;
  --apf-accent: #111111;
  --apf-accent-ink: #ffffff;
  --apf-radius: 22px;
  --apf-radius-lg: 30px;
  --apf-gutter: clamp(20px, 4vw, 48px);
  --apf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --apf-section: clamp(72px, 10vw, 140px);

  color: var(--apf-text);
  font-family: inherit;
  font-weight: 300;
  container-type: inline-size;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

.apf *,
.apf *::before,
.apf *::after {
  box-sizing: border-box;
}

/* Reset s nulovou špecifickosťou (:where),
aby ho triedy komponentov vždy prebili. */
.apf :where(h1,
h2,
h3,
p,
ul,
dl,
dd,
figure) {
  margin: 0;
  padding: 0;
}

.apf :where(ul) {
  list-style: none;
}

.apf :where(img,
video) {
  display: block;
  max-width: 100%;
}

.apf :where(a) {
  color: inherit;
  text-decoration: none;
  box-shadow: none;
}

.apf :where(button) {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.apf .apf-icon {
  flex: none;
  display: inline-block;
  vertical-align: middle;
}

.apf :focus-visible {
  outline: 2px solid var(--apf-ink);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Šírka obsahu: ak téma už má okraje,
nepridávame ďalšie. */
.apf .apf-wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: max(0px, calc(var(--apf-gutter) - (100cqw - 100%) / 2));
}

.apf .apf-wrap--wide {
  position: relative;
  left: 50%;
  translate: -50% 0;
  width: min(1520px, 100cqw);
  max-width: none;
  padding-inline: var(--apf-gutter);
}

.apf .apf-section {
  margin-top: var(--apf-section);
}

/* Odsadenie pre bočné menu témy na desktope (nastavuje sa v pluginu). */
@media (min-width: 1025px) {
  .apf.apf-case {
    padding-left: var(--apf-offset, 0px);
  }
}

/* ---------- Typografia ---------- */

.apf .apf-h2 {
  color: var(--apf-ink);
  font-size: clamp(1.75rem, 3.2vw, 2.625rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.apf .apf-h3 {
  color: inherit;
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.apf .apf-mini {
  display: block;
  color: var(--apf-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.apf .apf-num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--apf-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
}

.apf .apf-num::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.apf .apf-prose p + p {
  margin-top: 1em;
}

.apf .apf-prose p {
  font-size: 1.125rem;
  line-height: 1.7;
}

.apf .apf-prose--lead p {
  color: #2b2d31;
  font-size: clamp(1.1875rem, 1.7vw, 1.375rem);
  line-height: 1.6;
}

.apf .apf-prose--statement p {
  color: var(--apf-ink);
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* ---------- Hero ---------- */

.apf .apf-case__hero {
  padding-top: clamp(28px, 5vw, 64px);
}

.apf .apf-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 12px;
  border: 1px solid var(--apf-line);
  border-radius: 999px;
  color: var(--apf-ink);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.25s, border-color 0.25s;
}

.apf .apf-back:hover {
  background: var(--apf-soft);
  border-color: transparent;
}

.apf .apf-back .apf-icon {
  transition: translate 0.3s var(--apf-ease);
}

.apf .apf-back:hover .apf-icon {
  translate: -3px 0;
}

.apf .apf-case__heading {
  max-width: 980px;
  margin-top: clamp(40px, 7vw, 96px);
}

.apf .apf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--apf-text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.apf .apf-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--apf-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--apf-accent) 16%, transparent);
}

.apf .apf-case__title {
  color: var(--apf-ink);
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.apf .apf-case__lead {
  max-width: 44ch;
  margin-top: clamp(20px, 3vw, 32px);
  color: var(--apf-text);
  font-size: clamp(1.1875rem, 1.8vw, 1.4375rem);
  line-height: 1.55;
}

.apf .apf-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
  margin-top: clamp(40px, 6vw, 80px);
}

.apf .apf-fact {
  padding-top: 18px;
  border-top: 1px solid var(--apf-line);
}

.apf .apf-fact dt {
  margin-bottom: 8px;
  color: var(--apf-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.apf .apf-fact dd {
  color: var(--apf-ink);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.45;
}

.apf .apf-fact__list span:not(:last-child)::after {
  content: ", ";
}

.apf .apf-fact dd a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.35s var(--apf-ease);
}

.apf .apf-fact dd a:hover {
  background-size: 100% 1px;
}

/* ---------- Titulný vizuál ---------- */

.apf .apf-case__cover {
  position: relative;
  left: 50%;
  translate: -50% 0;
  width: min(1600px, calc(100cqw - 2 * var(--apf-gutter)));
  margin-top: clamp(40px, 6vw, 72px);
  overflow: hidden;
  border-radius: var(--apf-radius-lg);
  clip-path: inset(0 round var(--apf-radius-lg));
  isolation: isolate;
  background: var(--apf-soft);
  aspect-ratio: 16 / 9;
  max-height: 88vh;
}

.apf .apf-case__cover-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Dvojstĺpcové sekcie ---------- */

.apf .apf-split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
}

.apf .apf-split__label {
  position: sticky;
  top: 120px;
}

.apf .apf-split__body {
  max-width: 760px;
}

.apf .apf-brief {
  margin-top: clamp(36px, 5vw, 56px);
}

.apf .apf-tasks {
  margin-top: 14px;
}

.apf .apf-tasks li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--apf-line);
  color: var(--apf-ink);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
}

.apf .apf-tasks li .apf-icon {
  margin-top: 3px;
  color: var(--apf-muted);
}

/* ---------- Výzva a prístup ---------- */

.apf .apf-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.apf .apf-panel {
  padding: clamp(32px, 4.5vw, 56px);
  border-radius: var(--apf-radius-lg);
  background: var(--apf-soft);
  color: var(--apf-text);
}

.apf .apf-panel .apf-h3 {
  margin-bottom: 18px;
  color: var(--apf-ink);
}

.apf .apf-panel--approach {
  background: var(--apf-ink);
  color: rgba(255, 255, 255, 0.72);
}

.apf .apf-panel--approach .apf-h3 {
  color: #fff;
}

.apf .apf-panel--approach .apf-num {
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Čo sme dodali ---------- */

.apf .apf-section__head {
  margin-bottom: clamp(32px, 4vw, 56px);
}

.apf .apf-deliverables {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.apf .apf-deliverables--2,
.apf .apf-deliverables--4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.apf .apf-deliverable {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(28px, 3vw, 40px);
  border: 1px solid var(--apf-line);
  border-radius: var(--apf-radius);
  background: var(--apf-paper);
  transition: border-color 0.3s, box-shadow 0.4s var(--apf-ease), translate 0.4s var(--apf-ease);
}

.apf .apf-deliverable:hover {
  border-color: transparent;
  box-shadow: 0 24px 60px -28px rgba(13, 13, 15, 0.28);
  translate: 0 -4px;
}

.apf .apf-deliverable__index {
  margin-bottom: clamp(36px, 5vw, 64px);
  color: var(--apf-accent);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.apf .apf-deliverable__title {
  margin-bottom: 12px;
  color: var(--apf-ink);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.apf .apf-deliverable p {
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* ---------- Galéria ---------- */

.apf .apf-gallery {
  columns: 2;
  column-gap: clamp(12px, 1.6vw, 24px);
}

.apf .apf-gallery--single {
  columns: 1;
}

.apf .apf-gallery__item {
  position: relative;
  break-inside: avoid;
  margin-bottom: clamp(12px, 1.6vw, 24px);
  overflow: hidden;
  border-radius: var(--apf-radius);
  background: var(--apf-soft);
  aspect-ratio: var(--apf-ratio, 1.5);
}

.apf .apf-gallery__btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.apf .apf-gallery__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 1.1s var(--apf-ease);
}

.apf .apf-gallery__btn:hover .apf-gallery__media {
  scale: 1.035;
}

.apf .apf-gallery__open {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--apf-ink);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s;
}

.apf .apf-gallery__item:hover .apf-gallery__open,
.apf .apf-gallery__open:focus-visible {
  opacity: 1;
}

/* ---------- Vložené video ---------- */

.apf .apf-embed {
  position: relative;
  overflow: hidden;
  border-radius: var(--apf-radius-lg);
  clip-path: inset(0 round var(--apf-radius-lg));
  background: #000;
  aspect-ratio: 16 / 9;
}

.apf .apf-embed iframe,
.apf .apf-embed video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

/* ---------- Čísla ---------- */

.apf .apf-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 0;
  overflow: hidden;
  border-radius: var(--apf-radius-lg);
  background: var(--apf-accent);
  color: var(--apf-accent-ink);
}

.apf .apf-stat {
  padding: clamp(32px, 4vw, 52px);
  border-left: 1px solid color-mix(in srgb, var(--apf-accent-ink) 14%, transparent);
}

.apf .apf-stat:first-child {
  border-left: 0;
}

.apf .apf-stat__value {
  display: block;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

.apf .apf-stat__label {
  display: block;
  margin-top: 12px;
  font-size: 1rem;
  line-height: 1.45;
  opacity: 0.78;
}

/* ---------- Výsledok ---------- */

.apf .apf-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--apf-ink);
  color: var(--apf-ink);
  font-size: 1.0625rem;
  font-weight: 500;
}

.apf .apf-link .apf-icon {
  transition: translate 0.3s var(--apf-ease);
}

.apf .apf-link:hover .apf-icon {
  translate: 3px -3px;
}

/* ---------- CTA ---------- */

.apf .apf-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
  padding: clamp(36px, 6vw, 80px);
  border-radius: var(--apf-radius-lg);
  background: var(--apf-ink);
  color: rgba(255, 255, 255, 0.7);
}

.apf .apf-cta__title {
  margin-bottom: 10px;
  color: #fff;
  font-size: clamp(1.875rem, 4vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.apf .apf-cta p {
  max-width: 46ch;
  font-size: 1.125rem;
  line-height: 1.6;
}

.apf .apf-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  border-radius: 999px;
  background: #fff;
  color: var(--apf-ink);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  transition: scale 0.3s var(--apf-ease), box-shadow 0.3s;
}

.apf .apf-button:hover {
  scale: 1.03;
  box-shadow: 0 12px 32px -12px rgba(255, 255, 255, 0.45);
}

.apf .apf-button .apf-icon {
  transition: translate 0.3s var(--apf-ease);
}

.apf .apf-button:hover .apf-icon {
  translate: 4px 0;
}

/* ---------- Ďalší projekt ---------- */

.apf .apf-next {
  margin-top: clamp(40px, 6vw, 72px);
  margin-bottom: var(--apf-section);
}

.apf .apf-next__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--apf-line);
  border-bottom: 1px solid var(--apf-line);
}

.apf .apf-next__text {
  flex: 1;
  min-width: 0;
}

.apf .apf-next__title {
  display: block;
  margin-top: 8px;
  color: var(--apf-ink);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
  transition: translate 0.5s var(--apf-ease);
}

.apf .apf-next__media {
  width: clamp(120px, 18vw, 240px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  opacity: 0;
  scale: 0.92;
  transition: opacity 0.4s, scale 0.6s var(--apf-ease);
}

.apf .apf-next__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apf .apf-next__arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--apf-line);
  border-radius: 50%;
  color: var(--apf-ink);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.apf .apf-next__link:hover .apf-next__title {
  translate: 10px 0;
}

.apf .apf-next__link:hover .apf-next__media {
  opacity: 1;
  scale: 1;
}

.apf .apf-next__link:hover .apf-next__arrow {
  border-color: var(--apf-ink);
  background: var(--apf-ink);
  color: #fff;
}

/* ---------- Mriežka portfólia [ap_portfolio] ---------- */

.apf.apf-portfolio {
  width: 100%;
}

.apf .apf-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.apf .apf-chip {
  padding: 10px 18px;
  border: 1px solid var(--apf-line);
  border-radius: 999px;
  background: transparent;
  color: var(--apf-ink);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.apf .apf-chip:hover {
  border-color: rgba(13, 13, 15, 0.3);
}

.apf .apf-chip.is-active {
  border-color: var(--apf-ink);
  background: var(--apf-ink);
  color: #fff;
}

.apf .apf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(250px, 25vw, 360px);
  grid-auto-flow: dense;
  gap: clamp(20px, 2.4vw, 32px) clamp(16px, 2vw, 28px);
}

.apf.apf-portfolio--grid .apf-grid {
  grid-auto-rows: auto;
}

.apf.apf-portfolio--grid .apf-card__media {
  aspect-ratio: 4 / 3;
}

.apf .apf-card {
  display: block;
  min-width: 0;
  animation: apf-card-in 0.6s var(--apf-ease) both;
}

.apf .apf-card[hidden] {
  display: none;
}

.apf .apf-card--lg {
  grid-column: span 2;
  grid-row: span 2;
}

.apf .apf-card--wide {
  grid-column: span 2;
}

.apf .apf-card--full {
  grid-column: 1 / -1;
}

.apf .apf-card__link {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
}

.apf .apf-card__media {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--apf-radius);
  background: var(--apf-soft);
  isolation: isolate;
}

.apf .apf-card__img,
.apf .apf-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 1.1s var(--apf-ease), opacity 0.5s;
}

.apf .apf-card__video {
  opacity: 0;
}

.apf .apf-card.is-playing .apf-card__video {
  opacity: 1;
}

.apf .apf-card__link:hover .apf-card__img,
.apf .apf-card__link:hover .apf-card__video {
  scale: 1.04;
}

.apf .apf-card__arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--apf-ink);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.35);
  opacity: 0;
  scale: 0.7;
  transition: opacity 0.35s, scale 0.45s var(--apf-ease);
}

.apf .apf-card__link:hover .apf-card__arrow,
.apf .apf-card__link:focus-visible .apf-card__arrow {
  opacity: 1;
  scale: 1;
}

.apf .apf-card__body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding-top: 14px;
}

.apf .apf-card__title {
  color: var(--apf-ink);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.apf .apf-card--lg .apf-card__title {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
}

.apf .apf-card__meta {
  color: var(--apf-muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

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

.apf .apf-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(36px, 5vw, 64px);
}

.apf .apf-btn-more {
  padding: 16px 30px;
  border: 1px solid var(--apf-ink);
  border-radius: 999px;
  background: transparent;
  color: var(--apf-ink);
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.25s, color 0.25s;
}

.apf .apf-btn-more:hover {
  background: var(--apf-ink);
  color: #fff;
}

.apf .apf-btn-more[hidden],
.apf .apf-empty-msg[hidden] {
  display: none;
}

@keyframes apf-card-in {
  from {
    opacity: 0;
    translate: 0 18px;
  }
}

/* ---------- Lightbox ---------- */

.apf.apf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 64px);
  background: rgba(10, 10, 12, 0.94);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s;
}

.apf.apf-lightbox.is-open {
  opacity: 1;
}

.apf .apf-lightbox__stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.apf .apf-lightbox__stage img,
.apf .apf-lightbox__stage video {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: 14px;
  object-fit: contain;
}

.apf .apf-lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.25s;
}

.apf .apf-lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.apf .apf-lightbox__close {
  top: 20px;
  right: 20px;
}

.apf .apf-lightbox__prev {
  left: 20px;
  top: 50%;
  translate: 0 -50%;
}

.apf .apf-lightbox__next {
  right: 20px;
  top: 50%;
  translate: 0 -50%;
}

.apf .apf-lightbox__count {
  position: absolute;
  bottom: 22px;
  left: 50%;
  translate: -50% 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

html.apf-lock {
  overflow: hidden;
}

/* ---------- Animácie pri skrolovaní ---------- */

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .apf .apf-reveal:not(.is-in) {
    opacity: 0;
    translate: 0 26px;
  }

  .apf .apf-reveal {
    transition: opacity 0.9s var(--apf-ease), translate 0.9s var(--apf-ease);
    transition-delay: var(--apf-delay, 0ms);
  }

  .apf .apf-case__cover.apf-reveal {
    translate: -50% 0;
  }

  .apf .apf-case__cover.apf-reveal:not(.is-in) {
    translate: -50% 40px;
    scale: 0.985;
  }

  .apf .apf-case__cover.apf-reveal {
    transition: opacity 1.1s var(--apf-ease), translate 1.1s var(--apf-ease), scale 1.4s var(--apf-ease);
  }
}

@media (prefers-reduced-motion: reduce) {
  .apf *,
  .apf *::before,
  .apf *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Case studies ---------- */

.apf .apf-cs__title {
  color: var(--apf-ink);
  font-size: clamp(2.25rem, 6.4cqi, 4.75rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.apf .apf-cs-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.apf .apf-cs-summary--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.apf .apf-cs-summary--1 {
  grid-template-columns: 1fr;
}

.apf .apf-cs-summary__card {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3cqi, 48px);
  padding: clamp(26px, 3.2cqi, 44px);
  border-radius: var(--apf-radius-lg);
  background: var(--apf-soft);
}

.apf .apf-cs-summary__card p {
  color: var(--apf-ink);
  font-size: clamp(1.0625rem, 1.75cqi, 1.375rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.apf .apf-cs-summary__card--result {
  background: var(--apf-accent);
}

.apf .apf-cs-summary__card--result .apf-mini,
.apf .apf-cs-summary__card--result p {
  color: var(--apf-accent-ink);
}

.apf .apf-cs-summary__card--result .apf-mini {
  opacity: 0.75;
}

.apf .apf-cs-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.apf .apf-cs-steps > li {
  margin: 0;
  list-style: none;
}

.apf .apf-cs-steps--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.apf .apf-cs-steps--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.apf .apf-cs-step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--apf-line);
}

.apf .apf-cs-step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--apf-accent);
}

.apf .apf-cs-step__index {
  display: block;
  margin-bottom: clamp(20px, 3vw, 36px);
  color: var(--apf-accent);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.apf .apf-cs-step__title {
  margin-bottom: 12px;
  color: var(--apf-ink);
  font-size: 1.3125rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.apf .apf-cs-step p {
  font-size: 1.0625rem;
  line-height: 1.65;
}

.apf .apf-cs-blocks {
  display: grid;
  gap: clamp(48px, 7vw, 112px);
}

.apf .apf-cs-block {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}

.apf .apf-cs-block--flip {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.apf .apf-cs-block--flip .apf-cs-block__media {
  order: 2;
}

.apf .apf-cs-block--text {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

.apf .apf-cs-block__media {
  overflow: hidden;
  border-radius: var(--apf-radius-lg);
  background: var(--apf-soft);
  aspect-ratio: var(--apf-ratio, 1.3333);
}

.apf .apf-cs-block__index {
  display: block;
  margin-bottom: 18px;
  color: var(--apf-accent);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.apf .apf-cs-block__body .apf-h3 {
  margin-bottom: 16px;
  color: var(--apf-ink);
}

.apf .apf-cs-results {
  padding: clamp(36px, 6vw, 88px);
  border-radius: var(--apf-radius-lg);
  background: var(--apf-ink);
  color: rgba(255, 255, 255, 0.72);
}

.apf .apf-cs-results .apf-h2 {
  color: #fff;
}

.apf .apf-cs-results .apf-num {
  color: rgba(255, 255, 255, 0.55);
}

.apf .apf-cs-results__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 64px);
  margin-top: clamp(24px, 3vw, 40px);
}

.apf .apf-cs-results__list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.5;
}

.apf .apf-cs-results__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--apf-accent);
  color: var(--apf-accent-ink);
}

.apf .apf-cs-results__closing {
  max-width: 820px;
  margin-top: clamp(32px, 5vw, 64px);
}

.apf .apf-cs-results__closing p {
  color: #fff;
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.apf .apf-cs-results__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
}

.apf .apf-cs-results .apf-link {
  border-bottom-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.apf .apf-cs-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--apf-line);
  border-radius: var(--apf-radius-lg);
  transition: border-color 0.3s, box-shadow 0.4s var(--apf-ease);
}

.apf .apf-cs-banner:hover {
  border-color: transparent;
  box-shadow: 0 24px 60px -28px rgba(13, 13, 15, 0.28);
}

.apf .apf-cs-banner__title {
  display: block;
  margin-top: 10px;
  color: var(--apf-ink);
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.apf .apf-cs-banner__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--apf-btn, var(--apf-ink));
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.apf .apf-cs-banner__button .apf-icon {
  transition: translate 0.3s var(--apf-ease);
}

.apf .apf-cs-banner:hover .apf-cs-banner__button .apf-icon {
  translate: 4px 0;
}

/* Prehľad case studies */

.apf .apf-cs-archive__heading {
  max-width: 980px;
  margin-top: clamp(16px, 4vw, 48px);
}

.apf .apf-cs-list {
  display: grid;
  gap: clamp(56px, 8vw, 120px);
}

.apf .apf-cs-item {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.apf .apf-cs-item--flip {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.apf .apf-cs-item--flip .apf-cs-item__media {
  order: 2;
}

.apf .apf-cs-item__media {
  display: block;
  overflow: hidden;
  border-radius: var(--apf-radius-lg);
  background: var(--apf-soft);
  aspect-ratio: 4 / 3;
}

.apf .apf-cs-item__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 1.1s var(--apf-ease);
}

.apf .apf-cs-item:hover .apf-cs-item__img {
  scale: 1.035;
}

.apf .apf-cs-item__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--apf-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.apf .apf-cs-item__index {
  color: var(--apf-accent);
  font-weight: 700;
}

.apf .apf-cs-item__client {
  margin-top: 18px;
  color: var(--apf-ink);
  font-size: clamp(2rem, 5cqi, 3.75rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.apf .apf-cs-item__title {
  margin-top: 16px;
  color: var(--apf-ink);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  font-weight: 400;
  line-height: 1.45;
}

.apf .apf-cs-item__text {
  margin-top: 14px;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.apf .apf-cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.apf .apf-cs-tags li {
  padding: 7px 14px;
  border: 1px solid var(--apf-line);
  border-radius: 999px;
  color: var(--apf-ink);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
}

.apf .apf-cs-item__more {
  margin-top: 28px;
}

.apf .apf-cs-empty {
  font-size: 1.125rem;
}

/* ---------- Právne stránky ---------- */

.apf .apf-legal__heading {
  max-width: 900px;
  margin-top: clamp(16px, 4vw, 48px);
}

.apf .apf-legal__section {
  margin-top: clamp(32px, 5vw, 64px);
  margin-bottom: var(--apf-section);
}

.apf .apf-legal__body {
  max-width: 820px;
  color: var(--apf-text);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.apf .apf-legal__body > * + * {
  margin-top: 1em;
}

.apf .apf-legal__body .apf-legal__lead {
  color: #2b2d31;
  font-size: clamp(1.125rem, 1.6cqi, 1.3125rem);
  line-height: 1.6;
}

.apf .apf-legal__body .apf-legal__date {
  color: var(--apf-muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.apf .apf-legal__body h2 {
  margin: clamp(40px, 5vw, 64px) 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--apf-line);
  color: var(--apf-ink);
  font-size: clamp(1.375rem, 2.2cqi, 1.75rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.apf .apf-legal__body h3 {
  margin: 28px 0 8px;
  color: var(--apf-ink);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.35;
}

.apf .apf-legal__body ul {
  padding-left: 0;
  list-style: none;
}

.apf .apf-legal__body ul li {
  position: relative;
  padding-left: 22px;
}

.apf .apf-legal__body ul li + li {
  margin-top: 8px;
}

.apf .apf-legal__body ul li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apf-btn, var(--apf-ink));
}

.apf .apf-legal__body a {
  color: var(--apf-ink);
  text-decoration: underline;
  text-decoration-color: var(--apf-btn, currentColor);
  text-underline-offset: 3px;
}

.apf .apf-legal__body strong {
  color: var(--apf-ink);
  font-weight: 600;
}

.apf .apf-legal__box {
  padding: clamp(22px, 3cqi, 32px);
  border-radius: var(--apf-radius);
  background: var(--apf-soft);
}

.apf .apf-legal__box p + p {
  margin-top: 6px;
}

.apf .apf-legal__table {
  width: 100%;
  overflow-x: auto;
}

.apf .apf-legal__table table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.apf .apf-legal__table th,
.apf .apf-legal__table td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--apf-line);
  text-align: left;
  vertical-align: top;
}

.apf .apf-legal__table th {
  color: var(--apf-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.apf .apf-legal__table td:first-child {
  color: var(--apf-ink);
  font-weight: 500;
}

@media (max-width: 760px) {
  .apf .apf-legal__table table {
    min-width: 0;
  }

  .apf .apf-legal__table thead {
    display: none;
  }

  .apf .apf-legal__table table,
  .apf .apf-legal__table tbody,
  .apf .apf-legal__table tr,
  .apf .apf-legal__table td {
    display: block;
    width: 100%;
  }

  .apf .apf-legal__table tr {
    padding: 18px 0;
    border-bottom: 1px solid var(--apf-line);
  }

  .apf .apf-legal__table td {
    padding: 4px 0;
    border: 0;
  }

  .apf .apf-legal__table td:first-child {
    margin-bottom: 6px;
    font-size: 1.0625rem;
  }

  .apf .apf-legal__table td:not(:first-child)::before {
    content: attr(data-label) ": ";
    color: var(--apf-muted);
    font-weight: 600;
  }
}

/* Case studies podľa skutočnej šírky obsahu (téma má bočné menu). */
@container (max-width: 1100px) {
  .apf .apf-cs-steps,
  .apf .apf-cs-steps--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }
}

/* ---------- Responzivita ---------- */

@media (max-width: 1100px) {
  .apf .apf-cs-steps,
  .apf .apf-cs-steps--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apf .apf-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 24px;
  }

  .apf .apf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(240px, 36vw, 340px);
  }

  .apf .apf-card--lg {
    grid-column: span 2;
    grid-row: span 2;
  }

  .apf .apf-card--wide {
    grid-column: span 1;
  }

  .apf .apf-deliverables,
  .apf .apf-deliverables--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .apf .apf-cs-block,
  .apf .apf-cs-block--flip,
  .apf .apf-cs-item,
  .apf .apf-cs-item--flip {
    grid-template-columns: 1fr;
  }

  .apf .apf-cs-block--flip .apf-cs-block__media,
  .apf .apf-cs-item--flip .apf-cs-item__media {
    order: 0;
  }

  .apf .apf-cs-summary,
  .apf .apf-cs-summary--2 {
    grid-template-columns: 1fr;
  }

  .apf .apf-cs-results__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .apf .apf-cs-steps,
  .apf .apf-cs-steps--2,
  .apf .apf-cs-steps--3 {
    grid-template-columns: 1fr;
  }

  .apf .apf-split {
    grid-template-columns: 1fr;
  }

  .apf .apf-split__label {
    position: static;
  }

  .apf .apf-case__cover {
    aspect-ratio: 4 / 5;
    border-radius: var(--apf-radius);
    clip-path: inset(0 round var(--apf-radius));
  }

  .apf .apf-gallery {
    columns: 1;
  }

  .apf .apf-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .apf .apf-card--lg,
  .apf .apf-card--wide,
  .apf .apf-card--full {
    grid-column: auto;
    grid-row: auto;
  }

  .apf .apf-card__media {
    flex: none;
    aspect-ratio: 4 / 3;
  }

  .apf .apf-deliverables,
  .apf .apf-deliverables--2,
  .apf .apf-deliverables--4 {
    grid-template-columns: 1fr;
  }

  .apf .apf-stat {
    border-left: 0;
    border-top: 1px solid color-mix(in srgb, var(--apf-accent-ink) 14%, transparent);
  }

  .apf .apf-stat:first-child {
    border-top: 0;
  }

  .apf .apf-next__media {
    display: none;
  }

  .apf .apf-next__arrow {
    width: 52px;
    height: 52px;
  }

  .apf .apf-lightbox__prev,
  .apf .apf-lightbox__next {
    top: auto;
    bottom: 16px;
    translate: none;
  }
}
